@dcl/builder-site 7.10.1-16527307771.commit-bda752c → 7.11.1-16576276409.commit-1d1de4c

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 (80) hide show
  1. package/assets/{Back-CQPVZ_Yw.js → Back-CMDvhr75.js} +1 -1
  2. package/assets/{CollectionProvider.container-BlgzLY7w.js → CollectionProvider.container-COHBv8D1.js} +1 -1
  3. package/assets/{CollectionStatus.container-B5kSw8QZ.js → CollectionStatus.container-6iMZMYJf.js} +1 -1
  4. package/assets/{ConfirmDelete-Bu5cpBOG.js → ConfirmDelete-B_dA5p6F.js} +1 -1
  5. package/assets/{FileSaver.min-BQCLuufv.js → FileSaver.min-C-UK6SK9.js} +1 -1
  6. package/assets/{ItemProvider.container-siyKsJBH.js → ItemProvider.container-8rAdhUYb.js} +1 -1
  7. package/assets/{JumpIn.container-hYmuYYl_.js → JumpIn.container-Z96yvyrM.js} +1 -1
  8. package/assets/{LandAction-Dz0xpczy.js → LandAction-D4ikqnus.js} +1 -1
  9. package/assets/{LandProviderPage-q8b0q3xS.js → LandProviderPage-To0NgrKv.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-DDpb0HDW.js → LoggedInDetailPage.container-Mhu8kcM_.js} +1 -1
  11. package/assets/{Navigation-BTJLJ6b6.css → Navigation-xtzbZPbr.css} +1 -1
  12. package/assets/{Navigation.container-CuwEnxUg.js → Navigation.container-BeLamUER.js} +1 -1
  13. package/assets/{NotFound-Drp5upn-.js → NotFound-BTph46EQ.js} +1 -1
  14. package/assets/{OptionsDropdown-psFuZbbt.js → OptionsDropdown-DFqXRkoK.js} +1 -1
  15. package/assets/{RentalPeriod-Ch6U4OGQ.js → RentalPeriod-3F8-C-tg.js} +1 -1
  16. package/assets/{SDKTag-cXIioIqG.js → SDKTag-DaiEuO8w.js} +1 -1
  17. package/assets/{SceneStats.container-Cz3IRVTv.js → SceneStats.container-Bee7aqna.js} +1 -1
  18. package/assets/{SignInRequired-C_a3RZQm.js → SignInRequired-0hr2yxm2.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-CZ3_p5DQ.js → ThirdPartyKindBadge-LSmjjAY7.js} +1 -1
  20. package/assets/{dataReader-COAvyQVC.js → dataReader-Ccnup1Cn.js} +1 -1
  21. package/assets/{date-DVtTbuy-.js → date-CEzjVKJb.js} +1 -1
  22. package/assets/{fortmatic-2xS99WFY.js → fortmatic-CecTnrHv.js} +1 -1
  23. package/assets/{index-B1j5QfDE.css → index-0ff8cZmy.css} +7 -7
  24. package/assets/{index-0PNnjTS1.js → index-B0iRzFkl.js} +1 -1
  25. package/assets/{index-COKFEHLF.js → index-B0xiLXHD.js} +1 -1
  26. package/assets/{index-BuReGvwz.js → index-B3jCFGor.js} +1 -1
  27. package/assets/{index-Bp1T5VCO.js → index-B9uvwHs4.js} +1 -1
  28. package/assets/{index-BAudlX7b.js → index-BACkDnCv.js} +1 -1
  29. package/assets/index-BIsJy8e2.js +1 -0
  30. package/assets/{index-BIFLEIQd.js → index-BYn0X966.js} +1 -1
  31. package/assets/{index-D1STVhL2.js → index-BdyEcuuO.js} +1 -1
  32. package/assets/{index-DMQoZRVb.js → index-Bj2egvaS.js} +1 -1
  33. package/assets/{index-DIVpiEK-.js → index-BkB-JydD.js} +1 -1
  34. package/assets/{index-CO7tm4XI.css → index-Bp8szrqc.css} +1 -1
  35. package/assets/{index-CHKZr3P0.js → index-BrOnZexk.js} +2 -2
  36. package/assets/{index-BtoDUXGw.css → index-C3uPBN4g.css} +1 -1
  37. package/assets/{index-Dm0_b6AP.js → index-CDGxOtJR.js} +1 -1
  38. package/assets/{index-DkmrqgVa.js → index-CJ6x31lt.js} +1 -1
  39. package/assets/{index-G4Vl4R9o.js → index-CM6kO28E.js} +2 -2
  40. package/assets/{index-j66rXTci.js → index-CRm8rxsg.js} +33 -33
  41. package/assets/{index-BG3D5vCW.js → index-CWJpig3p.js} +1 -1
  42. package/assets/{index-CbIqreGu.js → index-C_ainjab.js} +1 -1
  43. package/assets/{index-4mP-idOj.js → index-CauuBNbx.js} +1 -1
  44. package/assets/{index-DFxnePgX.js → index-Cd82rMTT.js} +1 -1
  45. package/assets/{index-CYC8HL9e.js → index-Ch8kERJH.js} +1 -1
  46. package/assets/{index-bv5FtVcH.js → index-CpegfC8j.js} +1 -1
  47. package/assets/{index-UErW8C6J.css → index-CpimJOWu.css} +1 -1
  48. package/assets/{index-KerIryJH.js → index-Cq4u_8fz.js} +1 -1
  49. package/assets/{index-DnkKH5vl.js → index-CrDlK3R7.js} +1 -1
  50. package/assets/{index-BZEUgF2A.js → index-Ctj_5l5z.js} +1 -1
  51. package/assets/{index-Cieh_dbt.js → index-CuuNPuEN.js} +1 -1
  52. package/assets/{index-CeemkspK.js → index-DCaQnpft.js} +1 -1
  53. package/assets/{index-D-xKmxnV.js → index-DF3PHWoX.js} +1 -1
  54. package/assets/{index-B2j0TCh_.js → index-DPBkowrV.js} +1 -1
  55. package/assets/{index-CkloEuvz.js → index-Dayi3ygu.js} +1 -1
  56. package/assets/{index-39ZC1jwF.js → index-DcrplfMw.js} +1 -1
  57. package/assets/{index-DeJrmTwL.js → index-Dd0kte2w.js} +1 -1
  58. package/assets/{index-jzxrFGy_.js → index-Deot8mjm.js} +1 -1
  59. package/assets/index-DiMnTjz0.js +1 -0
  60. package/assets/index-DkWwZMVB.js +1 -0
  61. package/assets/{index-CmjqU8F9.js → index-DmhISa84.js} +1 -1
  62. package/assets/{index-CNBMM92C.css → index-DuHACZZ0.css} +1 -1
  63. package/assets/{index-Bg9uzOz7.js → index-DwreIqvl.js} +1 -1
  64. package/assets/index-DxOsWXAY.css +1 -0
  65. package/assets/{index-C9zs0R_5.js → index-Fk7LQG_D.js} +1 -1
  66. package/assets/{index-OXfxf5cu.js → index-UXnHMP2N.js} +1 -1
  67. package/assets/{index-BsdyWJlv.js → index-izXxOcG4.js} +1 -1
  68. package/assets/{index-Cay_ldL_.js → index-o43gleqk.js} +1 -1
  69. package/assets/{index-DpAoV5eD.js → index-o94EZYq3.js} +1 -1
  70. package/assets/{index-khq7nwBI.css → index-r3nb3HBF.css} +1 -1
  71. package/assets/{index-85UYDG2S.js → index-sMr87Zqb.js} +1 -1
  72. package/assets/{index-CAOz1vZz.css → index-w_NhnP5b.css} +1 -1
  73. package/assets/{index.es-DeYGqe8K.js → index.es--2iYFeC1.js} +4 -4
  74. package/assets/{selectors-DlaHedkY.js → selectors-CLsL5QuF.js} +1 -1
  75. package/index.html +3 -3
  76. package/package.json +3 -3
  77. package/assets/index-BVlj6viB.js +0 -1
  78. package/assets/index-BiyvJAFa.js +0 -1
  79. package/assets/index-C7335b66.js +0 -1
  80. package/assets/index-CgM_5JKq.css +0 -1
@@ -1,4 +1,4 @@
1
- import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-G4Vl4R9o.js";import"./index-j66rXTci.js";/**
1
+ import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-CM6kO28E.js";import"./index-CRm8rxsg.js";/**
2
2
  * @license
3
3
  * Copyright 2019 Google LLC
4
4
  * SPDX-License-Identifier: BSD-3-Clause
@@ -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-j66rXTci.js";import{L as _}from"./LandAction-Dz0xpczy.js";import{L as P}from"./LandProviderPage-q8b0q3xS.js";import"./Back-CQPVZ_Yw.js";import"./NotFound-Drp5upn-.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-CRm8rxsg.js";import{L as _}from"./LandAction-D4ikqnus.js";import{L as P}from"./LandProviderPage-To0NgrKv.js";import"./Back-CMDvhr75.js";import"./NotFound-BTph46EQ.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 _=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-j66rXTci.js";import{N as W}from"./Navigation.container-CuwEnxUg.js";import{L as z}from"./LoggedInDetailPage.container-DDpb0HDW.js";import{R as K}from"./RentalPeriod-Ch6U4OGQ.js";import"./selectors-DlaHedkY.js";import"./SignInRequired-C_a3RZQm.js";import"./index-CkloEuvz.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-CRm8rxsg.js";import{N as W}from"./Navigation.container-BeLamUER.js";import{L as z}from"./LoggedInDetailPage.container-Mhu8kcM_.js";import{R as K}from"./RentalPeriod-3F8-C-tg.js";import"./selectors-CLsL5QuF.js";import"./SignInRequired-0hr2yxm2.js";import"./index-Dayi3ygu.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{Z as k,D as d,aB as C,K as f,H as a,G as l,M as i,J as h,a1 as x,cz as A,cA as L,cy as T,L as P,cB as S,N as M,cL as R,cM as w,bw as O,cH as V,cC as D,cG as $,cN as H,cO as U,X as G,cP as K}from"./index-j66rXTci.js";import{L as q}from"./LoggedInDetailPage.container-DDpb0HDW.js";import{N as z}from"./Navigation.container-CuwEnxUg.js";import"./SignInRequired-C_a3RZQm.js";import"./selectors-DlaHedkY.js";const J="_main_7p9v2_1",Q="_fields_7p9v2_9",W="_ensImage_7p9v2_16",X="_field_7p9v2_9",Z="_fieldContainer_7p9v2_29",Y="_fieldTitle_7p9v2_41",ee="_subdomain_7p9v2_50",ae="_actionBtn_7p9v2_64",se="_editableFieldValue_7p9v2_84",le="_avatar_7p9v2_90",ie="_avatarImg_7p9v2_97",ne="_avatarName_7p9v2_104",te="_ensBtn_7p9v2_109",de="_address_7p9v2_116",ce="_returnLink_7p9v2_122",re="_editableField_7p9v2_84",oe="_emptyFieldPlaceholder_7p9v2_138",me="_pin_7p9v2_144",_e="_externalLink_7p9v2_154",pe="_unclaimedBadge_7p9v2_159",ue="_disabled_7p9v2_170",s={main:J,fields:Q,ensImage:W,field:X,fieldContainer:Z,fieldTitle:Y,subdomain:ee,actionBtn:ae,editableFieldValue:se,avatar:le,avatarImg:ie,avatarName:ne,ensBtn:te,address:de,returnLink:ce,editableField:re,emptyFieldPlaceholder:oe,pin:me,externalLink:_e,unclaimedBadge:pe,disabled:ue};function he(t){const{ens:e,isLoading:_,alias:N,avatar:o,name:p,wallet:g,onOpenModal:r,onFetchENS:j}=t,v=k(),F=d.useMemo(()=>e?`${C.get("MARKETPLACE_API")}/ens/generate?ens=${e.name}&width=330&height=330`:"",[e]),c=(e==null?void 0:e.ensOwnerAddress)!==(e==null?void 0:e.nftOwnerAddress);d.useEffect(()=>{p&&g&&j(p)},[p,g,j]);const u=d.useCallback(()=>{r("EnsMapAddressModal",{ens:e})},[r,e]),b=d.useCallback(()=>{r("UseAsAliasModal",{newName:e==null?void 0:e.name})},[r,e==null?void 0:e.name]),m=d.useCallback(()=>{v.push(f.ensSelectLand(e==null?void 0:e.subdomain))},[v,e==null?void 0:e.subdomain]),B=d.useCallback(()=>{r("ReclaimNameModal",{ens:e})},[r]),I=d.useMemo(()=>{let n;return N!==(e==null?void 0:e.name)?n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.unassign")}),a.jsx(i.Button,{compact:!0,primary:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.set_as_primary"),children:a.jsx(i.Icon,{name:"user plus"})})]}):n=a.jsx("div",{className:s.editableField,children:a.jsxs("span",{className:s.avatar,"data-testid":"alias-avatar",children:[o?a.jsx("img",{className:s.avatarImg,src:o.avatar.snapshots.face256,alt:o.realName}):a.jsx(h,{name:"profile"}),a.jsx("span",{className:s.avatarName,children:e.name}),l("ens_list_page.table.you")]})}),a.jsxs("div",{className:s.field,children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.alias"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.alias")})]}),n]})},[e==null?void 0:e.name,c,o,N,b]),y=d.useMemo(()=>{let n=null;return c?n=a.jsxs("div",{className:x(s.editableField,s.disabled),children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_address")}),a.jsx(i.Button,{compact:!0,secondary:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):e!=null&&e.ensAddressRecord?n=a.jsxs("span",{className:s.editableField,children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("img",{src:A,alt:"Ethereum"}),L(e.ensAddressRecord)]}),a.jsx(i.Button,{compact:!0,secondary:!0,inverted:!0,onClick:u,className:s.actionBtn,"aria-label":l("ens_detail_page.edit_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.assign_address")}),a.jsx(i.Button,{compact:!0,secondary:!0,onClick:u,className:s.actionBtn,"aria-label":l("ens_detail_page.assign_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}),a.jsxs("div",{className:x(s.field,{[s.disabled]:c}),children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.address"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.address")})]}),n]})},[e==null?void 0:e.ensAddressRecord,c,u]),E=d.useMemo(()=>{let n=null;return c?n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_location")}),a.jsx(i.Button,{compact:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_location"),children:a.jsx(i.Icon,{name:"crosshairs"})})]}):e!=null&&e.landId?T(e.landId)?n=a.jsxs("div",{className:s.editableField,"data-testid":"land-field",children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("div",{className:s.pin,children:a.jsx(h,{name:"pin"})}),e==null?void 0:e.landId]}),a.jsx(i.Button,{compact:!0,onClick:m,className:s.actionBtn,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,"data-testid":"estate-field",children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("div",{className:s.pin,children:a.jsx(h,{name:"pin"})}),`Estate (${e.landId})`]}),a.jsx(i.Button,{compact:!0,className:s.actionBtn,onClick:m,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.point_location")}),a.jsx(i.Button,{compact:!0,className:s.actionBtn,onClick:m,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"crosshairs"})})]}),a.jsxs("div",{className:x(s.field,{[s.disabled]:c}),children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.land"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.land")})]}),n]})},[e==null?void 0:e.landId,c,m]);return a.jsxs(q,{activeTab:z.NAMES,isPageFullscreen:!0,isLoading:_||!e,children:[a.jsx(P,{to:f.ens(),children:a.jsxs(i.Button,{basic:!0,className:s.returnLink,children:[a.jsx(i.Icon,{name:"chevron left"}),"Return"]})}),a.jsxs("div",{className:s.main,children:[a.jsx("img",{alt:e==null?void 0:e.subdomain,src:F,className:s.ensImage}),a.jsxs("div",{className:s.fields,children:[a.jsxs("div",{className:s.fieldContainer,children:[a.jsxs("div",{children:[a.jsx("span",{className:s.fieldTitle,children:l("ens_detail_page.name")}),a.jsxs("span",{className:s.subdomain,children:[a.jsxs("span",{children:[a.jsx("span",{children:e==null?void 0:e.name}),".dcl.eth"]}),a.jsx(S,{role:"button",text:(e==null?void 0:e.subdomain)||"",showPopup:!0,className:"copy-to-clipboard",children:a.jsx(i.Icon,{"aria-label":"copy name","aria-hidden":"false",name:"clone outline"})}),(e==null?void 0:e.ensOwnerAddress)!==(e==null?void 0:e.nftOwnerAddress)?a.jsx("span",{className:s.unclaimedBadge,children:l("ens_detail_page.unclaimed")}):null]})]}),a.jsx(i.Button,{primary:!0,onClick:B,children:l("ens_detail_page.reclaim_name")})]}),a.jsxs("div",{className:s.fieldContainer,children:[I,y,E]})]})]})]})}const xe=t=>{const e=R(t);return{name:e,ens:e?w(t,`${e}.dcl.eth`):null,isLoading:O(V(t),K),alias:D(t),avatar:$(t),wallet:H(t)}},Ne=t=>({onFetchENS:e=>t(U(e)),onOpenModal:(e,_)=>t(G(e,_))}),Fe=M(xe,Ne)(he);export{Fe as default};
1
+ import{Z as k,D as d,aB as C,K as f,H as a,G as l,M as i,J as h,a1 as x,cz as A,cA as L,cy as T,L as P,cB as S,N as M,cL as R,cM as w,bw as O,cH as V,cC as D,cG as $,cN as H,cO as U,X as G,cP as K}from"./index-CRm8rxsg.js";import{L as q}from"./LoggedInDetailPage.container-Mhu8kcM_.js";import{N as z}from"./Navigation.container-BeLamUER.js";import"./SignInRequired-0hr2yxm2.js";import"./selectors-CLsL5QuF.js";const J="_main_7p9v2_1",Q="_fields_7p9v2_9",W="_ensImage_7p9v2_16",X="_field_7p9v2_9",Z="_fieldContainer_7p9v2_29",Y="_fieldTitle_7p9v2_41",ee="_subdomain_7p9v2_50",ae="_actionBtn_7p9v2_64",se="_editableFieldValue_7p9v2_84",le="_avatar_7p9v2_90",ie="_avatarImg_7p9v2_97",ne="_avatarName_7p9v2_104",te="_ensBtn_7p9v2_109",de="_address_7p9v2_116",ce="_returnLink_7p9v2_122",re="_editableField_7p9v2_84",oe="_emptyFieldPlaceholder_7p9v2_138",me="_pin_7p9v2_144",_e="_externalLink_7p9v2_154",pe="_unclaimedBadge_7p9v2_159",ue="_disabled_7p9v2_170",s={main:J,fields:Q,ensImage:W,field:X,fieldContainer:Z,fieldTitle:Y,subdomain:ee,actionBtn:ae,editableFieldValue:se,avatar:le,avatarImg:ie,avatarName:ne,ensBtn:te,address:de,returnLink:ce,editableField:re,emptyFieldPlaceholder:oe,pin:me,externalLink:_e,unclaimedBadge:pe,disabled:ue};function he(t){const{ens:e,isLoading:_,alias:N,avatar:o,name:p,wallet:g,onOpenModal:r,onFetchENS:j}=t,v=k(),F=d.useMemo(()=>e?`${C.get("MARKETPLACE_API")}/ens/generate?ens=${e.name}&width=330&height=330`:"",[e]),c=(e==null?void 0:e.ensOwnerAddress)!==(e==null?void 0:e.nftOwnerAddress);d.useEffect(()=>{p&&g&&j(p)},[p,g,j]);const u=d.useCallback(()=>{r("EnsMapAddressModal",{ens:e})},[r,e]),b=d.useCallback(()=>{r("UseAsAliasModal",{newName:e==null?void 0:e.name})},[r,e==null?void 0:e.name]),m=d.useCallback(()=>{v.push(f.ensSelectLand(e==null?void 0:e.subdomain))},[v,e==null?void 0:e.subdomain]),B=d.useCallback(()=>{r("ReclaimNameModal",{ens:e})},[r]),I=d.useMemo(()=>{let n;return N!==(e==null?void 0:e.name)?n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.unassign")}),a.jsx(i.Button,{compact:!0,primary:!0,onClick:b,className:s.actionBtn,"aria-label":l("ens_detail_page.set_as_primary"),children:a.jsx(i.Icon,{name:"user plus"})})]}):n=a.jsx("div",{className:s.editableField,children:a.jsxs("span",{className:s.avatar,"data-testid":"alias-avatar",children:[o?a.jsx("img",{className:s.avatarImg,src:o.avatar.snapshots.face256,alt:o.realName}):a.jsx(h,{name:"profile"}),a.jsx("span",{className:s.avatarName,children:e.name}),l("ens_list_page.table.you")]})}),a.jsxs("div",{className:s.field,children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.alias"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.alias")})]}),n]})},[e==null?void 0:e.name,c,o,N,b]),y=d.useMemo(()=>{let n=null;return c?n=a.jsxs("div",{className:x(s.editableField,s.disabled),children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_address")}),a.jsx(i.Button,{compact:!0,secondary:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):e!=null&&e.ensAddressRecord?n=a.jsxs("span",{className:s.editableField,children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("img",{src:A,alt:"Ethereum"}),L(e.ensAddressRecord)]}),a.jsx(i.Button,{compact:!0,secondary:!0,inverted:!0,onClick:u,className:s.actionBtn,"aria-label":l("ens_detail_page.edit_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.assign_address")}),a.jsx(i.Button,{compact:!0,secondary:!0,onClick:u,className:s.actionBtn,"aria-label":l("ens_detail_page.assign_address"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}),a.jsxs("div",{className:x(s.field,{[s.disabled]:c}),children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.address"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.address")})]}),n]})},[e==null?void 0:e.ensAddressRecord,c,u]),E=d.useMemo(()=>{let n=null;return c?n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.reclaim_for_location")}),a.jsx(i.Button,{compact:!0,disabled:!0,className:s.actionBtn,"aria-label":l("ens_detail_page.reclaim_for_location"),children:a.jsx(i.Icon,{name:"crosshairs"})})]}):e!=null&&e.landId?T(e.landId)?n=a.jsxs("div",{className:s.editableField,"data-testid":"land-field",children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("div",{className:s.pin,children:a.jsx(h,{name:"pin"})}),e==null?void 0:e.landId]}),a.jsx(i.Button,{compact:!0,onClick:m,className:s.actionBtn,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,"data-testid":"estate-field",children:[a.jsxs("span",{className:s.editableFieldValue,children:[a.jsx("div",{className:s.pin,children:a.jsx(h,{name:"pin"})}),`Estate (${e.landId})`]}),a.jsx(i.Button,{compact:!0,className:s.actionBtn,onClick:m,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"pencil alternate"})})]}):n=a.jsxs("div",{className:s.editableField,children:[a.jsx("span",{className:s.emptyFieldPlaceholder,children:l("ens_detail_page.point_location")}),a.jsx(i.Button,{compact:!0,className:s.actionBtn,onClick:m,"aria-label":l("ens_list_page.button.assign_to_land"),children:a.jsx(i.Icon,{name:"crosshairs"})})]}),a.jsxs("div",{className:x(s.field,{[s.disabled]:c}),children:[a.jsxs("span",{className:s.fieldTitle,children:[l("ens_detail_page.land"),a.jsx(i.InfoTooltip,{on:"click",content:l("ens_detail_page.tooltips.land")})]}),n]})},[e==null?void 0:e.landId,c,m]);return a.jsxs(q,{activeTab:z.NAMES,isPageFullscreen:!0,isLoading:_||!e,children:[a.jsx(P,{to:f.ens(),children:a.jsxs(i.Button,{basic:!0,className:s.returnLink,children:[a.jsx(i.Icon,{name:"chevron left"}),"Return"]})}),a.jsxs("div",{className:s.main,children:[a.jsx("img",{alt:e==null?void 0:e.subdomain,src:F,className:s.ensImage}),a.jsxs("div",{className:s.fields,children:[a.jsxs("div",{className:s.fieldContainer,children:[a.jsxs("div",{children:[a.jsx("span",{className:s.fieldTitle,children:l("ens_detail_page.name")}),a.jsxs("span",{className:s.subdomain,children:[a.jsxs("span",{children:[a.jsx("span",{children:e==null?void 0:e.name}),".dcl.eth"]}),a.jsx(S,{role:"button",text:(e==null?void 0:e.subdomain)||"",showPopup:!0,className:"copy-to-clipboard",children:a.jsx(i.Icon,{"aria-label":"copy name","aria-hidden":"false",name:"clone outline"})}),(e==null?void 0:e.ensOwnerAddress)!==(e==null?void 0:e.nftOwnerAddress)?a.jsx("span",{className:s.unclaimedBadge,children:l("ens_detail_page.unclaimed")}):null]})]}),a.jsx(i.Button,{primary:!0,onClick:B,children:l("ens_detail_page.reclaim_name")})]}),a.jsxs("div",{className:s.fieldContainer,children:[I,y,E]})]})]})]})}const xe=t=>{const e=R(t);return{name:e,ens:e?w(t,`${e}.dcl.eth`):null,isLoading:O(V(t),K),alias:D(t),avatar:$(t),wallet:H(t)}},Ne=t=>({onFetchENS:e=>t(U(e)),onOpenModal:(e,_)=>t(G(e,_))}),Fe=M(xe,Ne)(he);export{Fe as default};
@@ -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-j66rXTci.js";import{B as Oe}from"./Back-CQPVZ_Yw.js";import{N as Pe}from"./NotFound-Drp5upn-.js";import{S as $e}from"./SDKTag-cXIioIqG.js";import{a as F,S as Be}from"./SceneStats.container-Cz3IRVTv.js";import"./date-DVtTbuy-.js";import"./index-CkloEuvz.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.10.1-16527307771.commit-bda752c/assets/automatic_migrate-DQYv7lI_.webp",Ge="https://cdn.decentraland.org/@dcl/builder-site/7.10.1-16527307771.commit-bda752c/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 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-CRm8rxsg.js";import{B as Oe}from"./Back-CMDvhr75.js";import{N as Pe}from"./NotFound-BTph46EQ.js";import{S as $e}from"./SDKTag-DaiEuO8w.js";import{a as F,S as Be}from"./SceneStats.container-Bee7aqna.js";import"./date-CEzjVKJb.js";import"./index-Dayi3ygu.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.11.1-16576276409.commit-1d1de4c/assets/automatic_migrate-DQYv7lI_.webp",Ge="https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16576276409.commit-1d1de4c/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 +1 @@
1
- import{q as f,B as a}from"./index-j66rXTci.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
1
+ import{q as f,B as a}from"./index-CRm8rxsg.js";var l=function(o,r){if(typeof Blob>"u"||!(o instanceof Blob))throw new Error("first argument must be a Blob");if(typeof r!="function")throw new Error("second argument must be a function");const e=new FileReader;function n(t){e.removeEventListener("loadend",n,!1),t.error?r(t.error):r(null,a.from(e.result))}e.addEventListener("loadend",n,!1),e.readAsArrayBuffer(o)};const u=f(l),s=Object.freeze(Object.defineProperty({__proto__:null,default:u},Symbol.toStringTag,{value:"Module"}));export{s as i};
@@ -1 +1 @@
1
- import{bO as h,bP as s}from"./index-j66rXTci.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-CRm8rxsg.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
- import{af as ne,H as e,M as a,G as n,D as r,fo as K,fp as Ne,eO as v,ce as Fe,b8 as V,N as F,eQ as fe,fq as le,fr as Ue,X as M,fs as He,ft as ve,eZ as J,cB as ue,fu as me,e8 as ye,cC as We,bw as $,eC as Y,fv as Oe,et as ze,fw as Ge,fc as ke,bk as Ye,Z as Ee,fx as q,fy as te,K as w,eR as Te,er as _e,fz as qe,fA as Qe,bu as ee,fB as Ve,f3 as Je,f4 as Ze,e$ as Pe,eT as Se,L as pe,fC as Xe,dC as Ke,ep as es,f7 as ss,fD as as,fE as Q,fF as ts,f2 as ns,eD as he,fG as xe,aH as ls,cN as os,fH as Re,eo as is,fI as rs,fJ as cs,bv as ds,eX as f,fK as us,eu as ms,J as L,fL as be,a1 as se,fM as _s,f5 as ae,fN as ge,fO as ps,fb as hs,fP as xs,fQ as bs,fR as gs,fS as Cs,fT as js}from"./index-j66rXTci.js";import{g as Is}from"./selector-CtnQnmhq.js";import{C as Ns}from"./CollectionProvider.container-BlgzLY7w.js";import{L as fs}from"./LoggedInDetailPage.container-DDpb0HDW.js";import{N as vs}from"./NotFound-Drp5upn-.js";import{B as ys}from"./Back-CQPVZ_Yw.js";import{C as ks}from"./CollectionStatus.container-B5kSw8QZ.js";import{J as Es}from"./JumpIn.container-hYmuYYl_.js";import{C as Ts}from"./ConfirmDelete-Bu5cpBOG.js";import"./Navigation.container-CuwEnxUg.js";import"./selectors-DlaHedkY.js";import"./SignInRequired-C_a3RZQm.js";const Ps=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),Ce=ne.memo(Ps),Ss=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:d,onPush:_,onInit:j}=s;r.useEffect(()=>{l.isPublished&&j()},[l,j]);const x=o.length>K,k=r.useMemo(()=>o.length===0||!o.every(Ne)||x,[o,x]);let g;if(l.isPublished)l.isApproved?u?g=e.jsx(Ce,{type:"push"}):t===v.UNSYNCED?g=e.jsx(a.Button,{primary:!0,compact:!0,onClick:_,children:n("collection_detail_page.push_changes")}):g=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):g=e.jsx(Ce,{type:"publish"});else{const y=e.jsx(Fe,{disabled:k,primary:!0,compact:!0,onClick:d,network:V.Network.MATIC,children:n("collection_detail_page.publish")});if(k){let b;o.length>K?b=n("collection_detail_page.publish_reason_max_items",{maxItems:K}):o.length===0?b=n("collection_detail_page.publish_reason_no_items"):b=n("collection_detail_page.publish_reason_items_not_complete"),g=e.jsx(a.Popup,{content:b,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:y}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else g=y}return g},Rs=ne.memo(Ss),ws=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:le(s,o),status:t[o],hasPendingCuration:Ue(s,o)}},Ms=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(M("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(M("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(He(o))}},je=F(ws,Ms)(Rs),Ds="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",Bs="_menu_1a07a_13",Ls="_disabled_1a07a_13",$s="_item_1a07a_13",Ie={dropdown:Ds,ellipsis:As,menu:Bs,disabled:Ls,item:$s},Fs=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},d=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},_=()=>{o("AddExistingItemModal",{collectionId:s.id})},j=()=>{t(s)},x=ve(s,l.address);return e.jsx(a.Dropdown,{className:Ie.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:Ie.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?x?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:d})]}):null:J(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:_}),e.jsx(Ts,{name:s.name,onDelete:j,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(ue,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(ue,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Us=Fs,Hs=(s,l)=>({wallet:ye(s),items:le(s,l.collection.id),name:We(s)||"",isForumPostLoading:$(Y(s),Ge)}),Ws=s=>({onOpenModal:(l,o)=>s(M(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),Os=F(Hs,Ws)(Us),zs=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ne.memo(zs),Ys=(s,l)=>{const{itemId:o}=l;return{isEnabled:ke(s)[o]===v.UNSYNCED}},qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(M("ResetItemModal",{itemId:o}))}},Qs=F(Ys,qs)(Gs),Vs="_itemImage_10lcv_1",Js="_itemStatus_10lcv_9",Zs="_mana_10lcv_13",Xs="_grid_10lcv_19",Ks="_row_10lcv_30",ea="_avatarColumn_10lcv_35",sa="_avatarContainer_10lcv_40",aa="_info_10lcv_44",ta="_nameWrapper_10lcv_49",na="_badgeContainer_10lcv_54",la="_badge_10lcv_54",oa="_name_10lcv_49",ia="_linkAction_10lcv_76",ra="_subtitle_10lcv_80",ca="_itemActions_10lcv_86",da="_removeSaleButton_10lcv_93",ua="_status_10lcv_98",ma="_ready_10lcv_112",_a="_notReady_10lcv_117",pa="_incomplete_10lcv_122",ha="_published_10lcv_126",xa="_underReview_10lcv_131",ba="_unsynced_10lcv_132",ga="_alertIcon_10lcv_137",Ca="_check_10lcv_148",ja="_contextMenuButton_10lcv_152",Ia="_contextMenu_10lcv_152",i={itemImage:Vs,itemStatus:Js,mana:Zs,grid:Xs,row:Ks,avatarColumn:ea,avatarContainer:sa,info:aa,nameWrapper:ta,badgeContainer:na,badge:la,name:oa,linkAction:ia,subtitle:ra,itemActions:ca,removeSaleButton:da,status:ua,ready:ma,notReady:_a,incomplete:pa,published:ha,underReview:xa,unsynced:ba,alertIcon:ga,check:Ca,contextMenuButton:ja,contextMenu:Ia},Na=25;function fa({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,collection:d,status:_,ethAddress:j,wallet:x,loadingTradeIds:k,isCancellingItemOrder:g}){const y=Ye(),b=Ee(),E=x&&q(d,x),C=x&&u&&te(d,x),U=!u||C&&t.tradeId||E,T=r.useCallback(()=>{if(u&&C){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),D=r.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),N=r.useCallback(()=>{l([t]),b.push(w.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Te.COLLECTIONS}),y==null||y.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?qe(t.urn):Qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,b]),A=r.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),P=r.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:d})},[t,s,d]),H=r.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),W=r.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),Z=r.useCallback(()=>t.price?t.price===Ve.toString()||u&&!E&&!t.tradeId?e.jsx("span",{children:"-"}):Je(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:i.mana,network:V.Network.MATIC,showTooltip:!0,children:Ze(t.price)}):e.jsx("div",{className:`link ${i.linkAction}`,onClick:ee(T),children:n("collection_item.set_price")}),[t,E,u,T]),S=r.useCallback(()=>_===v.UNSYNCED?e.jsxs("div",{className:`${i.unsynced} ${i.status}`,children:[e.jsx("div",{className:i.alertIcon}),n("collection_item.unsynced")]}):_===v.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${i.underReview} ${i.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${i.published} ${i.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${i.ready} ${i.status}`,children:[e.jsx(a.Icon,{className:i.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Pe(t)&&!(Se in t.contents)?e.jsxs("div",{className:`${i.notReady} ${i.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:ee(N),className:`link ${i.linkAction}`,children:n("collection_item.edit_item")}),[N,t,_]),R=r.useCallback(()=>e.jsx("div",{className:i.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:i.action,onClick:ee(),children:e.jsxs(a.Dropdown.Menu,{className:i.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:w.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:D}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:N}),!d.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:P}),Xe(d,t,j)&&!J(d)?e.jsxs(e.Fragment,{children:[t.price&&U?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:T}):null,e.jsx(Qs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:A})]})]}):null]})})}),[d,t,j,D,N,P,T,A]),I=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${i.row}`,children:[e.jsx(a.Table.Cell,{className:`${i.avatarColumn}`,width:t.name.length>Na?6:5,children:e.jsx(pe,{to:w.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:i.avatarContainer,children:[e.jsx(Ke,{className:i.itemImage,item:t}),e.jsx("div",{className:i.info,children:e.jsx("div",{className:i.nameWrapper,children:e.jsxs("div",{className:i.name,title:t.name,children:[e.jsx(es,{className:i.itemStatus,item:t}),t.name,e.jsx("div",{className:i.badgeContainer,children:e.jsx(ss,{className:i.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:i.column,children:t.rarity&&I.category?e.jsx(as,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`${t.type}.category.${I.category}`)}):null}),Q(t)&&ts(I)?e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`emote.play_mode.${I.loop?"loop":"simple"}.text`)}):null}):null,u&&!d.isPublished?null:e.jsx(a.Table.Cell,{className:i.column,children:Z()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:i.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ns(t)]})}):null,e.jsx(a.Table.Cell,{children:S()}),u&&!E&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!C,onClick:H,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:i.removeSaleButton,onClick:W,loading:g&&k.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:i.contextMenuButton,children:R()})]})}const va=(s,l)=>{const o=ke(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ls(s),status:o[l.item.id],wallet:os(s),isOffchainPublicItemOrdersEnabled:Re(s),isCancellingItemOrder:$(he(s),xe),loadingTradeIds:t}},ya=s=>({onOpenModal:(l,o)=>s(M(l,o)),onDeleteItem:l=>s(is(l)),onSetItems:l=>s(rs(l)),onRemoveFromSale:l=>s(cs(l,!0))}),ka=F(va,ya)(fa);function Ea({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:d,onOpenModal:_,isLoading:j,isOffchainPublicItemOrdersEnabled:x,onFetchCollectionForumPostReply:k}){const g=ds(),y=r.useMemo(()=>new URLSearchParams(g.search).get("tab"),[g]),[b,E]=r.useState(y||f.WEARABLE),C=Ee(),U=u===w.collections(),T=r.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&k(s.id)},[s,k]);r.useEffect(()=>{s&&T()},[s]);const D=r.useCallback(()=>{_("MintItemsModal",{collectionId:s.id})},[s,_]),N=r.useCallback(()=>{_("CreateSingleItemModal",{collectionId:s.id})},[s,_]),A=r.useCallback(()=>{s&&!s.isPublished&&_("EditCollectionNameModal",{collection:s})},[s,_]),P=r.useCallback(()=>{s&&_("SellCollectionModal",{collectionId:s.id,isOnSale:te(s,l)||q(s,l)})},[s,l,_]),H=r.useCallback(()=>{U?C.goBack():C.push(w.collections())},[C,U]),W=r.useCallback(()=>{s&&C.push(us(s,o),{fromParam:Te.COLLECTIONS})},[C,s,o]),Z=r.useCallback((c,p="")=>{const m=window.open(c,p);m&&m.focus()},[]),S=r.useCallback(()=>{s&&s.isPublished&&s.forumLink&&Z(s.forumLink,"_blank")},[s]),R=r.useCallback(c=>{E(c),C.push(w.collectionDetail(s.id,ms.STANDARD,{tab:b}))},[s,C]),I=r.useCallback(c=>{const p=c===f.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:p.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),oe=r.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),X=r.useCallback(c=>{if(!s)return null;const p=J(s),m=c.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Es,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:p||!m}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:p||!m,onClick:W,children:[e.jsx(L,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),m&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:p,onClick:N,children:[e.jsx(L,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,W,N]),ie=r.useCallback(()=>{if(!s)return null;const c=q(s,l),p=te(s,l);return x&&!c?p?null:e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsxs(a.Button,{className:se("action-button",p?"secondary":"primary"),disabled:t||!m,onClick:P,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})}):e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsx(a.Button,{className:se("action-button",c?"basic":"primary"),disabled:t||!m,onClick:P,children:e.jsx("span",{className:"text",children:c?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})})},[s,x,P]),O=r.useCallback((c="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:p,last_read_post_number:m}=s.forumPostReply,z=p-(m??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:c,children:z})}return null},[s]),re=r.useCallback(()=>!(s!=null&&s.isApproved)||![v.UNSYNCED,v.UNDER_REVIEW].includes(d)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${d}_collection_message`,{br:e.jsx("br",{})})})]}),d===v.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:S,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),O("medium")]}):null,d===v.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,d,O,S]),we=r.useCallback(c=>{if(!s)return null;const p=_s(s,l.address),m=J(s),z=q(s,l),G=c.some(Q),B=c.some(ae),Me=G?c.some(h=>Q(h)&&!h.price):!1,De=B?c.some(h=>ae(h)&&!h.price):!1,Ae=B&&c.some(h=>Pe(h)&&!(Se in h.contents)),de=G&&!B,Be=B&&!G,Le=c.filter(h=>Be?ae(h):de?Q(h):h.type===b),$e=G&&B;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:se({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(ys,{absolute:!0,onClick:H}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:m?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(ks,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:A,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(L,{name:"edit",className:"edit-collection-name"}),z?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!p,onClick:D,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:S,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?O():null]}):null,!(s.isPublished&&s.isApproved)&&d!==v.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?ie():null,ge(s,l.address)?e.jsx(Os,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[re(),$e?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:b===f.WEARABLE,onClick:()=>R(f.WEARABLE),children:[e.jsx(L,{name:"wearable"}),n("collection_detail_page.wearables"),De?I(f.WEARABLE):Ae?oe():null]}),e.jsxs(a.Tabs.Tab,{active:b===f.EMOTE,onClick:()=>R(f.EMOTE),children:[e.jsx(L,{name:"emote"}),n("collection_detail_page.emotes"),Me?I(f.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:X(c)})]}):e.jsx("div",{className:"secondary-actions",children:X(c)}),c.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),b===f.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,x&&!s.isPublished?null:e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}),s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),x&&!z&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Le.map(h=>e.jsx(ka,{collection:s,item:h},h.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:m,onClick:N,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[b,d,l,s,N,X,A,I,R,re,ie,R,S,oe,O,D,H]),ce=l!==null&&s!==null&&ge(s,l.address);return e.jsx(Ns,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:c,isLoadingCollectionItems:p,items:m})=>e.jsx(fs,{className:"CollectionDetailPage",hasNavigation:!ce&&!j&&!c,isLoading:j||c||p,children:ce?we(m):e.jsx(vs,{})})})}const Ta=s=>{const l=ps(s)||"",o=hs(s,l),t=fe(s);return{wallet:ye(s),collection:o,isOnSaleLoading:xs(s)||$(Y(s),gs),items:le(s,l),status:t[l],isLoading:$(Y(s),Cs)||$(Y(s),js),lastLocation:Is(s),isOffchainPublicItemOrdersEnabled:Re(s)}},Pa=s=>({onOpenModal:(l,o)=>s(M(l,o)),onFetchCollectionForumPostReply:l=>s(bs(l))}),Oa=F(Ta,Pa)(Ea);export{Oa as default};
1
+ import{af as ne,H as e,M as a,G as n,D as r,fp as K,fq as Ne,eO as v,ce as Fe,b8 as V,N as F,eQ as fe,fr as le,fs as Ue,X as M,ft as He,fu as ve,eZ as J,cB as ue,fv as me,e8 as ye,cC as We,bw as $,eC as Y,fw as Oe,et as ze,fx as Ge,fd as ke,bk as Ye,Z as Ee,fy as q,fz as te,K as w,eR as Te,er as _e,fA as qe,fB as Qe,bu as ee,f4 as Ve,f3 as Je,f5 as Ze,e$ as Pe,eT as Se,L as pe,fC as Xe,dC as Ke,ep as es,f8 as ss,fD as as,fE as Q,fF as ts,f2 as ns,eD as he,fG as xe,aH as ls,cN as os,fH as Re,eo as is,fI as rs,fJ as cs,bv as ds,eX as f,fK as us,eu as ms,J as L,fL as be,a1 as se,fM as _s,f6 as ae,fN as ge,fO as ps,fc as hs,fP as xs,fQ as bs,fR as gs,fS as Cs,fT as js}from"./index-CRm8rxsg.js";import{g as Is}from"./selector-CtnQnmhq.js";import{C as Ns}from"./CollectionProvider.container-COHBv8D1.js";import{L as fs}from"./LoggedInDetailPage.container-Mhu8kcM_.js";import{N as vs}from"./NotFound-BTph46EQ.js";import{B as ys}from"./Back-CMDvhr75.js";import{C as ks}from"./CollectionStatus.container-6iMZMYJf.js";import{J as Es}from"./JumpIn.container-Z96yvyrM.js";import{C as Ts}from"./ConfirmDelete-B_dA5p6F.js";import"./Navigation.container-BeLamUER.js";import"./selectors-CLsL5QuF.js";import"./SignInRequired-0hr2yxm2.js";const Ps=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),Ce=ne.memo(Ps),Ss=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:d,onPush:_,onInit:j}=s;r.useEffect(()=>{l.isPublished&&j()},[l,j]);const x=o.length>K,k=r.useMemo(()=>o.length===0||!o.every(Ne)||x,[o,x]);let g;if(l.isPublished)l.isApproved?u?g=e.jsx(Ce,{type:"push"}):t===v.UNSYNCED?g=e.jsx(a.Button,{primary:!0,compact:!0,onClick:_,children:n("collection_detail_page.push_changes")}):g=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):g=e.jsx(Ce,{type:"publish"});else{const y=e.jsx(Fe,{disabled:k,primary:!0,compact:!0,onClick:d,network:V.Network.MATIC,children:n("collection_detail_page.publish")});if(k){let b;o.length>K?b=n("collection_detail_page.publish_reason_max_items",{maxItems:K}):o.length===0?b=n("collection_detail_page.publish_reason_no_items"):b=n("collection_detail_page.publish_reason_items_not_complete"),g=e.jsx(a.Popup,{content:b,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:y}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else g=y}return g},Rs=ne.memo(Ss),ws=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:le(s,o),status:t[o],hasPendingCuration:Ue(s,o)}},Ms=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(M("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(M("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(He(o))}},je=F(ws,Ms)(Rs),Ds="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",Bs="_menu_1a07a_13",Ls="_disabled_1a07a_13",$s="_item_1a07a_13",Ie={dropdown:Ds,ellipsis:As,menu:Bs,disabled:Ls,item:$s},Fs=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},d=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},_=()=>{o("AddExistingItemModal",{collectionId:s.id})},j=()=>{t(s)},x=ve(s,l.address);return e.jsx(a.Dropdown,{className:Ie.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:Ie.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?x?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:d})]}):null:J(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:_}),e.jsx(Ts,{name:s.name,onDelete:j,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(ue,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(ue,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Us=Fs,Hs=(s,l)=>({wallet:ye(s),items:le(s,l.collection.id),name:We(s)||"",isForumPostLoading:$(Y(s),Ge)}),Ws=s=>({onOpenModal:(l,o)=>s(M(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),Os=F(Hs,Ws)(Us),zs=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ne.memo(zs),Ys=(s,l)=>{const{itemId:o}=l;return{isEnabled:ke(s)[o]===v.UNSYNCED}},qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(M("ResetItemModal",{itemId:o}))}},Qs=F(Ys,qs)(Gs),Vs="_itemImage_10lcv_1",Js="_itemStatus_10lcv_9",Zs="_mana_10lcv_13",Xs="_grid_10lcv_19",Ks="_row_10lcv_30",ea="_avatarColumn_10lcv_35",sa="_avatarContainer_10lcv_40",aa="_info_10lcv_44",ta="_nameWrapper_10lcv_49",na="_badgeContainer_10lcv_54",la="_badge_10lcv_54",oa="_name_10lcv_49",ia="_linkAction_10lcv_76",ra="_subtitle_10lcv_80",ca="_itemActions_10lcv_86",da="_removeSaleButton_10lcv_93",ua="_status_10lcv_98",ma="_ready_10lcv_112",_a="_notReady_10lcv_117",pa="_incomplete_10lcv_122",ha="_published_10lcv_126",xa="_underReview_10lcv_131",ba="_unsynced_10lcv_132",ga="_alertIcon_10lcv_137",Ca="_check_10lcv_148",ja="_contextMenuButton_10lcv_152",Ia="_contextMenu_10lcv_152",i={itemImage:Vs,itemStatus:Js,mana:Zs,grid:Xs,row:Ks,avatarColumn:ea,avatarContainer:sa,info:aa,nameWrapper:ta,badgeContainer:na,badge:la,name:oa,linkAction:ia,subtitle:ra,itemActions:ca,removeSaleButton:da,status:ua,ready:ma,notReady:_a,incomplete:pa,published:ha,underReview:xa,unsynced:ba,alertIcon:ga,check:Ca,contextMenuButton:ja,contextMenu:Ia},Na=25;function fa({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,collection:d,status:_,ethAddress:j,wallet:x,loadingTradeIds:k,isCancellingItemOrder:g}){const y=Ye(),b=Ee(),E=x&&q(d,x),C=x&&u&&te(d,x),U=!u||C&&t.tradeId||E,T=r.useCallback(()=>{if(u&&C){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),D=r.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),N=r.useCallback(()=>{l([t]),b.push(w.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Te.COLLECTIONS}),y==null||y.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?qe(t.urn):Qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,b]),A=r.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),P=r.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:d})},[t,s,d]),H=r.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),W=r.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),Z=r.useCallback(()=>t.price?t.price===Ve.toString()||u&&!E&&!t.tradeId?e.jsx("span",{children:"-"}):Je(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:i.mana,network:V.Network.MATIC,showTooltip:!0,children:Ze(t.price)}):e.jsx("div",{className:`link ${i.linkAction}`,onClick:ee(T),children:n("collection_item.set_price")}),[t,E,u,T]),S=r.useCallback(()=>_===v.UNSYNCED?e.jsxs("div",{className:`${i.unsynced} ${i.status}`,children:[e.jsx("div",{className:i.alertIcon}),n("collection_item.unsynced")]}):_===v.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${i.underReview} ${i.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${i.published} ${i.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${i.ready} ${i.status}`,children:[e.jsx(a.Icon,{className:i.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Pe(t)&&!(Se in t.contents)?e.jsxs("div",{className:`${i.notReady} ${i.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:ee(N),className:`link ${i.linkAction}`,children:n("collection_item.edit_item")}),[N,t,_]),R=r.useCallback(()=>e.jsx("div",{className:i.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:i.action,onClick:ee(),children:e.jsxs(a.Dropdown.Menu,{className:i.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:w.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:D}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:N}),!d.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:P}),Xe(d,t,j)&&!J(d)?e.jsxs(e.Fragment,{children:[t.price&&U?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:T}):null,e.jsx(Qs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:A})]})]}):null]})})}),[d,t,j,D,N,P,T,A]),I=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${i.row}`,children:[e.jsx(a.Table.Cell,{className:`${i.avatarColumn}`,width:t.name.length>Na?6:5,children:e.jsx(pe,{to:w.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:i.avatarContainer,children:[e.jsx(Ke,{className:i.itemImage,item:t}),e.jsx("div",{className:i.info,children:e.jsx("div",{className:i.nameWrapper,children:e.jsxs("div",{className:i.name,title:t.name,children:[e.jsx(es,{className:i.itemStatus,item:t}),t.name,e.jsx("div",{className:i.badgeContainer,children:e.jsx(ss,{className:i.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:i.column,children:t.rarity&&I.category?e.jsx(as,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`${t.type}.category.${I.category}`)}):null}),Q(t)&&ts(I)?e.jsx(a.Table.Cell,{className:i.column,children:I.category?e.jsx("div",{children:n(`emote.play_mode.${I.loop?"loop":"simple"}.text`)}):null}):null,u&&!d.isPublished?null:e.jsx(a.Table.Cell,{className:i.column,children:Z()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:i.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ns(t)]})}):null,e.jsx(a.Table.Cell,{children:S()}),u&&!E&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!C,onClick:H,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:i.removeSaleButton,onClick:W,loading:g&&k.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:i.contextMenuButton,children:R()})]})}const va=(s,l)=>{const o=ke(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ls(s),status:o[l.item.id],wallet:os(s),isOffchainPublicItemOrdersEnabled:Re(s),isCancellingItemOrder:$(he(s),xe),loadingTradeIds:t}},ya=s=>({onOpenModal:(l,o)=>s(M(l,o)),onDeleteItem:l=>s(is(l)),onSetItems:l=>s(rs(l)),onRemoveFromSale:l=>s(cs(l,!0))}),ka=F(va,ya)(fa);function Ea({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:d,onOpenModal:_,isLoading:j,isOffchainPublicItemOrdersEnabled:x,onFetchCollectionForumPostReply:k}){const g=ds(),y=r.useMemo(()=>new URLSearchParams(g.search).get("tab"),[g]),[b,E]=r.useState(y||f.WEARABLE),C=Ee(),U=u===w.collections(),T=r.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&k(s.id)},[s,k]);r.useEffect(()=>{s&&T()},[s]);const D=r.useCallback(()=>{_("MintItemsModal",{collectionId:s.id})},[s,_]),N=r.useCallback(()=>{_("CreateSingleItemModal",{collectionId:s.id})},[s,_]),A=r.useCallback(()=>{s&&!s.isPublished&&_("EditCollectionNameModal",{collection:s})},[s,_]),P=r.useCallback(()=>{s&&_("SellCollectionModal",{collectionId:s.id,isOnSale:te(s,l)||q(s,l)})},[s,l,_]),H=r.useCallback(()=>{U?C.goBack():C.push(w.collections())},[C,U]),W=r.useCallback(()=>{s&&C.push(us(s,o),{fromParam:Te.COLLECTIONS})},[C,s,o]),Z=r.useCallback((c,p="")=>{const m=window.open(c,p);m&&m.focus()},[]),S=r.useCallback(()=>{s&&s.isPublished&&s.forumLink&&Z(s.forumLink,"_blank")},[s]),R=r.useCallback(c=>{E(c),C.push(w.collectionDetail(s.id,ms.STANDARD,{tab:b}))},[s,C]),I=r.useCallback(c=>{const p=c===f.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:p.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),oe=r.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),X=r.useCallback(c=>{if(!s)return null;const p=J(s),m=c.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Es,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:p||!m}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:p||!m,onClick:W,children:[e.jsx(L,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),m&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:p,onClick:N,children:[e.jsx(L,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,W,N]),ie=r.useCallback(()=>{if(!s)return null;const c=q(s,l),p=te(s,l);return x&&!c?p?null:e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsxs(a.Button,{className:se("action-button",p?"secondary":"primary"),disabled:t||!m,onClick:P,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})}):e.jsx(be,{network:V.Network.MATIC,children:m=>e.jsx(a.Button,{className:se("action-button",c?"basic":"primary"),disabled:t||!m,onClick:P,children:e.jsx("span",{className:"text",children:c?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})})},[s,x,P]),O=r.useCallback((c="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:p,last_read_post_number:m}=s.forumPostReply,z=p-(m??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:c,children:z})}return null},[s]),re=r.useCallback(()=>!(s!=null&&s.isApproved)||![v.UNSYNCED,v.UNDER_REVIEW].includes(d)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${d}_collection_message`,{br:e.jsx("br",{})})})]}),d===v.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:S,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),O("medium")]}):null,d===v.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,d,O,S]),we=r.useCallback(c=>{if(!s)return null;const p=_s(s,l.address),m=J(s),z=q(s,l),G=c.some(Q),B=c.some(ae),Me=G?c.some(h=>Q(h)&&!h.price):!1,De=B?c.some(h=>ae(h)&&!h.price):!1,Ae=B&&c.some(h=>Pe(h)&&!(Se in h.contents)),de=G&&!B,Be=B&&!G,Le=c.filter(h=>Be?ae(h):de?Q(h):h.type===b),$e=G&&B;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:se({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(ys,{absolute:!0,onClick:H}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:m?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(ks,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:A,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(L,{name:"edit",className:"edit-collection-name"}),z?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!p,onClick:D,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:S,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?O():null]}):null,!(s.isPublished&&s.isApproved)&&d!==v.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?ie():null,ge(s,l.address)?e.jsx(Os,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[re(),$e?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:b===f.WEARABLE,onClick:()=>R(f.WEARABLE),children:[e.jsx(L,{name:"wearable"}),n("collection_detail_page.wearables"),De?I(f.WEARABLE):Ae?oe():null]}),e.jsxs(a.Tabs.Tab,{active:b===f.EMOTE,onClick:()=>R(f.EMOTE),children:[e.jsx(L,{name:"emote"}),n("collection_detail_page.emotes"),Me?I(f.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:X(c)})]}):e.jsx("div",{className:"secondary-actions",children:X(c)}),c.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),b===f.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,x&&!s.isPublished?null:e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}),s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),x&&!z&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Le.map(h=>e.jsx(ka,{collection:s,item:h},h.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:m,onClick:N,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[b,d,l,s,N,X,A,I,R,re,ie,R,S,oe,O,D,H]),ce=l!==null&&s!==null&&ge(s,l.address);return e.jsx(Ns,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:c,isLoadingCollectionItems:p,items:m})=>e.jsx(fs,{className:"CollectionDetailPage",hasNavigation:!ce&&!j&&!c,isLoading:j||c||p,children:ce?we(m):e.jsx(vs,{})})})}const Ta=s=>{const l=ps(s)||"",o=hs(s,l),t=fe(s);return{wallet:ye(s),collection:o,isOnSaleLoading:xs(s)||$(Y(s),gs),items:le(s,l),status:t[l],isLoading:$(Y(s),Cs)||$(Y(s),js),lastLocation:Is(s),isOffchainPublicItemOrdersEnabled:Re(s)}},Pa=s=>({onOpenModal:(l,o)=>s(M(l,o)),onFetchCollectionForumPostReply:l=>s(bs(l))}),Oa=F(Ta,Pa)(Ea);export{Oa as default};
@@ -1 +1 @@
1
- var f=Object.defineProperty;var R=(l,o,s)=>o in l?f(l,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[o]=s;var x=(l,o,s)=>R(l,typeof o!="symbol"?o+"":o,s);import{D as g,K as m,H as e,aZ as B,M as t,N,a_ as O,bQ as z,bR as H,aA as P,bB as _,bS as A,bT as F,bI as j,bU as C,G as a,bM as $,bA as X,bC as E,bV as Y,bW as W,bX as U,bY as V,bZ as J,b_ as Z,aW as G,b$ as K,X as Q}from"./index-j66rXTci.js";import{L as q}from"./LandProviderPage-q8b0q3xS.js";import{B as ee}from"./Back-CQPVZ_Yw.js";import{J as se}from"./JumpIn.container-hYmuYYl_.js";import{R as te}from"./RentalPeriod-Ch6U4OGQ.js";import{S as oe}from"./SceneStats.container-Cz3IRVTv.js";import"./NotFound-Drp5upn-.js";import"./index-CkloEuvz.js";import"./date-DVtTbuy-.js";let ie=class extends g.PureComponent{constructor(){super(...arguments);x(this,"handleOnClick",()=>{const{isLoading:s,history:i}=this.props;s&&i.push(m.activity())})}render(){const{ens:s,isLoading:i,onIconClick:n}=this.props;return e.jsx(B,{className:"ENSChip",text:i?e.jsxs(e.Fragment,{children:[s.subdomain,e.jsx(t.Loader,{active:!0,size:"tiny"})]}):s.subdomain,isActive:i,icon:i?"":"minus",onClick:this.handleOnClick,onIconClick:n})}};const ne=(l,o)=>{const{ens:s}=o;return{isLoading:z(l)[s.subdomain]||H(l)[s.subdomain]}},le=N(ne)(O(ie)),ae=l=>{const{deployment:o,onMouseEnter:s,onMouseLeave:i,onNavigate:n,onOpenModal:u,projects:c,disabled:r}=l,d=o.projectId&&o.projectId in c?c[o.projectId]:null,p=g.useCallback(()=>{r||s(o)},[s,r,o]),h=g.useCallback(()=>{r||i(o)},[i,r,o]),v=g.useCallback(()=>{d&&!r&&n(m.sceneDetail(d.id))},[n,d,r]),S=g.useCallback(()=>{u("DeployModal",{view:P.CLEAR_DEPLOYMENT,deploymentId:o.id})},[u,o]);return e.jsxs("div",{className:`Scene ${d&&!r?"clickable":""}`,onClick:v,onMouseEnter:p,onMouseLeave:h,children:[o.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${o.thumbnail})`}}):e.jsx("div",{className:"no-thumbnail"}),e.jsxs("div",{className:"stat",children:[e.jsx("div",{className:"title",title:o.name,children:o.name}),o.layout?e.jsxs("div",{className:"secondary-text",children:[o.layout.rows,"x",o.layout.cols]}):null]}),e.jsx(oe,{deployment:o}),e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,disabled:r,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:"Unpublish",onClick:S})})})]})},L=({children:l,land:o})=>{const s=g.Children.map(l,i=>g.isValidElement(i)?g.cloneElement(i,{disabled:o.roles.includes(j.LESSOR)}):i);return e.jsx(t.Popup,{content:a("land_detail_page.land_is_locked"),position:"top left",disabled:!o.roles.includes(j.LESSOR),trigger:e.jsx("span",{children:s})})};let re=class extends g.PureComponent{constructor(){super(...arguments);x(this,"state",{hovered:null,mouseX:0,mouseY:0,showTooltip:!1});x(this,"handleMouseEnter",s=>{this.setState({hovered:s,showTooltip:!1})});x(this,"handleMouseLeave",()=>{this.setState({hovered:null,showTooltip:!1})});x(this,"handleMouseMove",s=>{this.setState({mouseX:s.clientX,mouseY:s.clientY})});x(this,"handleHover",s=>(i,n)=>{const{deploymentsByCoord:u}=this.props,c=u[_(i,n)];c&&s.some(r=>r.id===c.id)?this.setState({hovered:c,showTooltip:!0}):this.setState({hovered:null,showTooltip:!1})});x(this,"handleClick",(s,i)=>{const{deploymentsByCoord:n,projects:u,onNavigate:c,onReplace:r,landTiles:d}=this.props,p=_(s,i),h=n[p];h&&h.projectId&&h.projectId in u?c(m.sceneDetail(h.projectId)):p in d&&r(m.landDetail(d[p].land.id))});x(this,"isHovered",(s,i)=>{const{deploymentsByCoord:n}=this.props,{hovered:u}=this.state,c=_(s,i),r=n[c];return!!r&&!!u&&u.id===r.id});x(this,"getHoverStrokeLayer",s=>(i,n)=>this.isHovered(i,n)?{color:A[s.role],scale:1.4}:null);x(this,"getHoverFillLayer",s=>(i,n)=>this.isHovered(i,n)?{color:F[s.role],scale:1.2}:null)}computeOccupiedLand(s,i){const{landTiles:n}=this.props;return i.reduce((c,r)=>c+r.parcels.filter(d=>{const p=n[d];return!!p&&p.land.id===s.id}).length,0)}renderDetail(s,i,n){const{ensList:u,parcelsAvailableToBuildEstates:c,projects:r,onNavigate:d,onOpenModal:p}=this.props,{hovered:h,mouseX:v,mouseY:S,showTooltip:y}=this.state,D=this.computeOccupiedLand(s,i),w=n&&(s.roles.includes(j.LESSOR)||s.roles.includes(j.TENANT))?n.lessor:s.owner,M=s.roles.includes(j.LESSOR),k=c[s.id],T=y&&h&&h.projectId&&h.projectId in r;return e.jsxs(e.Fragment,{children:[h&&y?e.jsxs("div",{className:"tooltip",style:{top:S,left:v},children:[h.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${h.thumbnail})`}}):null,e.jsx("div",{className:"name",children:h.name})]}):null,e.jsx(t.Section,{size:"large",children:e.jsxs(t.Row,{children:[e.jsx(ee,{absolute:!0,onClick:()=>d(m.land())}),e.jsx(t.Narrow,{children:e.jsxs(t.Row,{children:[e.jsx(t.Column,{children:e.jsxs(t.Row,{children:[e.jsx(t.Header,{size:"huge",children:s.name}),s.type===C.PARCEL?e.jsx(e.Fragment,{children:e.jsxs(t.Badge,{color:"#37333D",children:[e.jsx("i",{className:"pin"}),s.id]})}):e.jsxs(t.Badge,{color:"#37333D",children:[s.size," LAND"]}),e.jsx(se,{land:s})]})}),s.role===j.OWNER||s.role===j.LESSOR?e.jsx(t.Column,{className:"actions",align:"right",children:e.jsxs(t.Row,{children:[e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landTransfer(s.id)),children:a("land_detail_page.transfer")})}),e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landEdit(s.id)),children:a("global.edit")})}),e.jsx(L,{land:s,children:e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[k?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.build_estate"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.add_or_remove_parcels"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.dissolve_estate"),onClick:()=>p("DissolveModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.assign_name"),onClick:()=>d(m.landSelectENS(s.id))}),e.jsx(t.Dropdown.Divider,{})]}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})]})})})]})}):s.roles.includes(j.TENANT)&&n&&!$(n)?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})})}):null]})})]})}),e.jsxs(t.Narrow,{children:[e.jsx(t.Section,{size:"large",children:e.jsx("div",{className:`atlas-wrapper ${T?"clickable":""}`,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,children:e.jsx(X,{landId:s.id,layers:[this.getHoverStrokeLayer(s),this.getHoverFillLayer(s)],isDraggable:!0,zoom:s.size&&s.size>=1e3?.5:1,onHover:this.handleHover(i),onClick:this.handleClick})})}),e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.online_scenes")}),i.length===0?e.jsx(t.Empty,{height:100,children:a("global.none")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:i.map(b=>e.jsx(ae,{disabled:M,deployment:b,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onNavigate:d,onOpenModal:p,projects:r},b.id))}),e.jsx("div",{className:"notice",children:a("analytics.notice")})]})]}),u.length>0?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:e.jsx(t.Row,{children:e.jsx(t.Column,{children:a("land_detail_page.assigned_names")})})}),e.jsx("div",{className:"ens-list",children:u.map(b=>e.jsx(le,{ens:b,onIconClick:()=>p("UnsetENSContentModal",{ens:b,land:s})},b.subdomain))})]}):null,s.description?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.description")}),e.jsx("p",{children:s.description})]}):null,e.jsxs(t.Section,{className:"data",children:[e.jsxs(t.Stats,{title:a("global.role"),className:"role",children:[e.jsx(t.Header,{children:a(`roles.${s.role}`)}),n?e.jsx(te,{land:s,rental:n}):null]}),e.jsx(t.Stats,{title:a("land_detail_page.owner"),children:e.jsx(E,{address:w,size:"large"})}),n&&s.roles.includes(j.LESSOR)?e.jsx(t.Stats,{title:a("land_detail_page.tenant"),children:e.jsx(E,{address:n.tenant,size:"large"})}):null,s.operators.length>0?e.jsx(t.Stats,{title:a("land_detail_page.operated_by"),className:"operators",children:e.jsx(t.Row,{children:s.operators.map((b,I)=>e.jsx(E,{address:b,size:"large"},I))})}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Stats,{title:a("land_detail_page.total_land"),children:e.jsx(t.Header,{children:s.size})}),e.jsx(t.Stats,{title:a("land_detail_page.empty_land"),children:e.jsx(t.Header,{children:s.size-D})})]}):null]})]})]})}render(){return e.jsx(q,{className:"LandDetailPage",children:(s,{deployments:i,rental:n})=>this.renderDetail(s,i,n)})}};const de=l=>{const o=Y(l)||"";return{ensList:W(l,o),parcelsAvailableToBuildEstates:U(l),deploymentsByCoord:V(l),landTiles:J(l),projects:Z(l)}},ce=l=>({onNavigate:o=>l(G(o)),onReplace:o=>l(K(o)),onOpenModal:(o,s)=>l(Q(o,s))}),Ee=N(de,ce)(re);export{Ee as default};
1
+ var f=Object.defineProperty;var R=(l,o,s)=>o in l?f(l,o,{enumerable:!0,configurable:!0,writable:!0,value:s}):l[o]=s;var x=(l,o,s)=>R(l,typeof o!="symbol"?o+"":o,s);import{D as g,K as m,H as e,aZ as B,M as t,N,a_ as O,bQ as z,bR as H,aA as P,bB as _,bS as A,bT as F,bI as j,bU as C,G as a,bM as $,bA as X,bC as E,bV as Y,bW as W,bX as U,bY as V,bZ as J,b_ as Z,aW as G,b$ as K,X as Q}from"./index-CRm8rxsg.js";import{L as q}from"./LandProviderPage-To0NgrKv.js";import{B as ee}from"./Back-CMDvhr75.js";import{J as se}from"./JumpIn.container-Z96yvyrM.js";import{R as te}from"./RentalPeriod-3F8-C-tg.js";import{S as oe}from"./SceneStats.container-Bee7aqna.js";import"./NotFound-BTph46EQ.js";import"./index-Dayi3ygu.js";import"./date-CEzjVKJb.js";let ie=class extends g.PureComponent{constructor(){super(...arguments);x(this,"handleOnClick",()=>{const{isLoading:s,history:i}=this.props;s&&i.push(m.activity())})}render(){const{ens:s,isLoading:i,onIconClick:n}=this.props;return e.jsx(B,{className:"ENSChip",text:i?e.jsxs(e.Fragment,{children:[s.subdomain,e.jsx(t.Loader,{active:!0,size:"tiny"})]}):s.subdomain,isActive:i,icon:i?"":"minus",onClick:this.handleOnClick,onIconClick:n})}};const ne=(l,o)=>{const{ens:s}=o;return{isLoading:z(l)[s.subdomain]||H(l)[s.subdomain]}},le=N(ne)(O(ie)),ae=l=>{const{deployment:o,onMouseEnter:s,onMouseLeave:i,onNavigate:n,onOpenModal:u,projects:c,disabled:r}=l,d=o.projectId&&o.projectId in c?c[o.projectId]:null,p=g.useCallback(()=>{r||s(o)},[s,r,o]),h=g.useCallback(()=>{r||i(o)},[i,r,o]),v=g.useCallback(()=>{d&&!r&&n(m.sceneDetail(d.id))},[n,d,r]),S=g.useCallback(()=>{u("DeployModal",{view:P.CLEAR_DEPLOYMENT,deploymentId:o.id})},[u,o]);return e.jsxs("div",{className:`Scene ${d&&!r?"clickable":""}`,onClick:v,onMouseEnter:p,onMouseLeave:h,children:[o.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${o.thumbnail})`}}):e.jsx("div",{className:"no-thumbnail"}),e.jsxs("div",{className:"stat",children:[e.jsx("div",{className:"title",title:o.name,children:o.name}),o.layout?e.jsxs("div",{className:"secondary-text",children:[o.layout.rows,"x",o.layout.cols]}):null]}),e.jsx(oe,{deployment:o}),e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,disabled:r,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:"Unpublish",onClick:S})})})]})},L=({children:l,land:o})=>{const s=g.Children.map(l,i=>g.isValidElement(i)?g.cloneElement(i,{disabled:o.roles.includes(j.LESSOR)}):i);return e.jsx(t.Popup,{content:a("land_detail_page.land_is_locked"),position:"top left",disabled:!o.roles.includes(j.LESSOR),trigger:e.jsx("span",{children:s})})};let re=class extends g.PureComponent{constructor(){super(...arguments);x(this,"state",{hovered:null,mouseX:0,mouseY:0,showTooltip:!1});x(this,"handleMouseEnter",s=>{this.setState({hovered:s,showTooltip:!1})});x(this,"handleMouseLeave",()=>{this.setState({hovered:null,showTooltip:!1})});x(this,"handleMouseMove",s=>{this.setState({mouseX:s.clientX,mouseY:s.clientY})});x(this,"handleHover",s=>(i,n)=>{const{deploymentsByCoord:u}=this.props,c=u[_(i,n)];c&&s.some(r=>r.id===c.id)?this.setState({hovered:c,showTooltip:!0}):this.setState({hovered:null,showTooltip:!1})});x(this,"handleClick",(s,i)=>{const{deploymentsByCoord:n,projects:u,onNavigate:c,onReplace:r,landTiles:d}=this.props,p=_(s,i),h=n[p];h&&h.projectId&&h.projectId in u?c(m.sceneDetail(h.projectId)):p in d&&r(m.landDetail(d[p].land.id))});x(this,"isHovered",(s,i)=>{const{deploymentsByCoord:n}=this.props,{hovered:u}=this.state,c=_(s,i),r=n[c];return!!r&&!!u&&u.id===r.id});x(this,"getHoverStrokeLayer",s=>(i,n)=>this.isHovered(i,n)?{color:A[s.role],scale:1.4}:null);x(this,"getHoverFillLayer",s=>(i,n)=>this.isHovered(i,n)?{color:F[s.role],scale:1.2}:null)}computeOccupiedLand(s,i){const{landTiles:n}=this.props;return i.reduce((c,r)=>c+r.parcels.filter(d=>{const p=n[d];return!!p&&p.land.id===s.id}).length,0)}renderDetail(s,i,n){const{ensList:u,parcelsAvailableToBuildEstates:c,projects:r,onNavigate:d,onOpenModal:p}=this.props,{hovered:h,mouseX:v,mouseY:S,showTooltip:y}=this.state,D=this.computeOccupiedLand(s,i),w=n&&(s.roles.includes(j.LESSOR)||s.roles.includes(j.TENANT))?n.lessor:s.owner,M=s.roles.includes(j.LESSOR),k=c[s.id],T=y&&h&&h.projectId&&h.projectId in r;return e.jsxs(e.Fragment,{children:[h&&y?e.jsxs("div",{className:"tooltip",style:{top:S,left:v},children:[h.thumbnail?e.jsx("div",{className:"thumbnail",style:{backgroundImage:`url(${h.thumbnail})`}}):null,e.jsx("div",{className:"name",children:h.name})]}):null,e.jsx(t.Section,{size:"large",children:e.jsxs(t.Row,{children:[e.jsx(ee,{absolute:!0,onClick:()=>d(m.land())}),e.jsx(t.Narrow,{children:e.jsxs(t.Row,{children:[e.jsx(t.Column,{children:e.jsxs(t.Row,{children:[e.jsx(t.Header,{size:"huge",children:s.name}),s.type===C.PARCEL?e.jsx(e.Fragment,{children:e.jsxs(t.Badge,{color:"#37333D",children:[e.jsx("i",{className:"pin"}),s.id]})}):e.jsxs(t.Badge,{color:"#37333D",children:[s.size," LAND"]}),e.jsx(se,{land:s})]})}),s.role===j.OWNER||s.role===j.LESSOR?e.jsx(t.Column,{className:"actions",align:"right",children:e.jsxs(t.Row,{children:[e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landTransfer(s.id)),children:a("land_detail_page.transfer")})}),e.jsx(L,{land:s,children:e.jsx(t.Button,{basic:!0,onClick:()=>d(m.landEdit(s.id)),children:a("global.edit")})}),e.jsx(L,{land:s,children:e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[k?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.build_estate"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.add_or_remove_parcels"),onClick:()=>p("EstateEditorModal",{land:s})}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.dissolve_estate"),onClick:()=>p("DissolveModal",{land:s})}),e.jsx(t.Dropdown.Divider,{})]}):null,e.jsxs(e.Fragment,{children:[e.jsx(t.Dropdown.Item,{text:a("land_detail_page.assign_name"),onClick:()=>d(m.landSelectENS(s.id))}),e.jsx(t.Dropdown.Divider,{})]}),e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})]})})})]})}):s.roles.includes(j.TENANT)&&n&&!$(n)?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsx(t.Dropdown.Menu,{children:e.jsx(t.Dropdown.Item,{text:a("land_detail_page.set_operator"),onClick:()=>d(m.landOperator(s.id))})})}):null]})})]})}),e.jsxs(t.Narrow,{children:[e.jsx(t.Section,{size:"large",children:e.jsx("div",{className:`atlas-wrapper ${T?"clickable":""}`,onMouseLeave:this.handleMouseLeave,onMouseMove:this.handleMouseMove,children:e.jsx(X,{landId:s.id,layers:[this.getHoverStrokeLayer(s),this.getHoverFillLayer(s)],isDraggable:!0,zoom:s.size&&s.size>=1e3?.5:1,onHover:this.handleHover(i),onClick:this.handleClick})})}),e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.online_scenes")}),i.length===0?e.jsx(t.Empty,{height:100,children:a("global.none")}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"deployments",children:i.map(b=>e.jsx(ae,{disabled:M,deployment:b,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onNavigate:d,onOpenModal:p,projects:r},b.id))}),e.jsx("div",{className:"notice",children:a("analytics.notice")})]})]}),u.length>0?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:e.jsx(t.Row,{children:e.jsx(t.Column,{children:a("land_detail_page.assigned_names")})})}),e.jsx("div",{className:"ens-list",children:u.map(b=>e.jsx(le,{ens:b,onIconClick:()=>p("UnsetENSContentModal",{ens:b,land:s})},b.subdomain))})]}):null,s.description?e.jsxs(t.Section,{size:"large",children:[e.jsx(t.Header,{sub:!0,children:a("land_detail_page.description")}),e.jsx("p",{children:s.description})]}):null,e.jsxs(t.Section,{className:"data",children:[e.jsxs(t.Stats,{title:a("global.role"),className:"role",children:[e.jsx(t.Header,{children:a(`roles.${s.role}`)}),n?e.jsx(te,{land:s,rental:n}):null]}),e.jsx(t.Stats,{title:a("land_detail_page.owner"),children:e.jsx(E,{address:w,size:"large"})}),n&&s.roles.includes(j.LESSOR)?e.jsx(t.Stats,{title:a("land_detail_page.tenant"),children:e.jsx(E,{address:n.tenant,size:"large"})}):null,s.operators.length>0?e.jsx(t.Stats,{title:a("land_detail_page.operated_by"),className:"operators",children:e.jsx(t.Row,{children:s.operators.map((b,I)=>e.jsx(E,{address:b,size:"large"},I))})}):null,s.type===C.ESTATE?e.jsxs(e.Fragment,{children:[e.jsx(t.Stats,{title:a("land_detail_page.total_land"),children:e.jsx(t.Header,{children:s.size})}),e.jsx(t.Stats,{title:a("land_detail_page.empty_land"),children:e.jsx(t.Header,{children:s.size-D})})]}):null]})]})]})}render(){return e.jsx(q,{className:"LandDetailPage",children:(s,{deployments:i,rental:n})=>this.renderDetail(s,i,n)})}};const de=l=>{const o=Y(l)||"";return{ensList:W(l,o),parcelsAvailableToBuildEstates:U(l),deploymentsByCoord:V(l),landTiles:J(l),projects:Z(l)}},ce=l=>({onNavigate:o=>l(G(o)),onReplace:o=>l(K(o)),onOpenModal:(o,s)=>l(Q(o,s))}),Ee=N(de,ce)(re);export{Ee as default};
@@ -1 +1 @@
1
- var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{af as r,ag as d,H as a,ah as p,M as h,ai as g,aj as l,N as C,ae as m,a6 as x,ak as u}from"./index-j66rXTci.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),R=n=>({onConnect:e=>n(u(e))}),$=C(P,R)(j);export{$ as default};
1
+ var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{af as r,ag as d,H as a,ah as p,M as h,ai as g,aj as l,N as C,ae as m,a6 as x,ak as u}from"./index-CRm8rxsg.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),R=n=>({onConnect:e=>n(u(e))}),$=C(P,R)(j);export{$ as default};
@@ -0,0 +1 @@
1
+ var X=Object.defineProperty;var Y=(n,a,l)=>a in n?X(n,a,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[a]=l;var E=(n,a,l)=>Y(n,typeof a!="symbol"?a+"":a,l);import{D as o,H as e,J as Z,Z as J,K as S,er as q,eR as F,eS as k,eT as j,eO as H,eU as $,eV as ee,eW as _,eX as se,eY as ae,eZ as ie,M as t,G as i,dC as te,e_ as le,e$ as y,f0 as ne,f1 as ce,f2 as re,L as oe,eq as de,cB as ue,f3 as me,f4 as z,b8 as he,f5 as xe,cA as pe,f6 as je,f7 as ge,f8 as ve,f9 as Ne,N as be,fa as Ie,fb as fe,e8 as _e,fc as ye,fd as Ce,fe as Ee,bw as T,eD as P,ff as Se,fg as ke,eo as Te,X as Pe,eM as we,fh as De,fi as Me}from"./index-CRm8rxsg.js";import{I as Le}from"./ItemProvider.container-8rAdhUYb.js";import{C as Re}from"./ConfirmDelete-B_dA5p6F.js";import{L as Be}from"./LoggedInDetailPage.container-Mhu8kcM_.js";import{N as Ue}from"./NotFound-BTph46EQ.js";import{B as Oe}from"./Back-CMDvhr75.js";import"./Navigation.container-BeLamUER.js";import"./selectors-CLsL5QuF.js";import"./SignInRequired-0hr2yxm2.js";class Ae extends o.PureComponent{constructor(l){super(l);E(this,"state",{isNoticeClosed:!1});E(this,"handleCloseNotice",()=>{const{storageKey:l}=this.props;this.setState({isNoticeClosed:!0}),localStorage.setItem(l,"1")});const{storageKey:u}=l;this.state={isNoticeClosed:localStorage.getItem(u)!==null}}render(){const{children:l}=this.props,{isNoticeClosed:u}=this.state;return u?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:l}),e.jsx(Z,{name:"close",onClick:this.handleCloseNotice})]})}}const Ve="dcl-item-notice";function qe(n){const{item:a,itemId:l,isLoading:u,status:h,collection:g,hasAccess:v,isWearableUtilityEnabled:w,onDelete:D,onSaveItem:x,onOpenModal:d}=n,p=o.useRef(null),N=J(),C=o.useCallback(()=>{a&&N.push(S.itemEditor({itemId:a.id,collectionId:a.collectionId}),{fromParam:q(a.urn)?F.TP_COLLECTIONS:F.COLLECTIONS})},[N,a]),M=o.useCallback(async s=>{const c=await k({[j]:s}),m={...a,contents:{...a==null?void 0:a.contents,[j]:c[j]}};h&&[H.UNPUBLISHED,H.UNDER_REVIEW].includes(h)&&(m.video=c[j]),x(m,{[j]:s})},[x,a,h]),b=o.useCallback(()=>{d("EditVideoModal",{item:a,onSaveVideo:M})},[a,d,M]),L=o.useCallback(()=>{D(a)},[a,D]),I=o.useCallback(()=>{a&&$(a)?d("CreateSingleItemModal",{item:a,addRepresentation:!0}):d("CreateSingleItemModal",{item:a,changeItemFile:!0})},[d,a]),R=o.useCallback(()=>{d("EditItemURNModal",{item:a})},[a,d]),B=o.useCallback(async s=>{const c=ee(s);x({...a,contents:{...a==null?void 0:a.contents,...await k({[_]:c})}},{[_]:c})},[x,a]),U=o.useCallback(()=>{(a==null?void 0:a.type)===se.EMOTE?d("EditThumbnailModal",{onSaveThumbnail:B,item:a,collection:g}):p.current&&p.current.click()},[p.current,g,a,d,B]),O=o.useCallback(async s=>{const{files:c}=s.target;if(c&&c.length>0){const m=c[0],f=await ae(m,1024,1024);f&&a&&(a.contents={...a.contents,...await k({[_]:f})},x(a,{[_]:f}))}},[x,a]),A=o.useCallback(()=>{d("MoveItemToCollectionModal",{item:a})},[a,d]),W=o.useCallback((s,c)=>{var V;const m=s.data,K=!(c&&ie(c));return e.jsxs(e.Fragment,{children:[e.jsx(t.Section,{children:e.jsx(t.Row,{children:e.jsx(Oe,{onClick:()=>N.push(S.collectionDetail(s.collectionId))})})}),e.jsxs(t.Narrow,{children:[!c&&!s.collectionId?e.jsx(Ae,{storageKey:Ve,children:i("item_detail_page.notice")}):null,e.jsxs("div",{className:"item-data",children:[e.jsxs("div",{className:"item-data-left-panel",children:[e.jsx(te,{item:s,hasBadge:!0,hasRarityBadge:!0,hasUtilityBadge:!0}),e.jsx("div",{children:e.jsxs(t.Button,{primary:!0,onClick:U,children:[e.jsx("input",{type:"file",ref:p,onChange:O,accept:"image/png"}),e.jsx(t.Icon,{name:"camera"}),i("item_detail_page.edit_thumbnail")]})}),e.jsxs("div",{className:"metrics",children:[e.jsx("span",{className:"subtitle",children:i("item_detail_page.properties")}),e.jsx(le,{item:s})]}),y(s)?e.jsx(ne,{item:s,onClick:b,children:(r,Q,G,$e)=>e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"overlay",children:e.jsx(t.Icon,{name:"play",className:"play-video-button",onClick:b})}),e.jsxs(t.Button,{primary:!0,onClick:b,children:[e.jsx(t.Icon,{name:"video"}),i("item_detail_page.edit_video")]}),e.jsxs("div",{className:"metrics",children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.properties")}),e.jsx(ce,{duration:Q,size:G,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details")}),s.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",s.tokenId]})]}),m.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.category")}),e.jsx("div",{className:"value",children:i(`${s.type}.category.${m.category}`)})]}):null,s.isPublished&&s.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.supply")}),e.jsxs("div",{className:"value",children:[s.totalSupply,"/",re(s)]})]}):null,c?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.collection")}),e.jsx(oe,{className:"collection-link",to:S.collectionDetail(c.id,de(c)),children:c.name})]}):null,s.urn?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("global.urn")}),e.jsxs("div",{className:"value urn",children:[e.jsxs("span",{children:[s.urn,e.jsx(ue,{role:"button",text:s.urn,children:e.jsx(t.Icon,{"aria-label":"Copy urn","aria-hidden":"false",className:"link copy",name:"copy outline"})})]}),e.jsx("div",{className:"urn-actions",children:q(s.urn)?e.jsx(t.Popup,{content:i("collection_item.cannot_edit_urn"),disabled:!s.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:s.isPublished,className:"link",onClick:R,children:i("item.edit_urn")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):null})]})]}):null]})]}),e.jsxs("div",{className:"cards-container",children:[e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:s.name}),e.jsxs("div",{className:"actions",children:[y(s)&&e.jsx(t.Button,{className:"edit",inverted:!0,size:"small",onClick:I,children:i("global.edit")}),e.jsx(t.Button,{inverted:!0,size:"small",onClick:C,children:i("collection_detail_page.preview")}),K?e.jsx(t.Dropdown,{trigger:e.jsx(t.Button,{basic:!0,className:"more-actions-button",children:e.jsx(t.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(t.Dropdown.Menu,{children:[e.jsx(Re,{name:s.name,onDelete:L,trigger:s.isPublished?e.jsx(t.Popup,{content:i("item_detail_page.delete_published_item"),position:"right center",trigger:e.jsx(t.Dropdown.Item,{disabled:!0,text:i("global.delete")}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx(t.Dropdown.Item,{text:i("global.delete")})}),!s.collectionId&&e.jsx(t.Dropdown.Item,{text:i("collection_item.move_to_another_collection"),onClick:A})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[s.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.description")}),e.jsx("div",{className:"data",children:s.description})]}),s.utility&&w&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.utility")}),e.jsx("div",{className:"data",children:s.utility})]})]}),s.data.tags.length?e.jsx("div",{className:"attribute-row",children:e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.tags.title")}),e.jsx("div",{className:"data tags-container",children:s.data.tags.map(r=>e.jsx("span",{className:"tag",children:r},r))})]})}):null]}),e.jsxs("div",{className:"card",children:[e.jsx("div",{className:"title",children:i("item_detail_page.selling.title")}),e.jsxs("div",{className:"data",children:[me(s)?e.jsxs(t.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),e.jsx("div",{className:"value",children:i("global.free")})]}):s.price?e.jsxs(t.Section,{className:"price-container",children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),s.price&&s.price!==z.toString()?e.jsx(t.Mana,{showTooltip:!0,network:he.Network.MATIC,className:"mana-price-container",children:(()=>{const r=xe(s.price);return r.length>10?e.jsx(t.Popup,{content:r,position:"top center",trigger:e.jsx("span",{children:`${r.slice(0,3)}...${r.slice(-4)}`}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}):e.jsx("div",{className:"value",children:r})})()}):s.price===z.toString()?e.jsx("div",{className:"value",children:i("item.not_for_sale")}):"-"]}):null,e.jsxs(t.Section,{className:"beneficiary-container",children:[e.jsx("div",{className:"subtitle",children:i("item.beneficiary")}),s.beneficiary?e.jsx("div",{className:"value",children:pe(s.beneficiary)}):"-"]})]})]}),je(s)&&!y(s)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:i("item_detail_page.representations.title")}),e.jsx(t.Button,{className:"edit-button",inverted:!0,size:"small",onClick:I,children:$(s)?i("global.add"):i("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:s.data.representations.map(r=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:ge(s),alt:s.name}),r.mainFile,e.jsx(ve,{item:s,bodyShape:r.bodyShapes[0]})]},r.mainFile))})})]}):null,y(s)&&((V=s.data.requiredPermissions)!=null&&V.length)?e.jsxs("div",{className:"card",children:[e.jsxs("div",{className:"title-card-container",children:[e.jsx("div",{className:"title",children:i("item_detail_page.required_permissions")}),e.jsx(t.Button,{inverted:!0,className:"learn-more-permissions",size:"small",href:"https://docs.decentraland.org/creator/development-guide/sdk7/scene-metadata/#required-permissions",rel:"noopener noreferrer",target:"_blank",content:i("global.learn_more")})]}),e.jsx("div",{className:"data",children:e.jsx(Ne,{requiredPermissions:s.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[w,N,p,U,O,b,R,I,I,A,C,L,C]);return e.jsx(Le,{id:l,children:(s,c,m)=>e.jsx(Be,{className:"ItemDetailPage",hasNavigation:!v&&!u,isLoading:u||m,children:v&&s?W(s,c):e.jsx(Ue,{})})})}const Fe=n=>{const a=Ie(n),l=a?fe(n,a):null,u=_e(n),h=l&&l.collectionId?ye(n,l.collectionId):null,g=Ce(n),v=l?g[l.id]:null;return{itemId:a,wallet:u,item:l,collection:h,status:v,isWearableUtilityEnabled:Ee(n),isLoading:T(P(n),we)||T(P(n),De)||T(P(n),Me),hasAccess:l!==null&&Se(n,u.address,h,l)}},He=n=>({onSaveItem:(a,l)=>n(ke(a,l)),onDelete:a=>n(Te(a)),onOpenModal:(a,l)=>n(Pe(a,l))}),ss=be(Fe,He)(qe);export{ss as default};
@@ -0,0 +1 @@
1
+ import{N as g,ae as n,a5 as a,a6 as i}from"./index-CRm8rxsg.js";import{H as s}from"./Navigation.container-BeLamUER.js";import"./selectors-CLsL5QuF.js";const e=o=>({isLoggedIn:n(o),isLoggingIn:a(o)||i(o)}),c=g(e)(s);export{c as default};
@@ -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-j66rXTci.js";import{L as Je}from"./LoggedInDetailPage.container-DDpb0HDW.js";import{N as es}from"./Navigation.container-CuwEnxUg.js";import"./SignInRequired-C_a3RZQm.js";import"./selectors-DlaHedkY.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-CRm8rxsg.js";import{L as Je}from"./LoggedInDetailPage.container-Mhu8kcM_.js";import{N as es}from"./Navigation.container-BeLamUER.js";import"./SignInRequired-0hr2yxm2.js";import"./selectors-CLsL5QuF.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
- .ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.10.1-16527307771.commit-bda752c/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
1
+ .ProjectCard{position:relative;width:100%;max-width:var(--scenespage-card-width);height:var(--scenespage-card-height);border-radius:10px;background:rgba(var(--bluish-steel-raw),.16);cursor:pointer;display:flex;justify-content:flex-end;flex-direction:column}.ProjectCard .project-thumbnail{height:170px;width:100%;max-width:256px;background-size:100% 170px;border-top-left-radius:10px;border-top-right-radius:10px}.ProjectCard .deployment-status{align-self:flex-end;margin-right:8px;margin-bottom:8px;position:absolute;right:0;bottom:70px}.ProjectCard .project-data{height:70px;width:100%;padding:12px 9px 14px;background-color:#313131;align-self:flex-end;color:var(--text);z-index:1;border-bottom-left-radius:10px;border-bottom-right-radius:10px}.ProjectCard .title{font-size:18px;line-height:24px;font-weight:600;overflow:hidden;white-space:nowrap;width:240px;text-overflow:ellipsis}.ProjectCard .description{display:flex;align-items:center;font-size:14px;font-weight:400;line-height:24px;letter-spacing:0px;text-align:left;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;-webkit-user-select:none;user-select:none}.ProjectCard .description .Icon{margin-right:5px}.ProjectCard .description .Icon.scene-object{margin-left:11px}.ProjectCard .overlay{position:absolute;left:0;right:0;top:0;bottom:0;background:var(--background);opacity:.3}.ProjectCard:hover{z-index:999}.ProjectCard .options-container{display:flex;justify-content:space-between;align-items:center;position:absolute;top:0;width:100%;padding:8px}.ProjectCard .options-container .options-dropdown{visibility:hidden}.ProjectCard:hover .options-container .options-dropdown{visibility:visible}.ProjectCard .options-dropdown .icon:before{color:var(--text)!important}.ProjectCard.has-thumbnail{position:relative;background-size:cover;background-position:center}.ProjectCard .title-wrapper{display:flex}.ProjectCard .Icon.is-uploading{margin-left:4px;margin-top:2px}.ProjectCard .error-indicator{width:16px;height:16px;background:url("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%3e%3cdefs%3e%3cfilter%20id='a'%20width='108.5%25'%20height='175%25'%20x='-4.2%25'%20y='-37.5%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20result='shadowMatrixOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.16%200'/%3e%3cfeMerge%3e%3cfeMergeNode%20in='shadowMatrixOuter1'/%3e%3cfeMergeNode%20in='SourceGraphic'/%3e%3c/feMerge%3e%3c/filter%3e%3ccircle%20id='c'%20cx='8'%20cy='8'%20r='8'/%3e%3cfilter%20id='b'%20width='187.5%25'%20height='187.5%25'%20x='-43.8%25'%20y='-31.2%25'%20filterUnits='objectBoundingBox'%3e%3cfeOffset%20dy='2'%20in='SourceAlpha'%20result='shadowOffsetOuter1'/%3e%3cfeGaussianBlur%20in='shadowOffsetOuter1'%20result='shadowBlurOuter1'%20stdDeviation='2'/%3e%3cfeComposite%20in='shadowBlurOuter1'%20in2='SourceAlpha'%20operator='out'%20result='shadowBlurOuter1'/%3e%3cfeColorMatrix%20in='shadowBlurOuter1'%20values='0%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200%200.5%200'/%3e%3c/filter%3e%3c/defs%3e%3cg%20fill='none'%20fill-rule='evenodd'%20filter='url(%23a)'%20transform='translate(-2%20-6)'%3e%3cg%20transform='translate(8%208)'%3e%3cuse%20fill='%23000'%20filter='url(%23b)'%20xlink:href='%23c'/%3e%3ccircle%20cx='8'%20cy='8'%20r='7.25'%20fill='%23F00'%20stroke='%23FFF'%20stroke-linejoin='square'%20stroke-width='1.5'/%3e%3c/g%3e%3cpath%20fill='%23FFF'%20d='M17%2012.5v4a1%201%200%201%201-2%200v-4a1%201%200%201%201%202%200zm-2%207a1%201%200%201%201%202%200%201%201%200%200%201-2%200z'/%3e%3c/g%3e%3c/svg%3e");background-repeat:no-repeat;background-position:center -2px;margin-top:3px;margin-left:7px}.ScenesPageAd{padding-top:32px}.ScenesPage .ui.button.inverted,.ScenesPage .ui.button.inverted:hover{background-color:#fff;color:var(--shadows)}.ScenesPage .project-cards{position:relative}.ScenesPage .subtitle{display:flex;align-items:center;justify-content:space-between}.ScenesPage .empty-projects{display:flex;flex-direction:column;width:100%;border-radius:12px;border:1px solid var(--divider);align-items:center;justify-content:center;color:var(--text);background-color:var(--dark-two);-webkit-user-select:none;user-select:none;text-align:center;line-height:28px;padding-top:105px;padding-bottom:122px}.ScenesPage .empty-projects .empty-project-thumbnail{width:86px;height:86px;background:url(https://cdn.decentraland.org/@dcl/builder-site/7.11.1-16576276409.commit-1d1de4c/assets/scene-CZXq89b-.svg);background-size:contain;background-repeat:no-repeat;background-position:center;margin-bottom:30px}.ScenesPage .empty-projects .description{margin-bottom:40px}.ScenesPage .empty-projects .actions{display:flex;align-items:center;justify-content:center;gap:14px}.ScenesPage .template-cards{margin-top:80px}.ScenesPage .template-cards.animate .TemplateCard{animation:templateAnimation 2s}.ScenesPage .project-cards .subtitle,.ScenesPage .template-cards .subtitle{font-size:20px}.ScenesPage .CardList .ProjectCard,.ScenesPage .CardList .ProjectCard .project-thumbnail{max-width:unset}.ScenesPage .CardList{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:var(--scenespage-card-margin)}.ScenesPage .ProjectCard{transition:transform .2s ease-in-out;box-shadow:0 2px 4px #00000029}.ScenesPage .ProjectCard:hover{box-shadow:0 10px 20px #0000003d;transform:translateY(-4px)}.ScenesPage .dcl.tabs,.ScenesPage .dcl.tabs .ui.container{position:relative}.ScenesPage .projects-menu .items-count,.ScenesPage .scene-pool-menu .ui.header.sub{flex:1 0 auto;color:var(--secondary-text);text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.ScenesPage .projects-menu .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase;margin-bottom:8px}.ScenesPage .projects-menu .actions .ui.button{font-size:14px;font-weight:600}.ScenesPage .projects-menu .actions .ui.button+.ui.button{margin-left:16px}.ScenesPage .projects-menu .actions .ui.button.create-scene{display:flex;align-items:center}.ScenesPage .projects-menu .actions .ui.dropdown.active.visible{z-index:99999}.ScenesPage .projects-menu .actions .ui.dropdown+.ui.button{margin-left:24px}.ScenesPage .project-cards.has-pagination .CardList{min-height:606px}.ScenesPage .project-cards .ui.pagination{width:100%;display:flex;justify-content:center}.ScenesPage .project-cards .ui.pagination{margin-top:40px}.ScenesPage .project-cards .ui.pagination .item[type=nextItem],.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.ScenesPage .project-cards .ui.pagination .item[type=prevItem]{left:0}.ScenesPage .project-cards .ui.pagination .item[type=nextItem]{right:0}.ScenesPage .SyncToast{top:77px}.ScenesPage .scene-pool-projects{display:flex;overflow:auto;padding-top:20px;gap:var(--scenespage-card-margin)}.ScenesPage .scene-pool-projects .ProjectCard{flex:none}.ScenesPage .ui.button.import-scene,.ScenesPage .ui.button.create-scene{display:flex;align-items:center;justify-content:center;gap:10px;padding:12px 18px}.ScenesPage .import-scene:before,.ScenesPage .create-scene:before{content:"";width:20px;height:20px;background-position:center;background-repeat:no-repeat;display:block}.ScenesPage .import-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='19'%20height='18'%20viewBox='0%200%2019%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M4.25%203H14.75C15.1625%203%2015.5%203.3375%2015.5%203.75V5.25C15.5%205.6625%2015.1625%206%2014.75%206C14.3375%206%2014%205.6625%2014%205.25V4.5H5V5.25C5%205.6625%204.6625%206%204.25%206C3.8375%206%203.5%205.6625%203.5%205.25V3.75C3.5%203.3375%203.8375%203%204.25%203ZM6.50075%2010.5C6.272%2010.5%206.04775%2010.3965%205.9%2010.2C5.651%209.8685%205.7185%209.39825%206.05%209.15L9.05%206.9C9.3095%206.705%209.6665%206.69975%209.93125%206.8865L12.9312%208.997C13.2703%209.2355%2013.352%209.7035%2013.1135%2010.0417C12.875%2010.38%2012.4078%2010.4625%2012.0688%2010.224L10.2479%208.94308C10.2493%208.96187%2010.25%208.98085%2010.25%209V15C10.25%2015.414%209.91475%2015.75%209.5%2015.75C9.08525%2015.75%208.75%2015.414%208.75%2015V9.00013L6.95%2010.35C6.815%2010.4513%206.6575%2010.5%206.50075%2010.5Z'%20fill='black'/%3e%3c/svg%3e")}.ScenesPage .create-scene:before{background-image:url("data:image/svg+xml,%3csvg%20width='18'%20height='18'%20viewBox='0%200%2018%2018'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.7829%2015.3424V16.7893C10.7824%2016.9117%2010.7338%2017.0289%2010.6479%2017.1152C10.562%2017.2015%2010.4457%2017.25%2010.3245%2017.25H8.48794C8.36653%2017.25%208.25008%2017.2014%208.16414%2017.1148C8.0782%2017.0283%208.02979%2016.9109%208.02954%2016.7883V15.3424H10.7829ZM13.1042%2011.8362L14.1897%2013.7281C14.2295%2013.7983%2014.2502%2013.8779%2014.25%2013.9588C14.2498%2014.0397%2014.2285%2014.1192%2014.1883%2014.1892C14.1481%2014.2592%2014.0905%2014.3174%2014.0211%2014.3579C13.9516%2014.3984%2013.8729%2014.4198%2013.7927%2014.42H4.95725C4.87708%2014.4198%204.79835%2014.3984%204.72894%2014.3579C4.65953%2014.3174%204.60186%2014.2592%204.56169%2014.1892C4.52152%2014.1192%204.50025%2014.0397%204.5%2013.9588C4.49976%2013.8779%204.52055%2013.7983%204.5603%2013.7281L5.64681%2011.8362H13.1042ZM12.3493%208.32899L13.4358%2010.2219C13.4755%2010.2921%2013.4963%2010.3717%2013.4961%2010.4526C13.4958%2010.5335%2013.4746%2010.613%2013.4344%2010.683C13.3942%2010.753%2013.3365%2010.8112%2013.2671%2010.8517C13.1977%2010.8922%2013.119%2010.9136%2013.0388%2010.9138H5.71216C5.63198%2010.9136%205.55326%2010.8922%205.48385%2010.8517C5.41443%2010.8112%205.35677%2010.753%205.31659%2010.683C5.27642%2010.613%205.25515%2010.5335%205.25491%2010.4526C5.25466%2010.3717%205.27545%2010.2921%205.3152%2010.2219L6.40074%208.32899H12.3493ZM9.77342%201.731L12.635%206.71468C12.6748%206.78496%2012.6956%206.86453%2012.6953%206.94545C12.6951%207.02636%2012.6738%207.1058%2012.6336%207.17583C12.5935%207.24586%2012.5358%207.30403%2012.4664%207.34454C12.397%207.38504%2012.3183%207.40647%2012.2381%207.40667H6.5129C6.43272%207.40647%206.354%207.38504%206.28459%207.34454C6.21518%207.30403%206.15751%207.24586%206.11734%207.17583C6.07716%207.1058%206.05589%207.02636%206.05565%206.94545C6.0554%206.86453%206.07619%206.78496%206.11594%206.71468L8.97755%201.731C9.01806%201.66073%209.07612%201.60241%209.14595%201.56187C9.21578%201.52133%209.29493%201.5%209.37549%201.5C9.45604%201.5%209.53519%201.52133%209.60502%201.56187C9.67485%201.60241%209.73292%201.66073%209.77342%201.731Z'%20fill='white'/%3e%3c/svg%3e")}.ScenesPage .no-scenes-container{display:flex;flex-direction:column;width:100%;padding:50px;background:#242129;border-radius:10px;align-items:center;justify-content:center}.ScenesPage .no-scenes-title{font-size:24px}.ScenesPage .no-scenes-description{color:#fff;width:100%;max-width:620px;font-size:14px;line-height:24px;text-align:center;margin-bottom:36px}.ScenesPage .no-scenes-description a{color:#fff;text-decoration:underline}@keyframes templateAnimation{0%{background:rgba(var(--bluish-steel-raw),.16)}25%{background:rgba(var(--bluish-steel-raw),.3)}50%{background:rgba(var(--bluish-steel-raw),.16)}75%{background:rgba(var(--bluish-steel-raw),.3)}to{background:rgba(var(--bluish-steel-raw),.16)}}
@@ -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-j66rXTci.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-CRm8rxsg.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};