@dcl/shop 1.0.2-31055297774.commit-b808071 → 1.0.2-31061952187.commit-8d8b09e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/_assets/{Activity-BGVAnqbp.js → Activity-D_fQdZon.js} +8 -8
- package/_assets/{AnimatedBackground-BacIzfr9.js → AnimatedBackground-C9W4RBcZ.js} +1 -1
- package/_assets/{Assets-Bs3sIn09.js → Assets-CvZql_4R.js} +10 -9
- package/_assets/{Assets.styles-CkO8eYMZ.js → Assets.styles-BBWJCcMx.js} +1 -1
- package/_assets/Authorizations-DVwQ95Ww.js +191 -0
- package/_assets/{Cart-CfbLgf8G.js → Cart-CBLHJRVj.js} +6 -6
- package/_assets/{CircularProgress-1YXgiQtT.js → CircularProgress-D09608yv.js} +1 -1
- package/_assets/{Collection-DKA_h7HO.js → Collection-DllncUVv.js} +10 -10
- package/_assets/{CollectionCarousel-COMBJtj4.js → CollectionCarousel-B9HmGuVb.js} +6 -6
- package/_assets/{Confetti-BSUE6v15.js → Confetti-Dl6FT7nL.js} +1 -1
- package/_assets/{Creator-Chfg4XCW.js → Creator-BreBnKPX.js} +5 -5
- package/_assets/{ErrorNotice-aOead5te.js → ErrorNotice-OUNK486K.js} +1 -1
- package/_assets/{ExchangeController-D9wO5y3j.js → ExchangeController-Cp3qbfAM.js} +1 -1
- package/_assets/{Faq-BUcIgNDP.js → Faq-DXtTtsuA.js} +1 -1
- package/_assets/{GetCredits-BLECOB-N.js → GetCredits-BhRNCaTG.js} +10 -10
- package/_assets/{Grow-zqUJtnL7.js → Grow-DXdR0gI9.js} +1 -1
- package/_assets/{HelpersUtil-BrmwLkkp.js → HelpersUtil-rQp5uDAx.js} +1 -1
- package/_assets/{ItemDetail-B2vKg-9Z.js → ItemDetail-clRbfaLQ.js} +241 -236
- package/_assets/LazyEmoteControls-B7UYn8xk.js +2 -0
- package/_assets/{LoadMore-Cy9OoEJz.js → LoadMore-jSNRJiwZ.js} +1 -1
- package/_assets/{ManaPricingBanner.styles-B9-hTa3D.js → ManaPricingBanner.styles-vDUAKLLe.js} +1 -1
- package/_assets/{MyAssets-CHgc1ZcI.js → MyAssets-CsWhc-qa.js} +4 -4
- package/_assets/{MyFavorites-DWo1mliw.js → MyFavorites-BLrz2vwY.js} +1 -1
- package/_assets/NotFound-DP4nosOd.js +17 -0
- package/_assets/{NotificationsBell-Cg5PqU4H.js → NotificationsBell-ARziPv8W.js} +1 -1
- package/_assets/OutfitDetail-CLmuEgB3.js +374 -0
- package/_assets/{OutfitPreview-IPt5zFQ2.js → OutfitPreview-PWdXvCaE.js} +2 -2
- package/_assets/OutfitStudio-Cx3Xm6ff.js +556 -0
- package/_assets/StoreSettings-BQtEgWRm.js +243 -0
- package/_assets/{Success-B_ZedKxN.js → Success-BWfI3_Mu.js} +1 -1
- package/_assets/{SwapController-DEl6q4-5.js → SwapController-Bf58lQ6b.js} +1 -1
- package/_assets/{Tooltip-CfAbMWhJ.js → Tooltip-BDmKiALz.js} +1 -1
- package/_assets/{TradeService-DCGCUpYo.js → TradeService-Yecm1OxI.js} +1 -1
- package/_assets/{W3MFrameProviderSingleton-BEUP6hLZ.js → W3MFrameProviderSingleton-BQyeyr-U.js} +3 -3
- package/_assets/{WebCryptoP256-2ShtCeVF.js → WebCryptoP256-Ou_F2OJp.js} +1 -1
- package/_assets/{authorizations-B17B7Njo.js → authorizations-B3AvOvOm.js} +1 -1
- package/_assets/{basic-Dr3bEQfu.js → basic-DTDRwam-.js} +1 -1
- package/_assets/{biconomy-3Y8X7VlC.js → biconomy-DaLi1O64.js} +1 -1
- package/_assets/{builder-jjuFCu3k.js → builder-DxumJmKw.js} +1 -1
- package/_assets/{buy-wdud8pnf.js → buy-BHkfYJLe.js} +1 -1
- package/_assets/{buy-gasless-DoSh-tFa.js → buy-gasless-BfTEWjT9.js} +1 -1
- package/_assets/{categories-DGIg36Oc.js → categories-D23W_J-A.js} +1 -1
- package/_assets/{ccip-BKrghWQj.js → ccip-DGVhZCZ4.js} +1 -1
- package/_assets/{ccip-CXCfMVYe.js → ccip-qhHiv1gU.js} +1 -1
- package/_assets/{collectionPage.styles-DwFPJPce.js → collectionPage.styles-CoEdrsfq.js} +3 -3
- package/_assets/{controller-DdgkWKgL.js → controller-DGtmLk4f.js} +2 -2
- package/_assets/{core-C8S2mN1s.js → core-BAqS3vu7.js} +4 -4
- package/_assets/{createSvgIcon-Cg8ZliIm.js → createSvgIcon-Bm9nxGqG.js} +2 -2
- package/_assets/{custom-X9wHG9wg.js → custom-MaGTnz7S.js} +1 -1
- package/_assets/{data-capture-BgPNXS18.js → data-capture-5Vi1cyBa.js} +1 -1
- package/_assets/{email-BGdZRw8p.js → email-BG6hRXMo.js} +1 -1
- package/_assets/{embedded-wallet-CqIU9APg.js → embedded-wallet-CfnknCH8.js} +1 -1
- package/_assets/{emotion-styled.browser.esm-DZbIWeAZ.js → emotion-styled.browser.esm-CoxAZUrJ.js} +1 -1
- package/_assets/{engine-CBG8_pF-.js → engine-nQGCV50K.js} +1 -1
- package/_assets/{errors-BruxKfZB.js → errors-DZ_QWsza.js} +1 -1
- package/_assets/{estimate-l1-fee-k3exg7PR.js → estimate-l1-fee-CVpJ9ym5.js} +1 -1
- package/_assets/{execute-RjH3kC63.js → execute-DFvUDrLY.js} +2 -2
- package/_assets/{features-BnDZm8if.js → features-BXUedULM.js} +1 -1
- package/_assets/{fetchTokenMetadata-CdUuHqIj.js → fetchTokenMetadata-CkQcnzmO.js} +2 -2
- package/_assets/{field.styles-l0zobCFG.js → field.styles-PE4ZasC2.js} +1 -1
- package/_assets/{get-ecosystem-wallet-info-DALoL3Hc.js → get-ecosystem-wallet-info-CRLH8I6C.js} +1 -1
- package/_assets/{getBalance-CefhuKko.js → getBalance-CiV48JsZ.js} +1 -1
- package/_assets/{getNFT-D-L5zgdP.js → getNFT-C3ucNb89.js} +1 -1
- package/_assets/{getNFT-nev9rcin.js → getNFT-CV3N9TTA.js} +1 -1
- package/_assets/{grid.styles-DhFwhKRo.js → grid.styles-hOZTJ80g.js} +1 -1
- package/_assets/{hashTypedData-BEKwcmlS.js → hashTypedData-BtF2J233.js} +1 -1
- package/_assets/{hashTypedData-li6aoa3o.js → hashTypedData-gTABcRB5.js} +1 -1
- package/_assets/{in-app-DUJu2O6v.js → in-app-CSDr4Blb.js} +1 -1
- package/_assets/{in-app-wallet-calls-C9Jxi05O.js → in-app-wallet-calls-Crivl9zc.js} +1 -1
- package/_assets/{index-CvPkDtGf.js → index-1oceTWwb.js} +3 -3
- package/_assets/{index-1--tLqz8.js → index-9_4ZEs3N.js} +1 -1
- package/_assets/{index-Dd4KtrAw.js → index-9x1mGBeU.js} +1 -1
- package/_assets/{index-CE124P9G.js → index-BBbwMaBz.js} +1 -1
- package/_assets/{index-d570G5B7.js → index-BNBzDf6z.js} +1 -1
- package/_assets/{index-dr6fXYBx.js → index-BTDIKmoC.js} +1 -1
- package/_assets/{index-CV1_E3wb.js → index-Bg_gOSx_.js} +1 -1
- package/_assets/{index-DU9MjygG.js → index-BniGBCAO.js} +1 -1
- package/_assets/{index-Dar3bPlr.js → index-Bs4LvV4K.js} +2 -2
- package/_assets/{index-ChBwA1h2.js → index-C0pcaEQl.js} +1 -1
- package/_assets/{index-CpjzOH1b.js → index-C23D_vyT.js} +1 -1
- package/_assets/{index-vQ65olfe.js → index-C5Evg5sh.js} +1 -1
- package/_assets/{index-3PUZ8U0R.js → index-C7hpB9s1.js} +3 -3
- package/_assets/{index-BAyG95nG.js → index-CGBg3yUz.js} +11 -11
- package/_assets/{index-DAnXL5-b.js → index-CHf7lsmp.js} +1 -1
- package/_assets/{index-CkF3QZy9.js → index-CHolIX6U.js} +1 -1
- package/_assets/{index-CTfBCyyR.js → index-CKUuopSw.js} +319 -315
- package/_assets/{index-CVqec2h5.js → index-CS27am7J.js} +1 -1
- package/_assets/{index-CFEHIoaL.js → index-Cf-gi-Qq.js} +1 -1
- package/_assets/{index-BwjISY1Q.js → index-CkGO7qOd.js} +1 -1
- package/_assets/{index-DecRfVMx.js → index-ClUPCoEW.js} +1 -1
- package/_assets/{index-DjqUHVKK.js → index-CmY0V0eX.js} +1 -1
- package/_assets/{index-syneNMGM.js → index-CvwosU6Y.js} +1 -1
- package/_assets/{index-5uftLGuI.js → index-CwRTjZPC.js} +3 -3
- package/_assets/{index-n49vue3k.js → index-CyRHowbs.js} +1 -1
- package/_assets/{index-JG0FDNiP.js → index-D5eMvKb_.js} +1 -1
- package/_assets/{index-BfqVu35d.js → index-D769FdFr.js} +1 -1
- package/_assets/{index-1wf8L6YU.js → index-D7LYoLo4.js} +1 -1
- package/_assets/{index-HaAGk4bQ.js → index-DKHMu0o3.js} +1 -1
- package/_assets/{index-AKUvJK7K.js → index-DKdQUEzy.js} +1 -1
- package/_assets/{index-Ctoo8CLR.js → index-DLFQdlEW.js} +1 -1
- package/_assets/{index-DrWim4p_.js → index-DSuiX4WG.js} +1 -1
- package/_assets/{index-DDLK5XSq.js → index-DXRL-4ld.js} +1 -1
- package/_assets/{index-1nKs4-Ix.js → index-DY1xBku2.js} +1 -1
- package/_assets/{index-z7leYudl.js → index-DdmULNRk.js} +2 -2
- package/_assets/{index-Bl-qZqD6.js → index-DgOiZShm.js} +1 -1
- package/_assets/{index-C2_mL_dX.js → index-Dh85kccn.js} +1 -1
- package/_assets/{index-WSwhnTRZ.js → index-DjTNPtj2.js} +1 -1
- package/_assets/{index-DXWzE47h.js → index-DkV5TYom.js} +1 -1
- package/_assets/{index-BlmfBcG1.js → index-DnJJn52L.js} +1 -1
- package/_assets/{index-Xuxrb8Q0.js → index-DoGz07sk.js} +1 -1
- package/_assets/{index-B2O7gZoQ.js → index-Dp2641E3.js} +1 -1
- package/_assets/{index-DWiRe-sp.js → index-DwX-9Zo4.js} +1 -1
- package/_assets/{index-3_UdO-zA.js → index-EKmmXx1j.js} +1 -1
- package/_assets/{index-DbrCcWJ3.js → index-HAEoS9R6.js} +1 -1
- package/_assets/{index-BXykQ7Kr.js → index-ItjVcw1b.js} +1 -1
- package/_assets/{index-zDqeLkyG.js → index-KWEbYeSY.js} +1 -1
- package/_assets/{index-C7AFAxAx.js → index-S0X-BG2b.js} +1 -1
- package/_assets/{index-BOgrc04A.js → index-UyXkCiLs.js} +1 -1
- package/_assets/{index-BBNLswz5.js → index-hKv-BpxY.js} +1 -1
- package/_assets/{index-DoVK9CTx.js → index-qGMuaBIs.js} +1 -1
- package/_assets/{index-D-wVNkf3.js → index-wRmEiTlP.js} +2 -2
- package/_assets/{index.es-CE2sG7i4.js → index.es-DnMGDxtr.js} +1 -1
- package/_assets/{index.es-DbgkC7jp.js → index.es-g_bB-nFv.js} +1 -1
- package/_assets/{index.es-yWYRmppU.js → index.es-wpL2Ycto.js} +4 -4
- package/_assets/{localBatchGatewayRequest-VK-lqBeb.js → localBatchGatewayRequest-DtELSHiE.js} +1 -1
- package/_assets/{networks-DlOv_Jl5.js → networks-ZmRqsvV6.js} +1 -1
- package/_assets/{onramp-15oxC79b.js → onramp-Bffl3qa3.js} +1 -1
- package/_assets/{openzeppelin-BpuVaBDh.js → openzeppelin-BmH-LNci.js} +1 -1
- package/_assets/{parseNft-D06uX5gG.js → parseNft-PSjb4qKi.js} +2 -2
- package/_assets/{parseSignature-CnSs3XPr.js → parseSignature-D947kFfv.js} +3 -3
- package/_assets/{parseSignature-DGgCDYUH.js → parseSignature-IigTmAp7.js} +1 -1
- package/_assets/{passkeys-B8jZMST_.js → passkeys-BsJVcpuM.js} +1 -1
- package/_assets/{pay-with-exchange-DzV0qz9m.js → pay-with-exchange-CU_HZd9F.js} +1 -1
- package/_assets/{qr-overlay-FhG6DCeK.js → qr-overlay-EMShc5uE.js} +1 -1
- package/_assets/{receive-Bf8iJtVw.js → receive-CO6WElZa.js} +1 -1
- package/_assets/{resolveImplementation-DdV3P3Xk.js → resolveImplementation-CUngPhAv.js} +1 -1
- package/_assets/{rpc-BZX60R_2.js → rpc-BqH_VMy9.js} +1 -1
- package/_assets/{secp256k1-ChfCRMNj.js → secp256k1-CTsmRKJj.js} +1 -1
- package/_assets/{secp256k1-BLNizqyz.js → secp256k1-D7kpLshE.js} +1 -1
- package/_assets/{secp256k1-BpFoXgJs.js → secp256k1-DneM3aYG.js} +1 -1
- package/_assets/{send-CE26RsoC.js → send-DnwW2LgN.js} +1 -1
- package/_assets/{send-batch-transaction-CdcLTVn2.js → send-batch-transaction-BgJnfEM8.js} +1 -1
- package/_assets/{send-eip712-transaction-DFbUyBnM.js → send-eip712-transaction-Cw3ykz5y.js} +2 -2
- package/_assets/{send-gasless-transaction-IULoS1Vn.js → send-gasless-transaction-BjGhnCwR.js} +2 -2
- package/_assets/{send-transaction-vCrIjEYg.js → send-transaction-COKVeGfk.js} +2 -2
- package/_assets/{sendMetaTransaction-C5CWJOs0.js → sendMetaTransaction-Bp3kwdLJ.js} +1 -1
- package/_assets/{sendRawTransaction-BnXA-t5g.js → sendRawTransaction-eVli2oE3.js} +3 -3
- package/_assets/{serializeTransaction-BuP136Wz.js → serializeTransaction-CIM9i_-w.js} +1 -1
- package/_assets/{session-proposal-CnATfxsE.js → session-proposal-KGl_Ah2b.js} +1 -1
- package/_assets/{session-request-PJjSNFhP.js → session-request-VAEXTksW.js} +2 -2
- package/_assets/{signing-DVSxcG9z.js → signing-Cgx49_1X.js} +3 -3
- package/_assets/{skeleton.styles-CLtTv572.js → skeleton.styles-BXNXDWEi.js} +1 -1
- package/_assets/{socials-Bf2bVkOp.js → socials-oKAOeF-k.js} +1 -1
- package/_assets/{styled-DUDTxrNz.js → styled-pD_2hanx.js} +1 -1
- package/_assets/{swaps-CfzGwDGN.js → swaps-BcAY_D99.js} +1 -1
- package/_assets/{thirdweb-fPfEaf4k.js → thirdweb-ChAqWFCO.js} +3 -3
- package/_assets/{to-serializable-transaction-DXr6jbkS.js → to-serializable-transaction-D9qGbcrS.js} +2 -2
- package/_assets/{transactionReceipt-eQP54mTE.js → transactionReceipt-BMw52z-f.js} +1 -1
- package/_assets/{transactions-CGh5C6RL.js → transactions-CeENvGIt.js} +1 -1
- package/_assets/{useCreditPacks-CasKnCD5.js → useCreditPacks-BcavayJ3.js} +1 -1
- package/_assets/{useImportable-SR1m5Hwh.js → useImportable-CqnIvzif.js} +1 -1
- package/_assets/{useInfiniteGrid-Cy1tipbK.js → useInfiniteGrid-BjEQAabI.js} +1 -1
- package/_assets/{useTheme-BvkrK9YA.js → useTheme-BnnteKI4.js} +1 -1
- package/_assets/{verifyHash-Bi_3pzoI.js → verifyHash-CuRmy06R.js} +1 -1
- package/_assets/{w3m-modal-DAkUUjAI.js → w3m-modal-BvOCJx7k.js} +1 -1
- package/_assets/{w3m-modal-D57uPD-0.js → w3m-modal-CkBFH4cA.js} +1 -1
- package/_assets/{wait-for-tx-receipt-ByVNtVUa.js → wait-for-tx-receipt-B2KaPYJT.js} +1 -1
- package/_assets/{wallets-DHJBT8N-.js → wallets-CpXU08d2.js} +5 -5
- package/_assets/{web-connector-zzH3rfgh.js → web-connector-BHRkWbB9.js} +3 -3
- package/_assets/{writeContract-BeuidFa5.js → writeContract-DNDGvg0r.js} +1 -1
- package/_assets/{zoraTestnet-D4oN56a_.js → zoraTestnet-CCn01jlp.js} +1 -1
- package/index.html +11 -11
- package/package.json +2 -2
- package/_assets/Authorizations-CLC0gP2S.js +0 -188
- package/_assets/LazyEmoteControls-DnvyzyyY.js +0 -2
- package/_assets/NotFound-CIGIbTGI.js +0 -13
- package/_assets/OutfitDetail-DF87HN6H.js +0 -334
- package/_assets/OutfitStudio-DHyzlXbm.js +0 -537
- package/_assets/StoreSettings-SFcLGWm7.js +0 -239
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import{r as d,j as t,L as F,d as Jt,a as Xt,b as Yt}from"./react-BYHuwl8r.js";import{s,t as lt,I as K,aG as Zt,b as e,z as ot,B as x,K as Ct,o as X,R as te,x as ee,A as It,v as Et,V as ie,$ as z,aH as V,aI as se,aJ as oe,aK as J,a4 as ae,a5 as re,a2 as ne,a3 as de,S as Lt,a8 as le,aL as at,aM as ue,aN as ce,aO as pe,E as N,aP as Rt,aQ as zt,aR as A,F as rt,aS as nt,aT as he,aU as fe,aV as xe,Z as me,aW as ge,aX as be,af as ye}from"./index-CKUuopSw.js";import{E as D}from"./ErrorNotice-OUNK486K.js";import{L as je}from"./LoadMore-jSNRJiwZ.js";import{u as ve}from"./useInfiniteGrid-BjEQAabI.js";import{O as we}from"./OutfitPreview-PWdXvCaE.js";import{T as $e}from"./skeleton.styles-BXNXDWEi.js";import"./dcl-schemas-CmtP3U6y.js";import"./sentry-Dx-KuLV3.js";import"./ethers-BDpbhgX6.js";import"./intl-CBcMB1D2.js";import"./disposePreview-5vjiqVZ0.js";const{colors:m,radius:Y,media:Se}=lt,ke=s.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
gap: 12px;
|
|
5
|
+
`,Te=s.div`
|
|
6
|
+
display: flex;
|
|
7
|
+
align-items: center;
|
|
8
|
+
gap: 8px;
|
|
9
|
+
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
10
|
+
border-radius: ${Y.pill};
|
|
11
|
+
padding: 0 14px;
|
|
12
|
+
height: 44px;
|
|
13
|
+
background: rgba(0, 0, 0, 0.25);
|
|
14
|
+
color: ${m.softWhite};
|
|
15
|
+
|
|
16
|
+
input {
|
|
17
|
+
flex: 1;
|
|
18
|
+
min-width: 0;
|
|
19
|
+
border: 0;
|
|
20
|
+
outline: 0;
|
|
21
|
+
background: none;
|
|
22
|
+
font: inherit;
|
|
23
|
+
color: ${m.softWhite};
|
|
24
|
+
}
|
|
25
|
+
input::placeholder {
|
|
26
|
+
color: ${m.muted2};
|
|
27
|
+
}
|
|
28
|
+
`,vt=s.p`
|
|
29
|
+
margin: 0;
|
|
30
|
+
font-size: 13px;
|
|
31
|
+
color: ${m.gray4};
|
|
32
|
+
`,Ce=s.div`
|
|
33
|
+
display: flex;
|
|
34
|
+
gap: 8px;
|
|
35
|
+
`,Ie=s.button`
|
|
36
|
+
min-height: 44px;
|
|
37
|
+
padding: 0 16px;
|
|
38
|
+
border-radius: ${Y.pill};
|
|
39
|
+
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
40
|
+
background: none;
|
|
41
|
+
font: inherit;
|
|
42
|
+
font-weight: 600;
|
|
43
|
+
color: ${m.softWhite};
|
|
44
|
+
cursor: pointer;
|
|
45
|
+
|
|
46
|
+
&[data-selected] {
|
|
47
|
+
border-color: ${m.softWhite};
|
|
48
|
+
background: ${m.softWhite};
|
|
49
|
+
color: ${m.text};
|
|
50
|
+
}
|
|
51
|
+
`,wt=s.div`
|
|
52
|
+
display: grid;
|
|
53
|
+
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
|
|
54
|
+
gap: 10px;
|
|
55
|
+
|
|
56
|
+
${Se.maxWidth("mobile")} {
|
|
57
|
+
grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
|
|
58
|
+
}
|
|
59
|
+
`,Ee=s.span`
|
|
60
|
+
height: 190px;
|
|
61
|
+
border-radius: ${Y.card};
|
|
62
|
+
`,Le=s.button`
|
|
63
|
+
position: relative;
|
|
64
|
+
display: flex;
|
|
65
|
+
flex-direction: column;
|
|
66
|
+
gap: 6px;
|
|
67
|
+
padding: 8px;
|
|
68
|
+
background: rgba(0, 0, 0, 0.4);
|
|
69
|
+
border: 1px solid transparent;
|
|
70
|
+
border-radius: ${Y.card};
|
|
71
|
+
text-align: left;
|
|
72
|
+
font: inherit;
|
|
73
|
+
color: ${m.softWhite};
|
|
74
|
+
cursor: pointer;
|
|
75
|
+
|
|
76
|
+
&:hover:not(:disabled) {
|
|
77
|
+
border-color: ${m.magenta};
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&[data-selected] {
|
|
81
|
+
border-color: ${m.softWhite};
|
|
82
|
+
box-shadow: 0 0 0 1px ${m.softWhite};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:disabled {
|
|
86
|
+
opacity: 0.5;
|
|
87
|
+
cursor: default;
|
|
88
|
+
}
|
|
89
|
+
`,Re=s.img`
|
|
90
|
+
width: 100%;
|
|
91
|
+
aspect-ratio: 1;
|
|
92
|
+
object-fit: cover;
|
|
93
|
+
border-radius: 8px;
|
|
94
|
+
background: ${m.media};
|
|
95
|
+
`,ze=s.span`
|
|
96
|
+
font-size: 13px;
|
|
97
|
+
font-weight: 600;
|
|
98
|
+
white-space: nowrap;
|
|
99
|
+
overflow: hidden;
|
|
100
|
+
text-overflow: ellipsis;
|
|
101
|
+
`,Pe=s.span`
|
|
102
|
+
display: inline-flex;
|
|
103
|
+
align-items: center;
|
|
104
|
+
gap: 4px;
|
|
105
|
+
font-size: 12px;
|
|
106
|
+
color: ${m.gray4};
|
|
107
|
+
`,We=s(K)`
|
|
108
|
+
position: absolute;
|
|
109
|
+
top: 12px;
|
|
110
|
+
right: 12px;
|
|
111
|
+
color: ${m.accent};
|
|
112
|
+
background: ${m.white};
|
|
113
|
+
border-radius: 50%;
|
|
114
|
+
`,Oe=[{key:"wearable",labelKey:"categories.wearables"},{key:"emote",labelKey:"categories.emotes"}];function Ae({selectedKeys:n,onPick:f,canPick:h}){const[c,y]=d.useState("wearable"),[j,b]=d.useState(""),[o,R]=d.useState("");d.useEffect(()=>{const l=setTimeout(()=>R(j.trim()),300);return()=>clearTimeout(l)},[j]);const{items:C,isLoading:I,isPlaceholderData:u,isError:k,hasNextPage:E,isFetchingNextPage:Z,fetchNextPage:S}=ve(["outfit-picker",c,o],l=>Zt({search:o||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,H=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(ke,{"data-testid":"outfit-picker",children:[t.jsx(Ce,{role:"group","aria-label":e("outfits.studio.pickerCategory"),"data-testid":"outfit-picker-category",children:Oe.map(({key:l,labelKey:v})=>t.jsx(Ie,{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(Te,{children:[t.jsx(K,{name:"search",color:lt.colors.muted}),t.jsx("input",{value:j,placeholder:g,"aria-label":g,onChange:l=>b(l.target.value),"data-testid":"outfit-picker-search"})]}),k?t.jsx(vt,{children:e("outfits.errors.generic")}):I||u?t.jsx(wt,{"aria-busy":"true",children:Array.from({length:8},(l,v)=>t.jsx(Ee,{className:"skeleton","aria-hidden":!0},v))}):H.length===0?t.jsx(vt,{children:e("outfits.studio.noResults")}):t.jsx(wt,{children:H.map(l=>{const v=`${l.contractAddress.toLowerCase()}-${l.itemId}`,M=n.has(v);return t.jsxs(Le,{type:"button","data-testid":"outfit-picker-item","data-selected":M||void 0,disabled:!M&&!h(l),onClick:()=>f(l),title:l.name,children:[t.jsx(Re,{src:l.thumbnail,alt:"",loading:"lazy"}),t.jsx(ze,{children:l.name}),t.jsxs(Pe,{children:[t.jsx(ot,{size:12}),l.priceCredits.toLocaleString()]}),M?t.jsx(We,{name:"check-rounded",size:18}):null]},v)})}),!k&&!I&&!u?t.jsx(je,{auto:!1,hasNextPage:!!E,isFetching:Z,onLoadMore:()=>void S()}):null]})}const{colors:r,radius:$,media:B,z:Fe}=lt,Pt=s.div`
|
|
115
|
+
max-width: 1200px;
|
|
116
|
+
margin: 0 auto;
|
|
117
|
+
display: flex;
|
|
118
|
+
flex-direction: column;
|
|
119
|
+
gap: 20px;
|
|
120
|
+
color: ${r.softWhite};
|
|
121
|
+
`,O=s.div`
|
|
122
|
+
min-height: 52vh;
|
|
123
|
+
display: flex;
|
|
124
|
+
flex-direction: column;
|
|
125
|
+
align-items: center;
|
|
126
|
+
justify-content: center;
|
|
127
|
+
text-align: center;
|
|
128
|
+
gap: 14px;
|
|
129
|
+
color: ${r.softWhite};
|
|
130
|
+
`,$t=s.h1`
|
|
131
|
+
font-size: 24px;
|
|
132
|
+
`,w=s.p`
|
|
133
|
+
margin: 0;
|
|
134
|
+
font-size: 13px;
|
|
135
|
+
color: ${r.gray4};
|
|
136
|
+
`,Wt=s.div`
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
gap: 12px;
|
|
140
|
+
`,Ot=s.h1`
|
|
141
|
+
font-size: 24px;
|
|
142
|
+
font-weight: 800;
|
|
143
|
+
margin-right: auto;
|
|
144
|
+
`,Ne=s(F)`
|
|
145
|
+
display: inline-flex;
|
|
146
|
+
align-items: center;
|
|
147
|
+
justify-content: center;
|
|
148
|
+
width: 44px;
|
|
149
|
+
height: 44px;
|
|
150
|
+
border-radius: 50%;
|
|
151
|
+
color: ${r.softWhite};
|
|
152
|
+
|
|
153
|
+
&:hover {
|
|
154
|
+
background: rgba(255, 255, 255, 0.14);
|
|
155
|
+
}
|
|
156
|
+
`,At=s.span`
|
|
157
|
+
font-size: 12px;
|
|
158
|
+
font-weight: 700;
|
|
159
|
+
text-transform: uppercase;
|
|
160
|
+
letter-spacing: 0.03em;
|
|
161
|
+
padding: 3px 10px;
|
|
162
|
+
border-radius: ${$.pill};
|
|
163
|
+
background: rgba(255, 255, 255, 0.16);
|
|
164
|
+
color: ${r.softWhite};
|
|
165
|
+
|
|
166
|
+
&[data-state='published'] {
|
|
167
|
+
background: rgba(30, 166, 114, 0.35);
|
|
168
|
+
color: ${r.white};
|
|
169
|
+
}
|
|
170
|
+
`,St=s.div`
|
|
171
|
+
display: flex;
|
|
172
|
+
flex-direction: column;
|
|
173
|
+
gap: 10px;
|
|
174
|
+
`,Be=s.span`
|
|
175
|
+
height: 76px;
|
|
176
|
+
border-radius: ${$.card};
|
|
177
|
+
`,He=s.div`
|
|
178
|
+
display: flex;
|
|
179
|
+
align-items: center;
|
|
180
|
+
gap: 14px;
|
|
181
|
+
padding: 12px;
|
|
182
|
+
background: rgba(0, 0, 0, 0.4);
|
|
183
|
+
border-radius: ${$.card};
|
|
184
|
+
|
|
185
|
+
${B.maxWidth("mobile")} {
|
|
186
|
+
flex-wrap: wrap;
|
|
187
|
+
}
|
|
188
|
+
`,Ft=Ct`
|
|
189
|
+
width: 52px;
|
|
190
|
+
height: 52px;
|
|
191
|
+
border-radius: 8px;
|
|
192
|
+
background: ${r.media};
|
|
193
|
+
flex-shrink: 0;
|
|
194
|
+
`,Me=s.div`
|
|
195
|
+
${Ft};
|
|
196
|
+
overflow: hidden;
|
|
197
|
+
|
|
198
|
+
img {
|
|
199
|
+
width: 100%;
|
|
200
|
+
height: 100%;
|
|
201
|
+
object-fit: cover;
|
|
202
|
+
display: block;
|
|
203
|
+
}
|
|
204
|
+
`,Ue=s.span`
|
|
205
|
+
${Ft};
|
|
206
|
+
display: inline-block;
|
|
207
|
+
`,De=s.div`
|
|
208
|
+
flex: 1;
|
|
209
|
+
min-width: 0;
|
|
210
|
+
display: flex;
|
|
211
|
+
flex-direction: column;
|
|
212
|
+
gap: 4px;
|
|
213
|
+
`,Ke=s.span`
|
|
214
|
+
font-size: 15px;
|
|
215
|
+
font-weight: 700;
|
|
216
|
+
white-space: nowrap;
|
|
217
|
+
overflow: hidden;
|
|
218
|
+
text-overflow: ellipsis;
|
|
219
|
+
`,_e=s.span`
|
|
220
|
+
display: inline-flex;
|
|
221
|
+
align-items: center;
|
|
222
|
+
gap: 8px;
|
|
223
|
+
font-size: 13px;
|
|
224
|
+
color: ${r.gray4};
|
|
225
|
+
`,Ge=s.div`
|
|
226
|
+
display: flex;
|
|
227
|
+
align-items: center;
|
|
228
|
+
gap: 8px;
|
|
229
|
+
|
|
230
|
+
${B.maxWidth("mobile")} {
|
|
231
|
+
width: 100%;
|
|
232
|
+
justify-content: flex-end;
|
|
233
|
+
}
|
|
234
|
+
`,qe=s.button`
|
|
235
|
+
display: inline-flex;
|
|
236
|
+
align-items: center;
|
|
237
|
+
justify-content: center;
|
|
238
|
+
width: 44px;
|
|
239
|
+
height: 44px;
|
|
240
|
+
border: 0;
|
|
241
|
+
background: none;
|
|
242
|
+
border-radius: 50%;
|
|
243
|
+
color: ${r.gray4};
|
|
244
|
+
cursor: pointer;
|
|
245
|
+
|
|
246
|
+
&:hover {
|
|
247
|
+
color: ${r.dclRed};
|
|
248
|
+
background: rgba(255, 255, 255, 0.14);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
&:disabled {
|
|
252
|
+
opacity: 0.5;
|
|
253
|
+
cursor: default;
|
|
254
|
+
}
|
|
255
|
+
`,Qe=s.div`
|
|
256
|
+
position: fixed;
|
|
257
|
+
inset: 0;
|
|
258
|
+
z-index: ${Fe.overlay};
|
|
259
|
+
display: grid;
|
|
260
|
+
place-items: center;
|
|
261
|
+
padding: 16px;
|
|
262
|
+
`,Ve=s.div`
|
|
263
|
+
position: absolute;
|
|
264
|
+
inset: 0;
|
|
265
|
+
background: rgba(22, 21, 24, 0.5);
|
|
266
|
+
`,Je=s.div`
|
|
267
|
+
position: relative;
|
|
268
|
+
background: ${r.bg};
|
|
269
|
+
border-radius: ${$.card};
|
|
270
|
+
padding: 24px;
|
|
271
|
+
max-width: 420px;
|
|
272
|
+
width: 100%;
|
|
273
|
+
display: flex;
|
|
274
|
+
flex-direction: column;
|
|
275
|
+
gap: 12px;
|
|
276
|
+
`,Xe=s.h2`
|
|
277
|
+
font-size: 18px;
|
|
278
|
+
font-weight: 800;
|
|
279
|
+
`,Ye=s.div`
|
|
280
|
+
display: flex;
|
|
281
|
+
flex-wrap: wrap;
|
|
282
|
+
gap: 10px;
|
|
283
|
+
margin-top: 6px;
|
|
284
|
+
`,Ze=s.div`
|
|
285
|
+
display: grid;
|
|
286
|
+
grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
|
|
287
|
+
gap: 32px;
|
|
288
|
+
align-items: start;
|
|
289
|
+
|
|
290
|
+
${B.maxWidth("mobile")} {
|
|
291
|
+
grid-template-columns: 1fr;
|
|
292
|
+
gap: 20px;
|
|
293
|
+
}
|
|
294
|
+
`,ti=s.div`
|
|
295
|
+
display: flex;
|
|
296
|
+
flex-direction: column;
|
|
297
|
+
gap: 18px;
|
|
298
|
+
`,ei=s.div`
|
|
299
|
+
display: flex;
|
|
300
|
+
flex-direction: column;
|
|
301
|
+
gap: 18px;
|
|
302
|
+
`,ii=s.div`
|
|
303
|
+
position: relative;
|
|
304
|
+
aspect-ratio: 3 / 4;
|
|
305
|
+
border-radius: 16px;
|
|
306
|
+
overflow: hidden;
|
|
307
|
+
background: ${r.media};
|
|
308
|
+
|
|
309
|
+
${B.maxWidth("mobile")} {
|
|
310
|
+
aspect-ratio: 1 / 1;
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
& iframe {
|
|
314
|
+
width: 100%;
|
|
315
|
+
height: 100%;
|
|
316
|
+
border: 0;
|
|
317
|
+
display: block;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
[data-preview-viewport] {
|
|
321
|
+
position: absolute;
|
|
322
|
+
inset: 0;
|
|
323
|
+
pointer-events: none;
|
|
324
|
+
}
|
|
325
|
+
`,si=s.p`
|
|
326
|
+
position: absolute;
|
|
327
|
+
inset: 0;
|
|
328
|
+
display: grid;
|
|
329
|
+
place-items: center;
|
|
330
|
+
padding: 24px;
|
|
331
|
+
text-align: center;
|
|
332
|
+
color: ${r.softWhite};
|
|
333
|
+
text-shadow: 0 1px 6px rgba(0, 0, 0, 0.45);
|
|
334
|
+
`,P=s.div`
|
|
335
|
+
display: flex;
|
|
336
|
+
flex-direction: column;
|
|
337
|
+
gap: 8px;
|
|
338
|
+
`,W=s.label`
|
|
339
|
+
font-size: 13px;
|
|
340
|
+
font-weight: 700;
|
|
341
|
+
letter-spacing: 0.04em;
|
|
342
|
+
text-transform: uppercase;
|
|
343
|
+
color: ${r.gray4};
|
|
344
|
+
`,oi=s.div`
|
|
345
|
+
display: flex;
|
|
346
|
+
gap: 8px;
|
|
347
|
+
`,ai=s.button`
|
|
348
|
+
min-height: 44px;
|
|
349
|
+
padding: 0 16px;
|
|
350
|
+
border-radius: ${$.pill};
|
|
351
|
+
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
352
|
+
background: none;
|
|
353
|
+
font: inherit;
|
|
354
|
+
font-weight: 600;
|
|
355
|
+
color: ${r.softWhite};
|
|
356
|
+
cursor: pointer;
|
|
357
|
+
|
|
358
|
+
&[data-selected] {
|
|
359
|
+
border-color: ${r.softWhite};
|
|
360
|
+
background: ${r.softWhite};
|
|
361
|
+
color: ${r.text};
|
|
362
|
+
}
|
|
363
|
+
`,ri=s.div`
|
|
364
|
+
width: 240px;
|
|
365
|
+
aspect-ratio: 3 / 4;
|
|
366
|
+
border-radius: ${$.card};
|
|
367
|
+
overflow: hidden;
|
|
368
|
+
background: ${r.media};
|
|
369
|
+
|
|
370
|
+
&[data-busy] {
|
|
371
|
+
opacity: 0.6;
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
img {
|
|
375
|
+
width: 100%;
|
|
376
|
+
height: 100%;
|
|
377
|
+
object-fit: cover;
|
|
378
|
+
display: block;
|
|
379
|
+
}
|
|
380
|
+
`,ni=s.div`
|
|
381
|
+
display: flex;
|
|
382
|
+
align-items: center;
|
|
383
|
+
gap: 12px;
|
|
384
|
+
flex-wrap: wrap;
|
|
385
|
+
`,di=s.div`
|
|
386
|
+
display: flex;
|
|
387
|
+
align-items: center;
|
|
388
|
+
gap: 8px;
|
|
389
|
+
`,li=s.input`
|
|
390
|
+
width: 44px;
|
|
391
|
+
height: 44px;
|
|
392
|
+
padding: 2px;
|
|
393
|
+
border: 1px solid ${r.lineStrong};
|
|
394
|
+
border-radius: ${$.btn};
|
|
395
|
+
background: none;
|
|
396
|
+
cursor: pointer;
|
|
397
|
+
|
|
398
|
+
&::-webkit-color-swatch-wrapper {
|
|
399
|
+
padding: 0;
|
|
400
|
+
}
|
|
401
|
+
&::-webkit-color-swatch {
|
|
402
|
+
border: 0;
|
|
403
|
+
border-radius: 4px;
|
|
404
|
+
}
|
|
405
|
+
`,ui=s.div`
|
|
406
|
+
display: flex;
|
|
407
|
+
flex-direction: column;
|
|
408
|
+
gap: 2px;
|
|
409
|
+
font-size: 12px;
|
|
410
|
+
color: ${r.gray4};
|
|
411
|
+
`,ci=s.input`
|
|
412
|
+
width: 88px;
|
|
413
|
+
height: 26px;
|
|
414
|
+
padding: 0 6px;
|
|
415
|
+
border: 1px solid ${r.lineStrong};
|
|
416
|
+
border-radius: ${$.chip};
|
|
417
|
+
background: ${r.white};
|
|
418
|
+
font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
|
|
419
|
+
font-size: 12px;
|
|
420
|
+
color: ${r.text};
|
|
421
|
+
text-transform: lowercase;
|
|
422
|
+
|
|
423
|
+
&[data-invalid] {
|
|
424
|
+
border-color: ${r.errStrong};
|
|
425
|
+
}
|
|
426
|
+
`,pi=s.div`
|
|
427
|
+
width: 281px;
|
|
428
|
+
max-width: 100%;
|
|
429
|
+
`,hi=s(x)`
|
|
430
|
+
align-self: flex-start;
|
|
431
|
+
`,fi=s.div`
|
|
432
|
+
display: flex;
|
|
433
|
+
align-items: stretch;
|
|
434
|
+
gap: 8px;
|
|
435
|
+
|
|
436
|
+
input {
|
|
437
|
+
flex: 1;
|
|
438
|
+
min-width: 0;
|
|
439
|
+
}
|
|
440
|
+
`,kt=s.input`
|
|
441
|
+
height: 44px;
|
|
442
|
+
padding: 0 14px;
|
|
443
|
+
border: 1px solid ${r.lineStrong};
|
|
444
|
+
border-radius: ${$.btn};
|
|
445
|
+
background: ${r.white};
|
|
446
|
+
font: inherit;
|
|
447
|
+
color: ${r.text};
|
|
448
|
+
|
|
449
|
+
&:focus {
|
|
450
|
+
outline: 2px solid ${r.accent};
|
|
451
|
+
outline-offset: -1px;
|
|
452
|
+
}
|
|
453
|
+
`,xi=s.ul`
|
|
454
|
+
list-style: none;
|
|
455
|
+
margin: 0;
|
|
456
|
+
padding: 0;
|
|
457
|
+
display: flex;
|
|
458
|
+
flex-direction: column;
|
|
459
|
+
gap: 6px;
|
|
460
|
+
`,mi=s.li`
|
|
461
|
+
display: flex;
|
|
462
|
+
align-items: center;
|
|
463
|
+
gap: 10px;
|
|
464
|
+
padding: 6px 8px;
|
|
465
|
+
background: rgba(0, 0, 0, 0.4);
|
|
466
|
+
border-radius: ${$.card};
|
|
467
|
+
|
|
468
|
+
${B.maxWidth("mobile")} {
|
|
469
|
+
flex-wrap: wrap;
|
|
470
|
+
}
|
|
471
|
+
|
|
472
|
+
&[data-missing] {
|
|
473
|
+
opacity: 0.6;
|
|
474
|
+
}
|
|
475
|
+
`,Nt=Ct`
|
|
476
|
+
width: 40px;
|
|
477
|
+
height: 40px;
|
|
478
|
+
border-radius: 8px;
|
|
479
|
+
background: ${r.media};
|
|
480
|
+
flex-shrink: 0;
|
|
481
|
+
`,gi=s.img`
|
|
482
|
+
${Nt};
|
|
483
|
+
object-fit: cover;
|
|
484
|
+
`,bi=s.span`
|
|
485
|
+
${Nt};
|
|
486
|
+
display: inline-block;
|
|
487
|
+
`,yi=s.span`
|
|
488
|
+
flex: 1;
|
|
489
|
+
min-width: 0;
|
|
490
|
+
font-size: 14px;
|
|
491
|
+
font-weight: 600;
|
|
492
|
+
white-space: nowrap;
|
|
493
|
+
overflow: hidden;
|
|
494
|
+
text-overflow: ellipsis;
|
|
495
|
+
`,ji=s.span`
|
|
496
|
+
flex: none;
|
|
497
|
+
padding: 2px 8px;
|
|
498
|
+
border-radius: ${$.pill};
|
|
499
|
+
border: 1px solid rgba(255, 255, 255, 0.45);
|
|
500
|
+
font-size: 11px;
|
|
501
|
+
font-weight: 600;
|
|
502
|
+
color: ${r.softWhite};
|
|
503
|
+
white-space: nowrap;
|
|
504
|
+
|
|
505
|
+
${B.maxWidth("mobile")} {
|
|
506
|
+
order: 1;
|
|
507
|
+
margin-left: 50px;
|
|
508
|
+
}
|
|
509
|
+
`,vi=s.span`
|
|
510
|
+
display: inline-flex;
|
|
511
|
+
align-items: center;
|
|
512
|
+
gap: 4px;
|
|
513
|
+
font-size: 13px;
|
|
514
|
+
color: ${r.gray4};
|
|
515
|
+
white-space: nowrap;
|
|
516
|
+
`,wi=s.div`
|
|
517
|
+
display: flex;
|
|
518
|
+
align-items: center;
|
|
519
|
+
justify-content: space-between;
|
|
520
|
+
padding-top: 10px;
|
|
521
|
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
522
|
+
font-size: 13px;
|
|
523
|
+
font-weight: 700;
|
|
524
|
+
`,$i=s.span`
|
|
525
|
+
display: inline-flex;
|
|
526
|
+
align-items: center;
|
|
527
|
+
gap: 4px;
|
|
528
|
+
font-size: 15px;
|
|
529
|
+
font-weight: 700;
|
|
530
|
+
`,Si=s.button`
|
|
531
|
+
display: inline-flex;
|
|
532
|
+
align-items: center;
|
|
533
|
+
justify-content: center;
|
|
534
|
+
width: 40px;
|
|
535
|
+
height: 40px;
|
|
536
|
+
border: 0;
|
|
537
|
+
background: none;
|
|
538
|
+
border-radius: 50%;
|
|
539
|
+
color: ${r.gray4};
|
|
540
|
+
cursor: pointer;
|
|
541
|
+
|
|
542
|
+
&:hover {
|
|
543
|
+
color: ${r.dclRed};
|
|
544
|
+
background: rgba(255, 255, 255, 0.14);
|
|
545
|
+
}
|
|
546
|
+
`,ki=s.div`
|
|
547
|
+
display: flex;
|
|
548
|
+
flex-direction: column;
|
|
549
|
+
gap: 8px;
|
|
550
|
+
padding-top: 16px;
|
|
551
|
+
border-top: 1px solid rgba(255, 255, 255, 0.3);
|
|
552
|
+
`,Ti=s.div`
|
|
553
|
+
display: flex;
|
|
554
|
+
flex-wrap: wrap;
|
|
555
|
+
gap: 10px;
|
|
556
|
+
`;function Ki(){const{id:n}=Jt(),{pathname:f}=Xt(),h=X(b=>b.session),c=X(b=>b.signIn),y=te();ee({title:e("outfits.studio.title"),noindex:!0});const j=f.endsWith("/new")?"new":n?"edit":"list";return y==="pending"?t.jsx(O,{"aria-busy":"true","data-testid":"outfit-studio-loading",children:t.jsx("span",{className:"spinner","aria-hidden":!0})}):h?y!=="creator"?t.jsxs(O,{"data-testid":"outfit-studio-unavailable",children:[t.jsx($t,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.notAvailable")}),t.jsx(x,{as:F,to:"/overview",variant:"white",children:e("outfits.studio.backToShop")})]}):j==="list"?t.jsx(Ii,{}):t.jsx(Ri,{outfitId:j==="edit"?n:null},n??"new"):t.jsxs(O,{"data-testid":"outfit-studio-signin",children:[t.jsx($t,{children:e("outfits.studio.title")}),t.jsx(w,{children:e("outfits.studio.signInPrompt")}),t.jsx(x,{variant:"white",onClick:()=>c(),children:e("outfits.studio.signIn")})]})}function Ci({outfit:n}){const f=Lt(n.thumbnailHash);return f?t.jsx(Me,{style:{background:ce(n)},children:t.jsx("img",{src:f,alt:"",loading:"lazy"})}):t.jsx(Ue,{"aria-hidden":!0})}function Ii(){const n=X(u=>u.session),f=It(),[h,c]=d.useState(null),[y,j]=d.useState(null),{data:b=[],isLoading:o,isError:R,refetch:C}=Et({queryKey:["outfits-all"],enabled:!!n,staleTime:3e4,queryFn:()=>be(n.identity)});async function I(u,k){if(n){j(u.id);try{k==="delete"?(await pe(u.id,n.identity),N.success(e("outfits.studio.deleted"))):(await Rt({...dt(u),published:!1},n.identity,"update"),N.success(e("outfits.studio.unpublished"))),zt(f)}catch(E){E instanceof A||rt(E,{flow:`outfit-${k}`}),N.error(e(E instanceof A?nt(E.code):"outfits.errors.generic"))}finally{j(null),c(null)}}}return t.jsxs(Pt,{"data-testid":"outfit-studio-list",children:[t.jsxs(Wt,{children:[t.jsx(Ot,{children:e("outfits.studio.myOutfits")}),t.jsx(x,{as:F,to:"/outfits/new",variant:"white","data-testid":"outfit-studio-new",children:e("outfits.studio.new")})]}),o?t.jsx(St,{"aria-busy":"true",children:Array.from({length:3},(u,k)=>t.jsx(Be,{className:"skeleton","aria-hidden":!0},k))}):R?t.jsxs(O,{children:[t.jsx(D,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void C(),children:e("outfits.detail.retry")})]}):b.length===0?t.jsx(w,{children:e("outfits.studio.empty")}):t.jsx(St,{children:b.map(u=>t.jsxs(He,{"data-testid":"outfit-studio-row","data-published":u.published||void 0,children:[t.jsx(Ci,{outfit:u}),t.jsxs(De,{children:[t.jsx(Ke,{children:u.name||e("outfits.studio.untitled")}),t.jsxs(_e,{children:[t.jsx(At,{"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(Ge,{children:[u.published?t.jsx(x,{as:F,to:`/items/outfits/${u.id}`,variant:"ghost",size:"sm",children:e("outfits.studio.view")}):null,t.jsx(x,{as:F,to:`/outfits/${u.id}/edit`,variant:"outline",size:"sm","data-testid":"outfit-studio-edit",children:e("outfits.studio.edit")}),t.jsx(qe,{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))}),h?t.jsxs(Qe,{role:"dialog","aria-modal":"true","aria-label":e("outfits.studio.deleteTitle"),"data-testid":"outfit-studio-confirm",children:[t.jsx(Ve,{onClick:()=>c(null)}),t.jsxs(Je,{children:[t.jsx(Xe,{children:e("outfits.studio.deleteTitle")}),t.jsx("p",{className:"muted",children:e("outfits.studio.deleteBody")}),t.jsxs(Ye,{children:[h.published?t.jsx(x,{variant:"purple","data-testid":"outfit-studio-confirm-unpublish",disabled:y===h.id,onClick:()=>void I(h,"unpublish"),children:e("outfits.studio.unpublish")}):null,t.jsx(x,{variant:h.published?"outline":"purple","data-testid":"outfit-studio-confirm-delete",disabled:y===h.id,onClick:()=>void I(h,"delete"),children:e("outfits.studio.confirmDelete")}),t.jsx(x,{variant:"ghost",onClick:()=>c(null),children:e("outfits.studio.cancel")})]})]})]}):null]})}const Tt=["image/png","image/jpeg","image/webp"];function Ei(){return{id:crypto.randomUUID(),name:"",thumbnailHash:"",items:[],bodyShape:"unisex",gradientFrom:at.from,gradientTo:at.to,published:!1}}function dt(n){return{id:n.id,name:n.name,thumbnailHash:n.thumbnailHash,items:n.items,bodyShape:n.bodyShape,gradientFrom:n.gradientFrom,gradientTo:n.gradientTo,published:n.published}}function Li(n){try{const f=sessionStorage.getItem(n);return f?JSON.parse(f):null}catch{return null}}function Ri({outfitId:n}){const f=n===null,h=`outfit-draft:${n??"new"}`,c=X(i=>i.session),y=It(),j=Yt(),[b]=d.useState(()=>Li(h)),[o,R]=d.useState(()=>b??(f?Ei():null)),[C,I]=d.useState(!!b),{data:u,isLoading:k,isError:E,refetch:Z}=Et({queryKey:["outfit",n,!0],enabled:!f&&!!c,staleTime:0,queryFn:()=>ye(n,c.identity)});d.useEffect(()=>{u&&R(i=>i??dt(u))},[u]);function S(i){R(a=>a&&{...a,...i}),I(!0)}d.useEffect(()=>{if(!(!o||!C))try{sessionStorage.setItem(h,JSON.stringify(o))}catch{}},[o,C,h]),d.useEffect(()=>{if(!C)return;const i=a=>a.preventDefault();return window.addEventListener("beforeunload",i),()=>window.removeEventListener("beforeunload",i)},[C]),d.useEffect(()=>()=>sessionStorage.removeItem(h),[h]);const g=ie(o??void 0),_=d.useMemo(()=>new Set(((o==null?void 0:o.items)??[]).map(z)),[o]),H=i=>ge((o==null?void 0:o.items)??[],i,g.byKey),l=i=>!!i.itemId&&H(i).length<=J;function v(i){!o||!l(i)||S({items:H(i)})}const[M,ut]=d.useState(null),L=d.useRef(null),tt=d.useRef(!0);d.useEffect(()=>(tt.current=!0,()=>{tt.current=!1}),[]);const[G,ct]=d.useState(!1),[Bt,q]=d.useState(null),[et,pt]=d.useState(""),[Ht,ht]=d.useState(null),[T,Mt]=d.useState();d.useEffect(()=>()=>{L.current&&URL.revokeObjectURL(L.current)},[]);function ft(){const i=xe(et);if(!i){ht(e("outfits.studio.importError"));return}ht(null),pt(""),Mt(i.colors),S({items:i.items,...i.bodyShape?{bodyShape:i.bodyShape}:{}}),N.success(e("outfits.studio.importSuccess",{count:i.items.length}))}async function Ut(i){if(!i||!c)return;if(q(null),!Tt.includes(i.type)){q(e("outfits.errors.unsupportedType"));return}if(i.size>he){q(e("outfits.errors.tooLarge"));return}L.current&&URL.revokeObjectURL(L.current);const a=URL.createObjectURL(i);L.current=a,ut(a),ct(!0);try{const p=await fe(i,c.identity);S({thumbnailHash:p})}catch(p){p instanceof A||rt(p,{flow:"outfit-thumbnail"}),q(e(p instanceof A?nt(p.code):"outfits.errors.generic")),L.current&&(URL.revokeObjectURL(L.current),L.current=null),ut(null)}finally{ct(!1)}}const[U,xt]=d.useState(!1),[Dt,mt]=d.useState(null),it=!!o&&o.name.trim().length>0&&o.name.length<=60,Kt=!!o&&V(o.gradientFrom)&&V(o.gradientTo),gt=!!o&&o.items.some(i=>{const a=g.byKey.get(z(i));return!a||se(a)}),bt=!!o&&it&&!!o.thumbnailHash&&Kt&>&&o.items.length>=oe&&o.items.length<=J;async function st(i){if(!(!c||!o||U)){xt(!0),mt(null);try{const a=await Rt({...o,published:i},c.identity,f?"create":"update");if(!tt.current)return;sessionStorage.removeItem(h),R(dt(a)),I(!1),zt(y),i&&!o.published?(me("Shop Outfit Published",{outfit_id:a.id,item_count:a.items.length}),N.success(e("outfits.studio.publishedToast"))):N.success(e("outfits.studio.saved")),f&&(y.setQueryData(["outfit",a.id,!0],a),j(`/outfits/${a.id}/edit`,{replace:!0}))}catch(a){a instanceof A||rt(a,{flow:"outfit-save"}),mt(e(a instanceof A?nt(a.code):"outfits.errors.generic"))}finally{xt(!1)}}}const Q=d.useMemo(()=>((o==null?void 0:o.items)??[]).map(i=>g.byKey.get(z(i))).filter(i=>!!i),[o,g.byKey]),yt=d.useMemo(()=>ae(Q),[Q]),_t=d.useMemo(()=>{const i=re(Q);return i!=null&&i.itemId?z({contractAddress:i.contractAddress,itemId:i.itemId}):null},[Q]),Gt=(o==null?void 0:o.bodyShape)==="female"?ne:(o==null?void 0:o.bodyShape)==="male"?de:void 0;if(!c)return null;if(!o)return E?t.jsxs(O,{children:[t.jsx(D,{message:e("outfits.errors.generic")}),t.jsx(x,{variant:"white",onClick:()=>void Z(),children:e("outfits.detail.retry")})]}):!k&&u===null?t.jsxs(O,{"data-testid":"outfit-studio-missing",children:[t.jsx(w,{children:e("outfits.errors.notFound")}),t.jsx(x,{as:F,to:"/outfits/manage",variant:"white",children:e("outfits.studio.myOutfits")})]}):t.jsx(O,{"aria-busy":"true",children:t.jsx("span",{className:"spinner","aria-hidden":!0})});const jt=M??Lt(o.thumbnailHash),qt={...o,authorAddress:(c==null?void 0:c.address)??"",createdAt:0,updatedAt:0},Qt=o.items.reduce((i,a)=>{var p;return i+(((p=g.byKey.get(z(a)))==null?void 0:p.priceCredits)??0)},0);return t.jsxs(Pt,{"data-testid":"outfit-studio-editor",children:[t.jsxs(Wt,{children:[t.jsx(Ne,{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(Ot,{children:f?e("outfits.studio.new"):e("outfits.studio.editTitle")}),t.jsx(At,{"data-state":o.published?"published":"draft",children:o.published?e("outfits.studio.publishedState"):e("outfits.studio.draft")})]}),t.jsxs(Ze,{children:[t.jsxs(ti,{children:[t.jsxs(ii,{"data-testid":"outfit-studio-preview",style:{background:le(o)},children:[t.jsx(we,{id:"outfit-studio-preview-frame",profile:"default",bodyShape:Gt,urns:yt,skin:T==null?void 0:T.skin,hair:T==null?void 0:T.hair,eyes:T==null?void 0:T.eyes,enabled:!g.isLoading}),yt.length===0&&!g.isLoading?t.jsx(si,{children:e("outfits.studio.previewEmpty")}):null]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.bodyShape")}),t.jsx(oi,{role:"group","aria-label":e("outfits.studio.bodyShape"),children:["unisex","male","female"].map(i=>t.jsx(ai,{type:"button","data-selected":o.bodyShape===i||void 0,onClick:()=>S({bodyShape:i}),children:e(`outfits.studio.shape.${i}`)},i))})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.gradient")}),t.jsx(ni,{children:["gradientFrom","gradientTo"].map(i=>t.jsxs(di,{children:[t.jsx(li,{type:"color",value:V(o[i])?o[i]:at.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:a=>S({[i]:a.target.value.toLowerCase()})}),t.jsxs(ui,{children:[t.jsx("span",{children:e(i==="gradientFrom"?"outfits.studio.gradientTop":"outfits.studio.gradientBottom")}),t.jsx(ci,{value:o[i],maxLength:7,spellCheck:!1,placeholder:"#000000","aria-label":e(i==="gradientFrom"?"outfits.studio.gradientTopHex":"outfits.studio.gradientBottomHex"),"data-invalid":!V(o[i])||void 0,onChange:a=>{const p=a.target.value.trim().toLowerCase();S({[i]:p.startsWith("#")||p===""?p:`#${p}`})}})]})]},i))}),t.jsx(w,{children:e("outfits.studio.gradientHint")})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.thumbnail")}),jt?t.jsx(ri,{"data-busy":G||void 0,children:t.jsx("img",{src:jt,alt:""})}):null,t.jsxs(hi,{as:"label",variant:"outline",size:"sm","data-busy":G||void 0,children:[G?e("outfits.studio.uploading"):e("outfits.studio.upload"),t.jsx("input",{type:"file",accept:Tt.join(","),hidden:!0,disabled:G,onChange:i=>{var a;return void Ut((a=i.target.files)==null?void 0:a[0])},"data-testid":"outfit-studio-thumb-input"})]}),t.jsx(w,{children:e("outfits.studio.thumbnailHint")}),t.jsx(D,{message:Bt,testId:"outfit-studio-thumb-error"})]}),t.jsxs(P,{children:[t.jsx(W,{as:"span",children:e("outfits.studio.cardPreview")}),t.jsx(pi,{"data-testid":"outfit-studio-card-preview",onClickCapture:i=>{i.preventDefault(),i.stopPropagation()},children:t.jsx(ue,{outfit:qt,resolution:g})})]})]}),t.jsxs(ei,{children:[t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-import",children:e("outfits.studio.import")}),t.jsxs(fi,{children:[t.jsx(kt,{id:"outfit-import",value:et,spellCheck:!1,placeholder:e("outfits.studio.importPlaceholder"),onChange:i=>pt(i.target.value),onKeyDown:i=>{i.key==="Enter"&&ft()},"data-testid":"outfit-studio-import"}),t.jsx(x,{variant:"outline",size:"sm",onClick:ft,disabled:et.trim()==="","data-testid":"outfit-studio-import-apply",children:e("outfits.studio.importApply")})]}),t.jsx(w,{children:e("outfits.studio.importHint")}),t.jsx(D,{message:Ht,testId:"outfit-studio-import-error"})]}),t.jsxs(P,{children:[t.jsx(W,{htmlFor:"outfit-name",children:e("outfits.studio.name")}),t.jsx(kt,{id:"outfit-name",value:o.name,maxLength:60,placeholder:e("outfits.studio.namePlaceholder"),onChange:i=>S({name:i.target.value}),"data-testid":"outfit-studio-name"})]}),t.jsxs(P,{children:[t.jsxs(W,{as:"span",children:[e("outfits.studio.items")," (",o.items.length,"/",J,")"]}),o.items.length===0?t.jsx(w,{children:e("outfits.studio.noItems")}):t.jsx(xi,{children:o.items.map(i=>{const a=z(i),p=g.byKey.get(a);return t.jsxs(mi,{"data-testid":"outfit-studio-selected","data-missing":!p||void 0,children:[p?t.jsx(gi,{src:p.thumbnail,alt:""}):t.jsx(bi,{className:g.isLoading?"skeleton":void 0,"aria-hidden":!0}),t.jsx(yi,{className:p?void 0:"muted",children:p?p.name:g.isLoading?t.jsx($e,{className:"skeleton",width:96,"aria-hidden":!0}):e("outfits.card.unavailable")}),a===_t?t.jsx(ji,{"data-testid":"outfit-studio-plays-in-preview",children:e("outfits.studio.playsInPreview")}):null,p?t.jsxs(vi,{children:[t.jsx(ot,{size:12}),p.priceCredits.toLocaleString()]}):null,t.jsx(Si,{type:"button","aria-label":e("outfits.studio.remove"),title:e("outfits.studio.remove"),onClick:()=>S({items:o.items.filter(Vt=>z(Vt)!==a)}),children:t.jsx(K,{name:"trash",size:16})})]},a)})}),o.items.length>0?t.jsxs(wi,{"data-testid":"outfit-studio-total",children:[t.jsx("span",{children:e("outfits.detail.totalPrice")}),t.jsxs($i,{children:[t.jsx(ot,{size:14}),Qt.toLocaleString()]})]}):null,o.items.length>=J?t.jsx(w,{children:e("outfits.studio.maxItems")}):null]}),t.jsx(Ae,{selectedKeys:_,onPick:v,canPick:l})]})]}),t.jsxs(ki,{"data-testid":"outfit-studio-savebar",children:[t.jsx(D,{message:Dt,testId:"outfit-studio-save-error"}),it?!bt&&!o.published?t.jsx(w,{"data-testid":"outfit-studio-publish-hint",children:!gt&&o.items.length>0?e("outfits.studio.needsWearable"):e("outfits.errors.notPublishable")}):null:t.jsx(w,{children:e("outfits.studio.needName")}),t.jsxs(Ti,{children:[t.jsx(x,{variant:"outline","data-testid":"outfit-studio-save",disabled:U||!it,onClick:()=>void st(o.published),children:U?e("outfits.studio.saving"):e("outfits.studio.saveDraft")}),o.published?t.jsx(x,{variant:"white","data-testid":"outfit-studio-unpublish",disabled:U,onClick:()=>void st(!1),children:e("outfits.studio.unpublish")}):t.jsx(x,{variant:"white","data-testid":"outfit-studio-publish",disabled:U||!bt,onClick:()=>void st(!0),children:e("outfits.studio.publish")})]})]})]})}export{Ki as OutfitStudio,Ki as default};
|