@dcl/builder-site 7.7.3-15905947147.commit-22c3843 → 7.7.3-15927519190.commit-5e33e4f

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 (77) hide show
  1. package/assets/{Back-CyRxt1wV.js → Back-zhS4dnPe.js} +1 -1
  2. package/assets/{CollectionProvider.container-VOB9jiPP.js → CollectionProvider.container-BnQkbzk1.js} +1 -1
  3. package/assets/{CollectionStatus.container-D13eGW3b.js → CollectionStatus.container-K-peNoC0.js} +1 -1
  4. package/assets/{ConfirmDelete-Cgwh1aMw.js → ConfirmDelete-C-R9qPaE.js} +1 -1
  5. package/assets/{FileSaver.min-niIj7oyV.js → FileSaver.min-B71eMaAP.js} +1 -1
  6. package/assets/{ItemProvider.container-D0XjA2hc.js → ItemProvider.container-DuwOn11N.js} +1 -1
  7. package/assets/{JumpIn.container-DfdnXuPW.js → JumpIn.container-B_9Dyco8.js} +1 -1
  8. package/assets/{LandAction-DmjZtHFE.js → LandAction-CdMlXtXf.js} +1 -1
  9. package/assets/{LandProviderPage-BzHJPnG2.js → LandProviderPage-WPVlnS7x.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-Bv1v9sSj.js → LoggedInDetailPage.container-CHkyImHP.js} +1 -1
  11. package/assets/{Navigation-B1FcgkQo.css → Navigation-FpsnJ-au.css} +1 -1
  12. package/assets/{Navigation.container-CV-Jh9bH.js → Navigation.container-D9KntHwJ.js} +1 -1
  13. package/assets/{NotFound-ooP6Sr9r.js → NotFound-BcdJ_D3Z.js} +1 -1
  14. package/assets/{OptionsDropdown-Cwp9Lg1s.js → OptionsDropdown-tzT_1bX_.js} +1 -1
  15. package/assets/{RentalPeriod-DVytkRnq.js → RentalPeriod-B4b_361f.js} +1 -1
  16. package/assets/{SDKTag-CKlOg8VX.js → SDKTag-CRDi6A3C.js} +1 -1
  17. package/assets/{SceneStats.container-lRb7bnLM.js → SceneStats.container-BGpjDMCh.js} +1 -1
  18. package/assets/{SignInRequired-CNajZjQl.js → SignInRequired-DuOu4jO8.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-DIxZmSLO.js → ThirdPartyKindBadge-z0aQFujq.js} +1 -1
  20. package/assets/{dataReader-C7_SKbO4.js → dataReader-D0iWe9H3.js} +1 -1
  21. package/assets/{date-DITHkQIA.js → date-CqlTTNxl.js} +1 -1
  22. package/assets/{fortmatic-B3fm25iM.js → fortmatic-CYlwMgPB.js} +1 -1
  23. package/assets/{index-DOOjMr6a.js → index--N1OFy20.js} +1 -1
  24. package/assets/index-0Rmhintd.js +1 -0
  25. package/assets/{index-Bq_x3bEm.css → index-5qmS3SRK.css} +1 -1
  26. package/assets/{index-CVM6m45L.js → index-B0DJMiSP.js} +1 -1
  27. package/assets/{index-CwlG7mWW.js → index-B3qskmDa.js} +1 -1
  28. package/assets/index-B4B2EqHh.js +1 -0
  29. package/assets/{index-sz6iISZg.js → index-B4F12yF2.js} +1 -1
  30. package/assets/{index-DVuoPEnc.js → index-B51wz-me.js} +2 -2
  31. package/assets/{index-QfnyOzb0.js → index-B5K-fl1-.js} +1 -1
  32. package/assets/{index-BGSeCx0u.css → index-BEpv1zWw.css} +1 -1
  33. package/assets/{index-C8PxnaTu.css → index-BFROXrMt.css} +1 -1
  34. package/assets/{index-Bx1koZVY.js → index-BN7EN_aT.js} +1 -1
  35. package/assets/{index-Dq1_X5vY.js → index-BT5sXCgi.js} +1 -1
  36. package/assets/{index-C7zoDBcf.js → index-BYqQv5ei.js} +1 -1
  37. package/assets/{index-Cf2DZSMv.css → index-BdPNYy__.css} +1 -1
  38. package/assets/{index-Cuy52FAz.js → index-BjRDwrQR.js} +1 -1
  39. package/assets/{index-DfO2C43c.js → index-BxOZhmuR.js} +1 -1
  40. package/assets/{index-Zx0uPzeN.css → index-C4IFWdNl.css} +1 -1
  41. package/assets/{index-CGndJB5Y.css → index-C5ZjTxG3.css} +1 -1
  42. package/assets/{index-CxGA2Gw8.js → index-CHAD948R.js} +1 -1
  43. package/assets/{index-0xuXszLO.js → index-CMEG0FAB.js} +1 -1
  44. package/assets/{index-BBho-biD.js → index-CSDffGo-.js} +1 -1
  45. package/assets/{index-BooWUHOF.js → index-CTS80top.js} +1 -1
  46. package/assets/{index-Btky-iOH.js → index-CUI5-oMb.js} +1 -1
  47. package/assets/{index-7QLmN3Tr.js → index-CbL-GjTM.js} +1 -1
  48. package/assets/{index-jWw2HvoU.js → index-Cc2cKcEM.js} +27 -27
  49. package/assets/{index-ChwEt-9c.js → index-Cgh70S2Z.js} +1 -1
  50. package/assets/{index-CnYPoQMf.js → index-CytCfHp0.js} +1 -1
  51. package/assets/{index-BU0unhZb.js → index-D5wWaryG.js} +1 -1
  52. package/assets/{index-CoLX6Dx1.js → index-DDhIYyTG.js} +1 -1
  53. package/assets/{index-DFONSVhd.js → index-DFzfPWy8.js} +1 -1
  54. package/assets/{index-CBc7SgGB.js → index-DMrrhnB-.js} +1 -1
  55. package/assets/{index-CsuuBpe1.js → index-DWEXEyc-.js} +1 -1
  56. package/assets/{index-vJJgQ2Yb.js → index-DcvnxsjD.js} +1 -1
  57. package/assets/{index-DTjGMFSD.js → index-Dg3reGww.js} +1 -1
  58. package/assets/{index-BEIq7Zso.js → index-DsEi0fgU.js} +1 -1
  59. package/assets/{index-Dbqncsf4.js → index-DyQiO1Ah.js} +1 -1
  60. package/assets/{index-xUvpKXXN.js → index-FMBSejxP.js} +1 -1
  61. package/assets/{index-6iC3U-Ts.js → index-Lv5PUGj3.js} +1 -1
  62. package/assets/{index-BxKnbabW.js → index-NEK4qy2H.js} +1 -1
  63. package/assets/{index-CASSXwcq.js → index-NqdjtDz_.js} +1 -1
  64. package/assets/{index-fwkJDS7e.js → index-XWhcxY4M.js} +1 -1
  65. package/assets/{index-CfoM8fAZ.js → index-Xyeo6Aum.js} +1 -1
  66. package/assets/{index-BGHxmX6E.css → index-Z3ng-57R.css} +7 -7
  67. package/assets/{index-u4ivuC6M.js → index-ZclrW9q8.js} +1 -1
  68. package/assets/{index-CD3lamq-.js → index-_L5_cNBd.js} +1 -1
  69. package/assets/{index-ta2PXaZT.js → index-a_eB3weQ.js} +1 -1
  70. package/assets/{index-ljLFoDvy.js → index-gBlc6wdR.js} +1 -1
  71. package/assets/{index-6JTo0DjE.js → index-jVyfg-Ix.js} +1 -1
  72. package/assets/{index.es-BO9PCnpD.js → index.es-CR8Oo8S7.js} +4 -4
  73. package/assets/{selectors-D8l7Roli.js → selectors-BM5jODAk.js} +1 -1
  74. package/index.html +3 -3
  75. package/package.json +3 -3
  76. package/assets/index-BNPo5MWp.js +0 -1
  77. package/assets/index-DDNH3ekR.js +0 -1
@@ -1 +1 @@
1
- import{bv as Re,af as X,Z,H as e,cQ as U,G as l,N as J,cR as _e,a1 as ee,cS as H,M as n,cT as $,cU as ke,cV as L,cB as De,D as o,K as N,aB as se,bC as ye,cW as Pe,cX as he,a4 as me,cY as Ae,bw as E,cZ as Oe,cH as V,c_ as q,c$ as pe,d0 as ge,d1 as oe,d2 as ce,d3 as M,d4 as I,J as de,$ as ue,cD as We,d5 as Be,d6 as Ue,cE as Me,d7 as Ie,c0 as He,d8 as $e,a5 as Fe,ae as ze,d9 as Ke,da as Qe,cI as Ye,X as Q,db as Ge,cJ as Ve,cK as qe,c1 as Xe,dc as Ze}from"./index-jWw2HvoU.js";import{L as Je}from"./LoggedInDetailPage.container-Bv1v9sSj.js";import{N as es}from"./Navigation.container-CV-Jh9bH.js";import"./SignInRequired-CNajZjQl.js";import"./selectors-D8l7Roli.js";var T=(s=>(s.DESC="DESC",s.ASC="ASC",s))(T||{});const xe="tab";var c=(s=>(s.DCL="dcl",s.ENS="ens",s.CONTRIBUTOR="contributor",s))(c||{});const Ce=()=>{const s=Re(),a=new URLSearchParams(s.search),r=a.get(xe),m={urlSearchParams:a,pathname:s.pathname};switch(r){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},ss=({isWorldContributorEnabled:s})=>{const{tab:a,pathname:r,urlSearchParams:m}=Ce(),u=Z(),p=d=>{const b=new URLSearchParams(m);b.set(xe,d),u.push(`${r}?${b.toString()}`)};return!a||a===c.CONTRIBUTOR&&!s?(p(c.DCL),null):e.jsxs(U,{children:[e.jsx(U.Tab,{active:a===c.DCL,onClick:()=>p(c.DCL),children:l("worlds_list_page.name_tabs.dcl_names")}),e.jsx(U.Tab,{active:a===c.ENS,onClick:()=>p(c.ENS),children:l("worlds_list_page.name_tabs.ens_names")}),s&&e.jsx(U.Tab,{active:a===c.CONTRIBUTOR,onClick:()=>p(c.CONTRIBUTOR),children:l("worlds_list_page.name_tabs.contributor_names")})]})},ns=X.memo(ss),as=s=>({isWorldContributorEnabled:_e(s)}),ls=J(as)(ns),ts="_container_12bci_1",rs="_used_12bci_7",is="_description_12bci_13",os="_link_12bci_20",cs="_space_12bci_27",ds="_current_12bci_33",us="_bar_12bci_38",w={container:ts,used:rs,description:is,link:os,space:cs,current:ds,bar:us},bs="worlds-storage-current-mbs",_s="worlds-storage-bar-front",hs="worlds-storage",ms=({maxBytes:s,currentBytes:a,className:r,onViewDetails:m})=>{const u=$(s),p=$(a),d=p*100/u;return e.jsxs("div",{"data-testid":hs,className:ee(w.container,r),children:[e.jsx("span",{className:w.used,children:l("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:w.description,children:[e.jsx("span",{children:l("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:w.link,onClick:m,children:l("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:w.space,children:[e.jsxs("div",{"data-testid":bs,children:[e.jsx("span",{className:w.current,children:H(p)})," / ",H(u)," Mb"]}),e.jsx(n.Progress,{"data-testid":_s,percent:Math.trunc(d),className:w.bar,size:"small"})]})]})},ps=X.memo(ms),gs="_worldUrl_1sb6i_1",xs="_rightContainer_1sb6i_7",Cs="_copyUrn_1sb6i_13",Y={worldUrl:gs,rightContainer:xs,copyUrn:Cs};function je({ens:s,deploymentsByWorlds:a}){const r=ke(s.subdomain);return L(a,s)?e.jsxs("div",{className:Y.worldUrl,children:[e.jsx("span",{children:r}),e.jsxs("div",{className:Y.rightContainer,children:[e.jsx(De,{role:"button",text:r,showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ee("copy",Y.copyUrn),name:"copy outline"})}),e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:l("worlds_list_page.table.empty_url")})}function we({deploymentsByWorlds:s,ens:a,projects:r,onEditScene:m,onUnpublishScene:u,onPublishScene:p}){const d=s[a.subdomain];return L(s,a)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(n.Popup,{content:d==null?void 0:d.name,on:"hover",trigger:e.jsx("span",{children:d==null?void 0:d.name})}),r.find(b=>b.id===(d==null?void 0:d.projectId))?m&&e.jsx(n.Button,{inverted:!0,size:"small",onClick:()=>m(a),children:l("worlds_list_page.table.edit_scene")}):u&&e.jsx(n.Popup,{content:l("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(n.Button,{inverted:!0,size:"small",onClick:()=>u(a),children:l("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),p&&e.jsx(n.Button,{primary:!0,size:"small",onClick:p,children:l("worlds_list_page.table.publish_scene")})]})}function js({items:s,deploymentsByWorlds:a,projects:r,loading:m,error:u,onUnpublishWorld:p}){const d=Z(),b=o.useCallback(()=>{d.push(N.scenes())},[d]),f=o.useCallback(h=>{const{projectId:x}=a[h.subdomain];d.push(N.sceneDetail(x))},[a,N,d]),S=o.useCallback(h=>{var C;const x=(C=a[h.subdomain])==null?void 0:C.id;x&&p(x)},[a,p]);return u?e.jsx(n.Message,{error:!0,size:"tiny",visible:!0,content:u.message,header:l("worlds_list_page.error_title")}):m?e.jsx(n.Loader,{active:!0,size:"big"}):s.length?e.jsxs(n.Table,{basic:"very",children:[e.jsx(n.Table.Header,{children:e.jsxs(n.Table.Row,{children:[e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.name")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.owner")}),e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.url")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.published_scene")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.size")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.permissions")})]})}),e.jsx(n.Table.Body,{children:s.map((h,x)=>{var R,k;const C=(R=h.userPermissions)==null?void 0:R.includes("deployment"),v=(k=h.userPermissions)==null?void 0:k.map(D=>l(`worlds_list_page.table.user_permissions.${D}`)).join("/");return e.jsxs(n.Table.Row,{className:"TableRow",children:[e.jsx(n.Table.Cell,{width:1,children:h.name}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(ye,{address:h.nftOwnerAddress||""})}),e.jsx(n.Table.Cell,{width:2,children:e.jsx(je,{deploymentsByWorlds:a,ens:h})}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(we,{deploymentsByWorlds:a,ens:h,projects:r,onEditScene:C?f:void 0,onPublishScene:C?b:void 0,onUnpublishScene:C?S:void 0})}),e.jsx(n.Table.Cell,{width:1,children:H($(Number(h.size)||0))}),e.jsx(n.Table.Cell,{width:1,children:v})]},x)})})]}):e.jsxs(n.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:l("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:l("worlds_list_page.empty_contributor_list.description",{b:h=>e.jsx("b",{children:h})})}),e.jsx(n.Button,{as:"a",href:`${se.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:l("worlds_list_page.empty_list.cta")})]})}const ws=s=>({items:Pe(s),deploymentsByWorlds:he(s),projects:me(s),error:Ae(s),loading:E(V(s),Oe)||E(pe(s),q)}),Es=s=>({onUnpublishWorld:a=>s(ge(a))}),Ns=J(ws,Es)(js),be="Worlds List Page Action",Ss=se.get("ENS_DOMAINS_URL",""),Ts=se.get("MARKETPLACE_WEB_URL"),G=12,Ls=s=>{const{ensList:a,externalNames:r,error:m,deploymentsByWorlds:u,isLoading:p,projects:d,worldsWalletStats:b,isConnected:f,isWorldContributorEnabled:S,ensTotal:h,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:v,onOpenPermissionsModal:R,onFetchContributableNames:k,onFetchENSList:D}=s,[ne,y]=o.useState(T.DESC),[F,z]=o.useState(1),{tab:_}=Ce(),P=Z();o.useEffect(()=>{f&&S&&k()},[f,S]),o.useEffect(()=>{_===c.DCL&&D(G,(F-1)*G)},[D,F]);const A=o.useCallback(()=>{_===c.DCL?(oe(be,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(oe(be,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[_]),Ee=o.useCallback(()=>{P.push(N.scenes())},[N,P]),Ne=o.useCallback(i=>{const{projectId:t}=u[i.subdomain];P.push(N.sceneDetail(t))},[u,N,P]),Se=o.useCallback(i=>{var g;const t=(g=u[i.subdomain])==null?void 0:g.id;t&&v(t)},[u,v]),ae=o.useCallback((i,t)=>{z(+t.activePage)},[]),le=o.useCallback(()=>e.jsx(n.Dropdown,{direction:"left",value:ne,options:[{value:T.ASC,text:l("global.order.name_asc")},{value:T.DESC,text:l("global.order.name_desc")}],onChange:(i,{value:t})=>y(t)}),[ne,y]),te=o.useCallback(i=>{let t=L(u,i)?"active":"inactive";if(t==="active"&&b&&!ce(i.subdomain))switch(M(b).status){case I.BLOCKED:{t="blocked";break}case I.TO_BE_BLOCKED:t="warning"}return e.jsx("span",{className:`world-status ${t}`,children:l(`worlds_list_page.table.status_${t}`)})},[M,ce,L]),re=o.useCallback((i,t)=>{var B;const g=_===c.DCL?t==null?void 0:t.dclNames:t==null?void 0:t.ensNames;if(!L(u,i)||!g)return"-";const j=(B=g.find(ve=>ve.name===i.subdomain))==null?void 0:B.size,K=_===c.ENS?" / 25":"";return H($(Number(j)))+K},[_]),Te=o.useCallback((i,t)=>{R(t)},[]),O=o.useCallback(()=>{const i=_===c.DCL?h:r.length,t=Math.ceil(i/G),g=_===c.DCL?a:r;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(n.Container,{children:e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsx(n.Row,{children:e.jsx(n.Header,{sub:!0,className:"items-count",children:l("ens_list_page.items",{count:s.ensTotal.toLocaleString()})})})}),e.jsx(n.Column,{align:"right",children:e.jsx(n.Row,{children:le()})}),e.jsx(n.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(n.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(n.Button,{basic:!0,onClick:A,children:e.jsx(de,{name:"add-active"})})})})})]})})}),e.jsx(n.Container,{children:e.jsxs(n.Section,{className:"table-section",children:[e.jsxs(n.Table,{basic:"very",children:[e.jsx(n.Table.Header,{children:e.jsxs(n.Table.Row,{children:[e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.name")}),e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.url")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.published_scene")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center",children:l("worlds_list_page.table.size")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center",children:l("worlds_list_page.table.status")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(n.Table.Body,{children:g.map((j,K)=>e.jsxs(n.Table.Row,{className:"TableRow",children:[e.jsx(n.Table.Cell,{width:2,children:j.name}),e.jsx(n.Table.Cell,{width:2,children:e.jsx(je,{deploymentsByWorlds:u,ens:j})}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(we,{deploymentsByWorlds:u,ens:j,projects:d,onEditScene:Ne,onPublishScene:Ee,onUnpublishScene:Se})}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:re(j,b)}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:te(j)}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:e.jsx(n.Button,{basic:!0,onClick:B=>Te(B,j.subdomain),children:"Permissions"})})]},K))})]}),t>1&&e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:t,activePage:F,onPageChange:ae})]})})]})},[_,a,r,A,le,re,te,ae,h]),W=o.useCallback(()=>e.jsxs(n.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ee("empty-icon",_===c.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:_===c.DCL?l("worlds_list_page.empty_list.title"):l("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:_===c.DCL?l("worlds_list_page.empty_list.description",{b:i=>e.jsx("b",{children:i})}):l("worlds_list_page.empty_list.description_ens",{b:i=>e.jsx("b",{children:i})})}),e.jsx(n.Button,{className:"empty-action",primary:!0,onClick:A,children:_===c.DCL?l("worlds_list_page.empty_list.cta"):l("worlds_list_page.empty_list.cta_ens")})]}),[_,A]),ie=o.useCallback(()=>{if(!b)return null;const i=M(b);if(i.status===I.OK)return null;let t;return i.status===I.TO_BE_BLOCKED?t=l("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:i.toBeBlockedAt.toLocaleDateString(),b:g=>e.jsx("b",{children:g})}):t=l("worlds_list_page.worlds_warning_message.blocked",{blockedAt:i.blockedAt.toLocaleDateString(),b:g=>e.jsx("b",{children:g})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(de,{name:"alert-warning"})}),e.jsx("div",{children:t})]})},[b,M]),Le=o.useCallback(()=>a.length?e.jsxs("div",{children:[b?e.jsx(ps,{maxBytes:Number(b.maxAllowedSpace),currentBytes:Number(b.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:b})}}):null,ie(),O()]}):e.jsx("div",{children:W()}),[a,b,O,W,ie,x]),fe=o.useCallback(()=>e.jsx("div",{children:r.length>0?O():W()}),[r,W,O]);return o.useEffect(()=>{y(T.ASC),z(1)},[_,z,y]),o.useEffect(()=>{ue()&&C()},[ue,C]),e.jsx(Je,{className:"WorldListPage view",error:m,activeTab:es.WORLDS,isLoading:p,isPageFullscreen:!0,children:e.jsxs(n.Container,{children:[e.jsx("h1",{children:l("worlds_list_page.title")}),e.jsx(ls,{}),_===c.DCL&&Le(),_===c.ENS&&fe(),_===c.CONTRIBUTOR&&S&&e.jsx(Ns,{})]})})},fs=X.memo(Ls),vs=s=>{var a;return{ensList:We(s),externalNames:Be(s),deploymentsByWorlds:he(s),projects:me(s),worldsPermissions:Ue(s),error:((a=Me(s))==null?void 0:a.message)??Ie(s)??void 0,isLoading:E(V(s),qe)||E(pe(s),q)||E(He(s),Xe)||E($e(s),q)||E(V(s),Ze)||Fe(s),isLoggedIn:ze(s),worldsWalletStats:Ke(s),isConnected:Qe(s),isWorldContributorEnabled:_e(s),ensTotal:Ye(s)}},Rs=s=>({onOpenYourStorageModal:a=>s(Q("WorldsYourStorageModal",a)),onOpenPermissionsModal:(a,r)=>s(Q("WorldPermissionsModal",{worldName:a,isCollaboratorsTabShown:r})),onOpenWorldsForENSOwnersAnnouncementModal:()=>s(Q("WorldsForENSOwnersAnnouncementModal")),onUnpublishWorld:a=>s(ge(a)),onFetchContributableNames:()=>s(Ge()),onFetchENSList:(a,r)=>s(Ve(a,r))}),Os=J(vs,Rs)(fs);export{Os as default};
1
+ import{bv as Re,af as X,Z,H as e,cQ as U,G as l,N as J,cR as _e,a1 as ee,cS as H,M as n,cT as $,cU as ke,cV as L,cB as De,D as o,K as N,aB as se,bC as ye,cW as Pe,cX as he,a4 as me,cY as Ae,bw as E,cZ as Oe,cH as V,c_ as q,c$ as pe,d0 as ge,d1 as oe,d2 as ce,d3 as M,d4 as I,J as de,$ as ue,cD as We,d5 as Be,d6 as Ue,cE as Me,d7 as Ie,c0 as He,d8 as $e,a5 as Fe,ae as ze,d9 as Ke,da as Qe,cI as Ye,X as Q,db as Ge,cJ as Ve,cK as qe,c1 as Xe,dc as Ze}from"./index-Cc2cKcEM.js";import{L as Je}from"./LoggedInDetailPage.container-CHkyImHP.js";import{N as es}from"./Navigation.container-D9KntHwJ.js";import"./SignInRequired-DuOu4jO8.js";import"./selectors-BM5jODAk.js";var T=(s=>(s.DESC="DESC",s.ASC="ASC",s))(T||{});const xe="tab";var c=(s=>(s.DCL="dcl",s.ENS="ens",s.CONTRIBUTOR="contributor",s))(c||{});const Ce=()=>{const s=Re(),a=new URLSearchParams(s.search),r=a.get(xe),m={urlSearchParams:a,pathname:s.pathname};switch(r){case"dcl":m.tab="dcl";break;case"ens":m.tab="ens";break;case"contributor":m.tab="contributor";break}return m},ss=({isWorldContributorEnabled:s})=>{const{tab:a,pathname:r,urlSearchParams:m}=Ce(),u=Z(),p=d=>{const b=new URLSearchParams(m);b.set(xe,d),u.push(`${r}?${b.toString()}`)};return!a||a===c.CONTRIBUTOR&&!s?(p(c.DCL),null):e.jsxs(U,{children:[e.jsx(U.Tab,{active:a===c.DCL,onClick:()=>p(c.DCL),children:l("worlds_list_page.name_tabs.dcl_names")}),e.jsx(U.Tab,{active:a===c.ENS,onClick:()=>p(c.ENS),children:l("worlds_list_page.name_tabs.ens_names")}),s&&e.jsx(U.Tab,{active:a===c.CONTRIBUTOR,onClick:()=>p(c.CONTRIBUTOR),children:l("worlds_list_page.name_tabs.contributor_names")})]})},ns=X.memo(ss),as=s=>({isWorldContributorEnabled:_e(s)}),ls=J(as)(ns),ts="_container_12bci_1",rs="_used_12bci_7",is="_description_12bci_13",os="_link_12bci_20",cs="_space_12bci_27",ds="_current_12bci_33",us="_bar_12bci_38",w={container:ts,used:rs,description:is,link:os,space:cs,current:ds,bar:us},bs="worlds-storage-current-mbs",_s="worlds-storage-bar-front",hs="worlds-storage",ms=({maxBytes:s,currentBytes:a,className:r,onViewDetails:m})=>{const u=$(s),p=$(a),d=p*100/u;return e.jsxs("div",{"data-testid":hs,className:ee(w.container,r),children:[e.jsx("span",{className:w.used,children:l("worlds_list_page.worlds_storage.used")}),e.jsxs("div",{className:w.description,children:[e.jsx("span",{children:l("worlds_list_page.worlds_storage.description")})," ",e.jsx("span",{className:w.link,onClick:m,children:l("worlds_list_page.worlds_storage.link")})]}),e.jsxs("div",{className:w.space,children:[e.jsxs("div",{"data-testid":bs,children:[e.jsx("span",{className:w.current,children:H(p)})," / ",H(u)," Mb"]}),e.jsx(n.Progress,{"data-testid":_s,percent:Math.trunc(d),className:w.bar,size:"small"})]})]})},ps=X.memo(ms),gs="_worldUrl_1sb6i_1",xs="_rightContainer_1sb6i_7",Cs="_copyUrn_1sb6i_13",Y={worldUrl:gs,rightContainer:xs,copyUrn:Cs};function je({ens:s,deploymentsByWorlds:a}){const r=ke(s.subdomain);return L(a,s)?e.jsxs("div",{className:Y.worldUrl,children:[e.jsx("span",{children:r}),e.jsxs("div",{className:Y.rightContainer,children:[e.jsx(De,{role:"button",text:r,showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:ee("copy",Y.copyUrn),name:"copy outline"})}),e.jsx("a",{href:r,target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]})]}):e.jsx("span",{className:"empty-url",children:l("worlds_list_page.table.empty_url")})}function we({deploymentsByWorlds:s,ens:a,projects:r,onEditScene:m,onUnpublishScene:u,onPublishScene:p}){const d=s[a.subdomain];return L(s,a)?e.jsxs("div",{className:"publish-scene",children:[e.jsx(n.Popup,{content:d==null?void 0:d.name,on:"hover",trigger:e.jsx("span",{children:d==null?void 0:d.name})}),r.find(b=>b.id===(d==null?void 0:d.projectId))?m&&e.jsx(n.Button,{inverted:!0,size:"small",onClick:()=>m(a),children:l("worlds_list_page.table.edit_scene")}):u&&e.jsx(n.Popup,{content:l("worlds_list_page.table.scene_published_outside_builder"),on:"hover",position:"top center",trigger:e.jsx(n.Button,{inverted:!0,size:"small",onClick:()=>u(a),children:l("worlds_list_page.table.unpublish_scene")})})]}):e.jsxs("div",{className:"publish-scene",children:[e.jsx("span",{children:"-"}),p&&e.jsx(n.Button,{primary:!0,size:"small",onClick:p,children:l("worlds_list_page.table.publish_scene")})]})}function js({items:s,deploymentsByWorlds:a,projects:r,loading:m,error:u,onUnpublishWorld:p}){const d=Z(),b=o.useCallback(()=>{d.push(N.scenes())},[d]),f=o.useCallback(h=>{const{projectId:x}=a[h.subdomain];d.push(N.sceneDetail(x))},[a,N,d]),S=o.useCallback(h=>{var C;const x=(C=a[h.subdomain])==null?void 0:C.id;x&&p(x)},[a,p]);return u?e.jsx(n.Message,{error:!0,size:"tiny",visible:!0,content:u.message,header:l("worlds_list_page.error_title")}):m?e.jsx(n.Loader,{active:!0,size:"big"}):s.length?e.jsxs(n.Table,{basic:"very",children:[e.jsx(n.Table.Header,{children:e.jsxs(n.Table.Row,{children:[e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.name")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.owner")}),e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.url")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.published_scene")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.size")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.permissions")})]})}),e.jsx(n.Table.Body,{children:s.map((h,x)=>{var R,k;const C=(R=h.userPermissions)==null?void 0:R.includes("deployment"),v=(k=h.userPermissions)==null?void 0:k.map(D=>l(`worlds_list_page.table.user_permissions.${D}`)).join("/");return e.jsxs(n.Table.Row,{className:"TableRow",children:[e.jsx(n.Table.Cell,{width:1,children:h.name}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(ye,{address:h.nftOwnerAddress||""})}),e.jsx(n.Table.Cell,{width:2,children:e.jsx(je,{deploymentsByWorlds:a,ens:h})}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(we,{deploymentsByWorlds:a,ens:h,projects:r,onEditScene:C?f:void 0,onPublishScene:C?b:void 0,onUnpublishScene:C?S:void 0})}),e.jsx(n.Table.Cell,{width:1,children:H($(Number(h.size)||0))}),e.jsx(n.Table.Cell,{width:1,children:v})]},x)})})]}):e.jsxs(n.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:"empty-icon dcl-icon"}),e.jsx("div",{className:"empty-title",children:l("worlds_list_page.empty_contributor_list.title")}),e.jsx("div",{className:"empty-description",children:l("worlds_list_page.empty_contributor_list.description",{b:h=>e.jsx("b",{children:h})})}),e.jsx(n.Button,{as:"a",href:`${se.get("MARKETPLACE_WEB_URL")}/names/claim`,target:"_blank",className:"empty-action",primary:!0,children:l("worlds_list_page.empty_list.cta")})]})}const ws=s=>({items:Pe(s),deploymentsByWorlds:he(s),projects:me(s),error:Ae(s),loading:E(V(s),Oe)||E(pe(s),q)}),Es=s=>({onUnpublishWorld:a=>s(ge(a))}),Ns=J(ws,Es)(js),be="Worlds List Page Action",Ss=se.get("ENS_DOMAINS_URL",""),Ts=se.get("MARKETPLACE_WEB_URL"),G=12,Ls=s=>{const{ensList:a,externalNames:r,error:m,deploymentsByWorlds:u,isLoading:p,projects:d,worldsWalletStats:b,isConnected:f,isWorldContributorEnabled:S,ensTotal:h,onOpenYourStorageModal:x,onOpenWorldsForENSOwnersAnnouncementModal:C,onUnpublishWorld:v,onOpenPermissionsModal:R,onFetchContributableNames:k,onFetchENSList:D}=s,[ne,y]=o.useState(T.DESC),[F,z]=o.useState(1),{tab:_}=Ce(),P=Z();o.useEffect(()=>{f&&S&&k()},[f,S]),o.useEffect(()=>{_===c.DCL&&D(G,(F-1)*G)},[D,F]);const A=o.useCallback(()=>{_===c.DCL?(oe(be,{action:"Click Claim NAME"}),window.open(`${Ts}/names/claim`,"_blank","noopener,noreferrer")):(oe(be,{action:"Click Claim ENS Domain"}),window.open(Ss,"_blank","noopener,noreferrer"))},[_]),Ee=o.useCallback(()=>{P.push(N.scenes())},[N,P]),Ne=o.useCallback(i=>{const{projectId:t}=u[i.subdomain];P.push(N.sceneDetail(t))},[u,N,P]),Se=o.useCallback(i=>{var g;const t=(g=u[i.subdomain])==null?void 0:g.id;t&&v(t)},[u,v]),ae=o.useCallback((i,t)=>{z(+t.activePage)},[]),le=o.useCallback(()=>e.jsx(n.Dropdown,{direction:"left",value:ne,options:[{value:T.ASC,text:l("global.order.name_asc")},{value:T.DESC,text:l("global.order.name_desc")}],onChange:(i,{value:t})=>y(t)}),[ne,y]),te=o.useCallback(i=>{let t=L(u,i)?"active":"inactive";if(t==="active"&&b&&!ce(i.subdomain))switch(M(b).status){case I.BLOCKED:{t="blocked";break}case I.TO_BE_BLOCKED:t="warning"}return e.jsx("span",{className:`world-status ${t}`,children:l(`worlds_list_page.table.status_${t}`)})},[M,ce,L]),re=o.useCallback((i,t)=>{var B;const g=_===c.DCL?t==null?void 0:t.dclNames:t==null?void 0:t.ensNames;if(!L(u,i)||!g)return"-";const j=(B=g.find(ve=>ve.name===i.subdomain))==null?void 0:B.size,K=_===c.ENS?" / 25":"";return H($(Number(j)))+K},[_]),Te=o.useCallback((i,t)=>{R(t)},[]),O=o.useCallback(()=>{const i=_===c.DCL?h:r.length,t=Math.ceil(i/G),g=_===c.DCL?a:r;return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(n.Container,{children:e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsx(n.Row,{children:e.jsx(n.Header,{sub:!0,className:"items-count",children:l("ens_list_page.items",{count:s.ensTotal.toLocaleString()})})})}),e.jsx(n.Column,{align:"right",children:e.jsx(n.Row,{children:le()})}),e.jsx(n.Column,{align:"right",grow:!1,shrink:!0,children:e.jsx(n.Row,{children:e.jsx("div",{className:"actions",children:e.jsx(n.Button,{basic:!0,onClick:A,children:e.jsx(de,{name:"add-active"})})})})})]})})}),e.jsx(n.Container,{children:e.jsxs(n.Section,{className:"table-section",children:[e.jsxs(n.Table,{basic:"very",children:[e.jsx(n.Table.Header,{children:e.jsxs(n.Table.Row,{children:[e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.name")}),e.jsx(n.Table.HeaderCell,{width:"2",children:l("worlds_list_page.table.url")}),e.jsx(n.Table.HeaderCell,{width:"1",children:l("worlds_list_page.table.published_scene")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center",children:l("worlds_list_page.table.size")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center",children:l("worlds_list_page.table.status")}),e.jsx(n.Table.HeaderCell,{width:"1",textAlign:"center"})]})}),e.jsx(n.Table.Body,{children:g.map((j,K)=>e.jsxs(n.Table.Row,{className:"TableRow",children:[e.jsx(n.Table.Cell,{width:2,children:j.name}),e.jsx(n.Table.Cell,{width:2,children:e.jsx(je,{deploymentsByWorlds:u,ens:j})}),e.jsx(n.Table.Cell,{width:1,children:e.jsx(we,{deploymentsByWorlds:u,ens:j,projects:d,onEditScene:Ne,onPublishScene:Ee,onUnpublishScene:Se})}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:re(j,b)}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:te(j)}),e.jsx(n.Table.Cell,{width:1,textAlign:"center",children:e.jsx(n.Button,{basic:!0,onClick:B=>Te(B,j.subdomain),children:"Permissions"})})]},K))})]}),t>1&&e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:t,activePage:F,onPageChange:ae})]})})]})},[_,a,r,A,le,re,te,ae,h]),W=o.useCallback(()=>e.jsxs(n.Empty,{className:"empty-names-container",height:500,children:[e.jsx("div",{className:ee("empty-icon",_===c.DCL?"dcl-icon":"ens-icon")}),e.jsx("div",{className:"empty-title",children:_===c.DCL?l("worlds_list_page.empty_list.title"):l("worlds_list_page.empty_list.title_ens")}),e.jsx("div",{className:"empty-description",children:_===c.DCL?l("worlds_list_page.empty_list.description",{b:i=>e.jsx("b",{children:i})}):l("worlds_list_page.empty_list.description_ens",{b:i=>e.jsx("b",{children:i})})}),e.jsx(n.Button,{className:"empty-action",primary:!0,onClick:A,children:_===c.DCL?l("worlds_list_page.empty_list.cta"):l("worlds_list_page.empty_list.cta_ens")})]}),[_,A]),ie=o.useCallback(()=>{if(!b)return null;const i=M(b);if(i.status===I.OK)return null;let t;return i.status===I.TO_BE_BLOCKED?t=l("worlds_list_page.worlds_warning_message.to_be_blocked",{toBeBlockedAt:i.toBeBlockedAt.toLocaleDateString(),b:g=>e.jsx("b",{children:g})}):t=l("worlds_list_page.worlds_warning_message.blocked",{blockedAt:i.blockedAt.toLocaleDateString(),b:g=>e.jsx("b",{children:g})}),e.jsxs("div",{className:"insufficient-storage-message",children:[e.jsx("div",{children:e.jsx(de,{name:"alert-warning"})}),e.jsx("div",{children:t})]})},[b,M]),Le=o.useCallback(()=>a.length?e.jsxs("div",{children:[b?e.jsx(ps,{maxBytes:Number(b.maxAllowedSpace),currentBytes:Number(b.usedSpace),className:"worlds-storage",onViewDetails:()=>{x({stats:b})}}):null,ie(),O()]}):e.jsx("div",{children:W()}),[a,b,O,W,ie,x]),fe=o.useCallback(()=>e.jsx("div",{children:r.length>0?O():W()}),[r,W,O]);return o.useEffect(()=>{y(T.ASC),z(1)},[_,z,y]),o.useEffect(()=>{ue()&&C()},[ue,C]),e.jsx(Je,{className:"WorldListPage view",error:m,activeTab:es.WORLDS,isLoading:p,isPageFullscreen:!0,children:e.jsxs(n.Container,{children:[e.jsx("h1",{children:l("worlds_list_page.title")}),e.jsx(ls,{}),_===c.DCL&&Le(),_===c.ENS&&fe(),_===c.CONTRIBUTOR&&S&&e.jsx(Ns,{})]})})},fs=X.memo(Ls),vs=s=>{var a;return{ensList:We(s),externalNames:Be(s),deploymentsByWorlds:he(s),projects:me(s),worldsPermissions:Ue(s),error:((a=Me(s))==null?void 0:a.message)??Ie(s)??void 0,isLoading:E(V(s),qe)||E(pe(s),q)||E(He(s),Xe)||E($e(s),q)||E(V(s),Ze)||Fe(s),isLoggedIn:ze(s),worldsWalletStats:Ke(s),isConnected:Qe(s),isWorldContributorEnabled:_e(s),ensTotal:Ye(s)}},Rs=s=>({onOpenYourStorageModal:a=>s(Q("WorldsYourStorageModal",a)),onOpenPermissionsModal:(a,r)=>s(Q("WorldPermissionsModal",{worldName:a,isCollaboratorsTabShown:r})),onOpenWorldsForENSOwnersAnnouncementModal:()=>s(Q("WorldsForENSOwnersAnnouncementModal")),onUnpublishWorld:a=>s(ge(a)),onFetchContributableNames:()=>s(Ge()),onFetchENSList:(a,r)=>s(Ve(a,r))}),Os=J(vs,Rs)(fs);export{Os as default};
@@ -1 +1 @@
1
- var x=Object.defineProperty;var h=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var c=(t,s,a)=>h(t,typeof s!="symbol"?s+"":s,a);import{D as f,cc as g,H as e,bD as p,G as i,bm as u,M as l,cd as b,L as j,K as L,ce as v,bI as T,b8 as w,N as E,cf as N}from"./index-jWw2HvoU.js";import{L as _}from"./LandAction-DmjZtHFE.js";import{L as P}from"./LandProviderPage-BzHJPnG2.js";import"./Back-CyRxt1wV.js";import"./NotFound-ooP6Sr9r.js";let R=class extends f.PureComponent{constructor(){super(...arguments);c(this,"state",{address:"",isValid:!0});c(this,"handleChange",(a,r)=>{this.setState({isValid:!r.value||g(r.value),address:r.value})})}render(){const{onTransfer:a}=this.props,{address:r,isValid:o}=this.state;return e.jsx(P,{className:"LandTransferPage",children:n=>{let d;const m=p(n.owner,r);return m?d=i("transfer_page.same_owner"):o||(d=i("transfer_page.invalid_address")),e.jsx(_,{land:n,title:i("transfer_page.title"),subtitle:e.jsx(u,{id:"transfer_page.subtitle",values:{name:e.jsx("strong",{children:n.name})}}),children:e.jsxs(l.Form,{onSubmit:()=>a(n,r),children:[e.jsx(b,{label:"Address",value:r,onChange:this.handleChange,placeholder:"0x...",error:!o||m,message:d}),e.jsx(l.Section,{className:"disclaimer",children:e.jsx("p",{className:"danger-text",children:e.jsx(u,{id:"transfer_page.disclaimer",values:{br:e.jsx("br",{})}})})}),e.jsxs(l.Row,{children:[e.jsx(j,{className:"cancel",to:L.landDetail(n.id),children:e.jsx(l.Button,{children:i("global.cancel")})}),e.jsx(v,{type:"submit",primary:!0,disabled:!r||!o||n.role!==T.OWNER||p(n.owner,r),network:w.Network.ETHEREUM,children:i("global.submit")})]})]})})}})}};const V=t=>({onTransfer:(s,a)=>t(N(s,a))}),B=E(void 0,V)(R);export{B as default};
1
+ var x=Object.defineProperty;var h=(t,s,a)=>s in t?x(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var c=(t,s,a)=>h(t,typeof s!="symbol"?s+"":s,a);import{D as f,cc as g,H as e,bD as p,G as i,bm as u,M as l,cd as b,L as j,K as L,ce as v,bI as T,b8 as w,N as E,cf as N}from"./index-Cc2cKcEM.js";import{L as _}from"./LandAction-CdMlXtXf.js";import{L as P}from"./LandProviderPage-WPVlnS7x.js";import"./Back-zhS4dnPe.js";import"./NotFound-BcdJ_D3Z.js";let R=class extends f.PureComponent{constructor(){super(...arguments);c(this,"state",{address:"",isValid:!0});c(this,"handleChange",(a,r)=>{this.setState({isValid:!r.value||g(r.value),address:r.value})})}render(){const{onTransfer:a}=this.props,{address:r,isValid:o}=this.state;return e.jsx(P,{className:"LandTransferPage",children:n=>{let d;const m=p(n.owner,r);return m?d=i("transfer_page.same_owner"):o||(d=i("transfer_page.invalid_address")),e.jsx(_,{land:n,title:i("transfer_page.title"),subtitle:e.jsx(u,{id:"transfer_page.subtitle",values:{name:e.jsx("strong",{children:n.name})}}),children:e.jsxs(l.Form,{onSubmit:()=>a(n,r),children:[e.jsx(b,{label:"Address",value:r,onChange:this.handleChange,placeholder:"0x...",error:!o||m,message:d}),e.jsx(l.Section,{className:"disclaimer",children:e.jsx("p",{className:"danger-text",children:e.jsx(u,{id:"transfer_page.disclaimer",values:{br:e.jsx("br",{})}})})}),e.jsxs(l.Row,{children:[e.jsx(j,{className:"cancel",to:L.landDetail(n.id),children:e.jsx(l.Button,{children:i("global.cancel")})}),e.jsx(v,{type:"submit",primary:!0,disabled:!r||!o||n.role!==T.OWNER||p(n.owner,r),network:w.Network.ETHEREUM,children:i("global.submit")})]})]})})}})}};const V=t=>({onTransfer:(s,a)=>t(N(s,a))}),B=E(void 0,V)(R);export{B as default};
@@ -1 +1 @@
1
- var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index-jWw2HvoU.js";import{B as W}from"./Back-CyRxt1wV.js";import{S as K}from"./SDKTag-CKlOg8VX.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
1
+ var C=Object.defineProperty;var v=(s,r,e)=>r in s?C(s,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):s[r]=e;var l=(s,r,e)=>v(s,typeof r!="symbol"?r+"":r,e);import{aB as b,D as u,Q as P,H as t,al as L,ah as p,M as a,aj as g,G as d,aX as f,K as y,aY as k,aZ as j,J as h,N as w,a_ as N,an as S,aq as F,ap as m,a$ as I,ae as R,at as A,b0 as E,O as _,b1 as O,b2 as T,b3 as B,b4 as M,b5 as D,av as U,b6 as $,X as V,Y as q}from"./index-Cc2cKcEM.js";import{B as W}from"./Back-zhS4dnPe.js";import{S as K}from"./SDKTag-CRDi6A3C.js";function X(s){return s?{id:s.id,title:s.title,description:s.description,thumbnail:s.thumbnail,isPublic:!1,sceneId:s.sceneId,ethAddress:s.ethAddress,createdAt:s.createdAt,updatedAt:s.updatedAt,layout:s.layout,isTemplate:!1,video:s.video,templateStatus:null}:null}const Y=b.get("PROFILE_URL","");let z=class extends u.PureComponent{constructor(){super(...arguments);l(this,"handlePreview",()=>{this.props.onPreview()});l(this,"handleLike",()=>{const{currentPool:e,isLoggedIn:n,onOpenModal:o}=this.props;e&&(n?this.props.onLikePool(e.id,!e.like):o("LikeModal",{}))});l(this,"handleBack",()=>{const{history:e}=this.props;e.push(y.poolSearch())})}componentDidMount(){const{match:e,onLoadProject:n}=this.props;e.params.projectId&&n(e.params.projectId,this.getType())}componentDidUpdate(){const e=this.getCurrentProject(),n=this.getCurrentScene(),{isLoading:o,onLoadProjectScene:i}=this.props;e&&!n&&!o&&i(e,this.getType())}componentWillUnmount(){this.props.onCloseEditor()}getType(){return this.props.match&&this.props.match.params&&this.props.match.params.type||P.PUBLIC}getCurrentProject(){const{currentProject:e,currentPool:n}=this.props;switch(this.getType()){case"pool":return n;default:return e}}getCurrentScene(){const{scenes:e}=this.props,n=this.getCurrentProject();return n&&e[n.sceneId]||null}getCurrentPool(){const{currentPool:e}=this.props;switch(this.getType()){case"pool":return e;default:return null}}getParcelCount(){const e=this.getCurrentProject();return e?e.layout.cols*e.layout.rows:0}getObjectCount(){const e=this.getCurrentScene();if(!e||!e.sdk6)return 0;const n=this.getParcelCount();if(n===0)return 0;const o=Object.keys(e.sdk6.entities).length;return o<n?0:o-n}renderNotFount(){return t.jsx(L,{})}renderLoading(){return t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsx(a.Page,{isFullscreen:!0,children:t.jsx(a.Loader,{active:!0,size:"huge"})}),t.jsx(g,{isFullscreen:!0})]})}handleExportProject(){const{onOpenModal:e}=this.props;e("ExportModal",{project:X(this.getCurrentProject())})}renderAuthor(){const{currentAuthor:e}=this.props;if(!e)return null;const n=e.avatars[0].ethAddress;return t.jsxs("div",{className:"author",children:[d("public_page.made_by"),t.jsx(f,{address:n,as:"a",href:`${Y}/accounts/${n}`})]})}render(){const{isFetching:e,isPreviewing:n,isReady:o}=this.props;if(e)return this.renderLoading();const i=this.getCurrentProject();if(!i)return this.renderNotFount();const c=this.getCurrentPool(),x=this.getCurrentScene();return t.jsxs(t.Fragment,{children:[!n&&t.jsxs(t.Fragment,{children:[t.jsx(p,{}),t.jsxs(a.Container,{className:"back-container",children:[t.jsx(W,{absolute:!0,onClick:this.handleBack}),t.jsxs(a.Button,{secondary:!0,onClick:this.handleExportProject.bind(this),loading:!i,disabled:!i,children:[t.jsx(a.Icon,{name:"download"}),d("scene_detail_page.download_scene")]})]})]}),t.jsxs("div",{className:"SceneViewPage"+(n?" preview":" mini"),children:[t.jsx("div",{className:"thumbnail",style:{backgroundImage:`url("${i.thumbnail}")`},children:t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx(k,{isReadOnly:!0,type:this.getType()},i.id)})}),t.jsxs("div",{className:"scene-action-list",children:[c&&t.jsx("div",{className:"scene-action",children:t.jsx(j,{text:t.jsxs(t.Fragment,{children:[t.jsx(h,{name:c.like?"heart-full":"heart"}),c.likes>0&&t.jsx("span",{className:"LikeCount",children:c.likes})]}),type:"circle",onClick:this.handleLike})}),t.jsx("div",{style:{flex:1}}),t.jsx(a.Responsive,{minWidth:1025,as:u.Fragment,children:t.jsx("div",{className:"scene-action",children:t.jsx(j,{icon:"view",type:"circle",isActive:n,isDisabled:!o,onClick:this.handlePreview})})})]}),t.jsxs("div",{className:"detail",children:[t.jsxs("div",{className:"title",children:[t.jsx("h1",{children:i.title}),t.jsx(K,{scene:x})]}),this.renderAuthor(),i.description&&t.jsx("div",{className:"description",children:t.jsx("p",{children:i.description})}),t.jsxs("div",{className:"component-list",children:[t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-parcel"})," ",d("public_page.parcel_count",{parcels:this.getParcelCount()})]}),t.jsxs("div",{className:"component",children:[t.jsx(h,{name:"scene-object"})," ",d("public_page.item_count",{items:this.getObjectCount()})]})]})]})]}),!n&&t.jsx(g,{})]})}};const G=s=>({isPreviewing:S(s),isReady:!F(s)&&m(s),isFetching:I(s)&&!m(s),isLoggedIn:R(s),currentProject:A(s),currentPool:E(s),scenes:_(s),currentAuthor:O(s),isLoading:T(s)||!!B(s).length}),H=s=>({onLikePool:(r,e=!0)=>s(M(r,e)),onPreview:()=>s(D(!0)),onCloseEditor:()=>s(U()),onLoadProject:(r,e=P.PUBLIC)=>s($(r,e)),onOpenModal:(r,e)=>s(V(r,e)),onLoadProjectScene:(r,e)=>s(q(r,e))}),se=w(G,H)(N(z));export{se as default};
@@ -1 +1 @@
1
- import{bO as h,bP as s}from"./index-jWw2HvoU.js";var C={};function N(){return C}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function M(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=M(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=M(t,n)===-i;E(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function b(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},be={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Me={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:b({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:b({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:b({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:b({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:be,defaultMatchWidth:"any",parsePatterns:Me,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=N(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var O=Math.round(d/S);return r.formatDistance("xDays",O,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var x=Math.round(d/P);return r.formatDistance("xMonths",x,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,b as d,D as e,Se as f,N as g,we as l};
1
+ import{bO as h,bP as s}from"./index-Cc2cKcEM.js";var C={};function N(){return C}function D(e){var a=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return a.setUTCFullYear(e.getFullYear()),e.getTime()-a.getTime()}function M(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getTime()-n.getTime();return i<0?-1:i>0?1:i}function A(e,a){h(2,arguments);var t=s(e),n=s(a),i=t.getFullYear()-n.getFullYear(),o=t.getMonth()-n.getMonth();return i*12+o}function X(e,a){return h(2,arguments),s(e).getTime()-s(a).getTime()}var T={ceil:Math.ceil,round:Math.round,floor:Math.floor,trunc:function(a){return a<0?Math.ceil(a):Math.floor(a)}},_="trunc";function I(e){return e?T[e]:T[_]}function R(e){h(1,arguments);var a=s(e);return a.setHours(23,59,59,999),a}function Y(e){h(1,arguments);var a=s(e),t=a.getMonth();return a.setFullYear(a.getFullYear(),t+1,0),a.setHours(23,59,59,999),a}function E(e){h(1,arguments);var a=s(e);return R(a).getTime()===Y(a).getTime()}function j(e,a){h(2,arguments);var t=s(e),n=s(a),i=M(t,n),o=Math.abs(A(t,n)),r;if(o<1)r=0;else{t.getMonth()===1&&t.getDate()>27&&t.setDate(30),t.setMonth(t.getMonth()-i*o);var l=M(t,n)===-i;E(s(e))&&o===1&&M(e,n)===1&&(l=!1),r=i*(o-Number(l))}return r===0?0:r}function q(e,a,t){h(2,arguments);var n=X(e,a)/1e3;return I(void 0)(n)}var V={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},z=function(a,t,n){var i,o=V[a];return typeof o=="string"?i=o:t===1?i=o.one:i=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i};function w(e){return function(){var a=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},t=a.width?String(a.width):e.defaultWidth,n=e.formats[t]||e.formats[e.defaultWidth];return n}}var H={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},J={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},L={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},U={date:w({formats:H,defaultWidth:"full"}),time:w({formats:J,defaultWidth:"full"}),dateTime:w({formats:L,defaultWidth:"full"})},Q={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},$=function(a,t,n,i){return Q[a]};function g(e){return function(a,t){var n=t!=null&&t.context?String(t.context):"standalone",i;if(n==="formatting"&&e.formattingValues){var o=e.defaultFormattingWidth||e.defaultWidth,r=t!=null&&t.width?String(t.width):o;i=e.formattingValues[r]||e.formattingValues[o]}else{var l=e.defaultWidth,u=t!=null&&t.width?String(t.width):e.defaultWidth;i=e.values[u]||e.values[l]}var m=e.argumentCallback?e.argumentCallback(a):a;return i[m]}}var B={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},K={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},G={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Z={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},ee={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},te={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},ae=function(a,t){var n=Number(a),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},ne={ordinalNumber:ae,era:g({values:B,defaultWidth:"wide"}),quarter:g({values:K,defaultWidth:"wide",argumentCallback:function(a){return a-1}}),month:g({values:G,defaultWidth:"wide"}),day:g({values:Z,defaultWidth:"wide"}),dayPeriod:g({values:ee,defaultWidth:"wide",formattingValues:te,defaultFormattingWidth:"wide"})};function b(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=t.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],o=a.match(i);if(!o)return null;var r=o[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?ie(l,function(f){return f.test(r)}):re(l,function(f){return f.test(r)}),m;m=e.valueCallback?e.valueCallback(u):u,m=t.valueCallback?t.valueCallback(m):m;var c=a.slice(r.length);return{value:m,rest:c}}}function re(e,a){for(var t in e)if(e.hasOwnProperty(t)&&a(e[t]))return t}function ie(e,a){for(var t=0;t<e.length;t++)if(a(e[t]))return t}function oe(e){return function(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.match(e.matchPattern);if(!n)return null;var i=n[0],o=a.match(e.parsePattern);if(!o)return null;var r=e.valueCallback?e.valueCallback(o[0]):o[0];r=t.valueCallback?t.valueCallback(r):r;var l=a.slice(i.length);return{value:r,rest:l}}}var ue=/^(\d+)(th|st|nd|rd)?/i,se=/\d+/i,le={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},de={any:[/^b/i,/^(a|c)/i]},me={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},fe={any:[/1/i,/2/i,/3/i,/4/i]},he={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},ce={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},ve={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},ge={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},be={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Me={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},ye={ordinalNumber:oe({matchPattern:ue,parsePattern:se,valueCallback:function(a){return parseInt(a,10)}}),era:b({matchPatterns:le,defaultMatchWidth:"wide",parsePatterns:de,defaultParseWidth:"any"}),quarter:b({matchPatterns:me,defaultMatchWidth:"wide",parsePatterns:fe,defaultParseWidth:"any",valueCallback:function(a){return a+1}}),month:b({matchPatterns:he,defaultMatchWidth:"wide",parsePatterns:ce,defaultParseWidth:"any"}),day:b({matchPatterns:ve,defaultMatchWidth:"wide",parsePatterns:ge,defaultParseWidth:"any"}),dayPeriod:b({matchPatterns:be,defaultMatchWidth:"any",parsePatterns:Me,defaultParseWidth:"any"})},we={code:"en-US",formatDistance:z,formatLong:U,formatRelative:$,localize:ne,match:ye,options:{weekStartsOn:0,firstWeekContainsDate:1}};function W(e,a){if(e==null)throw new TypeError("assign requires that input parameter not be null or undefined");for(var t in a)Object.prototype.hasOwnProperty.call(a,t)&&(e[t]=a[t]);return e}function Pe(e){return W({},e)}var S=1440,pe=2520,P=43200,De=86400;function Se(e,a,t){var n,i;h(2,arguments);var o=N(),r=(n=(i=t==null?void 0:t.locale)!==null&&i!==void 0?i:o.locale)!==null&&n!==void 0?n:we;if(!r.formatDistance)throw new RangeError("locale must contain formatDistance property");var l=M(e,a);if(isNaN(l))throw new RangeError("Invalid time value");var u=W(Pe(t),{addSuffix:!!(t!=null&&t.addSuffix),comparison:l}),m,c;l>0?(m=s(a),c=s(e)):(m=s(e),c=s(a));var f=q(c,m),k=(D(c)-D(m))/1e3,d=Math.round((f-k)/60),v;if(d<2)return t!=null&&t.includeSeconds?f<5?r.formatDistance("lessThanXSeconds",5,u):f<10?r.formatDistance("lessThanXSeconds",10,u):f<20?r.formatDistance("lessThanXSeconds",20,u):f<40?r.formatDistance("halfAMinute",0,u):f<60?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",1,u):d===0?r.formatDistance("lessThanXMinutes",1,u):r.formatDistance("xMinutes",d,u);if(d<45)return r.formatDistance("xMinutes",d,u);if(d<90)return r.formatDistance("aboutXHours",1,u);if(d<S){var F=Math.round(d/60);return r.formatDistance("aboutXHours",F,u)}else{if(d<pe)return r.formatDistance("xDays",1,u);if(d<P){var O=Math.round(d/S);return r.formatDistance("xDays",O,u)}else if(d<De)return v=Math.round(d/P),r.formatDistance("aboutXMonths",v,u)}if(v=j(c,m),v<12){var x=Math.round(d/P);return r.formatDistance("xMonths",x,u)}else{var p=v%12,y=Math.floor(v/12);return p<3?r.formatDistance("aboutXYears",y,u):p<9?r.formatDistance("overXYears",y,u):r.formatDistance("almostXYears",y+1,u)}}export{g as a,w as b,oe as c,b as d,D as e,Se as f,N as g,we as l};
@@ -1 +1 @@
1
- var V=Object.defineProperty;var q=(t,s,a)=>s in t?V(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var T=(t,s,a)=>q(t,typeof s!="symbol"?s+"":s,a);import{aB as z,D as r,eb as X,H as e,bA as J,bS as Z,bT as ee,ec as te,ed as se,G as l,ee as ne,a1 as B,K as I,cB as ae,M as n,aA as oe,bB as le,N as P,a_ as ie,bZ as re,X as K,ef as ce,eg as de,bw as S,eh as me,ei as ue,T as ge,ej as pe,b3 as G,ek as he,af as _e,ah as xe,aj as je,I as be,el as Se,b_ as Ee,S as De,O as ye,cH as Ce,c$ as A,c0 as Ne,aW as Te,V as Ie,W as fe,Y as ke,em as Re,cK as Me,en as we,c_ as Le,c1 as ve}from"./index-jWw2HvoU.js";import{B as Oe}from"./Back-CyRxt1wV.js";import{N as Pe}from"./NotFound-ooP6Sr9r.js";import{S as $e}from"./SDKTag-CKlOg8VX.js";import{a as F,S as Be}from"./SceneStats.container-lRb7bnLM.js";import"./date-DITHkQIA.js";import"./index-Dbqncsf4.js";const U=z.get("EXPLORER_URL",""),Ae=z.get("WORLDS_CONTENT_SERVER","");let Fe=class extends r.PureComponent{constructor(){super(...arguments);T(this,"getHighlightLayer",(a,o)=>(c,u)=>{const{deployment:d,landTiles:g}=this.props,i=le(c,u),h=g[i];return h&&d.parcels.some(_=>_===i)?{color:a[h.land.role],scale:o}:null});T(this,"renderThumbnail",()=>{const{deployment:a,landTiles:o,project:c}=this.props,[u,d]=X(a.base);return(a.base in o?o[a.base].land.id:null)?e.jsx("div",{className:"atlas-wrapper",children:e.jsx(J,{x:u,y:d,isDraggable:!1,zoom:.75,layers:[this.getHighlightLayer(Z,1.4),this.getHighlightLayer(ee,1.2)]})}):e.jsx("div",{className:"thumbnail-wrapper",children:e.jsx("img",{className:"thumbnail",src:c.thumbnail,alt:c.description})})});T(this,"getExplorerUrl",a=>te?`${U}/?realm=${Ae}/world/${a}&NETWORK=sepolia`:`${U}/world/${a}`)}render(){const{project:a,deployment:o,landTiles:c,history:u,onOpenModal:d}=this.props,g=o.base in c?c[o.base].land.id:null,i=o.world?o.world:o.base,h=se(a,o);let _=l("scene_detail_page.published");return h===ne.NEEDS_SYNC&&(_=l("scene_detail_page.unsynced")),e.jsxs("div",{className:B("DeploymentDetail",{clickable:g}),onClick:()=>g&&u.push(I.landDetail(g)),children:[this.renderThumbnail(),e.jsx(F,{label:l("scene_detail_page.status"),children:_}),e.jsx(F,{label:l("scene_detail_page.location"),children:e.jsxs("div",{className:B({"world-url":o.world}),children:[i,o.world?e.jsxs(e.Fragment,{children:[e.jsx(ae,{role:"button",text:this.getExplorerUrl(o.world),showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})}),e.jsx("a",{href:this.getExplorerUrl(o.world),target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]}):null]})}),e.jsx(Be,{deployment:o}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(n.Dropdown.Menu,{children:e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.unpublish"),onClick:()=>d("DeployModal",{view:oe.CLEAR_DEPLOYMENT,deploymentId:o.id})})})})]})}};const Ue=t=>({landTiles:re(t)}),He=t=>({onOpenModal:(s,a)=>t(K(s,a))}),ze=P(Ue,He)(ie(Fe)),Ke="https://cdn.decentraland.org/@dcl/builder-site/7.7.3-15905947147.commit-22c3843/assets/automatic_migrate-DQYv7lI_.webp",Ge="https://cdn.decentraland.org/@dcl/builder-site/7.7.3-15905947147.commit-22c3843/assets/migrate_smart_items-D2zNoKEa.webp";var m=(t=>(t.INFO="info",t.MIGRATE="migrate",t))(m||{});function H(t){return t&&t.sdk6?Object.values(t.sdk6.components).filter(a=>a.type===ce.Script).length:0}const Qe="_modalContainer_5geih_1",We="_subtitle_5geih_20",Ye="_content_5geih_27",Ve="_actions_5geih_35",qe="_loadingMessage_5geih_53",Xe="_loader_5geih_57",b={modalContainer:Qe,subtitle:We,content:Ye,actions:Ve,loadingMessage:qe,loader:Xe};function Je({project:t,scene:s,isLoading:a,isSavingSDK6Copy:o,isSavingScene:c,onNavigate:u,onClose:d,onMigrateScene:g}){const[i,h]=r.useState(m.INFO),[_,x]=r.useState(!1),j=r.useMemo(()=>H(s)>0,[s]),D=r.useCallback(()=>{h(m.INFO)},[]),y=r.useCallback(()=>{a||d()},[a,d]),f=r.useCallback(()=>{switch(i){case m.INFO:return de;case m.MIGRATE:return t!=null&&t.thumbnail?t.thumbnail:j?Ge:Ke}},[i,j,t]),k=r.useCallback(()=>{switch(i){case m.INFO:h(m.MIGRATE);break;case m.MIGRATE:t&&g(t,_);break}},[i,_,t,g]),R=()=>i===m.MIGRATE&&j?{smartItemsCount:H(s)}:{},M=()=>!a||i!==m.MIGRATE?e.jsx(n.Button,{disabled:a,primary:!0,onClick:k,children:l(`migrate_to_sdk7_modal.${E}.action`)}):o?e.jsxs("span",{className:b.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny",inline:!0,className:b.loader}),l("migrate_to_sdk7_modal.saving_copy")]}):c?e.jsxs("span",{className:b.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny"}),l("migrate_to_sdk7_modal.migrating_scene")]}):null,E=j?`${i}_smart_items`:i,w=!a&&(i!==m.MIGRATE||j);return e.jsxs(n.Modal,{open:!0,className:b.modalContainer,onClose:y,children:[e.jsx(n.ModalNavigation,{title:l(`migrate_to_sdk7_modal.${E}.title`),onBack:i!==m.INFO?D:void 0,onClose:y}),e.jsxs(n.ModalContent,{className:b.content,children:[e.jsx("p",{className:b.subtitle,children:l(`migrate_to_sdk7_modal.${E}.subtitle`,{b:C=>e.jsx("b",{children:C}),br:()=>e.jsx("br",{}),...R()})}),e.jsx("div",{style:{width:"648px",height:"324px",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${f()}`}}),i===m.MIGRATE&&e.jsx(n.Checkbox,{disabled:a,checked:_,label:l("migrate_to_sdk7_modal.save_a_copy"),onChange:(C,{checked:L})=>{x(!!L)}})]}),e.jsxs(n.ModalActions,{className:b.actions,children:[M(),w&&e.jsx(n.Button,{disabled:a,secondary:!0,onClick:()=>u(I.sceneEditor(t==null?void 0:t.id)),children:l("migrate_to_sdk7_modal.use_legacy_builder")})]})]})}const Ze=(t,s)=>{var a,o;return{isLoading:S(ue(t),me),isSavingScene:!!((a=s.project)!=null&&a.id)&&ge(t).has((o=s.project)==null?void 0:o.id),isSavingSDK6Copy:S(G(t),pe)}},et=t=>({onMigrateScene:(s,a)=>t(he(s,a))}),tt=P(Ze,et)(Je),st=t=>{const{project:s,scene:a,isLoading:o,deployments:c,onOpenModal:u,onDelete:d,onDuplicate:g,onNavigate:i,onLoadProjectScene:h}=t,[_,x]=r.useState(!1),[j,D]=r.useState(!1);r.useEffect(()=>{s&&!a&&h(s)},[s,a,h]);const y=()=>e.jsx(n.Center,{children:e.jsx(n.Loader,{active:!0,size:"large"})}),f=()=>e.jsx(Pe,{}),k=r.useCallback(()=>{u("EditProjectModal")},[u]),R=r.useCallback(()=>{x(!0)},[x]),M=r.useCallback(()=>{g(s)},[s,g]),E=r.useCallback(()=>{d(s),x(!1)},[s,d,x]),w=r.useCallback(()=>{x(!1)},[x]),C=r.useCallback(()=>{a!=null&&a.sdk6?D(!0):i(I.inspector(s==null?void 0:s.id))},[s,a,i]),L=()=>{const{project:p,isLoading:N,isLoadingDeployments:v}=t;return N||v||!p?null:e.jsx(be,{projectId:p.id,className:"deployment-status"})},Q=(p,N)=>{const{isLoadingDeployments:v,onNavigate:W,onOpenModal:Y,scene:O}=t;return e.jsxs(e.Fragment,{children:[e.jsxs(n.Section,{size:"large",children:[e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsxs(n.Row,{children:[e.jsx(Oe,{absolute:!0,onClick:()=>W(I.scenes())}),e.jsxs(n.Header,{className:"name",children:[p.title,e.jsx(n.Icon,{name:"edit outline",onClick:k})]})]})}),e.jsx(n.Column,{className:"actions",align:"right",children:e.jsxs(n.Row,{children:[e.jsxs(n.Button,{inverted:!0,className:"download-button",onClick:()=>Y("ExportModal",{project:p}),children:[e.jsx(n.Icon,{name:"download"}),l("scene_detail_page.download_scene")]}),e.jsxs(n.Button,{primary:!0,className:"edit-button",disabled:!O,loading:!O,onClick:C,children:[e.jsx(n.Icon,{name:"edit outline"}),l("scene_detail_page.edit_scene")]}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.duplicate"),onClick:M}),e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.delete"),onClick:R})]})})]})})]}),e.jsxs(n.Row,{className:"status-container",children:[L(),e.jsx($e,{scene:O})]})]}),e.jsx(n.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:p.thumbnail?`url(${p.thumbnail})`:""}})}),e.jsxs(n.Section,{className:p.description?"":"no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:l("scene_detail_page.published_in")}),v?e.jsx(n.Loader,{active:!0,size:"small"}):N.length===0?e.jsxs(n.Empty,{className:"empty-deployments-container",children:[e.jsx("div",{className:"empty-deployments-thumbnail"}),l("scene_detail_page.no_deployments")]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:N.map($=>e.jsx(ze,{project:p,deployment:$},$.id))}),e.jsx("div",{className:"notice",children:l("analytics.notice")})]})]}),p.description?e.jsxs(n.Section,{className:"description no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:l("scene_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}):null]})};return e.jsxs(e.Fragment,{children:[e.jsx(xe,{}),e.jsxs(n.Page,{className:"SceneDetailPage",isFullscreen:!0,children:[o&&!s?y():null,!o&&!s?f():null,s?e.jsxs(e.Fragment,{children:[Q(s,c),e.jsx(n.Confirm,{size:"tiny",open:_,header:l("project_card.confirm_delete_header",{title:s.title}),content:l("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(n.Button,{primary:!0,children:l("global.confirm")}),cancelButton:e.jsx(n.Button,{secondary:!0,children:l("global.cancel")}),onCancel:w,onConfirm:E})]}):null,j&&e.jsx(tt,{project:s,scene:a,onNavigate:i,onClose:()=>D(!1)})]}),e.jsx(je,{})]})},nt=_e.memo(st),at=t=>{const s=Se(t),a=Ee(t),o=s&&s in a?a[s]:null,c=De(t),u=s&&s in c?c[s]:[],d=o&&ye(t)[o.sceneId];return{project:o,deployments:u,scene:d,isLoading:S(G(t),Re),isLoadingDeployments:S(Ce(t),Me)||S(A(t),we)||S(A(t),Le)||S(Ne(t),ve)}},ot=t=>({onNavigate:s=>t(Te(s)),onOpenModal:(s,a)=>t(K(s,a)),onDelete:s=>t(Ie(s)),onDuplicate:s=>t(fe(s)),onLoadProjectScene:(s,a)=>t(ke(s,a))}),ht=P(at,ot)(nt);export{ht as default};
1
+ var V=Object.defineProperty;var q=(t,s,a)=>s in t?V(t,s,{enumerable:!0,configurable:!0,writable:!0,value:a}):t[s]=a;var T=(t,s,a)=>q(t,typeof s!="symbol"?s+"":s,a);import{aB as z,D as r,eb as X,H as e,bA as J,bS as Z,bT as ee,ec as te,ed as se,G as l,ee as ne,a1 as B,K as f,cB as ae,M as n,aA as oe,bB as le,N as P,a_ as ie,bZ as re,X as K,ef as ce,eg as de,bw as S,eh as me,ei as ue,T as ge,ej as pe,b3 as G,ek as he,af as _e,ah as xe,aj as je,I as be,el as Se,b_ as Ee,S as De,O as ye,cH as Ce,c$ as A,c0 as Ne,aW as Te,V as fe,W as Ie,Y as ke,em as Re,cK as Me,en as we,c_ as Le,c1 as ve}from"./index-Cc2cKcEM.js";import{B as Oe}from"./Back-zhS4dnPe.js";import{N as Pe}from"./NotFound-BcdJ_D3Z.js";import{S as $e}from"./SDKTag-CRDi6A3C.js";import{a as F,S as Be}from"./SceneStats.container-BGpjDMCh.js";import"./date-CqlTTNxl.js";import"./index-DyQiO1Ah.js";const U=z.get("EXPLORER_URL",""),Ae=z.get("WORLDS_CONTENT_SERVER","");let Fe=class extends r.PureComponent{constructor(){super(...arguments);T(this,"getHighlightLayer",(a,o)=>(c,u)=>{const{deployment:d,landTiles:g}=this.props,i=le(c,u),h=g[i];return h&&d.parcels.some(_=>_===i)?{color:a[h.land.role],scale:o}:null});T(this,"renderThumbnail",()=>{const{deployment:a,landTiles:o,project:c}=this.props,[u,d]=X(a.base);return(a.base in o?o[a.base].land.id:null)?e.jsx("div",{className:"atlas-wrapper",children:e.jsx(J,{x:u,y:d,isDraggable:!1,zoom:.75,layers:[this.getHighlightLayer(Z,1.4),this.getHighlightLayer(ee,1.2)]})}):e.jsx("div",{className:"thumbnail-wrapper",children:e.jsx("img",{className:"thumbnail",src:c.thumbnail,alt:c.description})})});T(this,"getExplorerUrl",a=>te?`${U}/?realm=${Ae}/world/${a}&NETWORK=sepolia`:`${U}/world/${a}`)}render(){const{project:a,deployment:o,landTiles:c,history:u,onOpenModal:d}=this.props,g=o.base in c?c[o.base].land.id:null,i=o.world?o.world:o.base,h=se(a,o);let _=l("scene_detail_page.published");return h===ne.NEEDS_SYNC&&(_=l("scene_detail_page.unsynced")),e.jsxs("div",{className:B("DeploymentDetail",{clickable:g}),onClick:()=>g&&u.push(f.landDetail(g)),children:[this.renderThumbnail(),e.jsx(F,{label:l("scene_detail_page.status"),children:_}),e.jsx(F,{label:l("scene_detail_page.location"),children:e.jsxs("div",{className:B({"world-url":o.world}),children:[i,o.world?e.jsxs(e.Fragment,{children:[e.jsx(ae,{role:"button",text:this.getExplorerUrl(o.world),showPopup:!0,children:e.jsx(n.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})}),e.jsx("a",{href:this.getExplorerUrl(o.world),target:"_blank",rel:"noopener noreferrer",children:e.jsx(n.Icon,{name:"external alternate"})})]}):null]})}),e.jsx(Be,{deployment:o}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(n.Dropdown.Menu,{children:e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.unpublish"),onClick:()=>d("DeployModal",{view:oe.CLEAR_DEPLOYMENT,deploymentId:o.id})})})})]})}};const Ue=t=>({landTiles:re(t)}),He=t=>({onOpenModal:(s,a)=>t(K(s,a))}),ze=P(Ue,He)(ie(Fe)),Ke="https://cdn.decentraland.org/@dcl/builder-site/7.7.3-15927519190.commit-5e33e4f/assets/automatic_migrate-DQYv7lI_.webp",Ge="https://cdn.decentraland.org/@dcl/builder-site/7.7.3-15927519190.commit-5e33e4f/assets/migrate_smart_items-D2zNoKEa.webp";var m=(t=>(t.INFO="info",t.MIGRATE="migrate",t))(m||{});function H(t){return t&&t.sdk6?Object.values(t.sdk6.components).filter(a=>a.type===ce.Script).length:0}const Qe="_modalContainer_5geih_1",We="_subtitle_5geih_20",Ye="_content_5geih_27",Ve="_actions_5geih_35",qe="_loadingMessage_5geih_53",Xe="_loader_5geih_57",b={modalContainer:Qe,subtitle:We,content:Ye,actions:Ve,loadingMessage:qe,loader:Xe};function Je({project:t,scene:s,isLoading:a,isSavingSDK6Copy:o,isSavingScene:c,onNavigate:u,onClose:d,onMigrateScene:g}){const[i,h]=r.useState(m.INFO),[_,x]=r.useState(!1),j=r.useMemo(()=>H(s)>0,[s]),D=r.useCallback(()=>{h(m.INFO)},[]),y=r.useCallback(()=>{a||d()},[a,d]),I=r.useCallback(()=>{switch(i){case m.INFO:return de;case m.MIGRATE:return t!=null&&t.thumbnail?t.thumbnail:j?Ge:Ke}},[i,j,t]),k=r.useCallback(()=>{switch(i){case m.INFO:h(m.MIGRATE);break;case m.MIGRATE:t&&g(t,_);break}},[i,_,t,g]),R=()=>i===m.MIGRATE&&j?{smartItemsCount:H(s)}:{},M=()=>!a||i!==m.MIGRATE?e.jsx(n.Button,{disabled:a,primary:!0,onClick:k,children:l(`migrate_to_sdk7_modal.${E}.action`)}):o?e.jsxs("span",{className:b.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny",inline:!0,className:b.loader}),l("migrate_to_sdk7_modal.saving_copy")]}):c?e.jsxs("span",{className:b.loadingMessage,children:[e.jsx(n.Loader,{size:"tiny"}),l("migrate_to_sdk7_modal.migrating_scene")]}):null,E=j?`${i}_smart_items`:i,w=!a&&(i!==m.MIGRATE||j);return e.jsxs(n.Modal,{open:!0,className:b.modalContainer,onClose:y,children:[e.jsx(n.ModalNavigation,{title:l(`migrate_to_sdk7_modal.${E}.title`),onBack:i!==m.INFO?D:void 0,onClose:y}),e.jsxs(n.ModalContent,{className:b.content,children:[e.jsx("p",{className:b.subtitle,children:l(`migrate_to_sdk7_modal.${E}.subtitle`,{b:C=>e.jsx("b",{children:C}),br:()=>e.jsx("br",{}),...R()})}),e.jsx("div",{style:{width:"648px",height:"324px",backgroundPosition:"center",backgroundSize:"cover",backgroundImage:`url(${I()}`}}),i===m.MIGRATE&&e.jsx(n.Checkbox,{disabled:a,checked:_,label:l("migrate_to_sdk7_modal.save_a_copy"),onChange:(C,{checked:L})=>{x(!!L)}})]}),e.jsxs(n.ModalActions,{className:b.actions,children:[M(),w&&e.jsx(n.Button,{disabled:a,secondary:!0,onClick:()=>u(f.sceneEditor(t==null?void 0:t.id)),children:l("migrate_to_sdk7_modal.use_legacy_builder")})]})]})}const Ze=(t,s)=>{var a,o;return{isLoading:S(ue(t),me),isSavingScene:!!((a=s.project)!=null&&a.id)&&ge(t).has((o=s.project)==null?void 0:o.id),isSavingSDK6Copy:S(G(t),pe)}},et=t=>({onMigrateScene:(s,a)=>t(he(s,a))}),tt=P(Ze,et)(Je),st=t=>{const{project:s,scene:a,isLoading:o,deployments:c,onOpenModal:u,onDelete:d,onDuplicate:g,onNavigate:i,onLoadProjectScene:h}=t,[_,x]=r.useState(!1),[j,D]=r.useState(!1);r.useEffect(()=>{s&&!a&&h(s)},[s,a,h]);const y=()=>e.jsx(n.Center,{children:e.jsx(n.Loader,{active:!0,size:"large"})}),I=()=>e.jsx(Pe,{}),k=r.useCallback(()=>{u("EditProjectModal")},[u]),R=r.useCallback(()=>{x(!0)},[x]),M=r.useCallback(()=>{g(s)},[s,g]),E=r.useCallback(()=>{d(s),x(!1)},[s,d,x]),w=r.useCallback(()=>{x(!1)},[x]),C=r.useCallback(()=>{a!=null&&a.sdk6?D(!0):i(f.inspector(s==null?void 0:s.id))},[s,a,i]),L=()=>{const{project:p,isLoading:N,isLoadingDeployments:v}=t;return N||v||!p?null:e.jsx(be,{projectId:p.id,className:"deployment-status"})},Q=(p,N)=>{const{isLoadingDeployments:v,onNavigate:W,onOpenModal:Y,scene:O}=t;return e.jsxs(e.Fragment,{children:[e.jsxs(n.Section,{size:"large",children:[e.jsxs(n.Row,{children:[e.jsx(n.Column,{children:e.jsxs(n.Row,{children:[e.jsx(Oe,{absolute:!0,onClick:()=>W(f.scenes())}),e.jsxs(n.Header,{className:"name",children:[p.title,e.jsx(n.Icon,{name:"edit outline",onClick:k})]})]})}),e.jsx(n.Column,{className:"actions",align:"right",children:e.jsxs(n.Row,{children:[e.jsxs(n.Button,{inverted:!0,className:"download-button",onClick:()=>Y("ExportModal",{project:p}),children:[e.jsx(n.Icon,{name:"download"}),l("scene_detail_page.download_scene")]}),e.jsxs(n.Button,{primary:!0,className:"edit-button",disabled:!O,loading:!O,onClick:C,children:[e.jsx(n.Icon,{name:"edit outline"}),l("scene_detail_page.edit_scene")]}),e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.duplicate"),onClick:M}),e.jsx(n.Dropdown.Item,{text:l("scene_detail_page.actions.delete"),onClick:R})]})})]})})]}),e.jsxs(n.Row,{className:"status-container",children:[L(),e.jsx($e,{scene:O})]})]}),e.jsx(n.Section,{children:e.jsx("div",{className:"header-image",style:{backgroundImage:p.thumbnail?`url(${p.thumbnail})`:""}})}),e.jsxs(n.Section,{className:p.description?"":"no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:l("scene_detail_page.published_in")}),v?e.jsx(n.Loader,{active:!0,size:"small"}):N.length===0?e.jsxs(n.Empty,{className:"empty-deployments-container",children:[e.jsx("div",{className:"empty-deployments-thumbnail"}),l("scene_detail_page.no_deployments")]}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:N.map($=>e.jsx(ze,{project:p,deployment:$},$.id))}),e.jsx("div",{className:"notice",children:l("analytics.notice")})]})]}),p.description?e.jsxs(n.Section,{className:"description no-margin-bottom",children:[e.jsx(n.Header,{sub:!0,children:l("scene_detail_page.description")}),e.jsx("p",{className:"description-content",children:p.description})]}):null]})};return e.jsxs(e.Fragment,{children:[e.jsx(xe,{}),e.jsxs(n.Page,{className:"SceneDetailPage",isFullscreen:!0,children:[o&&!s?y():null,!o&&!s?I():null,s?e.jsxs(e.Fragment,{children:[Q(s,c),e.jsx(n.Confirm,{size:"tiny",open:_,header:l("project_card.confirm_delete_header",{title:s.title}),content:l("project_card.confirm_delete_content",{title:s.title}),confirmButton:e.jsx(n.Button,{primary:!0,children:l("global.confirm")}),cancelButton:e.jsx(n.Button,{secondary:!0,children:l("global.cancel")}),onCancel:w,onConfirm:E})]}):null,j&&e.jsx(tt,{project:s,scene:a,onNavigate:i,onClose:()=>D(!1)})]}),e.jsx(je,{})]})},nt=_e.memo(st),at=t=>{const s=Se(t),a=Ee(t),o=s&&s in a?a[s]:null,c=De(t),u=s&&s in c?c[s]:[],d=o&&ye(t)[o.sceneId];return{project:o,deployments:u,scene:d,isLoading:S(G(t),Re),isLoadingDeployments:S(Ce(t),Me)||S(A(t),we)||S(A(t),Le)||S(Ne(t),ve)}},ot=t=>({onNavigate:s=>t(Te(s)),onOpenModal:(s,a)=>t(K(s,a)),onDelete:s=>t(fe(s)),onDuplicate:s=>t(Ie(s)),onLoadProjectScene:(s,a)=>t(ke(s,a))}),ht=P(at,ot)(nt);export{ht as default};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var N=(a,l,e)=>l in a?f(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var c=(a,l,e)=>N(a,typeof l!="symbol"?l+"":l,e);import{D as j,aA as S,H as s,L as y,K as p,J as C,G as r,N as P,O as F,R as L,X as _,aM as d,ah as w,M as n,aj as A,aN as D,ac as E,aO as I,aP as M,aQ as O,aR as b,aS as B,aT as T,aU as R,aV as k,ae as G,ad as V,aW as m}from"./index-jWw2HvoU.js";import{B as $}from"./Back-CyRxt1wV.js";const W=["page","sortBy","sortOrder","group","ethAddress"];var x;let z=(x=class extends j.PureComponent{constructor(){super(...arguments);c(this,"state",{isDeleting:!1});c(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});c(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});c(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});c(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:S.CLEAR_DEPLOYMENT,projectId:e.id})})}render(){const{pool:e}=this.props,t=e.statistics?e.statistics.parcels:e.layout.cols*e.layout.rows;return s.jsxs(y,{to:p.poolView(e.id,"pool"),className:"PoolCard",children:[s.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${e.thumbnail})`}}),s.jsxs("div",{className:"project-data",children:[s.jsx("div",{className:"title-wrapper",children:s.jsx("div",{className:"title",children:e.title})}),s.jsx("div",{className:"description",title:e.description,children:s.jsxs("div",{className:"component-list",children:[s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-parcel"})," ",r("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",r("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},c(x,"defaultProps",{items:0}),x);const U=(a,l)=>{const{pool:e}=l,t=F(a)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:L(a)[l.pool.id]}},H=a=>({onOpenModal:(l,e)=>a(_(l,e))}),K=P(U,H)(z);let q=class extends j.PureComponent{constructor(){super(...arguments);c(this,"handleChangeGroup",(e,t)=>{const{group:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,group:t.value})});c(this,"handleChangeUser",(e,t)=>{const{ethAddress:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,ethAddress:t.value})});c(this,"handleChangeSort",(e,t)=>{const i=this.getFilters(),o=1;if(t.value&&i.sortBy!==t.value)switch(t.value){case d.NAME:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"desc"})}});c(this,"handlePageChange",(e,t)=>{const i=this.getFilters(),o=Number(t.activePage);!Number.isNaN(o)&&o>0&&this.handleChangeFilters({...i,page:o})})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=d.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return W.reduce((t,i)=>{const o=e[i];return o!==void 0&&(t[i]=o),t},{})}handleChangeFilters(e){const{onPageChange:t,onLoadPools:i}=this.props;t(e),i(e)}render(){const{pools:e,total:t,totalPages:i,isLoggedIn:o,onNavigateToScenes:h}=this.props,g=this.getFilters(),u={firstItem:null,lastItem:null};return g.page===1&&(u.prevItem=null),g.page===i&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(w,{}),s.jsx(n.Page,{isFullscreen:!0,children:s.jsxs("div",{className:"SceneListPage",children:[s.jsxs(n.Container,{children:[s.jsx(n.Section,{className:"navigation",children:s.jsxs(n.Row,{children:[s.jsx($,{absolute:!0,onClick:h}),s.jsx(n.Narrow,{children:s.jsxs(n.Row,{children:[s.jsx(n.Column,{children:s.jsx(n.Row,{children:s.jsx(n.Header,{size:"large",children:r("scene_list_page.projects_title")})})}),s.jsx(n.Column,{align:"right",children:s.jsxs(n.Row,{children:[s.jsx(n.Responsive,{minWidth:1025,as:j.Fragment,children:o&&s.jsx(n.Dropdown,{direction:"left",value:g.ethAddress||"all",options:[{value:"all",text:r("scene_list_page.filters.all_users")},{value:"me",text:r("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(n.Dropdown,{direction:"left",value:g.sortBy,options:[{value:d.NEWEST,text:r("scene_list_page.filters.newest")},{value:d.NAME,text:r("scene_list_page.filters.name")},{value:d.LIKES,text:r("scene_list_page.filters.likes")},{value:d.ITEMS,text:r("scene_list_page.filters.items")},{value:d.SMART_ITEMS,text:r("scene_list_page.filters.smart_items")},{value:d.SIZE,text:r("scene_list_page.filters.size")}],onChange:this.handleChangeSort})]})})]})})]})}),s.jsx(n.Narrow,{children:s.jsxs("div",{className:"PoolCardList",children:[e===null&&s.jsx(n.Loader,{active:!0,size:"huge"}),Array.isArray(e)&&t===0&&s.jsx("div",{className:"empty-projects",children:r("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(v=>s.jsx(K,{pool:v},v.id))})]})})]}),s.jsx(n.Container,{children:t!==null&&i!==null&&s.jsx(n.Pagination,{totalPages:i,activePage:g.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(A,{})]})}};const J=a=>({location:D(a),pools:E(a),poolGroups:I(a),total:M(a),totalPages:O(a),page:b(a),sortBy:B(a),sortOrder:T(a),group:R(a),ethAddress:k(a),isLoggedIn:G(a)}),Q=a=>({onOpenModal:(l,e)=>a(_(l,e)),onLoadPools:l=>a(V(l)),onPageChange:l=>a(m(p.poolSearch(l))),onNavigateToScenes:()=>a(m(p.scenes())),onNavegateToViewPool:l=>a(m(p.poolView(l)))}),te=P(J,Q)(q);export{te as default};
1
+ var f=Object.defineProperty;var N=(a,l,e)=>l in a?f(a,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[l]=e;var c=(a,l,e)=>N(a,typeof l!="symbol"?l+"":l,e);import{D as j,aA as S,H as s,L as y,K as p,J as C,G as r,N as P,O as F,R as L,X as _,aM as d,ah as w,M as n,aj as A,aN as D,ac as E,aO as I,aP as M,aQ as O,aR as b,aS as B,aT as T,aU as R,aV as k,ae as G,ad as V,aW as m}from"./index-Cc2cKcEM.js";import{B as $}from"./Back-zhS4dnPe.js";const W=["page","sortBy","sortOrder","group","ethAddress"];var x;let z=(x=class extends j.PureComponent{constructor(){super(...arguments);c(this,"state",{isDeleting:!1});c(this,"handleOnClick",()=>{const{onClick:e,pool:t}=this.props;e&&e(t)});c(this,"handleConfirmDeleteProject",()=>{this.setState({isDeleting:!0})});c(this,"handleCancelDeleteProject",()=>{this.setState({isDeleting:!1})});c(this,"handleClearDeployment",()=>{const{pool:e,onOpenModal:t}=this.props;t("DeployModal",{view:S.CLEAR_DEPLOYMENT,projectId:e.id})})}render(){const{pool:e}=this.props,t=e.statistics?e.statistics.parcels:e.layout.cols*e.layout.rows;return s.jsxs(y,{to:p.poolView(e.id,"pool"),className:"PoolCard",children:[s.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${e.thumbnail})`}}),s.jsxs("div",{className:"project-data",children:[s.jsx("div",{className:"title-wrapper",children:s.jsx("div",{className:"title",children:e.title})}),s.jsx("div",{className:"description",title:e.description,children:s.jsxs("div",{className:"component-list",children:[s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-parcel"})," ",r("public_page.parcel_count",{parcels:t})]}),e.statistics&&s.jsxs("div",{className:"component",children:[s.jsx(C,{name:"scene-object"})," ",r("public_page.item_count",{items:e.statistics.transforms})]})]})})]})]})}},c(x,"defaultProps",{items:0}),x);const U=(a,l)=>{const{pool:e}=l,t=F(a)[e.sceneId];return{items:t&&t.sdk6?t.sdk6.metrics.entities:0,deploymentStatus:L(a)[l.pool.id]}},H=a=>({onOpenModal:(l,e)=>a(_(l,e))}),K=P(U,H)(z);let q=class extends j.PureComponent{constructor(){super(...arguments);c(this,"handleChangeGroup",(e,t)=>{const{group:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,group:t.value})});c(this,"handleChangeUser",(e,t)=>{const{ethAddress:i,...o}=this.getFilters(),h=1;t.value==="all"?this.handleChangeFilters({...o,page:h}):this.handleChangeFilters({...o,page:h,ethAddress:t.value})});c(this,"handleChangeSort",(e,t)=>{const i=this.getFilters(),o=1;if(t.value&&i.sortBy!==t.value)switch(t.value){case d.NAME:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"asc"});break;default:this.handleChangeFilters({...i,page:o,sortBy:t.value,sortOrder:"desc"})}});c(this,"handlePageChange",(e,t)=>{const i=this.getFilters(),o=Number(t.activePage);!Number.isNaN(o)&&o>0&&this.handleChangeFilters({...i,page:o})})}componentDidMount(){const{location:e}=this.props,t=this.getFilters();(e.search===""||e.search==="?")&&(t.sortBy=d.NEWEST,t.sortOrder="desc"),this.handleChangeFilters(t)}getFilters(e=this.props){return W.reduce((t,i)=>{const o=e[i];return o!==void 0&&(t[i]=o),t},{})}handleChangeFilters(e){const{onPageChange:t,onLoadPools:i}=this.props;t(e),i(e)}render(){const{pools:e,total:t,totalPages:i,isLoggedIn:o,onNavigateToScenes:h}=this.props,g=this.getFilters(),u={firstItem:null,lastItem:null};return g.page===1&&(u.prevItem=null),g.page===i&&(u.nextItem=null),s.jsxs(s.Fragment,{children:[s.jsx(w,{}),s.jsx(n.Page,{isFullscreen:!0,children:s.jsxs("div",{className:"SceneListPage",children:[s.jsxs(n.Container,{children:[s.jsx(n.Section,{className:"navigation",children:s.jsxs(n.Row,{children:[s.jsx($,{absolute:!0,onClick:h}),s.jsx(n.Narrow,{children:s.jsxs(n.Row,{children:[s.jsx(n.Column,{children:s.jsx(n.Row,{children:s.jsx(n.Header,{size:"large",children:r("scene_list_page.projects_title")})})}),s.jsx(n.Column,{align:"right",children:s.jsxs(n.Row,{children:[s.jsx(n.Responsive,{minWidth:1025,as:j.Fragment,children:o&&s.jsx(n.Dropdown,{direction:"left",value:g.ethAddress||"all",options:[{value:"all",text:r("scene_list_page.filters.all_users")},{value:"me",text:r("scene_list_page.filters.only_me")}],onChange:this.handleChangeUser})}),s.jsx(n.Dropdown,{direction:"left",value:g.sortBy,options:[{value:d.NEWEST,text:r("scene_list_page.filters.newest")},{value:d.NAME,text:r("scene_list_page.filters.name")},{value:d.LIKES,text:r("scene_list_page.filters.likes")},{value:d.ITEMS,text:r("scene_list_page.filters.items")},{value:d.SMART_ITEMS,text:r("scene_list_page.filters.smart_items")},{value:d.SIZE,text:r("scene_list_page.filters.size")}],onChange:this.handleChangeSort})]})})]})})]})}),s.jsx(n.Narrow,{children:s.jsxs("div",{className:"PoolCardList",children:[e===null&&s.jsx(n.Loader,{active:!0,size:"huge"}),Array.isArray(e)&&t===0&&s.jsx("div",{className:"empty-projects",children:r("scene_list_page.no_projects")}),Array.isArray(e)&&t!==0&&s.jsx(s.Fragment,{children:e.map(v=>s.jsx(K,{pool:v},v.id))})]})})]}),s.jsx(n.Container,{children:t!==null&&i!==null&&s.jsx(n.Pagination,{totalPages:i,activePage:g.page,onPageChange:this.handlePageChange,...u})})]})}),s.jsx(A,{})]})}};const J=a=>({location:D(a),pools:E(a),poolGroups:I(a),total:M(a),totalPages:O(a),page:b(a),sortBy:B(a),sortOrder:T(a),group:R(a),ethAddress:k(a),isLoggedIn:G(a)}),Q=a=>({onOpenModal:(l,e)=>a(_(l,e)),onLoadPools:l=>a(V(l)),onPageChange:l=>a(m(p.poolSearch(l))),onNavigateToScenes:()=>a(m(p.scenes())),onNavegateToViewPool:l=>a(m(p.poolView(l)))}),te=P(J,Q)(q);export{te as default};
@@ -1 +1 @@
1
- var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{D as b,dv as O,bD as v,dw as L,bI as x,H as s,M as u,cd as S,G as o,L as y,K as E,ce as R,b8 as N,cc as _,bm as P,N as w,dx as C}from"./index-jWw2HvoU.js";import{L as A}from"./LandAction-DmjZtHFE.js";import{L as D}from"./LandProviderPage-BzHJPnG2.js";import"./Back-CyRxt1wV.js";import"./NotFound-ooP6Sr9r.js";class T extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!L(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(S,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(y,{className:"cancel",to:E.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(R,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let F=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(D,{children:e=>s.jsx(A,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(T,{land:e,onSetOperator:a})})})}};const U=r=>({onSetOperator:(a,e)=>r(C(a,e))}),K=w(void 0,U)(F);export{K as default};
1
+ var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{D as b,dv as O,bD as v,dw as L,bI as x,H as s,M as u,cd as S,G as o,L as y,K as E,ce as R,b8 as N,cc as _,bm as P,N as w,dx as C}from"./index-Cc2cKcEM.js";import{L as A}from"./LandAction-CdMlXtXf.js";import{L as D}from"./LandProviderPage-WPVlnS7x.js";import"./Back-zhS4dnPe.js";import"./NotFound-BcdJ_D3Z.js";class T extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!L(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(S,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(y,{className:"cancel",to:E.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(R,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let F=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(D,{children:e=>s.jsx(A,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(T,{land:e,onSetOperator:a})})})}};const U=r=>({onSetOperator:(a,e)=>r(C(a,e))}),K=w(void 0,U)(F);export{K as default};
@@ -1 +1 @@
1
- import{H as e,g0 as Ae,g1 as Ge,a1 as V,dB as Re,M as n,N as B,fb as je,Z as Y,eZ as We,G as i,fK as Ue,eR as ee,g2 as Oe,cC as He,X as D,et as ze,g3 as Fe,fW as qe,bw as Ie,fY as Ve,eE as Ne,g4 as Ye,f_ as Ze,D as r,K as M,g5 as Ke,g6 as Qe,eO as T,dC as fe,ep as Je,g7 as Xe,bu as ke,L as ye,fc as be,eo as ve,er as _e,g8 as es,g9 as ue,ga as ss,gb as ts,gc as ns,gd as as,ge as is,ff as os,gf as ls,gg as we,eu as rs,gh as cs,gi as ds,gj as ge,J as ms,cA as _s,cB as us,fO as gs,eP as he,ez as pe,fq as hs,aN as ps,e8 as Cs,gk as xs,gl as js,gm as Is,eC as Ns,gn as fs,go as ks,gp as ys,gq as bs,gr as vs,fS as ws}from"./index-jWw2HvoU.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-Bv1v9sSj.js";import{C as Ds}from"./CollectionProvider.container-VOB9jiPP.js";import{N as Es}from"./NotFound-ooP6Sr9r.js";import{B as Ts}from"./Back-CyRxt1wV.js";import{C as Ms,T as $s}from"./ThirdPartyKindBadge-DIxZmSLO.js";import{C as se}from"./ConfirmDelete-Cgwh1aMw.js";import"./Navigation.container-CV-Jh9bH.js";import"./selectors-D8l7Roli.js";import"./SignInRequired-CNajZjQl.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Os="_ellipsis_4huv2_1",Ce={ellipsis:Os},Hs=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:Oe.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Hs,Fs=s=>({name:He(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Ks=B(Ys,Zs)(Fe),Qs="_itemImage_1y9df_1",Js="_itemStatus_1y9df_10",Xs="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Qs,itemStatus:Js,grid:Xs,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Ke(s.urn);return Qe(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case T.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case T.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Je,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Xe(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case T.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case T.UNSYNCED:case T.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Tt="_nameWrapper_1rili_40",Mt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Tt,name:Mt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),O=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:O,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ot="_gridHeader_2k9qa_5",Ht="_itemColumn_2k9qa_15",X={itemCheckbox:Ut,gridHeader:Ot,itemColumn:Ht},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:X.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:X.itemColumn,children:[e.jsx(n.Checkbox,{className:X.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Kt="_main_16i8r_3",Qt="_slots_16i8r_11",Jt="_empty_16i8r_28",Xt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Kt,slots:Qt,empty:Jt,searchContainer:Xt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,O]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===M.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&O(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(M.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{O(+g.activePage),G.push(M.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),K=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Te=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Me=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),H=x,Q=Math.ceil(H/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ts,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ms,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Ks,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(H,w*L),total:H})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Me,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&Q>1?e.jsx("span",{className:"link",onClick:()=>Te(U),children:i("third_party_collection_detail_page.select_all",{total:H})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id)),Q>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:Q,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,K,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),On=B(Pn,Dn)(Sn);export{On as default};
1
+ import{H as e,g0 as Ae,g1 as Ge,a1 as V,dB as Re,M as n,N as B,fb as je,Z as Y,eZ as We,G as i,fK as Ue,eR as ee,g2 as Oe,cC as He,X as D,et as ze,g3 as Fe,fW as qe,bw as Ie,fY as Ve,eE as Ne,g4 as Ye,f_ as Ze,D as r,K as M,g5 as Ke,g6 as Qe,eO as T,dC as fe,ep as Je,g7 as Xe,bu as ke,L as ye,fc as be,eo as ve,er as _e,g8 as es,g9 as ue,ga as ss,gb as ts,gc as ns,gd as as,ge as is,ff as os,gf as ls,gg as we,eu as rs,gh as cs,gi as ds,gj as ge,J as ms,cA as _s,cB as us,fO as gs,eP as he,ez as pe,fq as hs,aN as ps,e8 as Cs,gk as xs,gl as js,gm as Is,eC as Ns,gn as fs,go as ks,gp as ys,gq as bs,gr as vs,fS as ws}from"./index-Cc2cKcEM.js";import{g as Ss}from"./selector-CtnQnmhq.js";import{L as Ps}from"./LoggedInDetailPage.container-CHkyImHP.js";import{C as Ds}from"./CollectionProvider.container-BnQkbzk1.js";import{N as Es}from"./NotFound-BcdJ_D3Z.js";import{B as Ts}from"./Back-zhS4dnPe.js";import{C as Ms,T as $s}from"./ThirdPartyKindBadge-z0aQFujq.js";import{C as se}from"./ConfirmDelete-C-R9qPaE.js";import"./Navigation.container-D9KntHwJ.js";import"./selectors-BM5jODAk.js";import"./SignInRequired-DuOu4jO8.js";const Ls=s=>e.jsx("img",{"data-testid":Ae,src:Ge[s.network],alt:s.network,className:s.className}),Bs="_image_142g7_1",As="_main_142g7_2",Gs="_network_142g7_13",z={image:Bs,main:As,network:Gs},Rs=s=>{const{collection:t,collectionId:o,className:l,shape:c}=s;return e.jsxs("div",{className:V(z.main,l),children:[t!=null&&t.itemCount?e.jsx(Re,{collectionId:o,className:z.image}):e.jsx(n.Blockie,{className:z.image,seed:o,size:8,scale:8,shape:c??"circle"}),t!=null&&t.linkedContractNetwork?e.jsx(Ls,{network:t==null?void 0:t.linkedContractNetwork,className:z.network}):null]})},Ws=(s,t)=>({collection:je(s,t.collectionId)}),Us=B(Ws)(Rs),Os="_ellipsis_4huv2_1",Ce={ellipsis:Os},Hs=s=>{const{collection:t}=s,o=Y(),l=()=>{t.isPublished&&t.forumLink&&v(t.forumLink,"_blank")},c=()=>{const{items:m,onOpenModal:d}=s;d("SeeInWorldModal",{itemIds:m.map(k=>k.id)})},a=()=>{const{collection:m,items:d}=s;o.push(Ue(m,d),{fromParam:ee.TP_COLLECTIONS})},x=()=>{const{collection:m,onDelete:d}=s;d(m)},p=()=>{const{collection:m,onOpenModal:d}=s;m.isPublished||d("EditCollectionURNModal",{collection:m})},N=()=>{const{collection:m,onOpenModal:d}=s;d("CreateAndEditMultipleItemsModal",{collectionId:m.id,type:Oe.EDIT})},v=(m,d="")=>{const k=window.open(m,d);k&&k.focus()},f=!We(t)&&!t.isPublished;return e.jsx(n.Dropdown,{className:Ce.dropdown,trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{className:Ce.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:c}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:a}),e.jsx(n.Popup,{content:i("collection_context_menu.delete_published_collection"),position:"right center",disabled:f,trigger:f?e.jsx(se,{name:t.name,onDelete:x,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})}):e.jsx(n.Dropdown.Item,{text:i("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Popup,{content:i("collection_context_menu.change_published_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_urn"),onClick:p,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.edit_in_bulk"),onClick:N}),e.jsx(n.Popup,{content:i("collection_context_menu.unpublished"),position:"right center",disabled:t.isPublished||!!t.forumLink,trigger:e.jsx(n.Dropdown.Item,{disabled:!t.isPublished||!t.forumLink,text:i("collection_context_menu.forum_post"),onClick:l}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},zs=Hs,Fs=s=>({name:He(s)||""}),qs=s=>({onOpenModal:(t,o)=>s(D(t,o)),onDelete:t=>s(ze(t))}),Vs=B(Fs,qs)(zs),Ys=(s,t)=>{const{collection:o,items:l}=t;return{itemCurations:qe(s,o.id),isLoadingItemCurations:Ie(Ve(s),Ze),isLinkedWearablesPaymentsEnabled:Ne(s),itemsStatus:Ye(s,l.map(c=>c.id))}},Zs=s=>({onNewClick:(t,o,l)=>s(D("PublishWizardCollectionModal",{collectionId:t,itemsWithChanges:o,itemsToPublish:l})),onPushChangesClick:(t,o)=>s(D("PushChangesModal",{collectionId:t,itemsWithChanges:o})),onClick:(t,o,l)=>s(D("PublishThirdPartyCollectionModal",{collectionId:t,itemIds:o,action:l}))}),Ks=B(Ys,Zs)(Fe),Qs="_itemImage_1y9df_1",Js="_itemStatus_1y9df_10",Xs="_grid_1y9df_14",et="_row_1y9df_25",st="_column_1y9df_30",tt="_statusColumn_1y9df_34",nt="_synced_1y9df_39",at="_unsynced_1y9df_43",it="_avatarColumn_1y9df_47",ot="_nameWrapper_1y9df_52",lt="_name_1y9df_52",rt="_itemActions_1y9df_65",ct="_action_1y9df_72",C={itemImage:Qs,itemStatus:Js,grid:Xs,row:et,column:st,statusColumn:tt,synced:nt,unsynced:at,avatarColumn:it,nameWrapper:ot,name:lt,itemActions:rt,action:ct};function dt({item:s,status:t,selected:o,onSelect:l,onOpenModal:c,onDelete:a}){const x=Y(),p=r.useCallback((h,P)=>{l(s,P.checked)},[s,l]),N=r.useCallback(()=>{c("SeeInWorldModal",{itemIds:[s.id]})},[s,c]),v=r.useCallback(()=>{s.isPublished||c("EditItemURNModal",{item:s})},[s,c]),f=r.useCallback(()=>{x.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,x]),m=r.useCallback(()=>{a(s)},[a,s]),d=r.useMemo(()=>{if(!s.urn)return"";try{const h=Ke(s.urn);return Qe(h)?h.thirdPartyTokenId??"":""}catch{return""}},[s]),k=r.useMemo(()=>{switch(t){case T.UNDER_REVIEW:return e.jsx(n.Icon,{name:"clock outline"});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle outline"});case T.UNSYNCED:return e.jsx(n.Icon,{name:"exclamation circle"});default:return null}},[t]),y=s.data;return e.jsx(n.Grid,{className:`CollectionItem ${C.grid}`,columns:"equal",children:e.jsxs(n.Grid.Row,{className:C.row,children:[e.jsxs(n.Grid.Column,{className:`${C.column} ${C.avatarColumn}`,width:5,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished,onClick:p}),e.jsx(fe,{className:C.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:C.nameWrapper,children:e.jsxs("div",{className:C.name,title:s.name,children:[e.jsx(Je,{className:C.itemStatus,item:s}),s.name]})})]}),e.jsx(n.Grid.Column,{className:C.column,children:y.category?e.jsx("div",{children:i(`wearable.category.${y.category}`)}):null}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:i(`body_shapes.${Xe(s)}`)})}),e.jsx(n.Grid.Column,{className:C.column,children:e.jsx("div",{children:d})}),e.jsxs(n.Grid.Column,{width:3,className:`${C.column} ${C.statusColumn} ${C[t]}`,children:[k,e.jsx("div",{children:i(`third_party_collection_detail_page.synced_statuses.${t}`)})]}),e.jsx(n.Grid.Column,{width:1,className:C.column,children:e.jsx("div",{className:C.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:C.action,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:N}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:f}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:v,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:m,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})})}const mt=(s,t)=>({status:be(s)[t.item.id]}),_t=s=>({onDelete:t=>s(ve(t)),onOpenModal:(t,o)=>s(D(t,o))}),ut=B(mt,_t)(dt),gt="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ht="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",pt="_status_rgxu1_1",Ct="_pending_migration_rgxu1_14",xt="_synced_rgxu1_19",jt="_unpublished_rgxu1_24",It="_unsynced_rgxu1_25",Nt="_pending_mapping_rgxu1_30",ft="_under_review_rgxu1_31",kt="_icon_rgxu1_10",F={status:pt,pending_migration:Ct,synced:xt,unpublished:jt,unsynced:It,pending_mapping:Nt,under_review:ft,icon:kt},yt=s=>{const{status:t,item:o}=s,l=!o.mappings&&_e(o.urn),c=!o.isMappingComplete&&_e(o.urn),a=r.useMemo(()=>{if(l)return e.jsx("img",{src:gt,className:F.icon});if(c)return e.jsx(n.Icon,{name:"warning circle"});switch(t){case T.UNDER_REVIEW:return e.jsx("img",{src:ht,className:F.icon});case T.SYNCED:return e.jsx(n.Icon,{name:"check circle"});case T.UNSYNCED:case T.UNPUBLISHED:return e.jsx(n.Icon,{name:"cloud upload"})}},[t,l,c]),x=r.useMemo(()=>l?i("item_status.pending_mapping"):c?i("item_status.pending_migration"):i(`item_status.${t}`),[t,l,c]),p=r.useMemo(()=>l?"pending_mapping":c?"pending_migration":t,[t,l,c]);return e.jsxs("div",{className:V(F[p],F.status),children:[a," ",x]})},bt="_itemImage_1rili_1",vt="_itemStatus_1rili_10",wt="_grid_1rili_14",St="_loading_1rili_21",Pt="_row_1rili_26",Dt="_column_1rili_31",Et="_avatarColumn_1rili_35",Tt="_nameWrapper_1rili_40",Mt="_name_1rili_40",$t="_itemActions_1rili_53",Lt="_action_1rili_60",Bt="_overlay_1rili_65",I={itemImage:bt,itemStatus:vt,grid:wt,loading:St,row:Pt,column:Dt,avatarColumn:Et,nameWrapper:Tt,name:Mt,itemActions:$t,action:Lt,overlay:Bt};function At({item:s,status:t,selected:o,loading:l,collection:c,onSaveItem:a,onSelect:x,onOpenModal:p,onDelete:N}){const v=Y(),f=r.useMemo(()=>es(s),[s]),m=r.useMemo(()=>c.linkedContractAddress&&c.linkedContractNetwork?{address:c.linkedContractAddress,network:c.linkedContractNetwork}:null,[c]),[d,k]=r.useState(f),y=r.useMemo(()=>{if(d&&m){const S=ue(d,m);return ss(S)?void 0:"Invalid mapping"}},[d,m]);r.useEffect(()=>{!m||y||(!f&&d||f&&d&&!ts(f,d))&&h(d,m)},[f,y,d,m]);const h=r.useCallback(ns((S,E)=>{const $=ue(S,E);a({...s,mappings:$})},1e3),[a]),P=r.useCallback((S,E)=>{l||x(s,E.checked)},[s,l,x]),w=r.useCallback(()=>{p("SeeInWorldModal",{itemIds:[s.id]})},[s,p]),O=r.useCallback(()=>{s.isPublished||p("EditItemURNModal",{item:s})},[s,p]),Z=r.useCallback(()=>{v.push(M.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:ee.TP_COLLECTIONS})},[s,v]),A=r.useCallback(()=>{N(s)},[N,s]);return e.jsxs(n.Grid,{className:V(I.grid,l&&I.loading),columns:"equal",children:[l&&e.jsx("div",{className:I.overlay,children:e.jsx(n.Loader,{size:"large",active:!0})}),e.jsxs(n.Grid.Row,{className:I.row,children:[e.jsxs(n.Grid.Column,{className:`${I.column} ${I.avatarColumn}`,width:4,children:[e.jsx(n.Checkbox,{checked:o,disabled:s.isPublished||l,onClick:P}),e.jsx(fe,{className:I.itemImage,item:s,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:I.nameWrapper,children:e.jsx("div",{className:I.name,title:s.name,children:s.name})})]}),e.jsx(n.Grid.Column,{children:m&&e.jsx(as,{disabled:l,mapping:d,error:y,onChange:k,isCompact:!0})}),e.jsx(n.Grid.Column,{width:3,className:V(I.column,I.statusColumn),children:e.jsx(yt,{status:t,item:s})}),e.jsx(n.Grid.Column,{width:1,className:I.column,children:e.jsx("div",{className:I.itemActions,children:e.jsx(n.Dropdown,{trigger:e.jsx(n.Button,{basic:!0,children:e.jsx(n.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:I.action,disabled:l,onClick:ke(),children:e.jsxs(n.Dropdown.Menu,{children:[e.jsx(n.Dropdown.Item,{text:i("collection_item.see_details"),as:ye,to:M.itemDetail(s.id)}),e.jsx(n.Dropdown.Item,{text:i("collection_context_menu.see_in_decentraland"),onClick:w}),e.jsx(n.Dropdown.Item,{text:i("global.open_in_editor"),onClick:Z}),e.jsx(n.Popup,{content:i("collection_item.cannot_edit_urn"),position:"right center",disabled:!s.isPublished,trigger:e.jsx(n.Dropdown.Item,{text:i("collection_item.edit_urn"),onClick:O,disabled:s.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!s.isPublished&&e.jsx(se,{name:s.name,onDelete:A,trigger:e.jsx(n.Dropdown.Item,{text:i("global.delete")})})]})})})})]})]})}const Gt=(s,t)=>{const o=be(s);return{loading:!!is(s)[t.item.id],status:o[t.item.id]}},Rt=s=>({onDelete:t=>s(ve(t)),onSaveItem:t=>s(os(t,{},{onlySaveItem:!0})),onOpenModal:(t,o)=>s(D(t,o))}),Wt=B(Gt,Rt)(At),L=50,Ut="_itemCheckbox_2k9qa_1",Ot="_gridHeader_2k9qa_5",Ht="_itemColumn_2k9qa_15",X={itemCheckbox:Ut,gridHeader:Ot,itemColumn:Ht},zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:X.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:5,className:X.itemColumn,children:[e.jsx(n.Checkbox,{className:X.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsx(n.Grid.Column,{children:i("global.category")}),e.jsx(n.Grid.Column,{children:i("global.body_shape")}),e.jsx(n.Grid.Column,{children:"URN ID"}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Ft="_gridHeader_4acv6_1",qt="_itemColumn_4acv6_11",Vt="_itemCheckbox_4acv6_16",Yt="_linkedToColumn_4acv6_20",q={gridHeader:Ft,itemColumn:qt,itemCheckbox:Vt,linkedToColumn:Yt},Zt=({areAllSelected:s,onSelectedAllClick:t})=>e.jsx(n.Grid,{columns:"equal",className:q.gridHeader,children:e.jsxs(n.Grid.Row,{children:[e.jsxs(n.Grid.Column,{width:4,className:q.itemColumn,children:[e.jsx(n.Checkbox,{className:q.itemCheckbox,checked:s,onClick:t})," ",i("global.item")]}),e.jsxs(n.Grid.Column,{className:q.linkedToColumn,children:[e.jsx("span",{children:i("third_party_collection_detail_page.linked_to")}),e.jsx(ls,{})]}),e.jsxs(n.Grid.Column,{width:3,children:[" ",i("collection_row.status")," "]}),e.jsx(n.Grid.Column,{width:1})]})}),Kt="_main_16i8r_3",Qt="_slots_16i8r_11",Jt="_empty_16i8r_28",Xt="_searchContainer_16i8r_32",en="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",tn="_selectionInfo_16i8r_53",nn="_header_16i8r_63",an="_content_16i8r_74",on="_title_16i8r_83",ln="_editCollectionName_16i8r_96",rn="_name_16i8r_101",cn="_nameAndType_16i8r_105",dn="_nameWrapper_16i8r_115",mn="_size_16i8r_139",_n="_actions_16i8r_143",un="_body_16i8r_151",gn="_info_16i8r_162",hn="_infoHeader_16i8r_170",pn="_infoContent_16i8r_178",Cn="_slotsIcon_16i8r_195",xn="_copyButton_16i8r_207",jn="_sparkles_16i8r_232",In="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",kn="_linkedWearableBadge_16i8r_283",yn="_typeBadge_16i8r_288",bn="_programmaticBadge_16i8r_292",vn="_standardBadge_16i8r_296",wn="_loader_16i8r_302",_={main:Kt,slots:Qt,empty:Jt,searchContainer:Xt,searchInfo:en,syncedStatusList:sn,selectionInfo:tn,header:nn,content:an,title:on,editCollectionName:ln,name:rn,nameAndType:cn,nameWrapper:dn,size:mn,actions:_n,body:un,info:gn,infoHeader:hn,infoContent:pn,slotsIcon:Cn,copyButton:xn,sparkles:jn,start:In,migrationBanner:Nn,type:fn,linkedWearableBadge:kn,typeBadge:yn,programmaticBadge:bn,standardBadge:vn,loader:wn},xe=({children:s,title:t,info:o})=>e.jsxs("div",{className:_.info,children:[e.jsxs("div",{className:_.infoHeader,children:[t," ",o&&e.jsx(n.InfoTooltip,{content:o})]}),e.jsx("div",{className:_.infoContent,children:s})]});function Sn({currentPage:s,lastLocation:t,wallet:o,thirdParty:l,items:c,collection:a,totalItems:x,isLoading:p,isThirdPartyV2Enabled:N,isLinkedWearablesPaymentsEnabled:v,onFetchAvailableSlots:f,onFetchThirdParty:m,onNewItem:d,onEditName:k,isLoadingAvailableSlots:y}){const[h,P]=r.useState({}),[w,O]=r.useState(s),[Z,A]=r.useState(!1),[S,E]=r.useState(!1),[$,te]=r.useState("ALL"),G=Y(),ne=t===M.collections();r.useEffect(()=>{l&&l.availableSlots===void 0&&!y&&f(l.id)},[l,y,f]),r.useEffect(()=>{!p&&!l&&(a!=null&&a.urn)&&m(we(a.urn))},[a==null?void 0:a.urn,p,l]),r.useEffect(()=>{if(s!==w&&O(s),S){const u=c.reduce((g,j)=>(g[j.id]=!0,g),{});P(u),A(!1)}},[w,S,c,l,s]);const Se=r.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),Pe=r.useCallback(()=>{a&&k(a)},[a,k]),De=r.useCallback(()=>{ne?G.goBack():G.push(M.collections(rs.THIRD_PARTY))},[G,ne]),Ee=r.useCallback((u,g)=>{O(+g.activePage),G.push(M.thirdPartyCollectionDetail(a.id,{page:+g.activePage}))},[a,G]),K=r.useCallback((u,g)=>{P({...h,[u.id]:g}),E(!1),A(!1)},[h]),R=r.useCallback(u=>u.every(g=>h[g.id]),[h]),ae=r.useCallback((u,g)=>{const j={...h},W=!R(u);for(const U of u)j[U.id]=W;P(j),A(!0),E(S&&!!g.checked)},[h,S,R]),ie=r.useCallback(()=>{P({})},[]),oe=r.useMemo(()=>a&&l&&o&&cs(o.address,l),[a,l,o]),Te=r.useCallback(u=>{if(E(!0),a){const g=Math.ceil(x/L);u(a.id,{page:ds(g),limit:L,overridePaginationData:!1})}},[x]),le=r.useCallback((u,{value:g})=>{te(g)},[te]),Me=[{value:"ALL",text:i("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:i("item_status.synced")},{value:"UNSYNCED",text:i("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:i("item_status.pending_migration")},{value:"MAPPING_PENDING",text:i("item_status.pending_mapping")}]],$e=r.useMemo(()=>{switch($){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:ge.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:ge.MISSING_MAPPING};default:return{}}},[$]),Le=r.useCallback((u,g,j,W,U)=>{const re=g.filter(b=>h[b.id]),ce=re.length,de=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),H=x,Q=Math.ceil(H/L),me=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:_.header,children:[e.jsx(Ts,{absolute:!0,onClick:De}),e.jsxs("div",{className:_.content,children:[e.jsxs("div",{className:_.title,children:[e.jsx(Us,{collectionId:a.id}),e.jsxs("div",{className:_.nameAndType,children:[e.jsxs("div",{className:_.nameWrapper,children:[e.jsx(n.Header,{size:"large",className:_.name,onClick:Pe,children:a.name}),!a.isPublished&&e.jsx(ms,{name:"edit",className:_.editCollectionName})]}),e.jsxs("div",{className:_.type,children:[e.jsx(Ms,{isThirdParty:!0}),e.jsx($s,{isProgrammatic:u.isProgrammatic})]})]})]}),e.jsxs("div",{className:_.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(xe,{title:i("third_party_collection_detail_page.smart_contract_address_short"),info:i("third_party_collection_detail_page.smart_contract_address_long"),children:[_s(a.linkedContractAddress)," ",e.jsx(us,{className:_.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(n.Icon,{name:"copy outline"})})]}),!v&&e.jsxs(xe,{title:i("third_party_collection_detail_page.slots_short"),info:i("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:_.slotsIcon}),y?e.jsx(n.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[u.availableSlots??0," / ",u.maxItems]})]}),e.jsxs(n.Button,{inverted:!0,onClick:Se,children:[e.jsx(n.Icon,{name:"plus"}),i("third_party_collection_detail_page.new_items")]}),u.availableSlots!==void 0?e.jsx(Ks,{collection:a,items:re,slots:u.availableSlots}):null,e.jsx(Vs,{collection:a,items:j})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:_.migrationBanner,children:[e.jsx(n.Icon,{name:"sync"})," ",i("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:_.body,children:W?e.jsx("div",{className:_.loader,children:e.jsx(n.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:_.searchContainer,children:[j.length>0&&e.jsx("div",{className:_.searchInfo,children:i("third_party_collection_detail_page.search_info",{page:(w-1)*L+1,pageTotal:Math.min(H,w*L),total:H})}),e.jsx(n.Dropdown,{className:_.syncedStatusList,direction:"left",value:$,options:Me,onChange:le})]}),j.length?e.jsxs(e.Fragment,{children:[ce>0?e.jsxs("div",{className:_.selectionInfo,children:[i("third_party_collection_detail_page.selection",{count:ce})," ",e.jsx("span",{className:"link",onClick:ie,children:i("third_party_collection_detail_page.clear_selection")}),".  ",Z&&Q>1?e.jsx("span",{className:"link",onClick:()=>Te(U),children:i("third_party_collection_detail_page.select_all",{total:H})}):null," "]}):null,e.jsxs("div",{children:[N&&de?e.jsx(Zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}):e.jsx(zt,{areAllSelected:R(j),onSelectedAllClick:(b,J)=>ae(j,J)}),j.map(b=>N&&de?e.jsx(Wt,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id):e.jsx(ut,{collection:a,item:b,selected:!!h[b.id],onSelect:K},b.id)),Q>1?e.jsx(n.Pagination,{firstItem:null,lastItem:null,totalPages:Q,activePage:w,onPageChange:Ee}):null]})]}):e.jsxs("div",{className:_.empty,children:[e.jsx("div",{className:me?_.start:_.sparkles}),me?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:i("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:i("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:i("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,v,N,x,w,K,R,le,ie,$]),Be=oe&&a;return e.jsx(Ds,{id:a==null?void 0:a.id,itemsPage:w,itemsPageSize:L,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:u,isLoadingCollectionItems:g,items:j,paginatedItems:W,onFetchCollectionItemsPages:U})=>e.jsx(Ps,{className:_.main,hasNavigation:!oe&&!p&&!u,isLoading:p||u,children:Be&&l?Le(l,j,W,g,U):e.jsx(Es,{})})})}const Pn=s=>{var N;const t=gs(s)||"",o=je(s,t),l=o?he(o):!1,c=((N=pe(s,t))==null?void 0:N.total)||null,a=o?hs(s,o.id):[],x=o&&pe(s,o.id)||null,p=Number(ps(s).query.page??1);return{items:a,totalItems:c,currentPage:p,paginatedData:x,wallet:Cs(s),collection:o,isThirdPartyV2Enabled:xs(s),isLinkedWearablesPaymentsEnabled:Ne(s),thirdParty:o&&he(o)?js(s,o):null,authorizations:Is(s),isLoading:Ie(Ns(s),ws)||fs(s)||!!(l&&o&&ks(s,we(o.urn))),isLoadingAvailableSlots:ys(s),lastLocation:Ss(s)}},Dn=s=>({onNewItem:t=>s(D("CreateItemsModal",{collectionId:t})),onEditName:t=>s(D("EditCollectionNameModal",{collection:t})),onFetchAvailableSlots:t=>s(bs(t)),onFetchThirdParty:t=>s(vs(t))}),On=B(Pn,Dn)(Sn);export{On as default};
@@ -1 +1 @@
1
- var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,bz as T,M as s,K as k,bA as y,bB as D,bC as I,bD as f,bE as C,N as O,a_ as F,bF as H,bG as $,bH as h,bI as g,aZ as S,bJ as G,bK as B,bL as V}from"./index-jWw2HvoU.js";import{N as W}from"./Navigation.container-CV-Jh9bH.js";import{L as z}from"./LoggedInDetailPage.container-Bv1v9sSj.js";import{R as K}from"./RentalPeriod-DVytkRnq.js";import"./selectors-D8l7Roli.js";import"./SignInRequired-CNajZjQl.js";import"./index-Dbqncsf4.js";const M=n=>n.ui.land,Z=n=>M(n).view;class A extends v.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(R,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(R,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,C)?1:f(t,C)?-1:n>t?1:-1;let J=class extends v.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(K,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const X=(n,t)=>{const{land:a}=t,o=H(n)[a.id]||[],d=$(n,a);return{deployments:o,rental:d}},Y=O(X)(F(J)),b=20;let Q=class extends v.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(S,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(S,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Y,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(z,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
1
+ var _=Object.defineProperty;var E=(n,t,a)=>t in n?_(n,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):n[t]=a;var j=(n,t,a)=>E(n,typeof t!="symbol"?t+"":t,a);import{D as v,H as e,bm as R,G as r,bz as T,M as s,K as k,bA as y,bB as D,bC as I,bD as f,bE as C,N as O,a_ as F,bF as H,bG as $,bH as h,bI as g,aZ as S,bJ as G,bK as B,bL as V}from"./index-Cc2cKcEM.js";import{N as W}from"./Navigation.container-D9KntHwJ.js";import{L as z}from"./LoggedInDetailPage.container-CHkyImHP.js";import{R as K}from"./RentalPeriod-B4b_361f.js";import"./selectors-BM5jODAk.js";import"./SignInRequired-DuOu4jO8.js";import"./index-DyQiO1Ah.js";const M=n=>n.ui.land,Z=n=>M(n).view;class A extends v.PureComponent{render(){const{list:t}=this.props;switch(t.length){case 0:return r("global.none");case 1:return t[0];case 2:return e.jsx(R,{id:"list.two",values:{first:t[0],second:t[1]}});default:return e.jsx(R,{id:"list.two",values:{first:t[0],second:r("list.more",{count:t.length-1})}})}}}const q=(n,t)=>f(n,C)?1:f(t,C)?-1:n>t?1:-1;let J=class extends v.PureComponent{render(){const{land:t,deployments:a,rental:l,history:o}=this.props,{x:d,y:p}=T(t);return e.jsxs(s.Table.Row,{className:"TableRow",onClick:()=>o.push(k.landDetail(t.id)),children:[e.jsx(s.Table.Cell,{children:e.jsxs(s.Row,{children:[e.jsx(s.Column,{width:67,grow:!1,shrink:!1,children:e.jsx(y,{landId:t.id,width:45,height:45,isDraggable:!1,size:9})}),e.jsx(s.Column,{className:"name",children:e.jsxs("div",{children:[t.name," ",e.jsx("span",{className:"secondary-text",children:D(d,p)})]})})]})}),e.jsx(s.Table.Cell,{children:e.jsxs("div",{children:[r(`roles.${t.role}`)," ",l?e.jsx(K,{land:t,rental:l}):null]})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:t.operators.sort(q).map(c=>e.jsx(I,{address:c}))})}),e.jsx(s.Table.Cell,{children:e.jsx(A,{list:a.map(c=>c.name)})})]})}};const X=(n,t)=>{const{land:a}=t,o=H(n)[a.id]||[],d=$(n,a);return{deployments:o,rental:d}},Y=O(X)(F(J)),b=20;let Q=class extends v.PureComponent{constructor(){super(...arguments);j(this,"state",{showOwner:!0,showOperator:!0,showLessor:!0,showTenant:!0,page:1,selectedLand:0});j(this,"handleNext",()=>{const{selectedLand:a}=this.state,l=this.getFilteredLands();a===l.length-1?this.setState({selectedLand:0}):this.setState({selectedLand:a+1})});j(this,"handlePrev",()=>{const{selectedLand:a}=this.state;if(a===0){const l=this.getFilteredLands();this.setState({selectedLand:l.length-1})}else this.setState({selectedLand:a-1})})}componentWillReceiveProps(a){a.lands!==this.props.lands&&this.setState({page:1})}renderLand(){const{view:a,onSetView:l}=this.props,{page:o,showOwner:d,showOperator:p,showTenant:c,showLessor:u,selectedLand:N}=this.state,i=this.getFilteredLands(),P=Math.ceil(i.length/b);let w,L;if(i.length>1&&N<i.length){const{x:m,y:x}=T(i[N]);w=m,L=x}else if(i.length===1){const{x:m,y:x}=T(i[0]);w=m,L=x}return e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"filters",children:e.jsx(s.Container,{children:e.jsxs(s.Row,{height:30,children:[e.jsx(s.Column,{children:e.jsxs(s.Row,{children:[e.jsx(s.Header,{sub:!0,children:r("land_page.results",{count:i.length.toLocaleString()})}),a===h.ATLAS&&i.length>1?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"arrow prev",onClick:this.handlePrev}),e.jsx("div",{className:"arrow next",onClick:this.handleNext})]}):null]})}),e.jsx(s.Column,{align:"right",children:e.jsxs(s.Row,{children:[e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{value:"owner",checked:d,onClick:()=>this.setState({showOwner:!d}),label:r(`roles.${g.OWNER}`)}),content:r("land_page.owner_explanation")}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"operator-checkbox",value:"operator",checked:p,onClick:()=>this.setState({showOperator:!p}),label:r(`roles.${g.OPERATOR}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.operator_explanation")})}),e.jsx(s.Popup,{trigger:e.jsx(s.Radio,{className:"tenant-checkbox",value:"tentant",checked:c,onClick:()=>this.setState({showTenant:!c}),label:r(`roles.${g.TENANT}`)}),className:"radio-popup",content:e.jsx("div",{children:r("land_page.tenant_explanation")})}),e.jsx(S,{className:"grid",icon:"table",isActive:a===h.GRID,onClick:()=>l(h.GRID)}),e.jsx(S,{className:"atlas",icon:"pin",isActive:a===h.ATLAS,onClick:()=>l(h.ATLAS)})]})})]})})}),a===h.GRID?e.jsxs(s.Container,{children:[e.jsx(s.Section,{className:"table-section",children:i.length>0?e.jsxs(s.Table,{basic:"very",children:[e.jsx(s.Table.Header,{children:e.jsxs(s.Table.Row,{children:[e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.name")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("global.role")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.operated_by")}),e.jsx(s.Table.HeaderCell,{width:"4",children:r("land_page.online_scenes")})]})}),e.jsx(s.Table.Body,{children:i.slice((o-1)*b,o*b).map((m,x)=>e.jsx(Y,{land:m},x))})]}):null}),P>1?e.jsx(s.Section,{className:"pagination-section",children:e.jsx(s.Pagination,{firstItem:null,lastItem:null,activePage:o,onPageChange:(m,x)=>this.setState({page:+x.activePage}),totalPages:P})}):null]}):e.jsx("div",{className:"atlas-wrapper",children:e.jsx(y,{className:"main",x:w,y:L,showOperator:p,showOwner:d,showTenant:c,showLessor:u,hasPopup:!0})})]})}getFilteredLands(){const{lands:a}=this.props,{showOwner:l,showOperator:o,showLessor:d,showTenant:p}=this.state;return a.filter(u=>!!(l&&u.roles.includes(g.OWNER)||o&&u.roles.includes(g.OPERATOR)||p&&u.roles.includes(g.TENANT)||d&&u.roles.includes(g.LESSOR)))}render(){const{isLoading:a,view:l}=this.props;return e.jsx(z,{className:`LandPage ${l}-view`,activeTab:W.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:Z(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
@@ -1 +1 @@
1
- import{N as n,am as s,an as r,ao as i,ap as m,aq as g,ar as t,ae as d,as as c,at as u,au as S,X as I,av as P,aw as l,ax as p,ay as y,az as O}from"./index-jWw2HvoU.js";const R=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),C=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(p()),onResetCamera:()=>a(y()),onTakeScreenshot:()=>a(O())}),L=n(R,C)(s);export{L as default};
1
+ import{N as n,am as s,an as r,ao as i,ap as m,aq as g,ar as t,ae as d,as as c,at as u,au as S,X as I,av as P,aw as l,ax as p,ay as y,az as O}from"./index-Cc2cKcEM.js";const R=a=>({isPreviewing:r(a),isSidebarOpen:i(a),isReady:m(a),isLoading:g(a),isFetching:t(a),isLoggedIn:d(a),isScreenshotReady:c(a),currentProject:u(a),numItems:S(a)}),C=a=>({onOpenModal:(e,o)=>a(I(e,o)),onCloseEditor:()=>a(P()),onZoomIn:()=>a(l()),onZoomOut:()=>a(p()),onResetCamera:()=>a(y()),onTakeScreenshot:()=>a(O())}),L=n(R,C)(s);export{L as default};