@dcl/builder-site 7.4.0 → 7.4.1-13507278405.commit-84ed1ac

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 (83) hide show
  1. package/assets/{Back-CcOe2OPR.js → Back-EcXwondN.js} +1 -1
  2. package/assets/{CollectionProvider.container-DxJ0CuEV.js → CollectionProvider.container-CixAsF1a.js} +1 -1
  3. package/assets/{CollectionStatus.container-LhIAY4M5.js → CollectionStatus.container-DgNA1q4o.js} +1 -1
  4. package/assets/{ConfirmDelete-BQ__uX_D.js → ConfirmDelete-CGBOfiZh.js} +1 -1
  5. package/assets/{FileSaver.min-CEXB1dl2.js → FileSaver.min-qKQHgB2l.js} +1 -1
  6. package/assets/{ItemProvider.container-ww0oFR41.js → ItemProvider.container-DD17VJjs.js} +1 -1
  7. package/assets/{JumpIn.container-CXf3AQ6H.js → JumpIn.container-CdFmhmMm.js} +1 -1
  8. package/assets/{LandAction-C18UJMxQ.js → LandAction-c9yHJgyO.js} +1 -1
  9. package/assets/{LandProviderPage-Bri2NXzA.js → LandProviderPage-Qr5d7tUz.js} +1 -1
  10. package/assets/{LoggedInDetailPage.container-CP5QlkqP.js → LoggedInDetailPage.container-39mJ2Eex.js} +1 -1
  11. package/assets/{Navigation-CUd2LsLk.css → Navigation-D9tHY4jf.css} +1 -1
  12. package/assets/{Navigation.container-Caaq2HYh.js → Navigation.container-rdACKxXe.js} +1 -1
  13. package/assets/{NotFound-D8kFfF63.js → NotFound-D03hcRtB.js} +1 -1
  14. package/assets/{OptionsDropdown-CHYbz4e5.js → OptionsDropdown-BOV-P02f.js} +1 -1
  15. package/assets/{RentalPeriod-Cjj0jvtz.js → RentalPeriod-DDVV54fA.js} +1 -1
  16. package/assets/{SDKTag-cIoqxMfH.js → SDKTag-DgpT_G5C.js} +1 -1
  17. package/assets/{SceneStats.container-DyOrKEMS.js → SceneStats.container-DB3f-y38.js} +1 -1
  18. package/assets/{SignInRequired-CqwdQCfU.js → SignInRequired-DR9OeMxy.js} +1 -1
  19. package/assets/{ThirdPartyKindBadge-B4U76UoB.js → ThirdPartyKindBadge-GS3I1NyJ.js} +1 -1
  20. package/assets/{dataReader-BuX1b3Ny.js → dataReader-D7Y2pu_K.js} +1 -1
  21. package/assets/{date-B02RhrCV.js → date-D5MNMUCW.js} +1 -1
  22. package/assets/{fortmatic-DhAJUIOS.js → fortmatic-BnfADafW.js} +1 -1
  23. package/assets/{index-6sjC13M9.js → index-4B3JEDqT.js} +1 -1
  24. package/assets/{index-C7XqFyMe.js → index-6LCviqYH.js} +1 -1
  25. package/assets/{index-CSFa_hR0.js → index-B4fbwexU.js} +1 -1
  26. package/assets/{index-BsPF3_nI.js → index-B7Uch9XO.js} +1 -1
  27. package/assets/{index-BadWll2h.js → index-B8-5_a-a.js} +1 -1
  28. package/assets/{index-Cmsh7MkI.js → index-BDwI7Jde.js} +1 -1
  29. package/assets/{index-DxvvKKI6.js → index-BE21io_H.js} +1 -1
  30. package/assets/{index-Bci_hXV6.js → index-BG6fmQRB.js} +1 -1
  31. package/assets/{index-Cb2vmzVZ.js → index-BHCCmm2P.js} +1 -1
  32. package/assets/{index-DPIVvhqF.js → index-BQW-mfU3.js} +1 -1
  33. package/assets/{index-B-XgZWF5.js → index-BSBFILRc.js} +1 -1
  34. package/assets/{index-CZlWRrl9.js → index-BTZ87K7v.js} +1 -1
  35. package/assets/{index-C_fzrRU7.css → index-BcV_lnIO.css} +7 -7
  36. package/assets/{index-CC9X8xUj.js → index-BdOoX95g.js} +1 -1
  37. package/assets/index-BjxWz5jC.js +1 -0
  38. package/assets/{index-Dn6w3jJc.js → index-BkThr9YR.js} +1 -1
  39. package/assets/{index-C3Dl6TUx.js → index-Bm4JZMVn.js} +1 -1
  40. package/assets/{index-Di1kuK40.js → index-Bp4QIPpg.js} +1 -1
  41. package/assets/{index-orpOYTTy.css → index-BuEdg4Ee.css} +1 -1
  42. package/assets/{index-flmdvOR7.js → index-BzA68U9Q.js} +24 -24
  43. package/assets/{index-H_1uXVAi.js → index-C5QGQSq4.js} +1 -1
  44. package/assets/{index-D0btPEiB.js → index-C6N-nt9h.js} +1 -1
  45. package/assets/{index-B2zK8wwN.js → index-C7qnb1WM.js} +1 -1
  46. package/assets/{index-CQA7Js80.js → index-C93V5LTo.js} +1 -1
  47. package/assets/index-C9XqGSPR.js +1 -0
  48. package/assets/{index-BunYit3g.js → index-CYNp7otp.js} +1 -1
  49. package/assets/{index-DxKCKO90.js → index-CaakJhNp.js} +1 -1
  50. package/assets/{index-C8o5EU9X.js → index-CbxEoiPz.js} +1 -1
  51. package/assets/{index-BoBS0q_1.js → index-CgnSgmnc.js} +1 -1
  52. package/assets/{index-yCcEzoJg.js → index-CnaJ5Klq.js} +1 -1
  53. package/assets/{index-9rEpBDga.js → index-CyKPMXCR.js} +1 -1
  54. package/assets/{index-B4KJ6VbC.js → index-D1wHC1MT.js} +1 -1
  55. package/assets/{index-BmwS_YEa.js → index-D2wbCObf.js} +1 -1
  56. package/assets/index-D3JTtG9o.js +2 -0
  57. package/assets/{index-DC4hYk1D.css → index-D8WPsnqs.css} +1 -1
  58. package/assets/index-D9MjBtiw.css +1 -0
  59. package/assets/index-D9ixvdFa.css +1 -0
  60. package/assets/{index-DsBnGRYG.js → index-DNZCvITY.js} +1 -1
  61. package/assets/index-DSh6BeKQ.css +1 -0
  62. package/assets/{index-DKjqFrx1.js → index-DW7jQO_6.js} +1 -1
  63. package/assets/{index-DCIip8s_.js → index-Dxi7QMJc.js} +1 -1
  64. package/assets/{index-DOl-0L6l.js → index-G9Y56ahE.js} +1 -1
  65. package/assets/{index-0CZpREZ9.js → index-OVCJPlqO.js} +1 -1
  66. package/assets/{index-D0il6SHm.js → index-Ts1tmi_e.js} +1 -1
  67. package/assets/{index-CJDrJNCG.js → index-V2bEes3d.js} +1 -1
  68. package/assets/index-l3I_Wy-Y.css +1 -0
  69. package/assets/index-nSWYdbxo.js +1 -0
  70. package/assets/{index-BAVTO1wI.js → index-pREeZy7i.js} +1 -1
  71. package/assets/{index-B4Mr5D7W.js → index-zrAcYBkN.js} +1 -1
  72. package/assets/{index.es-CCZmgIK6.js → index.es-Q3UGXaII.js} +4 -4
  73. package/assets/{selectors-DV14n6nm.js → selectors-Cq5Ys-vX.js} +1 -1
  74. package/index.html +3 -3
  75. package/package.json +3 -3
  76. package/assets/index-BpnD9Cq5.css +0 -1
  77. package/assets/index-COKMMOMy.js +0 -1
  78. package/assets/index-CZCaOitM.css +0 -1
  79. package/assets/index-D4zuIMMk.js +0 -1
  80. package/assets/index-DOCQHXB2.js +0 -2
  81. package/assets/index-MB0aYlXA.css +0 -1
  82. package/assets/index-U5D3SBV3.css +0 -1
  83. package/assets/index-npp0LcxN.js +0 -1
@@ -1 +1 @@
1
- var rt=Object.defineProperty;var dt=(n,l,e)=>l in n?rt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var h=(n,l,e)=>dt(n,typeof l!="symbol"?l+"":l,e);import{af as z,H as t,M as c,G as d,bm as H,bD as ct,D as x,gt as K,L as ee,K as R,cf as Me,b8 as _,N as B,bw as V,eD as ht,gu as mt,gv as gt,gw as pt,gx as ut,gy as Ct,gz as It,gA as bt,gB as xt,gC as _t,gD as L,er as vt,gE as Z,gF as Et,gG as Q,fc as Le,fr as jt,fX as St,fY as ft,eA as he,gm as wt,aH as te,gH as Tt,db as be,gI as xe,bt as Oe,gJ as yt,fZ as Pt,eE as me,aW as At,gK as Nt,gL as Rt,gM as Dt,fo as Mt,f$ as Lt,g0 as Ot,Z as ke,bv as Be,gN as kt,eS as fe,bE as Bt,fk as We,ae as Wt,gO as Fe,eH as _e,X as He,eu as Ft,ep as Ve,fF as X,dD as ge,eq as Ht,eV as pe,gP as $e,bk as ve,fV as Ue,eY as y,es as Y,fA as Je,fB as ue,J as O,f6 as Ce,dC as Vt,eQ as $t,eB as Ut,gQ as Ee,fb as je,fj as Jt,gR as Yt,gS as zt,gT as qt,gU as Ye,gV as ze,gW as qe,gX as Ge,fJ as Ze,eK as Gt,eJ as Ke,eL as Zt,eN as Kt,eO as Qt,gY as Xt,gZ as es,g_ as ts,g$ as se,h0 as oe,h1 as ss,ed as as,h2 as ns,h3 as is,h4 as ls,h5 as os,h6 as rs,h7 as ds,h8 as cs,h9 as hs,ha as ms,hb as gs,hc as ps,hd as us,he as Cs,hf as Is,hg as bs,hh as xs,hi as _s,hj as vs,f_ as Es,bO as ne,hk as js,hl as we,hm as Ss,hn as fs,eU as Te,fG as re,ho as de,eT as ws,eP as ye,eW as Ts,eX as Pe,eZ as Ae,e_ as Ne,hp as ys,hq as Ps,e$ as As,f0 as Re,f1 as De,hr as Ns,f9 as Rs,hs as Ds,ht as Ms,hu as Ls,hv as Qe,hw as Os,hx as ks,hy as Bs,fd as Ws,hz as Fs,hA as Hs,eG as Vs,hB as $s,fe as Us,fg as Js,hC as Ys}from"./index-flmdvOR7.js";import{J as zs}from"./JumpIn.container-CXf3AQ6H.js";import{C as qs}from"./CollectionProvider.container-DxJ0CuEV.js";import{C as Xe}from"./ConfirmDelete-BQ__uX_D.js";import{C as et}from"./CollectionStatus.container-LhIAY4M5.js";import{d as Gs,e as Zs,c as Ks}from"./selectors-DV14n6nm.js";import{I as Qs}from"./ItemProvider.container-ww0oFR41.js";const Xs=({open:n,assignee:l,onConfirm:e,onClose:s})=>t.jsxs(c.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:n,children:[t.jsx(c.Modal.Header,{children:d("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(ct,{textOnly:!0,address:l})})}})}),t.jsx("span",{children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:s,children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:e,children:d("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),ea=z.memo(Xs);var T=(n=>(n.REJECT_COLLECTION="REJECT_COLLECTION",n.REJECT_CURATION="REJECT_CURATION",n.DISABLE_COLLECTION="DISABLE_COLLECTION",n.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",n))(T||{});const k="item_editor.top_panel.rejection_modal",ta=({open:n,type:l,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:i,collection:o,curation:r,onReject:m,onRejectCuration:g,onClose:p})=>{const I=x.useMemo(()=>{switch(l){case T.DISABLE_COLLECTION:return k+".disable_collection";case T.REJECT_CURATION:return k+".reject_curation";case T.DISABLE_THIRD_PARTY:return k+".disable_third_party";default:return""}},[l]),S=()=>{switch(l){case T.DISABLE_COLLECTION:m(o);break;case T.REJECT_CURATION:g(r.collectionId);break;case T.DISABLE_THIRD_PARTY:s&&i(s.id);break}},E=l===T.DISABLE_COLLECTION&&!o.isApproved||l===T.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||l===T.REJECT_COLLECTION&&!o.isApproved||l===T.REJECT_CURATION&&(r==null?void 0:r.status)===K.REJECTED;return t.jsx(c.Modal,{size:"tiny",className:"RejectionModal",open:n,children:a?t.jsx(sa,{i18nKey:I}):E?t.jsx(aa,{link:o.forumLink,onClose:p}):t.jsx(na,{i18nKey:I,isLoading:e,onClose:p,onConfirm:S})})},sa=({i18nKey:n})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:d(`${n}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx(H,{id:k+".visit_activity",values:{activity_link:t.jsx(ee,{to:R.activity(),children:d("global.activity")})}})}),t.jsx(c.Loader,{active:!0,size:"large"})]})]}),aa=({link:n,onClose:l})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(k+".veredict_explanation")}),t.jsx(c.Modal.Content,{children:d(k+".go_to_forum")}),t.jsxs(c.Modal.Actions,{children:[t.jsx("a",{href:n,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(c.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:d(k+".forum_link")}),t.jsx("div",{className:"discussion",children:d(k+".discussion")}),t.jsx(c.Icon,{name:"chevron right"})]})}),t.jsx(c.Button,{basic:!0,onClick:l,children:d("global.done")})]})]}),na=({i18nKey:n,isLoading:l,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsx(c.Modal.Content,{children:d(`${n}.subtitle`)}),t.jsxs(c.Modal.Actions,{children:[t.jsx(Me,{primary:!0,onClick:e,disabled:l,loading:l,network:_.Network.MATIC,children:d(`${n}.action`)}),t.jsx(c.Button,{disabled:l,onClick:s,children:d("global.cancel")})]})]}),ia=z.memo(ta),la=(n,l)=>({isLoading:V(ht(n),xt)||V(mt(n),_t)||gt(n),hasPendingTransaction:pt(n)||!!(l.thirdParty&&ut(n,l.thirdParty.id))}),oa=n=>({onReject:l=>n(Ct(l)),onRejectCuration:l=>n(It(l)),onDisableThirdParty:l=>n(bt(l))}),ra=B(la,oa)(ia);var j=(n=>(n[n.APPROVE=0]="APPROVE",n[n.REJECT=1]="REJECT",n[n.ENABLE=2]="ENABLE",n[n.DISABLE=3]="DISABLE",n))(j||{});let da=class extends z.PureComponent{constructor(){super(...arguments);h(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});h(this,"handleBack",()=>{this.props.onNavigate(R.curation())});h(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:i,onInitiateTPApprovalFlow:o,onSetAssignee:r}=this.props;this.setState({showApproveConfirmModal:!1}),a&&r(e.id,a,s),L(e)?o(e):i(e)});h(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));h(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:i,totalItems:o,thirdParty:r}=this.props,{showRejectionModal:m,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,I=vt(e);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"actions",children:t.jsx("div",{className:"back",onClick:this.handleBack})}),t.jsxs("div",{className:"title",children:[e.name," · ",d(`collection.type.${I}`),t.jsx(zs,{size:"small",active:!0,collection:e,chainId:p,items:L(e)?s:void 0,text:d("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:L(e)&&o!==void 0?this.renderTPButtons(e,i,a):this.renderButtons(e,i)})}),m&&t.jsx(ra,{type:m,open:!0,collection:e,curation:i,thirdParty:r,onClose:()=>this.setShowRejectionModal(null)}),(i==null?void 0:i.assignee)&&g&&t.jsx(ea,{open:!0,assignee:i.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,i),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});h(this,"renderButton",(e,s,a)=>{const{address:i,thirdParty:o,onInitiateApprovalFlow:r,onInitiateTPApprovalFlow:m,reviewedItems:g,totalItems:p}=this.props,I={[j.APPROVE]:()=>a!=null&&a.assignee&&i!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):L(s)?m(s):r(s),[j.ENABLE]:()=>r(s),[j.DISABLE]:()=>this.setShowRejectionModal(o?T.DISABLE_THIRD_PARTY:T.DISABLE_COLLECTION),[j.REJECT]:()=>{(a==null?void 0:a.status)===K.PENDING?this.setShowRejectionModal(T.REJECT_CURATION):this.setShowRejectionModal(T.REJECT_COLLECTION)}},S={[j.APPROVE]:"approve",[j.ENABLE]:"enable",[j.DISABLE]:"disable",[j.REJECT]:"reject"},E=e===j.APPROVE||e===j.ENABLE,b=!L(s)||!!p&&g.length>=Z(p);return t.jsx(c.Popup,{content:d("item_editor.top_panel.items_pending_to_review"),disabled:b,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(c.Button,{primary:E,onClick:()=>I[e](),disabled:L(s)&&e===j.APPROVE&&!!p&&g.length<Z(p),children:d(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});h(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:i,totalItems:o,thirdParty:r}=this.props,m=a==null?void 0:a.some(g=>g.status===K.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(c.Header,{sub:!0,children:[m?d("item_editor.top_panel.reviewed_counter",{count:i.length,threshold:Z(o)}):d("item_editor.top_panel.not_enough_items_to_curate_more"),i.length>=Z(o)?t.jsx(c.Icon,{name:"check circle"}):null]}),m&&this.renderButton(j.APPROVE,e,s),m&&this.renderButton(j.REJECT,e,s),!m&&(r==null?void 0:r.isApproved)&&this.renderButton(j.DISABLE,e,null)]})});h(this,"renderButtons",(e,s)=>{if(s&&e.isApproved)switch(s.status){case"pending":return t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]});case"approved":case"rejected":return this.renderButton(j.DISABLE,e,s)}return Et(e)?e.isApproved?this.renderButton(j.DISABLE,e,s):this.renderButton(j.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]})})}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:i,isConnected:o,isLoading:r}=this.props,m=!e||r&&!s.length;return a&&i&&o?t.jsx("div",{className:"TopPanel",children:m?t.jsx(c.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const ca=n=>{const l=Q(n),e=l?Le(n,l):null,s=e?jt(n,e.id):[],a=e?St(n,e.id):[],i=l?ft(n,l):null,o=l?he(n,l):void 0,r=e&&L(e)?wt(n,e):null;return{address:te(n),items:s,totalItems:(o==null?void 0:o.total)||null,collection:e,itemCurations:a,thirdParty:r,curation:i,chainId:Tt(n),isConnected:be(n),isReviewing:xe(n),isCommitteeMember:Oe(n),selectedCollectionId:Q(n),isLoading:V(yt(n),Mt)||V(Pt(n),Lt)||V(me(n),Ot)}},ha=n=>({onNavigate:l=>n(At(l)),onSetAssignee:(l,e,s)=>n(Nt(l,e,s)),onInitiateTPApprovalFlow:l=>n(Rt(l)),onInitiateApprovalFlow:l=>n(Dt(l))}),ma=B(ca,ha)(da),ga="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.22722%2012.7164C4.07574%2012.5731%204%2012.3582%204%2012.2149C4%2012.0716%204.07574%2011.8567%204.22722%2011.7134L5.28757%2010.7104C5.59053%2010.4239%206.04497%2010.4239%206.34793%2010.7104L9.35858%2013.8448C9.51006%2013.9881%209.73728%2013.9881%209.88876%2013.8448L17.6521%206.21493C17.955%205.92836%2018.4095%205.92836%2018.7124%206.21493L19.7728%207.21791C20.0757%207.50448%2020.0757%207.93433%2019.7728%208.2209L10.116%2017.7851C9.9645%2017.9284%209.81302%2018%209.5858%2018C9.35858%2018%209.2071%2017.9284%209.05562%2017.7851L4.22722%2012.7164Z'%20fill='white'/%3e%3c/svg%3e",pa=n=>{const{collectionId:l,itemName:e}=n,[s,a]=x.useState(!1),[i,o]=x.useState(null),r=ke(),m=Be();x.useEffect(()=>{e&&(a(!0),o(e))},[e]);function g(){a(!1);const p=new URLSearchParams(m.search);p.delete("newItem"),r.replace({search:p.toString()})}return s&&i&&l?t.jsx(c.Toast,{type:c.ToastType.INFO,title:d("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:ga,alt:d("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx(H,{id:"sagas.item.item_added_toast.body",values:{name:i,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(ee,{to:R.collectionDetail(l),children:t.jsx(c.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},ua=z.memo(pa),Ca=n=>({itemName:kt(n)}),Ia=B(Ca)(ua),ba=({collection:n,address:l,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:i,onDeleteCollection:o})=>{var u,W;const r=Be(),m=ke(),g=((u=r.state)==null?void 0:u.fromParam)===fe.COLLECTIONS,p=((W=r.state)==null?void 0:W.fromParam)===fe.TP_COLLECTIONS,I=x.useCallback(()=>{m.push(R.collections())},[m]),S=x.useCallback(()=>{if(n&&(g||p)){const F=g?R.collectionDetail:R.thirdPartyCollectionDetail;m.push(F(n.id))}else m.push(R.itemEditor())},[g,p,m,n]),E=x.useCallback(()=>{i("CreateCollectionModal")},[i]),b=x.useCallback(()=>{n&&i("CreateSingleItemModal",{collectionId:n.id})},[n,i]),C=x.useCallback(()=>{n&&i("AddExistingItemModal",{collectionId:n.id})},[n,i]),w=x.useCallback(()=>{n&&i("EditCollectionNameModal",{collection:n})},[n,i]),f=x.useCallback(()=>{n&&o(n)},[n,o]),D=x.useCallback(()=>{const F=n&&Bt(n.owner,l||"");return n?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:S}),t.jsxs("div",{className:"title",children:[t.jsx(ee,{to:R.collectionDetail(n.id),children:n.name}),t.jsx(et,{collection:n})]}),F&&!n.isPublished?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[t.jsx(c.Dropdown.Item,{onClick:w,children:d("item_editor.left_panel.actions.edit_name")}),t.jsx(c.Dropdown.Item,{onClick:b,children:d("item_editor.left_panel.actions.new_item")}),e&&t.jsx(c.Dropdown.Item,{onClick:C,children:d("item_editor.left_panel.actions.add_existing_item")}),t.jsx(Xe,{name:n.name,onDelete:f,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}):null},[n,l,e,g,p]),M=x.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:I}),t.jsx("div",{className:"title",children:e?d("item_editor.left_panel.title"):d("item_editor.left_panel.title_alternative")}),s?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(c.Dropdown.Menu,{children:t.jsx(c.Dropdown.Item,{onClick:E,children:d("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(c.Row,{grow:!1,shrink:!1,className:"Header",children:n?D():M()})},xa=ba,_a=n=>{let l;const e=Q(n);e&&(l=We(n).find(i=>i.id===e));const s=te(n);return{address:s,isLoggedIn:Wt(n),isReviewing:xe(n),collection:l,hasEditRights:l!==void 0&&s!==void 0&&Fe(n,s,l),hasUserOrphanItems:_e(n)}},va=n=>({onOpenModal:(l,e)=>n(He(l,e)),onDeleteCollection:l=>n(Ft(l)),onDeleteItem:l=>n(Ve(l))}),Ea=B(_a,va)(xa),P=10;class N extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{isCollapsed:!1});h(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,i=!a;return t.jsxs("div",{className:`Collapsable ${i?"is-open":""}`.trim(),children:[t.jsxs("div",{className:"header",onClick:this.handleToggle,children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"handle"})]}),t.jsx("div",{className:"content",children:i?s:null})]})}}class ja extends x.PureComponent{constructor(){super(...arguments);h(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return X(e)?t.jsx(c.Icon,{className:"toggle-emote",name:s&&a?"pause":"play",onClick:this.handleClick}):t.jsx("div",{className:`toggle ${s?"is-visible":"is-hidden"}`,onClick:this.handleClick})}render(){const{item:e,isSelected:s,selectedCollectionId:a,bodyShape:i}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(ge,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx(Ht,{item:e}),e.name]}),t.jsx(c.Popup,{content:d("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:d(`body_shapes.${pe(e)}`).toLowerCase()})}),disabled:$e(e,i),position:"top center",trigger:this.renderToggleItem()})]})})}}const Sa=ja;var v=(n=>(n.TO_REVIEW="to-review",n.REVIEWED="reviewed",n.ALL_ITEMS="all-items",n))(v||{});const fa={[v.TO_REVIEW]:1,[v.REVIEWED]:1,[v.ALL_ITEMS]:1};class wa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentTab:v.TO_REVIEW,currentPages:fa,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});h(this,"analytics",ve());h(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:i}=this.state;this.getIsReviewingTPItems()&&i===v.TO_REVIEW&&!Ue(s,e==null?void 0:e.items)&&a()});h(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});h(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:i,isPlayingEmote:o,onSetItems:r}=this.props;if(!$e(e,s))return;let m=a.filter(p=>p.id!==e.id);if(X(e))if(this.isVisible(e)){o?i==null||i.emote.pause():i==null||i.emote.play();return}else m=m.filter(p=>p.type!==y.EMOTE);this.isVisible(e)||(m.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?Y(e.urn)?Je(e.urn):ue(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:Y(e.urn)})),r(m)});h(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:i}=this.props,{currentPages:o}=this.state;e===v.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{i(),s(o[v.ALL_ITEMS])}):e===v.TO_REVIEW&&a(),this.setState({currentTab:e})});h(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});h(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});h(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:i}=this.props;this.setState(o=>({currentPages:{...o.currentPages,[a]:+s.activePage}})),a!==v.REVIEWED&&i(+s.activePage)});h(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(v.ALL_ITEMS)});h(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?Y(e.urn)&&s:!1});h(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:i,isPlayingEmote:o}=this.props;return t.jsx(Sa,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:o,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:i,onClick:this.handleClick},e.id)});h(this,"renderSidebarCategory",e=>{const s=e.filter(Ce),a=e.filter(X);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(N,{label:this.renderCollapsableLabel(y.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(N,{label:this.renderCollapsableLabel(y.EMOTE),children:a.map(this.renderSidebarItem)})]})});h(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,i=a[s],o=Math.ceil(e/P);return o>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:o,activePage:i,onPageChange:this.handlePageChange}):null});h(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,i=s[a],o=(i-1)*P,r=i*P;return t.jsx(c.Header,{sub:!0,children:d("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:o,pageEnd:r>e?e:r,total:e})})});h(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:i}=this.props,{currentTab:o,currentPages:r}=this.state,m=this.getIsReviewingTPItems(),g=r[o];if(s)return t.jsx(c.Loader,{size:"large",active:!0});switch(o){case v.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!m&&a?this.renderTabPagination(a):null]});case v.REVIEWED:{const p=i.slice((g-1)*P,g*P);return t.jsxs(t.Fragment,{children:[i.length?this.renderPaginationStats(i.length):null,this.renderSidebarCategory(p),i.length?this.renderTabPagination(i.length):null]})}case v.ALL_ITEMS:return t.jsxs(t.Fragment,{children:[e.length&&a?this.renderPaginationStats(a):null,this.renderSidebarCategory(e),e.length&&a?this.renderTabPagination(a):null]});default:return null}});h(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:i}=this.state;let o;const r=!s||s<P||a.length===s;switch(i){case v.TO_REVIEW:o=t.jsx(c.Popup,{content:d("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!r,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(c.Button,{disabled:e||r,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(c.Icon,{name:"random"}),d("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case v.REVIEWED:o=t.jsx(H,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:d("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:Z(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",o," "]})});h(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(c.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx(H,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:v.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(c.Checkbox,{checked:!s}),d("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:this.handleModalProceed,children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(c.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.all_items_check.title")}),t.jsx(c.Modal.Content,{children:d("item_editor.left_panel.all_items_check.content")}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:()=>this.handleTabChange(v.ALL_ITEMS),children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:e===v.TO_REVIEW,onClick:()=>this.handleTabChange(v.TO_REVIEW),children:d("item_editor.left_panel.to_review")}),t.jsx(c.Tabs.Tab,{active:e===v.REVIEWED,onClick:()=>this.handleTabChange(v.REVIEWED),children:d("item_editor.left_panel.reviewed")}),t.jsx(c.Tabs.Tab,{active:e===v.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:d("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(O,{name:e}),t.jsx(H,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(c.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class Ta extends x.PureComponent{render(){const{collection:l,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({collectionId:l.id}),children:[t.jsx(Vt,{collectionId:l.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(et,{collection:l}),l.name]}),t.jsx("div",{className:"count",children:d("item_editor.left_panel.items_count",{count:l.itemCount})})]})]})})}}const ya=Ta;class Pa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentPage:1});h(this,"handlePageChange",(e,s)=>{const{onLoadPage:a}=this.props;this.setState({currentPage:+s.activePage}),a(+s.activePage)})}render(){const{collections:e,isLoading:s,items:a,selectedCollectionId:i,totalCollections:o}=this.props,{currentPage:r}=this.state;if(e.length===0)return null;const m=Math.ceil(o/P);return s?t.jsx(c.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(c.Section,{className:"Collections",children:[e.map(g=>t.jsx(ya,{collection:g,items:a,isSelected:g.id===i},g.id)),m>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:m,activePage:r,onPageChange:this.handlePageChange}):null]})})}}var J=(n=>(n.COLLECTIONS="collections",n.ORPHAN_ITEMS="orphanItems",n))(J||{});const U=1;let Aa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",this.getInitialState());h(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});h(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:i,selectedCollectionId:o}=this.props,{pages:r}=this.state;if(e&&!i&&!o){const m=r[r.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:P,page:m})}});h(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});h(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));h(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:i,onSetReviewedItems:o}=this.props,r=this.isCollectionTabActive()?i:a,m=Math.ceil(r/P);if(m>s.length){const g=[...Array(m).keys()].map(p=>p+1).filter(p=>!s.includes(p));if(g.length>0){const p=g[Math.floor(Math.random()*g.length)];this.setState(I=>({pages:[...I.pages,p]}),this.fetchResource)}}o(e)});h(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[U]},this.fetchResource)});h(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===J.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=J.COLLECTIONS;return!e&&s&&(a=J.ORPHAN_ITEMS),{pages:[U],currentTab:a,initialPage:U,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:i,onSetItems:o}=this.props;this.fetchResource(),e&&s===void 0&&i(e),a&&o([a])}componentDidUpdate(e,s){const{isConnected:a,address:i,selectedCollectionId:o,selectedItemId:r,selectedItem:m,orphanItems:g,totalItems:p,visibleItems:I,hasUserOrphanItems:S,onSetItems:E,onFetchOrphanItem:b}=this.props,{initialPage:C,pages:w}=this.state;if(!o&&i&&r&&p&&(C===U||s.initialPage<C)){if(!g.find(f=>f.id===r)){const f=Math.ceil(p/P),D=w[w.length-1],M=Math.min(f,D+1);w.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&r&&e.selectedItemId!==r){const f=I.filter(D=>D.type!==y.EMOTE);E(f)}else i&&a&&(a!==e.isConnected||e.selectedCollectionId&&!o)&&this.setState({pages:[U]},this.fetchResource),e.selectedCollectionId!==o&&this.setState({pages:[U]}),i&&i!==e.address&&S===void 0&&b(i);!e.selectedItem&&m&&m.type!==y.EMOTE&&E([m]),e.selectedCollectionId!==o&&E([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:i,orphanItems:o,isReviewing:r}=this.props;return i&&e?$t(e)&&r?s.filter(m=>!!(a!=null&&a.find(g=>g.itemId===m.id&&g.status===K.PENDING))):s:o}render(){const{items:e,totalItems:s,totalCollections:a,collections:i,selectedItemId:o,selectedCollectionId:r,visibleItems:m,bodyShape:g,reviewedItems:p,isReviewing:I,isPlayingEmote:S,isConnected:E,wearableController:b,isLoading:C,hasUserOrphanItems:w,onSetItems:f,onSetReviewedItems:D,onResetReviewedItems:M}=this.props,{pages:u,showSamplesModalAgain:W}=this.state,F=!r&&w,le=this.isCollectionTabActive()&&!r,A=!this.isCollectionTabActive()||r;return t.jsx("div",{className:"LeftPanel",children:E?t.jsx(qs,{id:r,itemSelected:o,itemsPage:u,itemsPageSize:P,fetchCollectionItemsOptions:{status:I?K.PENDING:void 0},onChangePage:q=>this.setState({pages:[q]}),children:({paginatedCollections:q,collection:$,paginatedItems:st,initialPage:at,isLoadingCollection:nt,isLoadingCollectionItems:it,itemCurations:lt})=>{const G=this.getItems($,st,lt),Se=this.isCollectionTabActive(),ot=r&&$?at:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(Ea,{}),F?t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:Se,onClick:()=>this.handleTabChange(J.COLLECTIONS),children:d("collections_page.collections")}),t.jsx(c.Tabs.Tab,{active:!Se,onClick:()=>this.handleTabChange(J.ORPHAN_ITEMS),children:d("item_editor.left_panel.items")})]}):null,le?t.jsx(Pa,{collections:q,totalCollections:a||i.length,items:e,hasHeader:G.length>0,selectedCollectionId:r,onLoadPage:this.loadPage,isLoading:nt}):null,A?t.jsxs(t.Fragment,{children:[t.jsx(wa,{items:G,totalItems:s||G.length,hasHeader:!r&&i.length>0,selectedItemId:o,collection:$,isReviewing:I,isPlayingEmote:S,visibleItems:m,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:f,wearableController:b,initialPage:ot,isLoading:it||C,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:W,onReviewItems:()=>D(G),onLoadRandomPage:()=>this.loadRandomPage(G),onLoadPage:this.loadPage}),t.jsx(Ia,{collectionId:r})]}):null]})}}):null})}};const Na=n=>{const l=Q(n),e=te(n),s=l?he(n,l):e?he(n,e):void 0,a=l?void 0:Ut(n),i=Ee(n)||"",o=je(n,i);return{address:e,isConnected:be(n),items:Jt(n),totalItems:(s==null?void 0:s.total)||null,totalCollections:(a==null?void 0:a.total)||null,orphanItems:e&&!l?Yt(n,e,s==null?void 0:s.limit):zt(n),collections:qt(n),selectedItemId:i,selectedItem:o,selectedCollectionId:l,visibleItems:Ye(n),bodyShape:ze(n),wearableController:qe(n),isReviewing:xe(n),isLoading:V(me(n),Kt)||V(me(n),Qt),isPlayingEmote:Ge(n),hasUserOrphanItems:_e(n)}},Ra=n=>({onSetItems:l=>n(Ze(l)),onFetchCollections:(l,e)=>n(Gt(l,e)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchOrphanItem:l=>n(Zt(l))}),Da=B(Na,Ra)(Aa);class ce extends z.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:i,onChange:o}=this.props;if(a.toHexString()!==s.value){const r=i.find(m=>m.toHexString()===s.value);o(r)}});h(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(c.Dropdown.Item,{value:a,onClick:this.handleAvatarColorChange,children:t.jsx("i",{className:"color",style:{background:a}})},s)})}render(){const{currentColor:e,colors:s,label:a}=this.props,i=e.toHexString();return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:i,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:a}),t.jsx("div",{className:"value",children:t.jsx("i",{className:"color",style:{background:i}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(c.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Ma=class extends z.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:i,bodyShape:o,onChange:r,baseWearables:m}=this.props,g=s.value?m.find(p=>p.id===s.value):null;a!==g&&r(i,o,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:i,isNullable:o,baseWearables:r}=this.props,m=Xt(r,a,s).map(p=>({value:p.id,text:es(p)}));o&&m.push({value:"",text:d("global.none")});const g=e?m.find(p=>p.value===e.id):null;return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:m,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:i}),t.jsx("div",{className:"value",children:g?g.text:d("global.none")}),t.jsx("div",{className:"handle"})]})})}};const La=n=>({baseWearables:ts(n)}),ae=B(La)(Ma);let Oa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});h(this,"analytics",ve());h(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});h(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});h(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:i,onSetAvatarAnimation:o,onSetItems:r}=this.props,m=a.find(p=>p.id===s),g=i.filter(p=>p.type!==y.EMOTE);g.forEach(p=>{var I;(I=this.analytics)==null||I.track("Play Emote",{EMOTE_PLAYED_BASE:!m,EMOTE_PLAYED_ITEM_ID:m!=null&&m.urn?ue(m.urn):null,EMOTE_PLAYED_NAME:m?m.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?Y(p.urn)?Je(p.urn):ue(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),m?g.push(m):o(s),r(g)});h(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});h(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});h(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});h(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:i}=this.props;i(e,s,a)});h(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(c.WearablePreview.createController("wearable-editor")),this.setState({isLoading:!1})});h(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case se.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case se.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});h(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:i,onSetItems:o}=this.props,r=a.filter(m=>m.type!==y.EMOTE);s?(i(_.PreviewEmote.IDLE),o(r)):e==null||e.emote.play()});h(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?d("item_editor.center_panel.stop"):d("item_editor.center_panel.play_emote");return t.jsxs(c.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(c.Icon,{name:s}),t.jsx("span",{children:a})]})});h(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,i=!!e,o=s.length>0;return a?null:t.jsx(c.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(c.Dropdown.Menu,{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(c.Dropdown.Header,{content:i?d("item_editor.center_panel.from_collection"):d("item_editor.center_panel.from_items")}),t.jsx(c.Dropdown.Divider,{}),s.map(r=>t.jsx(c.Dropdown.Item,{value:r.id,text:r.name,onClick:this.handleAnimationChange},r.id)),t.jsx(c.Dropdown.Divider,{}),t.jsx(c.Dropdown.Header,{content:d("item_editor.center_panel.default")}),t.jsx(c.Dropdown.Divider,{})]}),_.PreviewEmote.schema.enum.map(r=>t.jsx(c.Dropdown.Item,{value:r,text:d(`emotes.${r}`),onClick:this.handleAnimationChange},r))]})})});h(this,"renderEmoteSelector",()=>t.jsx(c.Popup,{content:d("item_editor.center_panel.disabled_animation_dropdown"),disabled:!0,position:"top center",trigger:t.jsx("div",{className:"avatar-animation-dropdown-wrapper option",children:t.jsxs(c.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:i,hasUserOrphanItems:o,onFetchBaseWearables:r,onFetchOrphanItems:m,onFetchCollectionItems:g}=this.props,p=a.length>0;i||r(),p||(s&&!L(s)?g(s.id):e&&o&&m(e)),this.setState({isLoading:!0})}componentWillUnmount(){const{onSetWearablePreviewController:e}=this.props;e(null)}renderSelectTrigger(e,s){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:s}),t.jsx("div",{className:"handle"})]})}getDropdownAttributes(e,s,a){const i=s.find(o=>o.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,i?i.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:i,emote:o,selectedBaseWearables:r,selectedItem:m,visibleItems:g,isImportFilesModalOpen:p,wearableController:I}=this.props,{isShowingAvatarAttributes:S,showSceneBoundaries:E,isLoading:b}=this.state,C=g.some(X)&&(m==null?void 0:m.type)===y.EMOTE,w=o===_.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(c.WearablePreview,{id:"wearable-editor",profile:"default",bodyShape:e,emote:o,zoom:w,skin:oe(s),eyes:oe(a),hair:oe(i),urns:r?Object.values(r).map(f=>f?f.id:null).filter(f=>f!==null):[],base64s:g.map(ss),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:as,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:C,showSceneBoundaries:E}),C?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(c.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(se.ZOOM_IN),children:t.jsx(c.Icon,{name:"plus"})}),t.jsx(c.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(se.ZOOM_OUT),children:t.jsx(c.Icon,{name:"minus"})})]}):null,b&&t.jsx(c.Center,{children:t.jsx(c.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[C&&!b&&I?t.jsx("div",{className:"emote-controls-container",children:t.jsx(c.EmoteControls,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:I})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${S?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(c.Icon,{name:"user"})}),C?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${E?"active":""}`,children:t.jsx(O,{name:"cylinder",onClick:()=>this.setState(f=>({showSceneBoundaries:!f.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${S?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:_.BodyShape.MALE,text:d("body_shapes.male")},{value:_.BodyShape.FEMALE,text:d("body_shapes.female")}],d("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:s,colors:ns(),label:d("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:a,colors:is(),label:d("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:i,colors:ls(),label:d("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.HAIR],category:_.WearableCategory.HAIR,bodyShape:e,label:d("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.FACIAL_HAIR],category:_.WearableCategory.FACIAL_HAIR,bodyShape:e,label:d("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.UPPER_BODY],category:_.WearableCategory.UPPER_BODY,bodyShape:e,label:d("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.LOWER_BODY],category:_.WearableCategory.LOWER_BODY,bodyShape:e,label:d("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const ka=n=>{const l=te(n);let e;const s=Q(n);let a=os(n);s?(e=We(n).find(b=>b.id===s),a=a.filter(b=>b.collectionId===s)):a=a.filter(E=>!E.collectionId);const i=Ee(n)||"",o=je(n,i),r=ze(n),m=rs(n),g=Ye(n),p=ds(n),I=!g.some(X)&&p===_.PreviewEmote.IDLE,S="CreateSingleItemModal"in cs(n);return{address:l,bodyShape:r,collection:e,selectedItem:o,selectedBaseWearables:m?m[r]:null,skinColor:hs(n),eyeColor:ms(n),hairColor:gs(n),emote:p,visibleItems:g,wearableController:qe(n),emotes:a,isPlayingEmote:I?!1:Ge(n),isImportFilesModalOpen:S,hasUserOrphanItems:_e(n)}},Ba=n=>({onSetBodyShape:l=>n(ps(l)),onSetAvatarAnimation:l=>n(us(l)),onSetSkinColor:l=>n(Cs(l)),onSetEyeColor:l=>n(Is(l)),onSetHairColor:l=>n(bs(l)),onSetBaseWearable:(l,e,s)=>n(xs(l,e,s)),onFetchBaseWearables:()=>n(_s()),onSetWearablePreviewController:l=>n(vs(l)),onSetItems:l=>n(Ze(l)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchCollectionItems:(l,e)=>n(Es(l,e))}),Wa=B(ka,Ba)(Oa);class Fa extends x.PureComponent{constructor(){super(...arguments);h(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:i}=this.props,o=e.target.value;s!==o&&i(a?o.slice(0,a):o)})}render(){const{label:e,disabled:s,value:a}=this.props;return t.jsxs("div",{className:`Input ${s?"is-disabled":""}`.trim(),children:[t.jsx("div",{className:"label",children:e}),t.jsx("input",{value:a||"",onChange:this.handleChange,disabled:s})]})}}class ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{value:a,onChange:i}=this.props,o=s.value;o!==a&&(this.setState({value:o}),i(o))})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,options:s}=this.props,{value:a}=this.state,i=s.find(o=>o.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:i?i.text:d("item_editor.right_panel.select_placeholder")}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(c.Dropdown,{className:`Select ${a?"":"blank"}`.trim(),trigger:this.renderTrigger(),inline:!0,direction:"right",scrolling:e.length>4,value:a||void 0,options:e,disabled:s,onChange:this.handleChange})}}h(ie,"defaultProps",{disabled:!1});class Ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:i}=this.state,o=s.value,r=[...i];for(const m of o)i.includes(m)||r.push(m);r.length!==i.length&&(this.setState({value:r}),a(r))});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,info:s,options:a}=this.props,{value:i}=this.state,o=a.reduce((r,m)=>(r[m.value]=m.text,r),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ne,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:i.length>0?i.map(r=>t.jsxs("div",{className:"value",children:[o[r],t.jsx("div",{className:"remove",onClick:m=>{this.handleRemove(r),m.stopPropagation()}})]},r)):t.jsx("div",{className:"placeholder",children:d("item_editor.right_panel.select_placeholder")})}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(c.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(i=>!a.includes(i.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}h(Ie,"defaultProps",{disabled:!1});class tt extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{draft:"",value:this.props.value});h(this,"handleChange",e=>{this.setState({draft:e.target.value})});h(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,i=s.trim();if(i!=="")if(a.includes(i))this.setState({draft:""});else{const o=[...a,i];this.setState({value:o,draft:""}),e(o)}});h(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===js||e.keyCode===we||e.keyCode===Ss)this.handleAdd();else if(e.keyCode===fs||e.keyCode===we){const{draft:s,value:a}=this.state,i=a[a.length-1];i&&s===""&&this.handleRemove(i)}});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}render(){const{isDisabled:e}=this.props,{draft:s,value:a}=this.state;return t.jsx("div",{className:`Tags ${a.length>0?"":"blank"} ${e?"is-disabled":""}`.trim(),children:t.jsxs("div",{className:"values",children:[a.map(i=>t.jsxs("div",{className:"value",children:[i,t.jsx("div",{className:"remove",onClick:o=>{this.handleRemove(i),o.stopPropagation()}})]},i)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}h(tt,"defaultProps",{isDisabled:!1});let Ha=class extends x.PureComponent{constructor(){super(...arguments);h(this,"analytics",ve());h(this,"state",this.getInitialState());h(this,"thumbnailInput",x.createRef());h(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});h(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});h(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});h(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});h(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Te]:e},isDirty:!0})});h(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});h(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});h(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});h(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});h(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleChangeCategory",e=>{let s;re(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===_.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===de.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let i=[];s==="wearable"?i=[...a.filter(r=>!_.WearableCategory.schema.enum.includes(r)),...e]:i=[...a.filter(r=>!_.BodyPartCategory.schema.enum.includes(r)),...e];const o=this.setHides(this.state.data,i);this.setState({data:o,isDirty:this.isDirty({data:o})})});h(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleOnSaveItem",async()=>{var S,E;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:i,description:o,utility:r,rarity:m,contents:g,data:p,isDirty:I}=this.state;if(I&&e){let b=p;b&&!re(b)&&(b={...b,removesDefaultHiding:b.category===_.WearableCategory.UPPER_BODY||(S=b.hides)!=null&&S.includes(_.WearableCategory.UPPER_BODY)?[_.BodyPartCategory.HANDS]:[],..."blockVrmExport"in b?{blockVrmExport:b.blockVrmExport}:{},..."outlineCompatible"in b?{outlineCompatible:b.outlineCompatible}:{}});const C={...e.contents,...await ws(g)},w={...e,name:i,description:o,rarity:m,data:b,contents:C,utility:r??void 0};s&&[ye.UNPUBLISHED,ye.UNDER_REVIEW].includes(s)&&(w.video=C[Te]),a(w,g),Y(w.urn)&&((E=this.analytics)==null||E.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});h(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});h(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===y.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});h(this,"handleEmoteThumbnailChange",e=>{const s=Ts(e);this.setState({thumbnail:e,contents:{[Pe]:s},isDirty:!0})});h(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],i=await Ae(a),o=await Ae(a,1024,1024),r=URL.createObjectURL(i);this.setState({thumbnail:r,contents:{[Pe]:o},isDirty:!0})}});h(this,"handleDownloadItem",()=>{const{selectedItemId:e,onDownload:s}=this.props;e&&s(e)})}componentDidMount(){const{selectedItem:e}=this.props;e&&this.setItem(e)}componentDidUpdate(e){const{selectedItemId:s,selectedItem:a}=this.props;e.selectedItemId!==s?a?this.setItem(a):this.setState(this.getInitialState()):a&&(!e.selectedItem||this.hasSavedItem())&&this.setItem(a)}setItem(e){var a;const s=e.data;Ce(e)&&((a=s.replaces)!=null&&a.length)&&(s.hides=s.hides.concat(s.replaces),s.replaces=[]),this.setState({thumbnail:"",video:"",name:e.name,description:e.description,utility:e.utility||"",rarity:e.rarity,data:e.data,hasItem:!0,isDirty:!1})}getInitialState(){return{name:"",description:"",utility:"",thumbnail:"",video:"",rarity:void 0,contents:{},data:void 0,hasItem:!1,isDirty:!1}}setReplaces(e,s){return{...e,replaces:s,representations:e.representations.map(a=>({...a,overrideReplaces:s}))}}setHides(e,s){return{...e,hides:s,representations:e.representations.map(a=>({...a,overrideHides:s}))}}canEditItemMetadata(e){const{collection:s,canEditSelectedItem:a}=this.props;return!e||s&&Ne(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===_.WearableCategory.SKIN}isDirty(e={}){const{selectedItem:s}=this.props,{hasItem:a}=this.state;return a?this.hasStateItemChanged({...this.state,...e},s):!1}hasSavedItem(){const{selectedItem:e}=this.props,{isDirty:s}=this.state;return e&&!s&&this.hasStateItemChanged(this.state,e)}hasStateItemChanged(e,s){return e.name!==s.name||e.description!==s.description||e.utility!==s.utility||e.rarity!==s.rarity||!Ue(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:d(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:d(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:d(`emote.play_mode.${s}.text`),description:d(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||re(a))return null;const i=ys(e.contents,a.category),o=Ps(e.contents),r=a.hides.filter(g=>i.includes(g)),m=a.hides.filter(g=>o.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.base_body"),info:d("item_editor.right_panel.base_body_info"),value:m,options:this.asCategorySelect(e.type,o),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.wearables"),info:d("item_editor.right_panel.wearables_info"),value:r,options:this.asCategorySelect(e.type,r.some(g=>g===_.WearableCategory.BODY_SHAPE)?i:i.filter(g=>g!==_.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,i=this.canEditItemMetadata(e),o=s?t.jsx(c.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(O,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[i?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),o,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"}),t.jsxs("div",{className:"thumbnail-edit-container",children:[t.jsx("input",{type:"file",ref:this.thumbnailInput,onChange:this.handleThumbnailChange,accept:"image/png"}),t.jsx("div",{className:"thumbnail-edit-background"}),t.jsx(O,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[o,t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(As,{item:e})]})}renderVideoDetails(e){if(!Re(e))return null;const s=this.canEditItemMetadata(e),a=s?()=>this.handleOpenVideoDialog():()=>this.handleOpenVideoDialog({viewOnly:!0});return t.jsx("div",{className:"details",children:s?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[Ns(e)&&t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Rs,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:i,error:o,isCampaignEnabled:r,isVrmOptOutEnabled:m,campaignName:g,campaignTag:p}=this.props,{name:I,description:S,utility:E,rarity:b,data:C,isDirty:w,hasItem:f}=this.state,D=_.Rarity.getRarities(),M=Ds();return t.jsx("div",{className:"RightPanel",children:i?t.jsx(Qs,{id:e,children:(u,W,F)=>{var $;const le=W&&Ne(W),A=this.canEditItemMetadata(u),q=u?Ce(u)?Ms(u.contents):Ls():[];return F?t.jsx(c.Loader,{size:"massive",active:!0}):f||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:d("item_editor.right_panel.properties")}),u&&Qe(u,s)&&!u.isPublished&&!le?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[pe(u)!==null?t.jsx(c.Dropdown.Item,{text:d("item_detail_page.add_representation",{bodyShape:d(`body_shapes.${pe(u)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(Xe,{name:I,onDelete:this.handleDeleteItem,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(N,{label:d("item_editor.right_panel.details"),children:u?t.jsxs(t.Fragment,{children:[this.renderModelDetails(u),this.renderVideoDetails(u)]}):null}),t.jsx(N,{label:d("item_editor.right_panel.basics"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(Fa,{label:d("global.name"),value:I,disabled:!A,maxLength:Os,onChange:this.handleChangeName}),t.jsx(c.TextAreaField,{maxLength:ks,onChange:this.handleChangeDescription,label:d("global.description"),placeholder:d("item_editor.right_panel.description_placeholder"),disabled:!A,value:S,rows:"2",cols:"12"}),a?t.jsx(c.TextAreaField,{maxLength:Bs,onChange:this.handleChangeUtility,label:d("global.utility"),placeholder:d("item_editor.right_panel.utility_placeholder"),disabled:!A,value:E,tooltip:{content:d("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(ie,{itemId:u.id,label:d("global.category"),value:C.category,options:this.asCategorySelect(u.type,q),disabled:!A,onChange:this.handleChangeCategory}),!(u.urn&&Y(u.urn))&&t.jsx(ie,{itemId:u.id,label:d("global.rarity"),value:b,options:this.asRaritySelect(D),disabled:u.isPublished||!A,onChange:this.handleChangeRarity})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.overrides")}),t.jsx(ne,{content:d("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(u)}),(u==null?void 0:u.type)===y.EMOTE&&t.jsx(N,{label:d("item_editor.right_panel.animation"),children:u?t.jsx(ie,{itemId:u.id,label:d("create_single_item_modal.play_mode_label"),value:C.loop?de.LOOP:de.SIMPLE,options:this.asPlayModeSelect(M),disabled:!A,onChange:this.handlePlayModeChange}):null}),u&&Re(u)&&(($=u.data.requiredPermissions)!=null&&$.length)?t.jsx(N,{label:d("item_editor.right_panel.required_permissions"),children:this.renderPermissions(u)}):null,t.jsx(N,{label:d("item_editor.right_panel.tags"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(tt,{itemId:u.id,value:C.tags,onChange:this.handleChangeTags,isDisabled:!A}),r&&g&&p&&A&&t.jsx("p",{className:"event-tag",children:d("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&m&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.copyright.title")}),t.jsx(ne,{content:d("item_editor.right_panel.copyright.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:d("item_editor.right_panel.copyright.vrm_export")}),t.jsx(c.Checkbox,{toggle:!0,label:C!=null&&C.blockVrmExport?d("item_editor.right_panel.copyright.disabled"):d("item_editor.right_panel.copyright.enabled"),checked:!(C!=null&&C.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":d("item_editor.right_panel.copyright.vrm_export")})]})})}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(ne,{content:d("item_editor.right_panel.outline_compatible.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(c.Checkbox,{toggle:!0,label:(C==null?void 0:C.outlineCompatible)!==!1?d("item_editor.right_panel.copyright.enabled"):d("item_editor.right_panel.copyright.disabled"),checked:(C==null?void 0:C.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":d("item_editor.right_panel.outline_compatible.title")})]})})}),w?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(c.Button,{secondary:!0,onClick:this.handleOnResetItem,children:d("global.cancel")}),t.jsx(Me,{primary:!0,onClick:this.handleOnSaveItem,network:_.Network.MATIC,children:d("global.save")})]}):o&&e?t.jsxs("p",{className:"danger-text",children:[d("global.error_ocurred"),": ",o]}):null]})]}):null}}):null})}};const Va=n=>{var r;const l=Ee(n)||"",e=je(n,l),s=te(n)||"",a=l&&e&&e.collectionId?Le(n,e.collectionId):null,i=Ws(n),o=l?i[l]:null;return{address:s,collection:a,selectedItem:e,selectedItemId:l,canEditSelectedItem:e?a?Fe(n,s,a):Qe(e,s):!1,itemStatus:o,error:Fs(n),isConnected:be(n),isDownloading:Hs(n),isCommitteeMember:Oe(n),isCampaignEnabled:Vs(n),campaignTag:Gs(n),campaignName:(r=Zs(n))==null?void 0:r[Ks(n)],isVrmOptOutEnabled:$s(n),isWearableUtilityEnabled:Us(n)}},$a=n=>({onSaveItem:(l,e)=>n(Js(l,e)),onDeleteItem:l=>n(Ve(l)),onOpenModal:(l,e)=>n(He(l,e)),onDownload:l=>n(Ys(l))}),Ua=B(Va,$a)(Ha);class nn extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{reviewedItems:[]});h(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(i=>i.id===a.id))]}))});h(this,"handleResetReviewedItems",()=>{this.setState({reviewedItems:[]})})}render(){const{reviewedItems:e}=this.state;return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"ItemEditorPage",children:[t.jsx(ma,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Da,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Wa,{}),t.jsx(Ua,{})]})]})})}}export{nn as default};
1
+ var rt=Object.defineProperty;var dt=(n,l,e)=>l in n?rt(n,l,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[l]=e;var h=(n,l,e)=>dt(n,typeof l!="symbol"?l+"":l,e);import{af as z,H as t,M as c,G as d,bm as H,bD as ct,D as x,gt as K,L as ee,K as R,cf as Me,b8 as _,N as B,bw as V,eD as ht,gu as mt,gv as gt,gw as pt,gx as ut,gy as Ct,gz as It,gA as bt,gB as xt,gC as _t,gD as L,er as vt,gE as Z,gF as Et,gG as Q,fc as Le,fr as jt,fX as St,fY as ft,eA as he,gm as wt,aH as te,gH as Tt,db as be,gI as xe,bt as Oe,gJ as yt,fZ as Pt,eE as me,aW as At,gK as Nt,gL as Rt,gM as Dt,fo as Mt,f$ as Lt,g0 as Ot,Z as ke,bv as Be,gN as kt,eS as fe,bE as Bt,fk as We,ae as Wt,gO as Fe,eH as _e,X as He,eu as Ft,ep as Ve,fF as X,dD as ge,eq as Ht,eV as pe,gP as $e,bk as ve,fV as Ue,eY as y,es as Y,fA as Je,fB as ue,J as O,f6 as Ce,dC as Vt,eQ as $t,eB as Ut,gQ as Ee,fb as je,fj as Jt,gR as Yt,gS as zt,gT as qt,gU as Ye,gV as ze,gW as qe,gX as Ge,fJ as Ze,eK as Gt,eJ as Ke,eL as Zt,eN as Kt,eO as Qt,gY as Xt,gZ as es,g_ as ts,g$ as se,h0 as oe,h1 as ss,ed as as,h2 as ns,h3 as is,h4 as ls,h5 as os,h6 as rs,h7 as ds,h8 as cs,h9 as hs,ha as ms,hb as gs,hc as ps,hd as us,he as Cs,hf as Is,hg as bs,hh as xs,hi as _s,hj as vs,f_ as Es,bO as ne,hk as js,hl as we,hm as Ss,hn as fs,eU as Te,fG as re,ho as de,eT as ws,eP as ye,eW as Ts,eX as Pe,eZ as Ae,e_ as Ne,hp as ys,hq as Ps,e$ as As,f0 as Re,f1 as De,hr as Ns,f9 as Rs,hs as Ds,ht as Ms,hu as Ls,hv as Qe,hw as Os,hx as ks,hy as Bs,fd as Ws,hz as Fs,hA as Hs,eG as Vs,hB as $s,fe as Us,fg as Js,hC as Ys}from"./index-BzA68U9Q.js";import{J as zs}from"./JumpIn.container-CdFmhmMm.js";import{C as qs}from"./CollectionProvider.container-CixAsF1a.js";import{C as Xe}from"./ConfirmDelete-CGBOfiZh.js";import{C as et}from"./CollectionStatus.container-DgNA1q4o.js";import{d as Gs,e as Zs,c as Ks}from"./selectors-Cq5Ys-vX.js";import{I as Qs}from"./ItemProvider.container-DD17VJjs.js";const Xs=({open:n,assignee:l,onConfirm:e,onClose:s})=>t.jsxs(c.Modal,{size:"tiny",className:"ConfirmApprovalModal",open:n,children:[t.jsx(c.Modal.Header,{children:d("curation_page.confirm_not_assigned_curation_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx("div",{className:"message-container",children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.body",values:{assignee:t.jsx("strong",{children:t.jsx(ct,{textOnly:!0,address:l})})}})}),t.jsx("span",{children:t.jsx(H,{id:"curation_page.confirm_not_assigned_curation_modal.confirm_footer"})})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:s,children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:e,children:d("curation_page.confirm_not_assigned_curation_modal.confirm_button")})]})]}),ea=z.memo(Xs);var T=(n=>(n.REJECT_COLLECTION="REJECT_COLLECTION",n.REJECT_CURATION="REJECT_CURATION",n.DISABLE_COLLECTION="DISABLE_COLLECTION",n.DISABLE_THIRD_PARTY="DISABLE_THIRD_PARTY",n))(T||{});const k="item_editor.top_panel.rejection_modal",ta=({open:n,type:l,isLoading:e,thirdParty:s,hasPendingTransaction:a,onDisableThirdParty:i,collection:o,curation:r,onReject:m,onRejectCuration:g,onClose:p})=>{const I=x.useMemo(()=>{switch(l){case T.DISABLE_COLLECTION:return k+".disable_collection";case T.REJECT_CURATION:return k+".reject_curation";case T.DISABLE_THIRD_PARTY:return k+".disable_third_party";default:return""}},[l]),S=()=>{switch(l){case T.DISABLE_COLLECTION:m(o);break;case T.REJECT_CURATION:g(r.collectionId);break;case T.DISABLE_THIRD_PARTY:s&&i(s.id);break}},E=l===T.DISABLE_COLLECTION&&!o.isApproved||l===T.DISABLE_THIRD_PARTY&&!(s!=null&&s.isApproved)||l===T.REJECT_COLLECTION&&!o.isApproved||l===T.REJECT_CURATION&&(r==null?void 0:r.status)===K.REJECTED;return t.jsx(c.Modal,{size:"tiny",className:"RejectionModal",open:n,children:a?t.jsx(sa,{i18nKey:I}):E?t.jsx(aa,{link:o.forumLink,onClose:p}):t.jsx(na,{i18nKey:I,isLoading:e,onClose:p,onConfirm:S})})},sa=({i18nKey:n})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsxs("div",{className:"loading-transaction",children:[t.jsx("div",{className:"danger-text",children:d(`${n}.tx_pending`)}),t.jsx("small",{className:"danger-text",children:t.jsx(H,{id:k+".visit_activity",values:{activity_link:t.jsx(ee,{to:R.activity(),children:d("global.activity")})}})}),t.jsx(c.Loader,{active:!0,size:"large"})]})]}),aa=({link:n,onClose:l})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(k+".veredict_explanation")}),t.jsx(c.Modal.Content,{children:d(k+".go_to_forum")}),t.jsxs(c.Modal.Actions,{children:[t.jsx("a",{href:n,className:"forum-link",target:"_blank",rel:"noopener noreferrer",children:t.jsxs(c.Button,{secondary:!0,icon:!0,labelPosition:"right",children:[t.jsx("div",{children:d(k+".forum_link")}),t.jsx("div",{className:"discussion",children:d(k+".discussion")}),t.jsx(c.Icon,{name:"chevron right"})]})}),t.jsx(c.Button,{basic:!0,onClick:l,children:d("global.done")})]})]}),na=({i18nKey:n,isLoading:l,onConfirm:e,onClose:s})=>t.jsxs(t.Fragment,{children:[t.jsx(c.Modal.Header,{children:d(`${n}.title`)}),t.jsx(c.Modal.Content,{children:d(`${n}.subtitle`)}),t.jsxs(c.Modal.Actions,{children:[t.jsx(Me,{primary:!0,onClick:e,disabled:l,loading:l,network:_.Network.MATIC,children:d(`${n}.action`)}),t.jsx(c.Button,{disabled:l,onClick:s,children:d("global.cancel")})]})]}),ia=z.memo(ta),la=(n,l)=>({isLoading:V(ht(n),xt)||V(mt(n),_t)||gt(n),hasPendingTransaction:pt(n)||!!(l.thirdParty&&ut(n,l.thirdParty.id))}),oa=n=>({onReject:l=>n(Ct(l)),onRejectCuration:l=>n(It(l)),onDisableThirdParty:l=>n(bt(l))}),ra=B(la,oa)(ia);var j=(n=>(n[n.APPROVE=0]="APPROVE",n[n.REJECT=1]="REJECT",n[n.ENABLE=2]="ENABLE",n[n.DISABLE=3]="DISABLE",n))(j||{});let da=class extends z.PureComponent{constructor(){super(...arguments);h(this,"state",{currentVeredict:void 0,showRejectionModal:null,showApproveConfirmModal:!1});h(this,"handleBack",()=>{this.props.onNavigate(R.curation())});h(this,"handleConfirmApprovalModal",(e,s)=>{const{address:a,onInitiateApprovalFlow:i,onInitiateTPApprovalFlow:o,onSetAssignee:r}=this.props;this.setState({showApproveConfirmModal:!1}),a&&r(e.id,a,s),L(e)?o(e):i(e)});h(this,"setShowRejectionModal",e=>this.setState({showRejectionModal:e}));h(this,"renderPage",e=>{const{items:s,itemCurations:a,curation:i,totalItems:o,thirdParty:r}=this.props,{showRejectionModal:m,showApproveConfirmModal:g}=this.state,{chainId:p}=this.props,I=vt(e);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"actions",children:t.jsx("div",{className:"back",onClick:this.handleBack})}),t.jsxs("div",{className:"title",children:[e.name," · ",d(`collection.type.${I}`),t.jsx(zs,{size:"small",active:!0,collection:e,chainId:p,items:L(e)?s:void 0,text:d("global.see_in_decentraland")})]}),t.jsx("div",{className:"actions",children:t.jsx("span",{className:"button-container",children:L(e)&&o!==void 0?this.renderTPButtons(e,i,a):this.renderButtons(e,i)})}),m&&t.jsx(ra,{type:m,open:!0,collection:e,curation:i,thirdParty:r,onClose:()=>this.setShowRejectionModal(null)}),(i==null?void 0:i.assignee)&&g&&t.jsx(ea,{open:!0,assignee:i.assignee,onConfirm:()=>this.handleConfirmApprovalModal(e,i),onClose:()=>this.setState({showApproveConfirmModal:!1})})]})});h(this,"renderButton",(e,s,a)=>{const{address:i,thirdParty:o,onInitiateApprovalFlow:r,onInitiateTPApprovalFlow:m,reviewedItems:g,totalItems:p}=this.props,I={[j.APPROVE]:()=>a!=null&&a.assignee&&i!==(a==null?void 0:a.assignee)?this.setState({showApproveConfirmModal:!0}):L(s)?m(s):r(s),[j.ENABLE]:()=>r(s),[j.DISABLE]:()=>this.setShowRejectionModal(o?T.DISABLE_THIRD_PARTY:T.DISABLE_COLLECTION),[j.REJECT]:()=>{(a==null?void 0:a.status)===K.PENDING?this.setShowRejectionModal(T.REJECT_CURATION):this.setShowRejectionModal(T.REJECT_COLLECTION)}},S={[j.APPROVE]:"approve",[j.ENABLE]:"enable",[j.DISABLE]:"disable",[j.REJECT]:"reject"},E=e===j.APPROVE||e===j.ENABLE,b=!L(s)||!!p&&g.length>=Z(p);return t.jsx(c.Popup,{content:d("item_editor.top_panel.items_pending_to_review"),disabled:b,position:"bottom center",trigger:t.jsx("div",{children:t.jsx(c.Button,{primary:E,onClick:()=>I[e](),disabled:L(s)&&e===j.APPROVE&&!!p&&g.length<Z(p),children:d(`item_editor.top_panel.${S[e]}`)})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})});h(this,"renderTPButtons",(e,s,a)=>{const{reviewedItems:i,totalItems:o,thirdParty:r}=this.props,m=a==null?void 0:a.some(g=>g.status===K.PENDING);return t.jsxs(t.Fragment,{children:[t.jsxs(c.Header,{sub:!0,children:[m?d("item_editor.top_panel.reviewed_counter",{count:i.length,threshold:Z(o)}):d("item_editor.top_panel.not_enough_items_to_curate_more"),i.length>=Z(o)?t.jsx(c.Icon,{name:"check circle"}):null]}),m&&this.renderButton(j.APPROVE,e,s),m&&this.renderButton(j.REJECT,e,s),!m&&(r==null?void 0:r.isApproved)&&this.renderButton(j.DISABLE,e,null)]})});h(this,"renderButtons",(e,s)=>{if(s&&e.isApproved)switch(s.status){case"pending":return t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]});case"approved":case"rejected":return this.renderButton(j.DISABLE,e,s)}return Et(e)?e.isApproved?this.renderButton(j.DISABLE,e,s):this.renderButton(j.ENABLE,e,s):t.jsxs(t.Fragment,{children:[this.renderButton(j.APPROVE,e,s),this.renderButton(j.REJECT,e,s)]})})}render(){const{collection:e,items:s,isCommitteeMember:a,isReviewing:i,isConnected:o,isLoading:r}=this.props,m=!e||r&&!s.length;return a&&i&&o?t.jsx("div",{className:"TopPanel",children:m?t.jsx(c.Loader,{size:"small",active:!0}):this.renderPage(e)}):null}};const ca=n=>{const l=Q(n),e=l?Le(n,l):null,s=e?jt(n,e.id):[],a=e?St(n,e.id):[],i=l?ft(n,l):null,o=l?he(n,l):void 0,r=e&&L(e)?wt(n,e):null;return{address:te(n),items:s,totalItems:(o==null?void 0:o.total)||null,collection:e,itemCurations:a,thirdParty:r,curation:i,chainId:Tt(n),isConnected:be(n),isReviewing:xe(n),isCommitteeMember:Oe(n),selectedCollectionId:Q(n),isLoading:V(yt(n),Mt)||V(Pt(n),Lt)||V(me(n),Ot)}},ha=n=>({onNavigate:l=>n(At(l)),onSetAssignee:(l,e,s)=>n(Nt(l,e,s)),onInitiateTPApprovalFlow:l=>n(Rt(l)),onInitiateApprovalFlow:l=>n(Dt(l))}),ma=B(ca,ha)(da),ga="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M4.22722%2012.7164C4.07574%2012.5731%204%2012.3582%204%2012.2149C4%2012.0716%204.07574%2011.8567%204.22722%2011.7134L5.28757%2010.7104C5.59053%2010.4239%206.04497%2010.4239%206.34793%2010.7104L9.35858%2013.8448C9.51006%2013.9881%209.73728%2013.9881%209.88876%2013.8448L17.6521%206.21493C17.955%205.92836%2018.4095%205.92836%2018.7124%206.21493L19.7728%207.21791C20.0757%207.50448%2020.0757%207.93433%2019.7728%208.2209L10.116%2017.7851C9.9645%2017.9284%209.81302%2018%209.5858%2018C9.35858%2018%209.2071%2017.9284%209.05562%2017.7851L4.22722%2012.7164Z'%20fill='white'/%3e%3c/svg%3e",pa=n=>{const{collectionId:l,itemName:e}=n,[s,a]=x.useState(!1),[i,o]=x.useState(null),r=ke(),m=Be();x.useEffect(()=>{e&&(a(!0),o(e))},[e]);function g(){a(!1);const p=new URLSearchParams(m.search);p.delete("newItem"),r.replace({search:p.toString()})}return s&&i&&l?t.jsx(c.Toast,{type:c.ToastType.INFO,title:d("sagas.item.item_added_toast.title"),closable:!0,icon:t.jsx("div",{className:"ItemAddedToast icon-container",children:t.jsx("img",{src:ga,alt:d("sagas.item.item_added_toast.title")})}),onClose:g,body:t.jsx(H,{id:"sagas.item.item_added_toast.body",values:{name:i,br:()=>t.jsx("br",{}),b:p=>t.jsx("strong",{children:p}),"collection-link":p=>t.jsx(ee,{to:R.collectionDetail(l),children:t.jsx(c.Button,{className:"ItemAddedToast view-collection-link",basic:!0,children:p})})}})}):null},ua=z.memo(pa),Ca=n=>({itemName:kt(n)}),Ia=B(Ca)(ua),ba=({collection:n,address:l,hasUserOrphanItems:e,isLoggedIn:s,isReviewing:a,onOpenModal:i,onDeleteCollection:o})=>{var u,W;const r=Be(),m=ke(),g=((u=r.state)==null?void 0:u.fromParam)===fe.COLLECTIONS,p=((W=r.state)==null?void 0:W.fromParam)===fe.TP_COLLECTIONS,I=x.useCallback(()=>{m.push(R.collections())},[m]),S=x.useCallback(()=>{if(n&&(g||p)){const F=g?R.collectionDetail:R.thirdPartyCollectionDetail;m.push(F(n.id))}else m.push(R.itemEditor())},[g,p,m,n]),E=x.useCallback(()=>{i("CreateCollectionModal")},[i]),b=x.useCallback(()=>{n&&i("CreateSingleItemModal",{collectionId:n.id})},[n,i]),C=x.useCallback(()=>{n&&i("AddExistingItemModal",{collectionId:n.id})},[n,i]),w=x.useCallback(()=>{n&&i("EditCollectionNameModal",{collection:n})},[n,i]),f=x.useCallback(()=>{n&&o(n)},[n,o]),D=x.useCallback(()=>{const F=n&&Bt(n.owner,l||"");return n?t.jsxs(t.Fragment,{children:[t.jsx("div",{className:`block ${g||p?"close":"back"}`,onClick:S}),t.jsxs("div",{className:"title",children:[t.jsx(ee,{to:R.collectionDetail(n.id),children:n.name}),t.jsx(et,{collection:n})]}),F&&!n.isPublished?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[t.jsx(c.Dropdown.Item,{onClick:w,children:d("item_editor.left_panel.actions.edit_name")}),t.jsx(c.Dropdown.Item,{onClick:b,children:d("item_editor.left_panel.actions.new_item")}),e&&t.jsx(c.Dropdown.Item,{onClick:C,children:d("item_editor.left_panel.actions.add_existing_item")}),t.jsx(Xe,{name:n.name,onDelete:f,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}):null},[n,l,e,g,p]),M=x.useCallback(()=>t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"block close",onClick:I}),t.jsx("div",{className:"title",children:e?d("item_editor.left_panel.title"):d("item_editor.left_panel.title_alternative")}),s?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"block add"}),inline:!0,direction:"left",children:t.jsx(c.Dropdown.Menu,{children:t.jsx(c.Dropdown.Item,{onClick:E,children:d("item_editor.left_panel.actions.new_collection")})})}):t.jsx("div",{className:"block"})]}),[e,s]);return a?null:t.jsx(c.Row,{grow:!1,shrink:!1,className:"Header",children:n?D():M()})},xa=ba,_a=n=>{let l;const e=Q(n);e&&(l=We(n).find(i=>i.id===e));const s=te(n);return{address:s,isLoggedIn:Wt(n),isReviewing:xe(n),collection:l,hasEditRights:l!==void 0&&s!==void 0&&Fe(n,s,l),hasUserOrphanItems:_e(n)}},va=n=>({onOpenModal:(l,e)=>n(He(l,e)),onDeleteCollection:l=>n(Ft(l)),onDeleteItem:l=>n(Ve(l))}),Ea=B(_a,va)(xa),P=10;class N extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{isCollapsed:!1});h(this,"handleToggle",()=>{this.setState({isCollapsed:!this.state.isCollapsed})})}render(){const{label:e,children:s}=this.props,{isCollapsed:a}=this.state,i=!a;return t.jsxs("div",{className:`Collapsable ${i?"is-open":""}`.trim(),children:[t.jsxs("div",{className:"header",onClick:this.handleToggle,children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"handle"})]}),t.jsx("div",{className:"content",children:i?s:null})]})}}class ja extends x.PureComponent{constructor(){super(...arguments);h(this,"handleClick",()=>{const{item:e,onClick:s}=this.props;s(e)})}renderToggleItem(){const{item:e,isVisible:s,isPlayingEmote:a}=this.props;return X(e)?t.jsx(c.Icon,{className:"toggle-emote",name:s&&a?"pause":"play",onClick:this.handleClick}):t.jsx("div",{className:`toggle ${s?"is-visible":"is-hidden"}`,onClick:this.handleClick})}render(){const{item:e,isSelected:s,selectedCollectionId:a,bodyShape:i}=this.props;return t.jsx("div",{className:`SidebarItem ${s?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({itemId:e.id,collectionId:a||void 0,newItem:void 0}),children:[t.jsx(ge,{item:e}),t.jsxs("div",{className:"name",children:[t.jsx(Ht,{item:e}),e.name]}),t.jsx(c.Popup,{content:d("item_editor.left_panel.invalid_representation_tooltip",{bodyShape:t.jsx("b",{children:d(`body_shapes.${pe(e)}`).toLowerCase()})}),disabled:$e(e,i),position:"top center",trigger:this.renderToggleItem()})]})})}}const Sa=ja;var v=(n=>(n.TO_REVIEW="to-review",n.REVIEWED="reviewed",n.ALL_ITEMS="all-items",n))(v||{});const fa={[v.TO_REVIEW]:1,[v.REVIEWED]:1,[v.ALL_ITEMS]:1};class wa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentTab:v.TO_REVIEW,currentPages:fa,reviewedTabPage:1,showGetMoreSamplesModal:!1,showAllItemsTabChangeModal:!1});h(this,"analytics",ve());h(this,"handleReviewItemsTrigger",e=>{const{items:s,onReviewItems:a}=this.props,{currentTab:i}=this.state;this.getIsReviewingTPItems()&&i===v.TO_REVIEW&&!Ue(s,e==null?void 0:e.items)&&a()});h(this,"isVisible",e=>{const{visibleItems:s}=this.props;return s.some(a=>a.id===e.id)});h(this,"handleClick",e=>{var g;const{bodyShape:s,visibleItems:a,wearableController:i,isPlayingEmote:o,onSetItems:r}=this.props;if(!$e(e,s))return;let m=a.filter(p=>p.id!==e.id);if(X(e))if(this.isVisible(e)){o?i==null||i.emote.pause():i==null||i.emote.play();return}else m=m.filter(p=>p.type!==y.EMOTE);this.isVisible(e)||(m.push(e),(g=this.analytics)==null||g.track("Preview Item",{ITEM_ID:e!=null&&e.urn?Y(e.urn)?Je(e.urn):ue(e.urn):null,ITEM_TYPE:e.type,ITEM_NAME:e.name,ITEM_IS_THIRD_PARTY:Y(e.urn)})),r(m)});h(this,"handleTabChange",e=>{const{onLoadPage:s,onReviewItems:a,onResetReviewedItems:i}=this.props,{currentPages:o}=this.state;e===v.ALL_ITEMS?this.setState({showAllItemsTabChangeModal:!1},()=>{i(),s(o[v.ALL_ITEMS])}):e===v.TO_REVIEW&&a(),this.setState({currentTab:e})});h(this,"handleGetRandomSampleClick",()=>{const{showSamplesModalAgain:e,onLoadRandomPage:s}=this.props;e?this.setState({showGetMoreSamplesModal:!0}):s()});h(this,"handleModalProceed",()=>{const{onLoadRandomPage:e}=this.props;e(),this.setState({showGetMoreSamplesModal:!1})});h(this,"handlePageChange",(e,s)=>{const{currentTab:a}=this.state,{onLoadPage:i}=this.props;this.setState(o=>({currentPages:{...o.currentPages,[a]:+s.activePage}})),a!==v.REVIEWED&&i(+s.activePage)});h(this,"handleSwitchToAllItemsTab",()=>{const{reviewedItems:e}=this.props;e.length>0?this.setState({showAllItemsTabChangeModal:!0}):this.handleTabChange(v.ALL_ITEMS)});h(this,"getIsReviewingTPItems",()=>{const{collection:e,isReviewing:s}=this.props;return e?Y(e.urn)&&s:!1});h(this,"renderSidebarItem",e=>{const{collection:s,selectedItemId:a,bodyShape:i,isPlayingEmote:o}=this.props;return t.jsx(Sa,{item:e,isSelected:a===e.id,isVisible:this.isVisible(e),isPlayingEmote:o,selectedCollectionId:(s==null?void 0:s.id)??null,bodyShape:i,onClick:this.handleClick},e.id)});h(this,"renderSidebarCategory",e=>{const s=e.filter(Ce),a=e.filter(X);return e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("item_editor.left_panel.empty_collection")})}):s.length===0||a.length===0?e.map(this.renderSidebarItem):t.jsxs(t.Fragment,{children:[t.jsx(N,{label:this.renderCollapsableLabel(y.WEARABLE),children:s.map(this.renderSidebarItem)}),t.jsx(N,{label:this.renderCollapsableLabel(y.EMOTE),children:a.map(this.renderSidebarItem)})]})});h(this,"renderTabPagination",e=>{const{currentTab:s,currentPages:a}=this.state,i=a[s],o=Math.ceil(e/P);return o>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:o,activePage:i,onPageChange:this.handlePageChange}):null});h(this,"renderPaginationStats",e=>{const{currentPages:s,currentTab:a}=this.state,i=s[a],o=(i-1)*P,r=i*P;return t.jsx(c.Header,{sub:!0,children:d("item_editor.left_panel.reviewed_tab.page_counter",{pageStart:o,pageEnd:r>e?e:r,total:e})})});h(this,"renderTabContent",()=>{const{items:e,isLoading:s,totalItems:a,reviewedItems:i}=this.props,{currentTab:o,currentPages:r}=this.state,m=this.getIsReviewingTPItems(),g=r[o];if(s)return t.jsx(c.Loader,{size:"large",active:!0});switch(o){case v.TO_REVIEW:return t.jsxs(t.Fragment,{children:[this.renderSidebarCategory(e),!m&&a?this.renderTabPagination(a):null]});case v.REVIEWED:{const p=i.slice((g-1)*P,g*P);return t.jsxs(t.Fragment,{children:[i.length?this.renderPaginationStats(i.length):null,this.renderSidebarCategory(p),i.length?this.renderTabPagination(i.length):null]})}case v.ALL_ITEMS:return t.jsxs(t.Fragment,{children:[e.length&&a?this.renderPaginationStats(a):null,this.renderSidebarCategory(e),e.length&&a?this.renderTabPagination(a):null]});default:return null}});h(this,"renderTabHeader",()=>{const{isLoading:e,totalItems:s,reviewedItems:a}=this.props,{currentTab:i}=this.state;let o;const r=!s||s<P||a.length===s;switch(i){case v.TO_REVIEW:o=t.jsx(c.Popup,{content:d("item_editor.top_panel.not_enough_items_to_curate_more"),disabled:!r,position:"bottom center",trigger:t.jsx("div",{children:t.jsxs(c.Button,{disabled:e||r,primary:!0,className:"random-sample-button",onClick:this.handleGetRandomSampleClick,children:[t.jsx(c.Icon,{name:"random"}),d("item_editor.left_panel.get_random_sample")]})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0});break;case v.REVIEWED:o=t.jsx(H,{id:"item_editor.left_panel.reviewed_samples",values:{reviewed_samples_bold:t.jsx("b",{children:d("item_editor.left_panel.reviewed_samples_bold",{count:a.length})}),total:Z(s??1)}});break;default:return null}return t.jsxs("div",{className:"tab-header",children:[" ",o," "]})});h(this,"renderModal",()=>{const{onToggleShowSamplesModalAgain:e,showSamplesModalAgain:s}=this.props,{showGetMoreSamplesModal:a}=this.state;return t.jsxs(c.Modal,{open:a,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.get_more_samples_modal.title")}),t.jsxs(c.Modal.Content,{children:[t.jsx(H,{id:"item_editor.left_panel.get_more_samples_modal.content",values:{count:10,tabName:t.jsx("b",{children:v.REVIEWED})}}),t.jsxs("div",{className:"checkbox-container",onClick:e,children:[t.jsx(c.Checkbox,{checked:!s}),d("item_editor.left_panel.get_more_samples_modal.dont_show_again")]})]}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showGetMoreSamplesModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:this.handleModalProceed,children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderAllItemsTabChangeModal",()=>{const{showAllItemsTabChangeModal:e}=this.state;return t.jsxs(c.Modal,{open:e,size:"small",className:"ConfirmNewSampleModal",children:[t.jsx(c.Modal.Header,{children:d("item_editor.left_panel.all_items_check.title")}),t.jsx(c.Modal.Content,{children:d("item_editor.left_panel.all_items_check.content")}),t.jsxs(c.Modal.Actions,{children:[t.jsx(c.Button,{onClick:()=>this.setState({showAllItemsTabChangeModal:!1}),children:d("global.cancel")}),t.jsx(c.Button,{primary:!0,onClick:()=>this.handleTabChange(v.ALL_ITEMS),children:d("item_editor.left_panel.get_more_samples_modal.understood")})]})]})});h(this,"renderTabs",()=>{const{currentTab:e}=this.state;return t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:e===v.TO_REVIEW,onClick:()=>this.handleTabChange(v.TO_REVIEW),children:d("item_editor.left_panel.to_review")}),t.jsx(c.Tabs.Tab,{active:e===v.REVIEWED,onClick:()=>this.handleTabChange(v.REVIEWED),children:d("item_editor.left_panel.reviewed")}),t.jsx(c.Tabs.Tab,{active:e===v.ALL_ITEMS,onClick:this.handleSwitchToAllItemsTab,children:d("item_editor.left_panel.all_items")})]})})}componentDidMount(){this.handleReviewItemsTrigger()}componentDidUpdate(e){this.handleReviewItemsTrigger(e)}renderCollapsableLabel(e){return t.jsxs(t.Fragment,{children:[t.jsx(O,{name:e}),t.jsx(H,{id:`item_editor.left_panel.${e}`})]})}render(){return t.jsxs(c.Section,{className:"Items",children:[this.getIsReviewingTPItems()?t.jsxs(t.Fragment,{children:[this.renderTabs(),this.renderTabHeader()]}):null,this.renderTabContent(),this.renderModal(),this.renderAllItemsTabChangeModal()]})}}class Ta extends x.PureComponent{render(){const{collection:l,isSelected:e}=this.props;return t.jsx("div",{className:`SidebarCollection ${e?"is-selected":""}`,children:t.jsxs(ee,{to:R.itemEditor({collectionId:l.id}),children:[t.jsx(Vt,{collectionId:l.id}),t.jsxs("div",{className:"wrapper",children:[t.jsxs("div",{className:"name",children:[t.jsx(et,{collection:l}),l.name]}),t.jsx("div",{className:"count",children:d("item_editor.left_panel.items_count",{count:l.itemCount})})]})]})})}}const ya=Ta;class Pa extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{currentPage:1});h(this,"handlePageChange",(e,s)=>{const{onLoadPage:a}=this.props;this.setState({currentPage:+s.activePage}),a(+s.activePage)})}render(){const{collections:e,isLoading:s,items:a,selectedCollectionId:i,totalCollections:o}=this.props,{currentPage:r}=this.state;if(e.length===0)return null;const m=Math.ceil(o/P);return s?t.jsx(c.Loader,{size:"small",active:!0}):!s&&a.length===0&&e.length===0?t.jsx("div",{className:"empty",children:t.jsx("div",{className:"subtitle",children:d("collections_page.empty_description")})}):t.jsx(t.Fragment,{children:t.jsxs(c.Section,{className:"Collections",children:[e.map(g=>t.jsx(ya,{collection:g,items:a,isSelected:g.id===i},g.id)),m>1?t.jsx(c.Pagination,{siblingRange:0,firstItem:null,lastItem:null,totalPages:m,activePage:r,onPageChange:this.handlePageChange}):null]})})}}var J=(n=>(n.COLLECTIONS="collections",n.ORPHAN_ITEMS="orphanItems",n))(J||{});const U=1;let Aa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",this.getInitialState());h(this,"handleToggleShowSamplesModalAgain",()=>{this.setState(e=>({showSamplesModalAgain:!e.showSamplesModalAgain}))});h(this,"fetchResource",()=>{const{address:e,onFetchCollections:s,onFetchOrphanItems:a,isReviewing:i,selectedCollectionId:o}=this.props,{pages:r}=this.state;if(e&&!i&&!o){const m=r[r.length-1];(this.isCollectionTabActive()?s:a)(e,{limit:P,page:m})}});h(this,"loadPage",e=>{this.setState({pages:[e]},()=>this.fetchResource())});h(this,"getRandomPage",(e,s)=>Math.floor(Math.random()*(s-e+1)+e));h(this,"loadRandomPage",e=>{const{pages:s}=this.state,{totalItems:a,totalCollections:i,onSetReviewedItems:o}=this.props,r=this.isCollectionTabActive()?i:a,m=Math.ceil(r/P);if(m>s.length){const g=[...Array(m).keys()].map(p=>p+1).filter(p=>!s.includes(p));if(g.length>0){const p=g[Math.floor(Math.random()*g.length)];this.setState(I=>({pages:[...I.pages,p]}),this.fetchResource)}}o(e)});h(this,"handleTabChange",e=>{this.setState({currentTab:e,pages:[U]},this.fetchResource)});h(this,"isCollectionTabActive",()=>{const{selectedCollectionId:e}=this.props,{currentTab:s}=this.state;return s===J.COLLECTIONS&&!e})}getInitialState(){const{selectedCollectionId:e,selectedItemId:s}=this.props;let a=J.COLLECTIONS;return!e&&s&&(a=J.ORPHAN_ITEMS),{pages:[U],currentTab:a,initialPage:U,showSamplesModalAgain:!0}}componentDidMount(){const{address:e,hasUserOrphanItems:s,selectedItem:a,onFetchOrphanItem:i,onSetItems:o}=this.props;this.fetchResource(),e&&s===void 0&&i(e),a&&o([a])}componentDidUpdate(e,s){const{isConnected:a,address:i,selectedCollectionId:o,selectedItemId:r,selectedItem:m,orphanItems:g,totalItems:p,visibleItems:I,hasUserOrphanItems:S,onSetItems:E,onFetchOrphanItem:b}=this.props,{initialPage:C,pages:w}=this.state;if(!o&&i&&r&&p&&(C===U||s.initialPage<C)){if(!g.find(f=>f.id===r)){const f=Math.ceil(p/P),D=w[w.length-1],M=Math.min(f,D+1);w.includes(M)||this.setState({pages:[M],initialPage:M},this.fetchResource)}}else if(e.selectedItemId&&r&&e.selectedItemId!==r){const f=I.filter(D=>D.type!==y.EMOTE);E(f)}else i&&a&&(a!==e.isConnected||e.selectedCollectionId&&!o)&&this.setState({pages:[U]},this.fetchResource),e.selectedCollectionId!==o&&this.setState({pages:[U]}),i&&i!==e.address&&S===void 0&&b(i);!e.selectedItem&&m&&m.type!==y.EMOTE&&E([m]),e.selectedCollectionId!==o&&E([])}componentWillUnmount(){const{onSetItems:e}=this.props;e([])}getItems(e,s,a){const{selectedCollectionId:i,orphanItems:o,isReviewing:r}=this.props;return i&&e?$t(e)&&r?s.filter(m=>!!(a!=null&&a.find(g=>g.itemId===m.id&&g.status===K.PENDING))):s:o}render(){const{items:e,totalItems:s,totalCollections:a,collections:i,selectedItemId:o,selectedCollectionId:r,visibleItems:m,bodyShape:g,reviewedItems:p,isReviewing:I,isPlayingEmote:S,isConnected:E,wearableController:b,isLoading:C,hasUserOrphanItems:w,onSetItems:f,onSetReviewedItems:D,onResetReviewedItems:M}=this.props,{pages:u,showSamplesModalAgain:W}=this.state,F=!r&&w,le=this.isCollectionTabActive()&&!r,A=!this.isCollectionTabActive()||r;return t.jsx("div",{className:"LeftPanel",children:E?t.jsx(qs,{id:r,itemSelected:o,itemsPage:u,itemsPageSize:P,fetchCollectionItemsOptions:{status:I?K.PENDING:void 0},onChangePage:q=>this.setState({pages:[q]}),children:({paginatedCollections:q,collection:$,paginatedItems:st,initialPage:at,isLoadingCollection:nt,isLoadingCollectionItems:it,itemCurations:lt})=>{const G=this.getItems($,st,lt),Se=this.isCollectionTabActive(),ot=r&&$?at:this.state.initialPage;return t.jsxs(t.Fragment,{children:[t.jsx(Ea,{}),F?t.jsxs(c.Tabs,{isFullscreen:!0,children:[t.jsx(c.Tabs.Tab,{active:Se,onClick:()=>this.handleTabChange(J.COLLECTIONS),children:d("collections_page.collections")}),t.jsx(c.Tabs.Tab,{active:!Se,onClick:()=>this.handleTabChange(J.ORPHAN_ITEMS),children:d("item_editor.left_panel.items")})]}):null,le?t.jsx(Pa,{collections:q,totalCollections:a||i.length,items:e,hasHeader:G.length>0,selectedCollectionId:r,onLoadPage:this.loadPage,isLoading:nt}):null,A?t.jsxs(t.Fragment,{children:[t.jsx(wa,{items:G,totalItems:s||G.length,hasHeader:!r&&i.length>0,selectedItemId:o,collection:$,isReviewing:I,isPlayingEmote:S,visibleItems:m,bodyShape:g,onResetReviewedItems:M,reviewedItems:p,onSetItems:f,wearableController:b,initialPage:ot,isLoading:it||C,onToggleShowSamplesModalAgain:this.handleToggleShowSamplesModalAgain,showSamplesModalAgain:W,onReviewItems:()=>D(G),onLoadRandomPage:()=>this.loadRandomPage(G),onLoadPage:this.loadPage}),t.jsx(Ia,{collectionId:r})]}):null]})}}):null})}};const Na=n=>{const l=Q(n),e=te(n),s=l?he(n,l):e?he(n,e):void 0,a=l?void 0:Ut(n),i=Ee(n)||"",o=je(n,i);return{address:e,isConnected:be(n),items:Jt(n),totalItems:(s==null?void 0:s.total)||null,totalCollections:(a==null?void 0:a.total)||null,orphanItems:e&&!l?Yt(n,e,s==null?void 0:s.limit):zt(n),collections:qt(n),selectedItemId:i,selectedItem:o,selectedCollectionId:l,visibleItems:Ye(n),bodyShape:ze(n),wearableController:qe(n),isReviewing:xe(n),isLoading:V(me(n),Kt)||V(me(n),Qt),isPlayingEmote:Ge(n),hasUserOrphanItems:_e(n)}},Ra=n=>({onSetItems:l=>n(Ze(l)),onFetchCollections:(l,e)=>n(Gt(l,e)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchOrphanItem:l=>n(Zt(l))}),Da=B(Na,Ra)(Aa);class ce extends z.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarColorChange",(e,s)=>{const{currentColor:a,colors:i,onChange:o}=this.props;if(a.toHexString()!==s.value){const r=i.find(m=>m.toHexString()===s.value);o(r)}});h(this,"renderItem",(e,s)=>{const a=e.toHexString();return t.jsx(c.Dropdown.Item,{value:a,onClick:this.handleAvatarColorChange,children:t.jsx("i",{className:"color",style:{background:a}})},s)})}render(){const{currentColor:e,colors:s,label:a}=this.props,i=e.toHexString();return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarColorDropdown Select",value:i,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:a}),t.jsx("div",{className:"value",children:t.jsx("i",{className:"color",style:{background:i}})}),t.jsx("div",{className:"handle"})]}),children:t.jsx(c.Dropdown.Menu,{className:"colors-menu",children:s.map(this.renderItem)})})}}let Ma=class extends z.PureComponent{constructor(){super(...arguments);h(this,"handleAvatarChangeWearable",(e,s)=>{const{wearable:a,category:i,bodyShape:o,onChange:r,baseWearables:m}=this.props,g=s.value?m.find(p=>p.id===s.value):null;a!==g&&r(i,o,g??null)})}render(){const{wearable:e,bodyShape:s,category:a,label:i,isNullable:o,baseWearables:r}=this.props,m=Xt(r,a,s).map(p=>({value:p.id,text:es(p)}));o&&m.push({value:"",text:d("global.none")});const g=e?m.find(p=>p.value===e.id):null;return t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"AvatarWearableDropdown Select",value:e?e.id:"",options:m,scrolling:!0,onChange:this.handleAvatarChangeWearable,trigger:t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:i}),t.jsx("div",{className:"value",children:g?g.text:d("global.none")}),t.jsx("div",{className:"handle"})]})})}};const La=n=>({baseWearables:ts(n)}),ae=B(La)(Ma);let Oa=class extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{showSceneBoundaries:!1,isShowingAvatarAttributes:!1,isLoading:!1});h(this,"analytics",ve());h(this,"handleToggleShowingAvatarAttributes",()=>{this.setState({isShowingAvatarAttributes:!this.state.isShowingAvatarAttributes})});h(this,"handleBodyShapeChange",(e,{value:s})=>{const{onSetBodyShape:a}=this.props;a(s)});h(this,"handleAnimationChange",(e,{value:s})=>{const{emotes:a,visibleItems:i,onSetAvatarAnimation:o,onSetItems:r}=this.props,m=a.find(p=>p.id===s),g=i.filter(p=>p.type!==y.EMOTE);g.forEach(p=>{var I;(I=this.analytics)==null||I.track("Play Emote",{EMOTE_PLAYED_BASE:!m,EMOTE_PLAYED_ITEM_ID:m!=null&&m.urn?ue(m.urn):null,EMOTE_PLAYED_NAME:m?m.name:s,PREVIEWED_WEARABLE_ITEM_ID:p!=null&&p.urn?Y(p.urn)?Je(p.urn):ue(p.urn):null,PREVIEWED_WEARABLE_NAME:p.name})}),m?g.push(m):o(s),r(g)});h(this,"handleSkinColorChange",e=>{const{onSetSkinColor:s}=this.props;s(e)});h(this,"handleEyeColorChange",e=>{const{onSetEyeColor:s}=this.props;s(e)});h(this,"handleHairColorChange",e=>{const{onSetHairColor:s}=this.props;s(e)});h(this,"handleWearableChange",(e,s,a)=>{const{onSetBaseWearable:i}=this.props;i(e,s,a)});h(this,"handleWearablePreviewLoad",()=>{const{wearableController:e,onSetWearablePreviewController:s}=this.props;e||s(c.WearablePreview.createController("wearable-editor")),this.setState({isLoading:!1})});h(this,"handleControlActionChange",async e=>{const{wearableController:s}=this.props,a=.1;if(s)switch(await(s==null?void 0:s.emote.pause()),e){case se.ZOOM_IN:{await(s==null?void 0:s.scene.changeZoom(a));break}case se.ZOOM_OUT:{await(s==null?void 0:s.scene.changeZoom(-a));break}}});h(this,"handlePlayEmote",()=>{const{wearableController:e,isPlayingEmote:s,visibleItems:a,onSetAvatarAnimation:i,onSetItems:o}=this.props,r=a.filter(m=>m.type!==y.EMOTE);s?(i(_.PreviewEmote.IDLE),o(r)):e==null||e.emote.play()});h(this,"renderEmotePlayButton",()=>{const{isPlayingEmote:e}=this.props,s=e?"stop":"play",a=e?d("item_editor.center_panel.stop"):d("item_editor.center_panel.play_emote");return t.jsxs(c.Button,{icon:!0,onClick:this.handlePlayEmote,children:[t.jsx(c.Icon,{name:s}),t.jsx("span",{children:a})]})});h(this,"renderEmoteDropdownButton",()=>{const{collection:e,emotes:s,isPlayingEmote:a}=this.props,i=!!e,o=s.length>0;return a?null:t.jsx(c.Dropdown,{className:"avatar-animation button icon",floating:!0,scrolling:!0,children:t.jsxs(c.Dropdown.Menu,{children:[o&&t.jsxs(t.Fragment,{children:[t.jsx(c.Dropdown.Header,{content:i?d("item_editor.center_panel.from_collection"):d("item_editor.center_panel.from_items")}),t.jsx(c.Dropdown.Divider,{}),s.map(r=>t.jsx(c.Dropdown.Item,{value:r.id,text:r.name,onClick:this.handleAnimationChange},r.id)),t.jsx(c.Dropdown.Divider,{}),t.jsx(c.Dropdown.Header,{content:d("item_editor.center_panel.default")}),t.jsx(c.Dropdown.Divider,{})]}),_.PreviewEmote.schema.enum.map(r=>t.jsx(c.Dropdown.Item,{value:r,text:d(`emotes.${r}`),onClick:this.handleAnimationChange},r))]})})});h(this,"renderEmoteSelector",()=>t.jsx(c.Popup,{content:d("item_editor.center_panel.disabled_animation_dropdown"),disabled:!0,position:"top center",trigger:t.jsx("div",{className:"avatar-animation-dropdown-wrapper option",children:t.jsxs(c.Button.Group,{children:[this.renderEmotePlayButton(),this.renderEmoteDropdownButton()]})})}))}componentDidMount(){const{address:e,collection:s,emotes:a,selectedBaseWearables:i,hasUserOrphanItems:o,onFetchBaseWearables:r,onFetchOrphanItems:m,onFetchCollectionItems:g}=this.props,p=a.length>0;i||r(),p||(s&&!L(s)?g(s.id):e&&o&&m(e)),this.setState({isLoading:!0})}componentWillUnmount(){const{onSetWearablePreviewController:e}=this.props;e(null)}renderSelectTrigger(e,s){return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:s}),t.jsx("div",{className:"handle"})]})}getDropdownAttributes(e,s,a){const i=s.find(o=>o.value===e);return{value:e,options:s,trigger:this.renderSelectTrigger(a,i?i.text:"")}}render(){const{bodyShape:e,skinColor:s,eyeColor:a,hairColor:i,emote:o,selectedBaseWearables:r,selectedItem:m,visibleItems:g,isImportFilesModalOpen:p,wearableController:I}=this.props,{isShowingAvatarAttributes:S,showSceneBoundaries:E,isLoading:b}=this.state,C=g.some(X)&&(m==null?void 0:m.type)===y.EMOTE,w=o===_.PreviewEmote.JUMP?1:void 0;return t.jsxs("div",{className:`CenterPanel ${p?"import-files-modal-is-open":""}`,children:[t.jsx(c.WearablePreview,{id:"wearable-editor",profile:"default",bodyShape:e,emote:o,zoom:w,skin:oe(s),eyes:oe(a),hair:oe(i),urns:r?Object.values(r).map(f=>f?f.id:null).filter(f=>f!==null):[],base64s:g.map(ss),disableAutoRotate:!0,disableBackground:!0,wheelZoom:1.5,wheelStart:100,dev:as,onUpdate:()=>this.setState({isLoading:!0}),onLoad:this.handleWearablePreviewLoad,disableDefaultEmotes:C,showSceneBoundaries:E}),C?t.jsxs("div",{className:"zoom-controls",children:[t.jsx(c.Button,{className:"zoom-control zoom-in-control",onClick:()=>this.handleControlActionChange(se.ZOOM_IN),children:t.jsx(c.Icon,{name:"plus"})}),t.jsx(c.Button,{className:"zoom-control zoom-out-control",onClick:()=>this.handleControlActionChange(se.ZOOM_OUT),children:t.jsx(c.Icon,{name:"minus"})})]}):null,b&&t.jsx(c.Center,{children:t.jsx(c.Loader,{active:!0})}),t.jsxs("div",{className:"footer",children:[C&&!b&&I?t.jsx("div",{className:"emote-controls-container",children:t.jsx(c.EmoteControls,{className:"emote-controls",wearablePreviewId:"wearable-editor",wearablePreviewController:I})}):null,t.jsxs("div",{className:"options",children:[t.jsx("div",{className:`option ${S?"active":""}`,onClick:this.handleToggleShowingAvatarAttributes,children:t.jsx(c.Icon,{name:"user"})}),C?null:this.renderEmoteSelector(),t.jsx("div",{className:`option ${E?"active":""}`,children:t.jsx(O,{name:"cylinder",onClick:()=>this.setState(f=>({showSceneBoundaries:!f.showSceneBoundaries}))})})]}),t.jsxs("div",{className:`avatar-attributes ${S?"active":""}`,children:[t.jsx("div",{className:"dropdown-container",children:t.jsx(c.Dropdown,{inline:!0,direction:"right",className:"Select",onChange:this.handleBodyShapeChange,...this.getDropdownAttributes(e,[{value:_.BodyShape.MALE,text:d("body_shapes.male")},{value:_.BodyShape.FEMALE,text:d("body_shapes.female")}],d("wearable.category.body_shape"))})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:s,colors:ns(),label:d("wearable.color.skin"),onChange:this.handleSkinColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:a,colors:is(),label:d("wearable.color.eye"),onChange:this.handleEyeColorChange})}),t.jsx("div",{className:"dropdown-container",children:t.jsx(ce,{currentColor:i,colors:ls(),label:d("wearable.color.hair"),onChange:this.handleHairColorChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.HAIR],category:_.WearableCategory.HAIR,bodyShape:e,label:d("wearable.category.hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.FACIAL_HAIR],category:_.WearableCategory.FACIAL_HAIR,bodyShape:e,label:d("wearable.category.facial_hair"),onChange:this.handleWearableChange,isNullable:!0})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.UPPER_BODY],category:_.WearableCategory.UPPER_BODY,bodyShape:e,label:d("wearable.category.upper_body"),onChange:this.handleWearableChange})}),t.jsx("div",{className:"dropdown-container",children:r&&t.jsx(ae,{wearable:r[_.WearableCategory.LOWER_BODY],category:_.WearableCategory.LOWER_BODY,bodyShape:e,label:d("wearable.category.lower_body"),onChange:this.handleWearableChange})})]})]})]})}};const ka=n=>{const l=te(n);let e;const s=Q(n);let a=os(n);s?(e=We(n).find(b=>b.id===s),a=a.filter(b=>b.collectionId===s)):a=a.filter(E=>!E.collectionId);const i=Ee(n)||"",o=je(n,i),r=ze(n),m=rs(n),g=Ye(n),p=ds(n),I=!g.some(X)&&p===_.PreviewEmote.IDLE,S="CreateSingleItemModal"in cs(n);return{address:l,bodyShape:r,collection:e,selectedItem:o,selectedBaseWearables:m?m[r]:null,skinColor:hs(n),eyeColor:ms(n),hairColor:gs(n),emote:p,visibleItems:g,wearableController:qe(n),emotes:a,isPlayingEmote:I?!1:Ge(n),isImportFilesModalOpen:S,hasUserOrphanItems:_e(n)}},Ba=n=>({onSetBodyShape:l=>n(ps(l)),onSetAvatarAnimation:l=>n(us(l)),onSetSkinColor:l=>n(Cs(l)),onSetEyeColor:l=>n(Is(l)),onSetHairColor:l=>n(bs(l)),onSetBaseWearable:(l,e,s)=>n(xs(l,e,s)),onFetchBaseWearables:()=>n(_s()),onSetWearablePreviewController:l=>n(vs(l)),onSetItems:l=>n(Ze(l)),onFetchOrphanItems:(l,e)=>n(Ke(l,e)),onFetchCollectionItems:(l,e)=>n(Es(l,e))}),Wa=B(ka,Ba)(Oa);class Fa extends x.PureComponent{constructor(){super(...arguments);h(this,"handleChange",e=>{const{value:s,maxLength:a,onChange:i}=this.props,o=e.target.value;s!==o&&i(a?o.slice(0,a):o)})}render(){const{label:e,disabled:s,value:a}=this.props;return t.jsxs("div",{className:`Input ${s?"is-disabled":""}`.trim(),children:[t.jsx("div",{className:"label",children:e}),t.jsx("input",{value:a||"",onChange:this.handleChange,disabled:s})]})}}class ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{value:a,onChange:i}=this.props,o=s.value;o!==a&&(this.setState({value:o}),i(o))})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,options:s}=this.props,{value:a}=this.state,i=s.find(o=>o.value===a);return t.jsxs(t.Fragment,{children:[t.jsx("div",{className:"label",children:e}),t.jsx("div",{className:"value",children:i?i.text:d("item_editor.right_panel.select_placeholder")}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(c.Dropdown,{className:`Select ${a?"":"blank"}`.trim(),trigger:this.renderTrigger(),inline:!0,direction:"right",scrolling:e.length>4,value:a||void 0,options:e,disabled:s,onChange:this.handleChange})}}h(ie,"defaultProps",{disabled:!1});class Ie extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{value:this.props.value});h(this,"handleChange",(e,s)=>{const{onChange:a}=this.props,{value:i}=this.state,o=s.value,r=[...i];for(const m of o)i.includes(m)||r.push(m);r.length!==i.length&&(this.setState({value:r}),a(r))});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}renderTrigger(){const{label:e,info:s,options:a}=this.props,{value:i}=this.state,o=a.reduce((r,m)=>(r[m.value]=m.text,r),{});return t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"label",children:[e,s?t.jsx(ne,{content:s,className:"info"}):null]}),t.jsx("div",{className:"values",children:i.length>0?i.map(r=>t.jsxs("div",{className:"value",children:[o[r],t.jsx("div",{className:"remove",onClick:m=>{this.handleRemove(r),m.stopPropagation()}})]},r)):t.jsx("div",{className:"placeholder",children:d("item_editor.right_panel.select_placeholder")})}),t.jsx("div",{className:"handle"})]})}render(){const{options:e,disabled:s}=this.props,{value:a}=this.state;return t.jsx(c.Dropdown,{inline:!0,multiple:!0,className:`MultiSelect ${a.length>0?"":"blank"}`.trim(),trigger:this.renderTrigger(),direction:"right",value:a,scrolling:!1,options:e.filter(i=>!a.includes(i.value)),disabled:s,onChange:this.handleChange,closeOnChange:!0})}}h(Ie,"defaultProps",{disabled:!1});class tt extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{draft:"",value:this.props.value});h(this,"handleChange",e=>{this.setState({draft:e.target.value})});h(this,"handleAdd",()=>{const{onChange:e}=this.props,{draft:s,value:a}=this.state,i=s.trim();if(i!=="")if(a.includes(i))this.setState({draft:""});else{const o=[...a,i];this.setState({value:o,draft:""}),e(o)}});h(this,"handleKeyDown",e=>{if(e.key==="#"){e.preventDefault();return}else if(e.keyCode===js||e.keyCode===we||e.keyCode===Ss)this.handleAdd();else if(e.keyCode===fs||e.keyCode===we){const{draft:s,value:a}=this.state,i=a[a.length-1];i&&s===""&&this.handleRemove(i)}});h(this,"handleRemove",e=>{const{onChange:s}=this.props,a=this.state.value.filter(i=>i!==e);this.setState({value:a}),s(a)})}componentWillReceiveProps(e){const{itemId:s,value:a}=e;(s!==this.props.itemId||a!==this.state.value)&&this.setState({value:a})}render(){const{isDisabled:e}=this.props,{draft:s,value:a}=this.state;return t.jsx("div",{className:`Tags ${a.length>0?"":"blank"} ${e?"is-disabled":""}`.trim(),children:t.jsxs("div",{className:"values",children:[a.map(i=>t.jsxs("div",{className:"value",children:[i,t.jsx("div",{className:"remove",onClick:o=>{this.handleRemove(i),o.stopPropagation()}})]},i)),t.jsx("input",{value:s,onChange:this.handleChange,onKeyDown:this.handleKeyDown,onBlur:this.handleAdd,disabled:e})]})})}}h(tt,"defaultProps",{isDisabled:!1});let Ha=class extends x.PureComponent{constructor(){super(...arguments);h(this,"analytics",ve());h(this,"state",this.getInitialState());h(this,"thumbnailInput",x.createRef());h(this,"handleDeleteItem",()=>{const{onDeleteItem:e}=this.props,{selectedItem:s}=this.props;e(s)});h(this,"handleAddRepresentationToItem",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,addRepresentation:!0})});h(this,"handleChangeItemFile",()=>{const{selectedItem:e,onOpenModal:s}=this.props;s("CreateSingleItemModal",{item:e,changeItemFile:!0})});h(this,"handleOpenVideoDialog",(e={})=>{const{selectedItem:s,onOpenModal:a}=this.props;a("EditVideoModal",{item:s,onSaveVideo:this.handleSaveVideo,...e})});h(this,"handleSaveVideo",e=>{this.setState({video:URL.createObjectURL(e),contents:{...this.state.contents,[Te]:e},isDirty:!0})});h(this,"handleChangeName",e=>{this.setState({name:e,isDirty:this.isDirty({name:e})})});h(this,"handleChangeDescription",(e,s)=>{const a=s.value??"";this.setState({description:a,isDirty:this.isDirty({description:a})})});h(this,"handleChangeUtility",(e,s)=>{const a=s.value??"";this.setState({utility:a,isDirty:this.isDirty({utility:a})})});h(this,"handleChangeRarity",e=>{this.setState({rarity:e,isDirty:this.isDirty({rarity:e})})});h(this,"handleAllowVrmExport",(e,{checked:s})=>{const a={...this.state.data,blockVrmExport:!s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleAllowOutlineCompatible",(e,{checked:s})=>{const a={...this.state.data,outlineCompatible:s};this.setState({data:a,isDirty:this.isDirty({data:a})})});h(this,"handleChangeCategory",e=>{let s;re(this.state.data)?s={...this.state.data,category:e}:(s={...this.state.data,category:e},e===_.WearableCategory.SKIN&&(s=this.setReplaces(s,[]),s=this.setHides(s,[]))),this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handlePlayModeChange",e=>{const s={...this.state.data,loop:e===de.LOOP};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeReplaces",e=>{const s=this.setReplaces(this.state.data,e);this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleChangeHides",(e,s)=>{const a=this.state.data.hides;let i=[];s==="wearable"?i=[...a.filter(r=>!_.WearableCategory.schema.enum.includes(r)),...e]:i=[...a.filter(r=>!_.BodyPartCategory.schema.enum.includes(r)),...e];const o=this.setHides(this.state.data,i);this.setState({data:o,isDirty:this.isDirty({data:o})})});h(this,"handleChangeTags",e=>{const s={...this.state.data,tags:e};this.setState({data:s,isDirty:this.isDirty({data:s})})});h(this,"handleOnSaveItem",async()=>{var S,E;const{selectedItem:e,itemStatus:s,onSaveItem:a}=this.props,{name:i,description:o,utility:r,rarity:m,contents:g,data:p,isDirty:I}=this.state;if(I&&e){let b=p;b&&!re(b)&&(b={...b,removesDefaultHiding:b.category===_.WearableCategory.UPPER_BODY||(S=b.hides)!=null&&S.includes(_.WearableCategory.UPPER_BODY)?[_.BodyPartCategory.HANDS]:[],..."blockVrmExport"in b?{blockVrmExport:b.blockVrmExport}:{},..."outlineCompatible"in b?{outlineCompatible:b.outlineCompatible}:{}});const C={...e.contents,...await ws(g)},w={...e,name:i,description:o,rarity:m,data:b,contents:C,utility:r??void 0};s&&[ye.UNPUBLISHED,ye.UNDER_REVIEW].includes(s)&&(w.video=C[Te]),a(w,g),Y(w.urn)&&((E=this.analytics)==null||E.track("Edit Item",{contents:g})),this.setState({isDirty:!1}),this.handleOnResetItem()}});h(this,"handleOnResetItem",()=>{const{selectedItem:e}=this.props;e&&this.setItem(e)});h(this,"handleOpenThumbnailDialog",()=>{const{selectedItem:e,onOpenModal:s}=this.props;(e==null?void 0:e.type)===y.EMOTE?s("EditThumbnailModal",{onSaveThumbnail:this.handleEmoteThumbnailChange,item:e}):this.thumbnailInput.current&&this.thumbnailInput.current.click()});h(this,"handleEmoteThumbnailChange",e=>{const s=Ts(e);this.setState({thumbnail:e,contents:{[Pe]:s},isDirty:!0})});h(this,"handleThumbnailChange",async e=>{const{files:s}=e.target;if(s&&s.length>0){const a=s[0],i=await Ae(a),o=await Ae(a,1024,1024),r=URL.createObjectURL(i);this.setState({thumbnail:r,contents:{[Pe]:o},isDirty:!0})}});h(this,"handleDownloadItem",()=>{const{selectedItemId:e,onDownload:s}=this.props;e&&s(e)})}componentDidMount(){const{selectedItem:e}=this.props;e&&this.setItem(e)}componentDidUpdate(e){const{selectedItemId:s,selectedItem:a}=this.props;e.selectedItemId!==s?a?this.setItem(a):this.setState(this.getInitialState()):a&&(!e.selectedItem||this.hasSavedItem())&&this.setItem(a)}setItem(e){var a;const s=e.data;Ce(e)&&((a=s.replaces)!=null&&a.length)&&(s.hides=s.hides.concat(s.replaces),s.replaces=[]),this.setState({thumbnail:"",video:"",name:e.name,description:e.description,utility:e.utility||"",rarity:e.rarity,data:e.data,hasItem:!0,isDirty:!1})}getInitialState(){return{name:"",description:"",utility:"",thumbnail:"",video:"",rarity:void 0,contents:{},data:void 0,hasItem:!1,isDirty:!1}}setReplaces(e,s){return{...e,replaces:s,representations:e.representations.map(a=>({...a,overrideReplaces:s}))}}setHides(e,s){return{...e,hides:s,representations:e.representations.map(a=>({...a,overrideHides:s}))}}canEditItemMetadata(e){const{collection:s,canEditSelectedItem:a}=this.props;return!e||s&&Ne(s)?!1:a}isSkin(){const{data:e}=this.state;return(e==null?void 0:e.category)===_.WearableCategory.SKIN}isDirty(e={}){const{selectedItem:s}=this.props,{hasItem:a}=this.state;return a?this.hasStateItemChanged({...this.state,...e},s):!1}hasSavedItem(){const{selectedItem:e}=this.props,{isDirty:s}=this.state;return e&&!s&&this.hasStateItemChanged(this.state,e)}hasStateItemChanged(e,s){return e.name!==s.name||e.description!==s.description||e.utility!==s.utility||e.rarity!==s.rarity||!Ue(e.data,s.data)}asCategorySelect(e,s){return s.map(a=>({value:a,text:d(`${e}.category.${a}`)}))}asRaritySelect(e){return e.map(s=>({value:s,text:d(`wearable.rarity.${s}`)}))}asPlayModeSelect(e){return e.map(s=>({value:s,text:d(`emote.play_mode.${s}.text`),description:d(`emote.play_mode.${s}.description`)}))}renderOverrides(e){const s=this.canEditItemMetadata(e),a=this.state.data;if(!e||re(a))return null;const i=ys(e.contents,a.category),o=Ps(e.contents),r=a.hides.filter(g=>i.includes(g)),m=a.hides.filter(g=>o.includes(g));return t.jsxs(t.Fragment,{children:[t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.base_body"),info:d("item_editor.right_panel.base_body_info"),value:m,options:this.asCategorySelect(e.type,o),disabled:!s,onChange:g=>this.handleChangeHides(g,"bodypart")}),t.jsx(Ie,{itemId:e.id,label:d("item_editor.right_panel.wearables"),info:d("item_editor.right_panel.wearables_info"),value:r,options:this.asCategorySelect(e.type,r.some(g=>g===_.WearableCategory.BODY_SHAPE)?i:i.filter(g=>g!==_.WearableCategory.BODY_SHAPE)),disabled:!s,onChange:g=>this.handleChangeHides(g,"wearable")})]})}renderModelDetails(e){const{isDownloading:s}=this.props,{thumbnail:a}=this.state,i=this.canEditItemMetadata(e),o=s?t.jsx(c.Loader,{active:!0,size:"tiny",className:"donwload-item-loader"}):t.jsx(O,{name:"export",className:"download-item-button",onClick:this.handleDownloadItem});return t.jsxs("div",{className:"details",children:[i?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:this.handleChangeItemFile}),o,t.jsxs("div",{className:"thumbnail-container",children:[t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"}),t.jsxs("div",{className:"thumbnail-edit-container",children:[t.jsx("input",{type:"file",ref:this.thumbnailInput,onChange:this.handleThumbnailChange,accept:"image/png"}),t.jsx("div",{className:"thumbnail-edit-background"}),t.jsx(O,{name:"camera",onClick:this.handleOpenThumbnailDialog})]})]})]}):t.jsxs(t.Fragment,{children:[o,t.jsx(ge,{item:e,src:a,hasBadge:!0,badgeSize:"small"})]}),t.jsx(As,{item:e})]})}renderVideoDetails(e){if(!Re(e))return null;const s=this.canEditItemMetadata(e),a=s?()=>this.handleOpenVideoDialog():()=>this.handleOpenVideoDialog({viewOnly:!0});return t.jsx("div",{className:"details",children:s?t.jsxs(t.Fragment,{children:[t.jsx(O,{name:"edit",className:"edit-item-file",onClick:a}),t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0,onClick:a})]}):t.jsxs(t.Fragment,{children:[Ns(e)&&t.jsx(O,{name:"play",className:"play-video-button",onClick:a}),t.jsx(De,{item:e,src:this.state.video,showMetrics:!0})]})})}renderPermissions(e){return t.jsx(Rs,{requiredPermissions:e.data.requiredPermissions})}render(){const{selectedItemId:e,address:s,isWearableUtilityEnabled:a,isConnected:i,error:o,isCampaignEnabled:r,isVrmOptOutEnabled:m,campaignName:g,campaignTag:p}=this.props,{name:I,description:S,utility:E,rarity:b,data:C,isDirty:w,hasItem:f}=this.state,D=_.Rarity.getRarities(),M=Ds();return t.jsx("div",{className:"RightPanel",children:i?t.jsx(Qs,{id:e,children:(u,W,F)=>{var $;const le=W&&Ne(W),A=this.canEditItemMetadata(u),q=u?Ce(u)?Ms(u.contents):Ls():[];return F?t.jsx(c.Loader,{size:"massive",active:!0}):f||!e?t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"header",children:[t.jsx("div",{className:"title",children:d("item_editor.right_panel.properties")}),u&&Qe(u,s)&&!u.isPublished&&!le?t.jsx(c.Dropdown,{trigger:t.jsx("div",{className:"actions"}),inline:!0,direction:"left",children:t.jsxs(c.Dropdown.Menu,{children:[pe(u)!==null?t.jsx(c.Dropdown.Item,{text:d("item_detail_page.add_representation",{bodyShape:d(`body_shapes.${pe(u)}`).toLowerCase()}),onClick:this.handleAddRepresentationToItem}):null,t.jsx(Xe,{name:I,onDelete:this.handleDeleteItem,trigger:t.jsx(c.Dropdown.Item,{text:d("global.delete")})})]})}):null]}),t.jsxs("div",{className:"container",children:[t.jsx(N,{label:d("item_editor.right_panel.details"),children:u?t.jsxs(t.Fragment,{children:[this.renderModelDetails(u),this.renderVideoDetails(u)]}):null}),t.jsx(N,{label:d("item_editor.right_panel.basics"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(Fa,{label:d("global.name"),value:I,disabled:!A,maxLength:Os,onChange:this.handleChangeName}),t.jsx(c.TextAreaField,{maxLength:ks,onChange:this.handleChangeDescription,label:d("global.description"),placeholder:d("item_editor.right_panel.description_placeholder"),disabled:!A,value:S,rows:"2",cols:"12"}),a?t.jsx(c.TextAreaField,{maxLength:Bs,onChange:this.handleChangeUtility,label:d("global.utility"),placeholder:d("item_editor.right_panel.utility_placeholder"),disabled:!A,value:E,tooltip:{content:d("item_editor.right_panel.utility_tooltip")},rows:"2",cols:"12"}):null,t.jsx(ie,{itemId:u.id,label:d("global.category"),value:C.category,options:this.asCategorySelect(u.type,q),disabled:!A,onChange:this.handleChangeCategory}),!(u.urn&&Y(u.urn))&&t.jsx(ie,{itemId:u.id,label:d("global.rarity"),value:b,options:this.asRaritySelect(D),disabled:u.isPublished||!A,onChange:this.handleChangeRarity})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.overrides")}),t.jsx(ne,{content:d("item_editor.right_panel.overrides_info"),className:"info"})]}),children:this.renderOverrides(u)}),(u==null?void 0:u.type)===y.EMOTE&&t.jsx(N,{label:d("item_editor.right_panel.animation"),children:u?t.jsx(ie,{itemId:u.id,label:d("create_single_item_modal.play_mode_label"),value:C.loop?de.LOOP:de.SIMPLE,options:this.asPlayModeSelect(M),disabled:!A,onChange:this.handlePlayModeChange}):null}),u&&Re(u)&&(($=u.data.requiredPermissions)!=null&&$.length)?t.jsx(N,{label:d("item_editor.right_panel.required_permissions"),children:this.renderPermissions(u)}):null,t.jsx(N,{label:d("item_editor.right_panel.tags"),children:u?t.jsxs(t.Fragment,{children:[t.jsx(tt,{itemId:u.id,value:C.tags,onChange:this.handleChangeTags,isDisabled:!A}),r&&g&&p&&A&&t.jsx("p",{className:"event-tag",children:d("item_editor.right_panel.event_tag",{event_tag:t.jsx("span",{children:p}),event_name:t.jsx("span",{children:g})})})]}):null}),(u==null?void 0:u.type)===y.WEARABLE&&m&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.copyright.title")}),t.jsx(ne,{content:d("item_editor.right_panel.copyright.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:d("item_editor.right_panel.copyright.vrm_export")}),t.jsx(c.Checkbox,{toggle:!0,label:C!=null&&C.blockVrmExport?d("item_editor.right_panel.copyright.disabled"):d("item_editor.right_panel.copyright.enabled"),checked:!(C!=null&&C.blockVrmExport),onChange:this.handleAllowVrmExport,"aria-label":d("item_editor.right_panel.copyright.vrm_export")})]})})}),(u==null?void 0:u.type)===y.WEARABLE&&t.jsx(N,{label:t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"overrides-label-panel",children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(ne,{content:d("item_editor.right_panel.outline_compatible.info"),className:"info"})]}),children:t.jsx("div",{className:"right-panel-copyright-section",children:t.jsxs("div",{className:"right-panel-export-protection",children:[t.jsx("span",{children:d("item_editor.right_panel.outline_compatible.title")}),t.jsx(c.Checkbox,{toggle:!0,label:(C==null?void 0:C.outlineCompatible)!==!1?d("item_editor.right_panel.copyright.enabled"):d("item_editor.right_panel.copyright.disabled"),checked:(C==null?void 0:C.outlineCompatible)!==!1,onChange:this.handleAllowOutlineCompatible,"aria-label":d("item_editor.right_panel.outline_compatible.title")})]})})}),w?t.jsxs("div",{className:"edit-buttons",children:[t.jsx(c.Button,{secondary:!0,onClick:this.handleOnResetItem,children:d("global.cancel")}),t.jsx(Me,{primary:!0,onClick:this.handleOnSaveItem,network:_.Network.MATIC,children:d("global.save")})]}):o&&e?t.jsxs("p",{className:"danger-text",children:[d("global.error_ocurred"),": ",o]}):null]})]}):null}}):null})}};const Va=n=>{var r;const l=Ee(n)||"",e=je(n,l),s=te(n)||"",a=l&&e&&e.collectionId?Le(n,e.collectionId):null,i=Ws(n),o=l?i[l]:null;return{address:s,collection:a,selectedItem:e,selectedItemId:l,canEditSelectedItem:e?a?Fe(n,s,a):Qe(e,s):!1,itemStatus:o,error:Fs(n),isConnected:be(n),isDownloading:Hs(n),isCommitteeMember:Oe(n),isCampaignEnabled:Vs(n),campaignTag:Gs(n),campaignName:(r=Zs(n))==null?void 0:r[Ks(n)],isVrmOptOutEnabled:$s(n),isWearableUtilityEnabled:Us(n)}},$a=n=>({onSaveItem:(l,e)=>n(Js(l,e)),onDeleteItem:l=>n(Ve(l)),onOpenModal:(l,e)=>n(He(l,e)),onDownload:l=>n(Ys(l))}),Ua=B(Va,$a)(Ha);class nn extends x.PureComponent{constructor(){super(...arguments);h(this,"state",{reviewedItems:[]});h(this,"handleOnSetReviewedItems",e=>{this.setState(s=>({reviewedItems:[...s.reviewedItems,...e.filter(a=>!s.reviewedItems.some(i=>i.id===a.id))]}))});h(this,"handleResetReviewedItems",()=>{this.setState({reviewedItems:[]})})}render(){const{reviewedItems:e}=this.state;return t.jsx(t.Fragment,{children:t.jsxs("div",{className:"ItemEditorPage",children:[t.jsx(ma,{reviewedItems:e}),t.jsxs("div",{className:"content",children:[t.jsx(Da,{reviewedItems:e,onResetReviewedItems:this.handleResetReviewedItems,onSetReviewedItems:this.handleOnSetReviewedItems}),t.jsx(Wa,{}),t.jsx(Ua,{})]})]})})}}export{nn as default};
@@ -1 +1 @@
1
- import{a as g}from"./index-0CZpREZ9.js";import"./index-flmdvOR7.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
1
+ import{a as g}from"./index-OVCJPlqO.js";import"./index-BzA68U9Q.js";var m=Object.defineProperty,v=Object.defineProperties,y=Object.getOwnPropertyDescriptors,c=Object.getOwnPropertySymbols,w=Object.prototype.hasOwnProperty,f=Object.prototype.propertyIsEnumerable,d=(e,r,t)=>r in e?m(e,r,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[r]=t,h=(e,r)=>{for(var t in r||(r={}))w.call(r,t)&&d(e,t,r[t]);if(c)for(var t of c(r))f.call(r,t)&&d(e,t,r[t]);return e},_=(e,r)=>v(e,y(r)),u=(e,r,t)=>new Promise((n,s)=>{var l=i=>{try{o(t.next(i))}catch(p){s(p)}},a=i=>{try{o(t.throw(i))}catch(p){s(p)}},o=i=>i.done?n(i.value):Promise.resolve(i.value).then(l,a);o((t=t.apply(e,r)).next())}),b=(e=>(e.Start="magic_oauth_login_with_redirect_start",e.Verify="magic_oauth_login_with_redirect_verify",e.Popup="magic_oauth_login_with_popup",e.VerifyTelegramData="magic_oauth_verify_telegram_data",e))(b||{}),R=(e=>(e.InvalidRequest="invalid_request",e.InvalidClient="invalid_client",e.InvalidScope="invalid_scope",e.InvalidGrant="invalid_grant",e.UnauthorizedClient="unauthorized_client",e.UnsupportedResponseType="unsupported_response_type",e.UnsupportedGrantType="unsupported_grant_type",e.UnsupportedTokenType="unsupported_token_type",e.AccessDenied="access_denied",e.ServerError="server_error",e.TemporarilyUnavailable="temporarily_unavailable",e))(R||{}),I=class extends g.Internal{constructor(){super(),this.name="oauth2",this.config={},this.compat={"magic-sdk":">=2.4.6","@magic-sdk/react-native":!1,"@magic-sdk/react-native-bare":!1,"@magic-sdk/react-native-expo":!1},this.seamlessTelegramLogin()}loginWithRedirect(e){return this.utils.createPromiEvent((r,t)=>u(this,null,function*(){var n;let s=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_start",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]),l=yield this.request(s),a=l,o=l;if(o.error&&t(this.createError(o.error,(n=o.error_description)!=null?n:"An error occurred.",{errorURI:o.error_uri,provider:o.provider})),a!=null&&a.oauthAuthoriationURI){let i=a.useMagicServerCallback?new URL(a.oauthAuthoriationURI,this.sdk.endpoint).href:a.oauthAuthoriationURI;a!=null&&a.shouldReturnURI?r(i):window.location.href=i}r(null)}))}getRedirectResult(e,r){let t=r||window.location.search,n=window.location.origin+window.location.pathname;return window.history.replaceState(null,"",n),P.call(this,t,e)}loginWithPopup(e){let r=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_popup",[_(h({},e),{apiKey:this.sdk.apiKey,platform:"web"})]);return this.request(r)}seamlessTelegramLogin(){try{if(!window.location.hash.toString().includes("#tgWebAppData"))return;let e=document.createElement("script");e.src="https://telegram.org/js/telegram-web-app.js",document.head.prepend(e),e.onload=()=>u(this,null,function*(){var r;try{let t=(r=window.Telegram)==null?void 0:r.WebApp.initData,n=this.utils.createJsonRpcRequestPayload("magic_oauth_verify_telegram_data",[{userData:t,isMiniApp:!0}]);yield this.request(n)}catch(t){console.log("Error while verifying telegram data",t)}})}catch(e){console.log("Error while loading telegram-web-app script",e)}}};function P(e,r){return this.utils.createPromiEvent((t,n)=>u(this,null,function*(){var s;let l=this.utils.createJsonRpcRequestPayload("magic_oauth_login_with_redirect_verify",[{authorizationResponseParams:e,magicApiKey:this.sdk.apiKey,platform:"web",lifespan:r}]),a=yield this.request(l),o=a,i=a;i.error&&n(this.createError(i.error,(s=i.error_description)!=null?s:"An error occurred.",{errorURI:i.error_uri,provider:i.provider})),t(o)}))}export{R as OAuthErrorCode,I as OAuthExtension,b as OAuthPayloadMethods};
@@ -1 +1 @@
1
- var G=Object.defineProperty;var X=(n,s,l)=>s in n?G(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var E=(n,s,l)=>X(n,typeof s!="symbol"?s+"":s,l);import{D as d,H as e,J as Y,Z,K as k,es as F,eS as H,eT as S,eU as j,eP as q,eV as z,eW as J,eX as _,eY as ee,eZ as se,e_ as ae,M as t,G as i,dD as ie,e$ as le,f0 as C,f1 as te,f2 as ne,f3 as ce,L as de,er as oe,cC as re,f4 as ue,b8 as me,f5 as he,cB as xe,f6 as pe,f7 as je,f8 as ge,f9 as ve,N as Ne,fa as be,fb as Ie,e9 as fe,fc as _e,fd as Ce,fe as ye,bw as T,eE as P,ff as Ee,fg as ke,ep as Se,X as Te,eN as Pe,fh as De,fi as we}from"./index-flmdvOR7.js";import{I as Me}from"./ItemProvider.container-ww0oFR41.js";import{C as Le}from"./ConfirmDelete-BQ__uX_D.js";import{L as Be}from"./LoggedInDetailPage.container-CP5QlkqP.js";import{N as Re}from"./NotFound-D8kFfF63.js";import{B as Ue}from"./Back-CcOe2OPR.js";import"./Navigation.container-Caaq2HYh.js";import"./selectors-DV14n6nm.js";import"./SignInRequired-CqwdQCfU.js";class Oe extends d.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:r}=l;this.state={isNoticeClosed:localStorage.getItem(r)!==null}}render(){const{children:l}=this.props,{isNoticeClosed:r}=this.state;return r?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:l}),e.jsx(Y,{name:"close",onClick:this.handleCloseNotice})]})}}const Ve="dcl-item-notice";function Ae(n){const{item:s,itemId:l,isLoading:r,status:h,collection:g,hasAccess:v,isWearableUtilityEnabled:D,onDelete:w,onSaveItem:x,onOpenModal:o}=n,p=d.useRef(null),N=Z(),y=d.useCallback(()=>{s&&N.push(k.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:F(s.urn)?H.TP_COLLECTIONS:H.COLLECTIONS})},[N,s]),M=d.useCallback(async a=>{const c=await S({[j]:a}),u={...s,contents:{...s==null?void 0:s.contents,[j]:c[j]}};h&&[q.UNPUBLISHED,q.UNDER_REVIEW].includes(h)&&(u.video=c[j]),x(u,{[j]:a})},[x,s,h]),b=d.useCallback(()=>{o("EditVideoModal",{item:s,onSaveVideo:M})},[s,o,M]),L=d.useCallback(()=>{w(s)},[s,w]),I=d.useCallback(()=>{s&&z(s)?o("CreateSingleItemModal",{item:s,addRepresentation:!0}):o("CreateSingleItemModal",{item:s,changeItemFile:!0})},[o,s]),B=d.useCallback(()=>{o("EditItemURNModal",{item:s})},[s,o]),R=d.useCallback(async a=>{const c=J(a);x({...s,contents:{...s==null?void 0:s.contents,...await S({[_]:c})}},{[_]:c})},[x,s]),U=d.useCallback(()=>{(s==null?void 0:s.type)===ee.EMOTE?o("EditThumbnailModal",{onSaveThumbnail:R,item:s,collection:g}):p.current&&p.current.click()},[p.current,g,s,o,R]),O=d.useCallback(async a=>{const{files:c}=a.target;if(c&&c.length>0){const u=c[0],f=await se(u,1024,1024);f&&s&&(s.contents={...s.contents,...await S({[_]:f})},x(s,{[_]:f}))}},[x,s]),V=d.useCallback(()=>{o("MoveItemToCollectionModal",{item:s})},[s,o]),W=d.useCallback((a,c)=>{var A;const u=a.data,$=!(c&&ae(c));return e.jsxs(e.Fragment,{children:[e.jsx(t.Section,{children:e.jsx(t.Row,{children:e.jsx(Ue,{onClick:()=>N.push(k.collectionDetail(a.collectionId))})})}),e.jsxs(t.Narrow,{children:[!c&&!a.collectionId?e.jsx(Oe,{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(ie,{item:a,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:a})]}),C(a)?e.jsx(te,{item:a,onClick:b,children:(m,K,Q,qe)=>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(ne,{duration:K,size:Q,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details")}),a.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",a.tokenId]})]}),u.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.category")}),e.jsx("div",{className:"value",children:i(`${a.type}.category.${u.category}`)})]}):null,a.isPublished&&a.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.supply")}),e.jsxs("div",{className:"value",children:[a.totalSupply,"/",ce(a)]})]}):null,c?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.collection")}),e.jsx(de,{className:"collection-link",to:k.collectionDetail(c.id,oe(c)),children:c.name})]}):null,a.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:[a.urn,e.jsx(re,{role:"button",text:a.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:F(a.urn)?e.jsx(t.Popup,{content:i("collection_item.cannot_edit_urn"),disabled:!a.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:a.isPublished,className:"link",onClick:B,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:a.name}),e.jsxs("div",{className:"actions",children:[C(a)&&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:y,children:i("collection_detail_page.preview")}),$?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(Le,{name:a.name,onDelete:L,trigger:a.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")})}),!a.collectionId&&e.jsx(t.Dropdown.Item,{text:i("collection_item.move_to_another_collection"),onClick:V})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[a.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.description")}),e.jsx("div",{className:"data",children:a.description})]}),a.utility&&D&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.utility")}),e.jsx("div",{className:"data",children:a.utility})]})]}),a.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:a.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):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:[ue(a)?e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),e.jsx("div",{className:"value",children:i("global.free")})]}):a.price?e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),a.price?e.jsx(t.Mana,{showTooltip:!0,network:me.Network.MATIC,children:he(a.price)}):"-"]}):null,e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.beneficiary")}),a.beneficiary?e.jsx("div",{className:"value",children:xe(a.beneficiary)}):"-"]})]})]}),pe(a)&&!C(a)?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:z(a)?i("global.add"):i("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:a.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:je(a),alt:a.name}),m.mainFile,e.jsx(ge,{item:a,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,C(a)&&((A=a.data.requiredPermissions)!=null&&A.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(ve,{requiredPermissions:a.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[D,N,p,U,O,b,B,I,I,V,y,L,y]);return e.jsx(Me,{id:l,children:(a,c,u)=>e.jsx(Be,{className:"ItemDetailPage",hasNavigation:!v&&!r,isLoading:r||u,children:v&&a?W(a,c):e.jsx(Re,{})})})}const Fe=n=>{const s=be(n),l=s?Ie(n,s):null,r=fe(n),h=l&&l.collectionId?_e(n,l.collectionId):null,g=Ce(n),v=l?g[l.id]:null;return{itemId:s,wallet:r,item:l,collection:h,status:v,isWearableUtilityEnabled:ye(n),isLoading:T(P(n),Pe)||T(P(n),De)||T(P(n),we),hasAccess:l!==null&&Ee(n,r.address,h,l)}},He=n=>({onSaveItem:(s,l)=>n(ke(s,l)),onDelete:s=>n(Se(s)),onOpenModal:(s,l)=>n(Te(s,l))}),es=Ne(Fe,He)(Ae);export{es as default};
1
+ var G=Object.defineProperty;var X=(n,s,l)=>s in n?G(n,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):n[s]=l;var E=(n,s,l)=>X(n,typeof s!="symbol"?s+"":s,l);import{D as d,H as e,J as Y,Z,K as k,es as F,eS as H,eT as S,eU as j,eP as q,eV as z,eW as J,eX as _,eY as ee,eZ as se,e_ as ae,M as t,G as i,dD as ie,e$ as le,f0 as C,f1 as te,f2 as ne,f3 as ce,L as de,er as oe,cC as re,f4 as ue,b8 as me,f5 as he,cB as xe,f6 as pe,f7 as je,f8 as ge,f9 as ve,N as Ne,fa as be,fb as Ie,e9 as fe,fc as _e,fd as Ce,fe as ye,bw as T,eE as P,ff as Ee,fg as ke,ep as Se,X as Te,eN as Pe,fh as De,fi as we}from"./index-BzA68U9Q.js";import{I as Me}from"./ItemProvider.container-DD17VJjs.js";import{C as Le}from"./ConfirmDelete-CGBOfiZh.js";import{L as Be}from"./LoggedInDetailPage.container-39mJ2Eex.js";import{N as Re}from"./NotFound-D03hcRtB.js";import{B as Ue}from"./Back-EcXwondN.js";import"./Navigation.container-rdACKxXe.js";import"./selectors-Cq5Ys-vX.js";import"./SignInRequired-DR9OeMxy.js";class Oe extends d.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:r}=l;this.state={isNoticeClosed:localStorage.getItem(r)!==null}}render(){const{children:l}=this.props,{isNoticeClosed:r}=this.state;return r?null:e.jsxs("div",{className:"Notice",children:[e.jsx("div",{className:"text",children:l}),e.jsx(Y,{name:"close",onClick:this.handleCloseNotice})]})}}const Ve="dcl-item-notice";function Ae(n){const{item:s,itemId:l,isLoading:r,status:h,collection:g,hasAccess:v,isWearableUtilityEnabled:D,onDelete:w,onSaveItem:x,onOpenModal:o}=n,p=d.useRef(null),N=Z(),y=d.useCallback(()=>{s&&N.push(k.itemEditor({itemId:s.id,collectionId:s.collectionId}),{fromParam:F(s.urn)?H.TP_COLLECTIONS:H.COLLECTIONS})},[N,s]),M=d.useCallback(async a=>{const c=await S({[j]:a}),u={...s,contents:{...s==null?void 0:s.contents,[j]:c[j]}};h&&[q.UNPUBLISHED,q.UNDER_REVIEW].includes(h)&&(u.video=c[j]),x(u,{[j]:a})},[x,s,h]),b=d.useCallback(()=>{o("EditVideoModal",{item:s,onSaveVideo:M})},[s,o,M]),L=d.useCallback(()=>{w(s)},[s,w]),I=d.useCallback(()=>{s&&z(s)?o("CreateSingleItemModal",{item:s,addRepresentation:!0}):o("CreateSingleItemModal",{item:s,changeItemFile:!0})},[o,s]),B=d.useCallback(()=>{o("EditItemURNModal",{item:s})},[s,o]),R=d.useCallback(async a=>{const c=J(a);x({...s,contents:{...s==null?void 0:s.contents,...await S({[_]:c})}},{[_]:c})},[x,s]),U=d.useCallback(()=>{(s==null?void 0:s.type)===ee.EMOTE?o("EditThumbnailModal",{onSaveThumbnail:R,item:s,collection:g}):p.current&&p.current.click()},[p.current,g,s,o,R]),O=d.useCallback(async a=>{const{files:c}=a.target;if(c&&c.length>0){const u=c[0],f=await se(u,1024,1024);f&&s&&(s.contents={...s.contents,...await S({[_]:f})},x(s,{[_]:f}))}},[x,s]),V=d.useCallback(()=>{o("MoveItemToCollectionModal",{item:s})},[s,o]),W=d.useCallback((a,c)=>{var A;const u=a.data,$=!(c&&ae(c));return e.jsxs(e.Fragment,{children:[e.jsx(t.Section,{children:e.jsx(t.Row,{children:e.jsx(Ue,{onClick:()=>N.push(k.collectionDetail(a.collectionId))})})}),e.jsxs(t.Narrow,{children:[!c&&!a.collectionId?e.jsx(Oe,{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(ie,{item:a,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:a})]}),C(a)?e.jsx(te,{item:a,onClick:b,children:(m,K,Q,qe)=>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(ne,{duration:K,size:Q,showIcons:!1})]})]})}):null,e.jsxs("div",{className:"details",children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details")}),a.isPublished&&e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item_detail_page.details_info.id")}),e.jsxs("div",{className:"value",children:["#",a.tokenId]})]}),u.category?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.category")}),e.jsx("div",{className:"value",children:i(`${a.type}.category.${u.category}`)})]}):null,a.isPublished&&a.rarity?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.supply")}),e.jsxs("div",{className:"value",children:[a.totalSupply,"/",ce(a)]})]}):null,c?e.jsxs("div",{children:[e.jsx("div",{className:"subtitle",children:i("item.collection")}),e.jsx(de,{className:"collection-link",to:k.collectionDetail(c.id,oe(c)),children:c.name})]}):null,a.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:[a.urn,e.jsx(re,{role:"button",text:a.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:F(a.urn)?e.jsx(t.Popup,{content:i("collection_item.cannot_edit_urn"),disabled:!a.isPublished,position:"top center",trigger:e.jsx("div",{children:e.jsx("button",{disabled:a.isPublished,className:"link",onClick:B,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:a.name}),e.jsxs("div",{className:"actions",children:[C(a)&&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:y,children:i("collection_detail_page.preview")}),$?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(Le,{name:a.name,onDelete:L,trigger:a.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")})}),!a.collectionId&&e.jsx(t.Dropdown.Item,{text:i("collection_item.move_to_another_collection"),onClick:V})]})}):null]})]}),e.jsxs("div",{className:"attribute-row",children:[a.description&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.description")}),e.jsx("div",{className:"data",children:a.description})]}),a.utility&&D&&e.jsxs("div",{className:"attribute-column",children:[e.jsx("div",{className:"subtitle",children:i("global.utility")}),e.jsx("div",{className:"data",children:a.utility})]})]}),a.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:a.data.tags.map(m=>e.jsx("span",{className:"tag",children:m},m))})]})}):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:[ue(a)?e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),e.jsx("div",{className:"value",children:i("global.free")})]}):a.price?e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.price")}),a.price?e.jsx(t.Mana,{showTooltip:!0,network:me.Network.MATIC,children:he(a.price)}):"-"]}):null,e.jsxs(t.Section,{children:[e.jsx("div",{className:"subtitle",children:i("item.beneficiary")}),a.beneficiary?e.jsx("div",{className:"value",children:xe(a.beneficiary)}):"-"]})]})]}),pe(a)&&!C(a)?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:z(a)?i("global.add"):i("global.edit")})]}),e.jsx("div",{className:"data",children:e.jsx("div",{className:"representations-container",children:a.data.representations.map(m=>e.jsxs("div",{className:"representation",children:[e.jsx("img",{className:"item-image",src:je(a),alt:a.name}),m.mainFile,e.jsx(ge,{item:a,bodyShape:m.bodyShapes[0]})]},m.mainFile))})})]}):null,C(a)&&((A=a.data.requiredPermissions)!=null&&A.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(ve,{requiredPermissions:a.data.requiredPermissions,basic:!0})})]}):null]})]})]})]})},[D,N,p,U,O,b,B,I,I,V,y,L,y]);return e.jsx(Me,{id:l,children:(a,c,u)=>e.jsx(Be,{className:"ItemDetailPage",hasNavigation:!v&&!r,isLoading:r||u,children:v&&a?W(a,c):e.jsx(Re,{})})})}const Fe=n=>{const s=be(n),l=s?Ie(n,s):null,r=fe(n),h=l&&l.collectionId?_e(n,l.collectionId):null,g=Ce(n),v=l?g[l.id]:null;return{itemId:s,wallet:r,item:l,collection:h,status:v,isWearableUtilityEnabled:ye(n),isLoading:T(P(n),Pe)||T(P(n),De)||T(P(n),we),hasAccess:l!==null&&Ee(n,r.address,h,l)}},He=n=>({onSaveItem:(s,l)=>n(ke(s,l)),onDelete:s=>n(Se(s)),onOpenModal:(s,l)=>n(Te(s,l))}),es=Ne(Fe,He)(Ae);export{es as default};
@@ -1 +1 @@
1
- var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{D as b,dw as O,bE as v,dx as y,bJ as x,H as s,M as u,ce as E,G as o,L,K as S,cf as R,b8 as N,cd as _,bm as P,N as w,dy as C}from"./index-flmdvOR7.js";import{L as A}from"./LandAction-C18UJMxQ.js";import{L as T}from"./LandProviderPage-Bri2NXzA.js";import"./Back-CcOe2OPR.js";import"./NotFound-D8kFfF63.js";class D extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!y(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(E,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(L,{className:"cancel",to:S.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(R,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let F=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(T,{children:e=>s.jsx(A,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(D,{land:e,onSetOperator:a})})})}};const U=r=>({onSetOperator:(a,e)=>r(C(a,e))}),K=w(void 0,U)(F);export{K as default};
1
+ var k=Object.defineProperty;var j=(r,a,e)=>a in r?k(r,a,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[a]=e;var i=(r,a,e)=>j(r,typeof a!="symbol"?a+"":a,e);import{D as b,dw as O,bE as v,dx as y,bJ as x,H as s,M as u,ce as E,G as o,L,K as S,cf as R,b8 as N,cd as _,bm as P,N as w,dy as C}from"./index-BzA68U9Q.js";import{L as A}from"./LandAction-c9yHJgyO.js";import{L as T}from"./LandProviderPage-Qr5d7tUz.js";import"./Back-EcXwondN.js";import"./NotFound-D03hcRtB.js";class D extends b.PureComponent{constructor(){super(...arguments);i(this,"state",{address:"",initial:"",loading:!1,editing:!1,dirty:!1,revoked:!1});i(this,"handleSetOperator",()=>{const{land:e,onSetOperator:t}=this.props,{address:n,revoked:p}=this.state;t(e,p?null:n)});i(this,"handleChange",(e,t)=>{this.setState({address:t.value,dirty:!0,revoked:!1})});i(this,"handleRevoke",()=>{this.setState({revoked:!0,dirty:!0})});i(this,"handleUndo",()=>{this.setState({revoked:!1,dirty:!1})})}async componentWillMount(){this.setState({loading:!0});const{land:e}=this.props,t=await O(e);t!==null?this.setState({address:t,initial:t,loading:!1,editing:!0}):this.setState({loading:!1})}render(){const{land:e}=this.props,{address:t,loading:n,dirty:p,revoked:d,editing:g,initial:m}=this.state,c=g&&v(t,m),h=!n&&!!t&&!_(t),f=n||!p||(v(t,m)||h)&&!d||!y(e,[x.OWNER,x.TENANT]),l=[];return d&&l.push("revoked"),g&&l.push("editing"),c&&l.push("is-revokable"),s.jsxs(u.Form,{className:"LandOperatorForm",children:[s.jsx(E,{placeholder:"0x...",label:o("operator_page.address"),className:l.join(" "),value:t,onChange:this.handleChange,loading:n,action:c?d?o("operator_page.undo"):o("operator_page.revoke"):void 0,onAction:c?d?this.handleUndo:this.handleRevoke:void 0,error:h,message:h?o("operator_page.invalid_address"):void 0}),s.jsxs(u.Row,{children:[s.jsx(L,{className:"cancel",to:S.landDetail(e.id),children:s.jsx(u.Button,{children:o("global.cancel")})}),s.jsx(R,{type:"submit",primary:!0,disabled:f,onClick:this.handleSetOperator,network:N.Network.ETHEREUM,children:o("global.submit")})]})]})}}let F=class extends b.PureComponent{render(){const{onSetOperator:a}=this.props;return s.jsx(T,{children:e=>s.jsx(A,{land:e,title:o("operator_page.title"),subtitle:s.jsx(P,{id:"operator_page.subtitle",values:{name:s.jsx("strong",{children:e.name}),b:t=>s.jsx("strong",{children:t}),br:()=>s.jsx("br",{})}}),children:s.jsx(D,{land:e,onSetOperator:a})})})}};const U=r=>({onSetOperator:(a,e)=>r(C(a,e))}),K=w(void 0,U)(F);export{K as default};
@@ -1 +1 @@
1
- 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,bA as T,M as s,K as k,bB as y,bC as D,bD as I,bE as f,bF as C,N as O,a_ as F,bG as H,bH as $,bI as h,bJ as g,aZ as S,bK as G,bL as B,bM as V}from"./index-flmdvOR7.js";import{N as M}from"./Navigation.container-Caaq2HYh.js";import{L as W}from"./LoggedInDetailPage.container-CP5QlkqP.js";import{R as K}from"./RentalPeriod-Cjj0jvtz.js";import"./selectors-DV14n6nm.js";import"./SignInRequired-CqwdQCfU.js";import"./index-DOl-0L6l.js";const Z=n=>n.ui.land,q=n=>Z(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 z=(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(z).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(W,{className:`LandPage ${l}-view`,activeTab:M.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:q(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,bA as T,M as s,K as k,bB as y,bC as D,bD as I,bE as f,bF as C,N as O,a_ as F,bG as H,bH as $,bI as h,bJ as g,aZ as S,bK as G,bL as B,bM as V}from"./index-BzA68U9Q.js";import{N as M}from"./Navigation.container-rdACKxXe.js";import{L as W}from"./LoggedInDetailPage.container-39mJ2Eex.js";import{R as K}from"./RentalPeriod-DDVV54fA.js";import"./selectors-Cq5Ys-vX.js";import"./SignInRequired-DR9OeMxy.js";import"./index-G9Y56ahE.js";const Z=n=>n.ui.land,q=n=>Z(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 z=(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(z).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(W,{className:`LandPage ${l}-view`,activeTab:M.LAND,isLoading:a,isPageFullscreen:!0,isFooterFullscreen:l===h.ATLAS,isNavigationFullscreen:l===h.ATLAS,children:this.renderLand()})}};const U=n=>({lands:G(n),view:q(n),isLoading:B(n)}),ee=n=>({onSetView:t=>n(V(t))}),he=O(U,ee)(Q);export{he as default};
@@ -1 +1 @@
1
- import{q as f,B as a}from"./index-flmdvOR7.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-BzA68U9Q.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};
@@ -0,0 +1,2 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-Bp4QIPpg.js","assets/index-BzA68U9Q.js","assets/index-BcV_lnIO.css"])))=>i.map(i=>d[i]);
2
+ import{B as pe,_ as me}from"./index-BzA68U9Q.js";const he=Symbol(),ee=Object.getPrototypeOf,Y=new WeakMap,ge=e=>e&&(Y.has(e)?Y.get(e):ee(e)===Object.prototype||ee(e)===Array.prototype),ye=e=>ge(e)&&e[he]||null,te=(e,t=!0)=>{Y.set(e,t)},z={BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.4.1-13507278405.commit-84ed1ac",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_BASE_URL:"https://cdn.decentraland.org/@dcl/builder-site/7.4.1-13507278405.commit-84ed1ac",VITE_REACT_APP_WEBSITE_VERSION:"7.4.1-13507278405.commit-84ed1ac"},F=e=>typeof e=="object"&&e!==null,C=new WeakMap,x=new WeakSet,ve=(e=Object.is,t=(o,g)=>new Proxy(o,g),s=o=>F(o)&&!x.has(o)&&(Array.isArray(o)||!(Symbol.iterator in o))&&!(o instanceof WeakMap)&&!(o instanceof WeakSet)&&!(o instanceof Error)&&!(o instanceof Number)&&!(o instanceof Date)&&!(o instanceof String)&&!(o instanceof RegExp)&&!(o instanceof ArrayBuffer),n=o=>{switch(o.status){case"fulfilled":return o.value;case"rejected":throw o.reason;default:throw o}},l=new WeakMap,c=(o,g,I=n)=>{const v=l.get(o);if((v==null?void 0:v[0])===g)return v[1];const b=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o));return te(b,!0),l.set(o,[g,b]),Reflect.ownKeys(o).forEach(j=>{if(Object.getOwnPropertyDescriptor(b,j))return;const O=Reflect.get(o,j),A={value:O,enumerable:!0,configurable:!0};if(x.has(O))te(O,!1);else if(O instanceof Promise)delete A.value,A.get=()=>I(O);else if(C.has(O)){const[y,H]=C.get(O);A.value=c(y,H(),I)}Object.defineProperty(b,j,A)}),Object.preventExtensions(b)},d=new WeakMap,f=[1,1],W=o=>{if(!F(o))throw new Error("object required");const g=d.get(o);if(g)return g;let I=f[0];const v=new Set,b=(i,a=++f[0])=>{I!==a&&(I=a,v.forEach(r=>r(i,a)))};let j=f[1];const O=(i=++f[1])=>(j!==i&&!v.size&&(j=i,y.forEach(([a])=>{const r=a[1](i);r>I&&(I=r)})),I),A=i=>(a,r)=>{const h=[...a];h[1]=[i,...h[1]],b(h,r)},y=new Map,H=(i,a)=>{if((z?"production":void 0)!=="production"&&y.has(i))throw new Error("prop listener already exists");if(v.size){const r=a[3](A(i));y.set(i,[a,r])}else y.set(i,[a])},Z=i=>{var a;const r=y.get(i);r&&(y.delete(i),(a=r[1])==null||a.call(r))},ue=i=>(v.add(i),v.size===1&&y.forEach(([r,h],U)=>{if((z?"production":void 0)!=="production"&&h)throw new Error("remove already exists");const N=r[3](A(U));y.set(U,[r,N])}),()=>{v.delete(i),v.size===0&&y.forEach(([r,h],U)=>{h&&(h(),y.set(U,[r]))})}),q=Array.isArray(o)?[]:Object.create(Object.getPrototypeOf(o)),k=t(q,{deleteProperty(i,a){const r=Reflect.get(i,a);Z(a);const h=Reflect.deleteProperty(i,a);return h&&b(["delete",[a],r]),h},set(i,a,r,h){const U=Reflect.has(i,a),N=Reflect.get(i,a,h);if(U&&(e(N,r)||d.has(r)&&e(N,d.get(r))))return!0;Z(a),F(r)&&(r=ye(r)||r);let V=r;if(r instanceof Promise)r.then(L=>{r.status="fulfilled",r.value=L,b(["resolve",[a],L])}).catch(L=>{r.status="rejected",r.reason=L,b(["reject",[a],L])});else{!C.has(r)&&s(r)&&(V=W(r));const L=!x.has(V)&&C.get(V);L&&H(a,L)}return Reflect.set(i,a,V,h),b(["set",[a],r,N]),!0}});d.set(o,k);const fe=[q,O,c,ue];return C.set(k,fe),Reflect.ownKeys(o).forEach(i=>{const a=Object.getOwnPropertyDescriptor(o,i);"value"in a&&(k[i]=o[i],delete a.value,delete a.writable),Object.defineProperty(q,i,a)}),k})=>[W,C,x,e,t,s,n,l,c,d,f],[be]=ve();function P(e={}){return be(e)}function D(e,t,s){const n=C.get(e);(z?"production":void 0)!=="production"&&!n&&console.warn("Please use proxy object");let l;const c=[],d=n[3];let f=!1;const o=d(g=>{c.push(g),l||(l=Promise.resolve().then(()=>{l=void 0,f&&t(c.splice(0))}))});return f=!0,()=>{f=!1,o()}}function we(e,t){const s=C.get(e);(z?"production":void 0)!=="production"&&!s&&console.warn("Please use proxy object");const[n,l,c]=s;return c(n,l(),t)}const u=P({history:["ConnectWallet"],view:"ConnectWallet",data:void 0}),de={state:u,subscribe(e){return D(u,()=>e(u))},push(e,t){e!==u.view&&(u.view=e,t&&(u.data=t),u.history.push(e))},reset(e){u.view=e,u.history=[e]},replace(e){u.history.length>1&&(u.history[u.history.length-1]=e,u.view=e)},goBack(){if(u.history.length>1){u.history.pop();const[e]=u.history.slice(-1);u.view=e}},setData(e){u.data=e}},m={WALLETCONNECT_DEEPLINK_CHOICE:"WALLETCONNECT_DEEPLINK_CHOICE",WCM_VERSION:"WCM_VERSION",RECOMMENDED_WALLET_AMOUNT:9,isMobile(){return typeof window<"u"?!!(window.matchMedia("(pointer:coarse)").matches||/Android|webOS|iPhone|iPad|iPod|BlackBerry|Opera Mini/u.test(navigator.userAgent)):!1},isAndroid(){return m.isMobile()&&navigator.userAgent.toLowerCase().includes("android")},isIos(){const e=navigator.userAgent.toLowerCase();return m.isMobile()&&(e.includes("iphone")||e.includes("ipad"))},isHttpUrl(e){return e.startsWith("http://")||e.startsWith("https://")},isArray(e){return Array.isArray(e)&&e.length>0},isTelegram(){return typeof window<"u"&&(!!window.TelegramWebviewProxy||!!window.Telegram||!!window.TelegramWebviewProxyProto)},formatNativeUrl(e,t,s){if(m.isHttpUrl(e))return this.formatUniversalUrl(e,t,s);let n=e;n.includes("://")||(n=e.replaceAll("/","").replaceAll(":",""),n=`${n}://`),n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},formatUniversalUrl(e,t,s){if(!m.isHttpUrl(e))return this.formatNativeUrl(e,t,s);let n=e;if(n.startsWith("https://t.me")){const c=pe.from(t).toString("base64").replace(/[=]/g,"");n.endsWith("/")&&(n=n.slice(0,-1)),this.setWalletConnectDeepLink(n,s);const d=new URL(n);return d.searchParams.set("startapp",c),d.toString()}n.endsWith("/")||(n=`${n}/`),this.setWalletConnectDeepLink(n,s);const l=encodeURIComponent(t);return`${n}wc?uri=${l}`},async wait(e){return new Promise(t=>{setTimeout(t,e)})},openHref(e,t){const s=this.isTelegram()?"_blank":t;window.open(e,s,"noreferrer noopener")},setWalletConnectDeepLink(e,t){try{localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:e,name:t}))}catch{console.info("Unable to set WalletConnect deep link")}},setWalletConnectAndroidDeepLink(e){try{const[t]=e.split("?");localStorage.setItem(m.WALLETCONNECT_DEEPLINK_CHOICE,JSON.stringify({href:t,name:"Android"}))}catch{console.info("Unable to set WalletConnect android deep link")}},removeWalletConnectDeepLink(){try{localStorage.removeItem(m.WALLETCONNECT_DEEPLINK_CHOICE)}catch{console.info("Unable to remove WalletConnect deep link")}},setModalVersionInStorage(){try{typeof localStorage<"u"&&localStorage.setItem(m.WCM_VERSION,"2.7.0")}catch{console.info("Unable to set Web3Modal version in storage")}},getWalletRouterData(){var e;const t=(e=de.state.data)==null?void 0:e.Wallet;if(!t)throw new Error('Missing "Wallet" view data');return t}},Ie=typeof location<"u"&&(location.hostname.includes("localhost")||location.protocol.includes("https")),p=P({enabled:Ie,userSessionId:"",events:[],connectedWalletId:void 0}),_e={state:p,subscribe(e){return D(p.events,()=>e(we(p.events[p.events.length-1])))},initialize(){p.enabled&&typeof(crypto==null?void 0:crypto.randomUUID)<"u"&&(p.userSessionId=crypto.randomUUID())},setConnectedWalletId(e){p.connectedWalletId=e},click(e){if(p.enabled){const t={type:"CLICK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},track(e){if(p.enabled){const t={type:"TRACK",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}},view(e){if(p.enabled){const t={type:"VIEW",name:e.name,userSessionId:p.userSessionId,timestamp:Date.now(),data:e};p.events.push(t)}}},_=P({chains:void 0,walletConnectUri:void 0,isAuth:!1,isCustomDesktop:!1,isCustomMobile:!1,isDataLoaded:!1,isUiLoaded:!1}),w={state:_,subscribe(e){return D(_,()=>e(_))},setChains(e){_.chains=e},setWalletConnectUri(e){_.walletConnectUri=e},setIsCustomDesktop(e){_.isCustomDesktop=e},setIsCustomMobile(e){_.isCustomMobile=e},setIsDataLoaded(e){_.isDataLoaded=e},setIsUiLoaded(e){_.isUiLoaded=e},setIsAuth(e){_.isAuth=e}},B=P({projectId:"",mobileWallets:void 0,desktopWallets:void 0,walletImages:void 0,chains:void 0,enableAuthMode:!1,enableExplorer:!0,explorerExcludedWalletIds:void 0,explorerRecommendedWalletIds:void 0,termsOfServiceUrl:void 0,privacyPolicyUrl:void 0}),$={state:B,subscribe(e){return D(B,()=>e(B))},setConfig(e){var t,s;_e.initialize(),w.setChains(e.chains),w.setIsAuth(!!e.enableAuthMode),w.setIsCustomMobile(!!((t=e.mobileWallets)!=null&&t.length)),w.setIsCustomDesktop(!!((s=e.desktopWallets)!=null&&s.length)),m.setModalVersionInStorage(),Object.assign(B,e)}};var Ee=Object.defineProperty,se=Object.getOwnPropertySymbols,Oe=Object.prototype.hasOwnProperty,We=Object.prototype.propertyIsEnumerable,ne=(e,t,s)=>t in e?Ee(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Le=(e,t)=>{for(var s in t||(t={}))Oe.call(t,s)&&ne(e,s,t[s]);if(se)for(var s of se(t))We.call(t,s)&&ne(e,s,t[s]);return e};const G="https://explorer-api.walletconnect.com",Q="wcm",X="js-2.7.0";async function K(e,t){const s=Le({sdkType:Q,sdkVersion:X},t),n=new URL(e,G);return n.searchParams.append("projectId",$.state.projectId),Object.entries(s).forEach(([c,d])=>{d&&n.searchParams.append(c,String(d))}),(await fetch(n)).json()}const S={async getDesktopListings(e){return K("/w3m/v1/getDesktopListings",e)},async getMobileListings(e){return K("/w3m/v1/getMobileListings",e)},async getInjectedListings(e){return K("/w3m/v1/getInjectedListings",e)},async getAllListings(e){return K("/w3m/v1/getAllListings",e)},getWalletImageUrl(e){return`${G}/w3m/v1/getWalletImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`},getAssetImageUrl(e){return`${G}/w3m/v1/getAssetImage/${e}?projectId=${$.state.projectId}&sdkType=${Q}&sdkVersion=${X}`}};var Ce=Object.defineProperty,oe=Object.getOwnPropertySymbols,Pe=Object.prototype.hasOwnProperty,Ae=Object.prototype.propertyIsEnumerable,re=(e,t,s)=>t in e?Ce(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Se=(e,t)=>{for(var s in t||(t={}))Pe.call(t,s)&&re(e,s,t[s]);if(oe)for(var s of oe(t))Ae.call(t,s)&&re(e,s,t[s]);return e};const ae=m.isMobile(),E=P({wallets:{listings:[],total:0,page:1},search:{listings:[],total:0,page:1},recomendedWallets:[]}),ke={state:E,async getRecomendedWallets(){const{explorerRecommendedWalletIds:e,explorerExcludedWalletIds:t}=$.state;if(e==="NONE"||t==="ALL"&&!e)return E.recomendedWallets;if(m.isArray(e)){const n={recommendedIds:e.join(",")},{listings:l}=await S.getAllListings(n),c=Object.values(l);c.sort((d,f)=>{const W=e.indexOf(d.id),o=e.indexOf(f.id);return W-o}),E.recomendedWallets=c}else{const{chains:s,isAuth:n}=w.state,l=s==null?void 0:s.join(","),c=m.isArray(t),d={page:1,sdks:n?"auth_v1":void 0,entries:m.RECOMMENDED_WALLET_AMOUNT,chains:l,version:2,excludedIds:c?t.join(","):void 0},{listings:f}=ae?await S.getMobileListings(d):await S.getDesktopListings(d);E.recomendedWallets=Object.values(f)}return E.recomendedWallets},async getWallets(e){const t=Se({},e),{explorerRecommendedWalletIds:s,explorerExcludedWalletIds:n}=$.state,{recomendedWallets:l}=E;if(n==="ALL")return E.wallets;l.length?t.excludedIds=l.map(I=>I.id).join(","):m.isArray(s)&&(t.excludedIds=s.join(",")),m.isArray(n)&&(t.excludedIds=[t.excludedIds,n].filter(Boolean).join(",")),w.state.isAuth&&(t.sdks="auth_v1");const{page:c,search:d}=e,{listings:f,total:W}=ae?await S.getMobileListings(t):await S.getDesktopListings(t),o=Object.values(f),g=d?"search":"wallets";return E[g]={listings:[...E[g].listings,...o],total:W,page:c??1},{listings:o,total:W}},getWalletImageUrl(e){return S.getWalletImageUrl(e)},getAssetImageUrl(e){return S.getAssetImageUrl(e)},resetSearch(){E.search={listings:[],total:0,page:1}}},T=P({open:!1}),J={state:T,subscribe(e){return D(T,()=>e(T))},async open(e){return new Promise(t=>{const{isUiLoaded:s,isDataLoaded:n}=w.state;if(m.removeWalletConnectDeepLink(),w.setWalletConnectUri(e==null?void 0:e.uri),w.setChains(e==null?void 0:e.chains),de.reset("ConnectWallet"),s&&n)T.open=!0,t();else{const l=setInterval(()=>{const c=w.state;c.isUiLoaded&&c.isDataLoaded&&(clearInterval(l),T.open=!0,t())},200)}})},close(){T.open=!1}};var Me=Object.defineProperty,ie=Object.getOwnPropertySymbols,De=Object.prototype.hasOwnProperty,je=Object.prototype.propertyIsEnumerable,le=(e,t,s)=>t in e?Me(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,Ue=(e,t)=>{for(var s in t||(t={}))De.call(t,s)&&le(e,s,t[s]);if(ie)for(var s of ie(t))je.call(t,s)&&le(e,s,t[s]);return e};function Te(){return typeof matchMedia<"u"&&matchMedia("(prefers-color-scheme: dark)").matches}const R=P({themeMode:Te()?"dark":"light"}),ce={state:R,subscribe(e){return D(R,()=>e(R))},setThemeConfig(e){const{themeMode:t,themeVariables:s}=e;t&&(R.themeMode=t),s&&(R.themeVariables=Ue({},s))}},M=P({open:!1,message:"",variant:"success"}),Ve={state:M,subscribe(e){return D(M,()=>e(M))},openToast(e,t){M.open=!0,M.message=e,M.variant=t},closeToast(){M.open=!1}};class $e{constructor(t){this.openModal=J.open,this.closeModal=J.close,this.subscribeModal=J.subscribe,this.setTheme=ce.setThemeConfig,ce.setThemeConfig(t),$.setConfig(t),this.initUi()}async initUi(){if(typeof window<"u"){await me(()=>import("./index-Bp4QIPpg.js"),__vite__mapDeps([0,1,2]));const t=document.createElement("wcm-modal");document.body.insertAdjacentElement("beforeend",t),w.setIsUiLoaded(!0)}}}const xe=Object.freeze(Object.defineProperty({__proto__:null,WalletConnectModal:$e},Symbol.toStringTag,{value:"Module"}));export{m as C,ke as E,J as M,w as O,de as R,ce as T,Ve as a,_e as b,$ as c,xe as i};
@@ -1 +1 @@
1
- .DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.4.0/assets/scene-CZXq89b-.svg);margin-bottom:16px}.SceneDetailPage .deployments+.notice{color:var(--text);text-align:right;margin-top:8px}.SceneDetailPage .description-content{font-size:20px;font-weight:400}
1
+ .DeploymentDetail{border-bottom:1px solid var(--divider);display:flex;align-items:center;padding:24px;margin-bottom:8px;background-color:var(--dark-two);border-radius:10px;gap:45px}.DeploymentDetail:first-child{border-top:1px solid var(--divider)}.DeploymentDetail:last-child{grid-column-end:-1}.DeploymentDetail.clickable:hover{background-color:#24212966;cursor:pointer}.DeploymentDetail .atlas-wrapper{width:95px;height:95px;background-color:var(--card);border-radius:8px}.DeploymentDetail .atlas-wrapper canvas{border-radius:8px}.DeploymentDetail .thumbnail-wrapper{background-color:var(--card);border-radius:8px}.DeploymentDetail .thumbnail-wrapper .thumbnail{width:95px;height:95px;border-radius:8px}.DeploymentDetail .title{font-size:15px;font-weight:600;font-stretch:normal;font-style:normal;line-height:1.6;letter-spacing:normal}.DeploymentDetail .stat{display:flex;flex-direction:column;min-width:128px;margin-right:32px}.DeploymentDetail .status{width:10px;height:10px;margin-bottom:1px;display:inline-block;border-radius:100%;margin-right:6px}.DeploymentDetail .status.online{background-color:#3fff47}.DeploymentDetail .status.needs-sync{background-color:orange}.DeploymentDetail .ui.dropdown{position:absolute;right:0}.DeploymentDetail .Stats .value .world-url{display:flex;flex-direction:row}.DeploymentDetail .Stats .value .world-url .icon.link,.DeploymentDetail .Stats .value .world-url a{color:var(--text)}.DeploymentDetail .Stats .value .world-url .icon.link{margin-left:5px}._modalContainer_5geih_1.ui.modal{width:740px;height:740px;display:flex!important;flex-direction:column;align-items:center;justify-content:center}._modalContainer_5geih_1 .dcl.modal-navigation{width:100%}._modalContainer_5geih_1 .dcl.modal-navigation-title{max-width:560px;text-align:center}._subtitle_5geih_20{font-size:14px;line-height:16px;text-align:center;max-width:560px}._modalContainer_5geih_1.ui.modal>._content_5geih_27{flex:1;display:flex;flex-direction:column;justify-content:space-between;align-items:center}._actions_5geih_35{display:flex;flex-direction:column;gap:15px;align-items:center;justify-content:center;width:100%}._actions_5geih_35 button{width:100%;max-width:476px}._actions_5geih_35 button.ui.button:not(:first-child){margin-left:0}._loadingMessage_5geih_53{display:flex}._loader_5geih_57.ui.loader.inline{margin-right:10px}.SceneDetailPage{margin-top:24px}.SceneDetailPage .dcl.section.large{margin-bottom:26px}.SceneDetailPage .dcl.back{margin-right:8px}.SceneDetailPage .header-image{height:347px;width:100%;background-color:var(--card);background-size:cover;background-position:center;object-fit:cover}.SceneDetailPage .capitalize .ui.header:not(.sub){text-transform:capitalize}.SceneDetailPage .header.name{display:flex;align-items:baseline}.SceneDetailPage .header.name .icon.edit{margin-left:21px;font-size:20px;cursor:pointer}.SceneDetailPage .status-container{margin-left:40px}.SceneDetailPage .status-badge{height:22px;padding:2px 8px;border-radius:34px;color:var(--shadows);font-weight:500;margin-right:10px}.SceneDetailPage .button.download-button,.SceneDetailPage .button.download-button:hover{background-color:#fff;color:var(--shadows)}.SceneDetailPage .button.edit-button .icon.edit{margin-right:6.85px}.SceneDetailPage .dcl.column.actions{margin-left:20px}.SceneDetailPage .dcl.section.medium.no-margin-bottom{margin-bottom:0}.SceneDetailPage .dcl.section .ui.header.sub{margin-bottom:32px;color:var(--text);font-size:20px;font-weight:400}.SceneDetailPage .empty-deployments-container{display:flex;flex-direction:column;padding:28px;background-color:var(--dark-two);color:var(--text);border:none}.SceneDetailPage .empty-deployments-thumbnail{height:86px;width:86px;background-position:center;background-size:contain;background-repeat:no-repeat;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.4.1-13507278405.commit-84ed1ac/assets/scene-CZXq89b-.svg);margin-bottom:16px}.SceneDetailPage .deployments+.notice{color:var(--text);text-align:right;margin-top:8px}.SceneDetailPage .description-content{font-size:20px;font-weight:400}
@@ -0,0 +1 @@
1
+ .ItemCard .image-wrapper{display:flex;align-items:center;text-align:center}.ItemCard .content{background:none;margin-top:16px;text-align:center}.ItemCard .content .text{font-size:17px;max-width:248px;overflow:hidden;text-overflow:ellipsis}.ItemCard .subtitle{margin-top:5px;color:var(--secondary-text)}.ui.cards>.ui.card.link.ItemCard.is-dragging{transform:translateY(0);border:1px solid var(--primary)!important}.ItemCard.is-dragging .ItemImage{border:1px solid var(--primary)}.ItemCard:hover .options-dropdown.ui.dropdown>.dropdown.icon{visibility:visible}.ItemCard .options-dropdown.ui.dropdown>.dropdown.icon{visibility:hidden}@media (max-width: 1200px){.ItemCard .content .text{max-width:215px}}._ItemRow_xmdia_1:hover{background-color:#24212966;color:var(--text);cursor:pointer}._image_xmdia_7{width:64px;height:64px;margin-right:10px;border-radius:8px;overflow:hidden;flex:none}._image_xmdia_7 img{width:100%;height:100%}._name_xmdia_21{display:inline-block;margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._title_xmdia_29,._imageColumn_xmdia_30{display:flex;align-items:center}._published_xmdia_35{color:var(--light-blue-raw)}.CollectionCard .content{margin-top:16px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:center}.CollectionCard .content .text{font-size:17px;max-width:248px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.CollectionCard .subtitle{margin-top:5px;max-width:248px;color:var(--secondary-text)}.CollectionCard .CollectionBadge{margin-left:5px}.CollectionCard .sparkles{width:54px;height:56px;margin-bottom:5px;background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.4.1-13507278405.commit-84ed1ac/assets/sparkles-C-WJN0Gh.svg);background-repeat:no-repeat}.CollectionCard.is-over .CollectionImage{border:1px solid var(--primary)!important}.CollectionCard .empty-collection-options .icon:before{color:var(--text)!important}.CollectionCard:hover .options-dropdown.ui.dropdown>.dropdown.icon{visibility:visible}.CollectionCard .options-dropdown.ui.dropdown>.dropdown.icon{visibility:hidden}.CollectionCard .pending-migration{text-transform:uppercase;padding:4px 8px;border-radius:32px;display:inline-flex;align-items:center;gap:4px;color:#ffbc5b;background-color:#ffbc5b33;margin-top:16px}.CollectionCard .pending-migration .icon{height:18px}@media (max-width: 1200px){.CollectionCard .content .text{max-width:215px}}.delete-collection-confirm .header{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}._CollectionRow_k7d4q_1:hover{background-color:#24212966;color:var(--text);cursor:pointer}._image_k7d4q_7{width:64px;height:64px;margin-right:10px;border-radius:8px;overflow:hidden;flex:none}._name_k7d4q_16{display:inline-block;margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}._title_k7d4q_24,._imageColumn_k7d4q_25{display:flex;align-items:center}._published_k7d4q_30{color:var(--light-blue-raw)}.CollectionsPage .ui.cards{margin:0}.CollectionsPage .empty{margin-top:28px;padding:112px 0;width:100%;border-radius:8px;border:1px solid var(--divider);justify-content:center;color:var(--secondary-text);text-align:center;line-height:28px;font-size:17px}.CollectionsPage .empty .header.title{margin:0}.CollectionsPage .empty .empty-description{margin:8px auto 34px;width:500px}.CollectionsPage .empty .create-new-wrapper{display:flex;justify-content:center}.CollectionsPage .empty .create-new{width:240px;height:204px;position:relative;background-color:rgba(var(--bluish-steel-raw),.16);border-radius:8px;background-position:50% 35%;cursor:pointer}.CollectionsPage .empty .create-new:first-child{margin-right:24px}.CollectionsPage .empty .create-new>.text{position:absolute;flex:1 1;color:#fff;bottom:31px;width:100%}.CollectionsPage .empty .create-new-item{background-image:url("data:image/svg+xml,%3csvg%20width='96'%20height='70'%20viewBox='0%200%2096%2070'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M94.7941%2054.5156H74.6855L79.6698%205.31259C79.6698%203.69125%2077.9661%202.41876%2069.6516%201.4775C64.084%200.847025%2056.4659%200.5%2048.201%200.5C39.9361%200.5%2032.318%200.847025%2026.7498%201.4775C18.4353%202.41876%2016.7316%203.69125%2016.7316%205.31259L21.7303%2054.5156H1.20588C0.53989%2054.5156%200%2055.0595%200%2055.7304C0%2057.5657%201.48584%2059.3693%204.41633%2061.0912C6.95671%2062.5838%2010.6085%2064.027%2014.9768%2065.2659C24.4687%2067.9566%2036.5783%2069.5%2048.201%2069.5C59.8068%2069.5%2071.8444%2067.9562%2081.2276%2065.2648C85.5422%2064.0272%2089.1474%2062.5826%2091.6534%2061.087C94.5377%2059.366%2096%2057.5641%2096%2055.7304C96%2055.0595%2095.4601%2054.5156%2094.7941%2054.5156ZM28.2371%203.76191C33.5781%203.22518%2040.6681%202.92958%2048.201%202.92958C55.7339%202.92958%2062.8239%203.22518%2068.1649%203.76191C73.4374%204.29176%2075.7292%204.92365%2076.6979%205.31239C75.7296%205.70071%2073.4378%206.3324%2068.1637%206.86185C62.8231%207.39818%2055.7335%207.69357%2048.201%207.69357C40.6685%207.69357%2033.5799%207.39798%2028.2375%206.86124C22.9668%206.3318%2020.6744%205.70051%2019.7047%205.31218C20.6738%204.92325%2022.9656%204.29176%2028.2371%203.76191ZM20.2817%208.04769C19.9589%207.96103%2019.6639%207.87195%2019.3895%207.78023L22.8556%2041.7797C25.5439%2042.0648%2028.2326%2042.3092%2030.8623%2042.5027C31.5103%2042.549%2032.0054%2043.104%2031.9822%2043.758C31.9589%2044.4121%2031.4255%2044.9299%2030.7758%2044.9293C30.7469%2044.9293%2030.7165%2044.9281%2030.6866%2044.9258C28.1961%2044.7424%2025.6531%2044.5138%2023.1074%2044.2492L24.1662%2054.633C40.9818%2056.5169%2055.4425%2056.5169%2072.2488%2054.633L73.3112%2044.2097C64.9039%2045.1073%2056.4558%2045.5605%2048.0014%2045.5676C44.0282%2045.5676%2040.0619%2045.4656%2036.0803%2045.2619C35.4151%2045.2279%2034.9033%2044.6572%2034.937%2043.9871C34.9708%2043.317%2035.5373%2042.8014%2036.2025%2042.8354C48.6658%2043.465%2061.159%2043.0979%2073.5646%2041.7374L77.0249%207.77658C76.75%207.86891%2076.4539%207.9588%2076.1301%208.04586C74.5092%208.48157%2072.236%208.8624%2069.3734%209.17744C63.8348%209.78726%2056.3155%2010.1232%2048.201%2010.1232C40.0939%2010.1232%2032.5784%209.78747%2027.0392%209.17805C24.1777%208.86321%2021.9042%208.48278%2020.2817%208.04769ZM80.5678%2062.928C71.3902%2065.56%2059.5933%2067.0704%2048.2016%2067.0704C36.7904%2067.0704%2024.9189%2065.5602%2015.6308%2062.9272C7.79601%2060.7059%204.28067%2058.4424%203.01068%2056.9452H22.9981L23.2493%2056.9737C40.7442%2058.9781%2055.669%2058.9781%2073.1554%2056.9757L73.4183%2056.9452H93.0339C91.6488%2058.6329%2087.6232%2060.9042%2080.5672%2062.928H80.5678ZM42.7852%2028.6841L41.9678%2033.4888C41.8902%2033.9446%2042.0762%2034.4052%2042.4475%2034.677C42.8189%2034.9488%2043.3112%2034.9846%2043.7175%2034.7694L48%2032.5014L52.2825%2034.769C52.6888%2034.9842%2053.1811%2034.9484%2053.5525%2034.6766C53.9238%2034.4048%2054.1098%2033.9442%2054.0322%2033.4884L53.2148%2028.6837L56.6799%2025.2817C57.0087%2024.9589%2057.1271%2024.4761%2056.9852%2024.0362C56.8433%2023.5964%2056.4658%2023.2759%2056.0115%2023.2095L51.2225%2022.5095L49.0815%2018.1383C48.8784%2017.7235%2048.4591%2017.4609%2048%2017.4609C47.5409%2017.4609%2047.1216%2017.7235%2046.9185%2018.1383L44.7775%2022.5095L39.9885%2023.2095C39.5342%2023.2759%2039.1567%2023.5964%2039.0148%2024.0362C38.8729%2024.4761%2038.9913%2024.9589%2039.3201%2025.2817L42.7852%2028.6841ZM45.7514%2024.8217C46.1443%2024.7642%2046.484%2024.5157%2046.6597%2024.157L48%2021.4205L49.3403%2024.157C49.516%2024.5157%2049.8557%2024.7642%2050.2486%2024.8217L53.2466%2025.2598L51.0774%2027.3902C50.7932%2027.6692%2050.6635%2028.0712%2050.7305%2028.4652L51.2424%2031.4737L48.5611%2030.0536C48.2098%2029.8675%2047.7902%2029.8675%2047.4389%2030.0536L44.7576%2031.4737L45.2695%2028.4652C45.3365%2028.0712%2045.2068%2027.6692%2044.9226%2027.3902L42.7544%2025.2598L45.7514%2024.8217Z'%20fill='white'/%3e%3c/svg%3e");background-repeat:no-repeat}.CollectionsPage .empty .create-new-collection{background-image:url("data:image/svg+xml,%3csvg%20width='80'%20height='68'%20viewBox='0%200%2080%2068'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M41.0076%2012.269L41.0075%2012.2691L41.0168%2012.2788C41.9992%2013.2997%2043.3962%2013.8831%2044.8227%2013.8831H70.143C74.7432%2013.8831%2078.4998%2017.6467%2078.4998%2022.2832L78.4998%2058.0694L78.4998%2058.0761C78.5204%2062.6953%2074.7818%2066.4778%2070.1849%2066.5H70.1792H9.85685C5.25666%2066.5%201.5%2062.7363%201.5%2058.0997V9.90034C1.5%205.26392%205.25664%201.50022%209.85681%201.50036H9.85685L27.0684%201.50038L27.077%201.50033C29.3256%201.48732%2031.5245%202.33413%2033.1219%203.92557L41.0076%2012.269Z'%20stroke='white'%20stroke-width='3'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M58.5227%2046.9194H50.563L52.536%2026.9529C52.536%2026.295%2051.8616%2025.7786%2048.5704%2025.3967C46.3666%2025.1408%2043.3511%2025%2040.0796%2025C36.808%2025%2033.7925%2025.1408%2031.5885%2025.3967C28.2973%2025.7786%2027.6229%2026.295%2027.6229%2026.9529L29.6016%2046.9194H21.4773C21.2137%2046.9194%2021%2047.1401%2021%2047.4123C21%2048.1571%2021.5881%2048.889%2022.7481%2049.5877C23.7537%2050.1934%2025.1992%2050.7791%2026.9283%2051.2818C30.6855%2052.3737%2035.4789%2053%2040.0796%2053C44.6735%2053%2049.4384%2052.3735%2053.1526%2051.2814C54.8605%2050.7791%2056.2875%2050.1929%2057.2795%2049.586C58.4212%2048.8877%2059%2048.1564%2059%2047.4123C59%2047.1401%2058.7863%2046.9194%2058.5227%2046.9194ZM32.1772%2026.3237C34.2913%2026.1059%2037.0978%2025.9859%2040.0796%2025.9859C43.0613%2025.9859%2045.8678%2026.1059%2047.9819%2026.3237C50.069%2026.5387%2050.9761%2026.7951%2051.3596%2026.9529C50.9763%2027.1104%2050.0691%2027.3668%2047.9815%2027.5816C45.8675%2027.7993%2043.0612%2027.9191%2040.0796%2027.9191C37.0979%2027.9191%2034.292%2027.7992%2032.1773%2027.5814C30.091%2027.3665%2029.1836%2027.1104%2028.7998%2026.9528C29.1834%2026.7949%2030.0905%2026.5387%2032.1772%2026.3237ZM29.0282%2028.0628C28.9004%2028.0277%2028.7836%2027.9915%2028.675%2027.9543L30.047%2041.7512C31.1111%2041.8669%2032.1754%2041.966%2033.2163%2042.0446C33.4728%2042.0634%2033.6688%2042.2886%2033.6596%2042.554C33.6504%2042.8194%2033.4392%2043.0295%2033.1821%2043.0293C33.1706%2043.0293%2033.1586%2043.0288%2033.1468%2043.0279C32.1609%2042.9534%2031.1543%2042.8607%2030.1467%2042.7533L30.5658%2046.967C37.222%2047.7315%2042.946%2047.7315%2049.5985%2046.967L50.019%2042.7373C46.6911%2043.1015%2043.3471%2043.2854%2040.0006%2043.2883C38.4278%2043.2883%2036.8578%2043.2469%2035.2818%2043.1643C35.0185%2043.1505%2034.8159%2042.9189%2034.8292%2042.6469C34.8426%2042.375%2035.0669%2042.1658%2035.3302%2042.1796C40.2635%2042.4351%2045.2088%2042.2861%2050.1193%2041.734L51.489%2027.9528C51.3802%2027.9903%2051.263%2028.0268%2051.1348%2028.0621C50.4932%2028.2389%2049.5934%2028.3934%2048.4603%2028.5213C46.2679%2028.7687%2043.2916%2028.905%2040.0796%2028.905C36.8705%2028.905%2033.8956%2028.7688%2031.703%2028.5215C30.5703%2028.3938%2029.6704%2028.2394%2029.0282%2028.0628ZM52.8914%2050.3331C49.2586%2051.4012%2044.589%2052.0141%2040.0798%2052.0141C35.5628%2052.0141%2030.8637%2051.4013%2027.1872%2050.3328C24.0859%2049.4314%2022.6944%2048.5129%2022.1917%2047.9053H30.1034L30.2029%2047.9169C37.1279%2048.7302%2043.0356%2048.7302%2049.9574%2047.9177L50.0614%2047.9053H57.8259C57.2776%2048.5902%2055.6842%2049.5118%2052.8912%2050.3331H52.8914ZM37.9358%2036.437L37.6123%2038.3868C37.5815%2038.5717%2037.6552%2038.7586%2037.8021%2038.8689C37.9491%2038.9792%2038.144%2038.9938%2038.3049%2038.9064L40%2037.9861L41.6951%2038.9063C41.856%2038.9936%2042.0508%2038.979%2042.1978%2038.8688C42.3448%2038.7585%2042.4185%2038.5715%2042.3877%2038.3866L42.0642%2036.4369L43.4358%2035.0563C43.5659%2034.9254%2043.6128%2034.7294%2043.5566%2034.5509C43.5005%2034.3724%2043.351%2034.2424%2043.1712%2034.2154L41.2756%2033.9314L40.4281%2032.1576C40.3477%2031.9893%2040.1817%2031.8827%2040%2031.8827C39.8183%2031.8827%2039.6523%2031.9893%2039.5719%2032.1576L38.7244%2033.9314L36.8288%2034.2154C36.649%2034.2424%2036.4995%2034.3724%2036.4434%2034.5509C36.3872%2034.7294%2036.4341%2034.9254%2036.5642%2035.0563L37.9358%2036.437ZM39.1099%2034.8697C39.2655%2034.8464%2039.3999%2034.7455%2039.4694%2034.5999L40%2033.4895L40.5305%2034.5999C40.6001%2034.7455%2040.7345%2034.8464%2040.8901%2034.8697L42.0768%2035.0475L41.2181%2035.9119C41.1056%2036.0252%2041.0543%2036.1883%2041.0808%2036.3482L41.2835%2037.569L40.2221%2036.9928C40.0831%2036.9173%2039.9169%2036.9173%2039.7779%2036.9928L38.7165%2037.569L38.9192%2036.3482C38.9457%2036.1883%2038.8944%2036.0252%2038.7819%2035.9119L37.9236%2035.0475L39.1099%2034.8697Z'%20fill='white'/%3e%3c/svg%3e");background-repeat:no-repeat}.CollectionsPage .ui.cards .ui.card{width:248px;background-color:transparent;box-shadow:none}.CollectionsPage .card .image-wrapper{height:248px;padding:15px}.CollectionsPage .filters{margin-bottom:20px}.dcl.page.LoggedInDetailPage.CollectionsPage{padding:0 24px}.CollectionsPage .filters .dcl.row.actions .ui.dropdown .ui.button{width:16px;height:16px;box-sizing:content-box;padding:5px 10px;border-radius:4px;border:solid 1px var(--gray)}.CollectionsPage .filters .dcl.row.actions .ui.button.open-editor{display:flex;align-items:center}.CollectionsPage .filters .dcl.row.actions .ui.button.open-editor .Icon{margin-right:6px}.CollectionsPage .filters .dcl.row.actions .ui.button.open-editor:hover{transform:translateY(0)}.CollectionsPage .Chip{padding:4px;height:28px;width:32px}.CollectionsPage .Chip.grid{border-radius:4px 0 0 4px;margin-left:16px}.CollectionsPage .Chip.list{border-radius:0 4px 4px 0}.CollectionsPage .is-card{transition:transform .2s ease-in-out,-webkit-transform .2s ease-in-out;box-shadow:none;transform:translateY(0)}.CollectionsPage .is-card:nth-child(4n){margin-right:0}.CollectionsPage .is-card:hover{transform:translateY(-4px)}.CollectionsPage .is-card .is-image{aspect-ratio:1 / 1;transition:box-shadow .2s ease-in-out;width:100%;overflow:hidden;border-radius:8px!important}.CollectionsPage .is-card:hover .is-image{box-shadow:var(--shadow-2)}.CollectionsPage .is-card .is-image .is-image{border-radius:0!important;box-shadow:none}.dcl.page.CollectionsPage .ui.container{width:100%;max-width:100%!important}.CollectionsPage .ui.container .ui.cards{display:grid;grid-template-columns:repeat(auto-fill,minmax(248px,1fr));gap:20px}.CollectionsPage .dcl.tabs.fullscreen .dcl.column.right{float:right;padding:19px 0}.CollectionsPage .pagination{width:100%;display:flex;justify-content:center;margin-top:16px}.CollectionsPage .ui.pagination.menu{margin-top:16px}.CollectionsPage .dcl.tabs .ui.container{margin-bottom:20px}.CollectionsPage .collections-main-actions{display:flex;justify-content:end;gap:20px;min-height:74px}.CollectionsPage .collections-main-actions>:first-child{flex:1}.CollectionsPage .dcl.field .collections-search-field.ui.input input{padding:8px;background:var(--shadows);border-radius:10px;border:none;font-size:16px}.CollectionsPage .collections-main-actions>.actions{align-self:baseline;justify-self:end;flex:none}.CollectionsPage .collections-icon{width:32px;height:32px;margin-bottom:20px}.CollectionsPage .action-tabs-container{display:flex;align-items:center;flex-direction:row;gap:8px}.CollectionsPage .banner-container{margin-bottom:24px}
@@ -0,0 +1 @@
1
+ ._container_12bci_1{background-color:var(--dark-two);border-radius:10px;padding:22px}._container_12bci_1 ._used_12bci_7{font-weight:600;font-size:16px;margin-bottom:8px}._container_12bci_1 ._description_12bci_13{color:#cfcdd4;font-size:14px;font-weight:400;margin-bottom:12px}._container_12bci_1 ._description_12bci_13 ._link_12bci_20{color:#fff;cursor:pointer;text-decoration:underline;font-weight:700}._container_12bci_1 ._space_12bci_27{display:flex;align-items:center;gap:1rem}._container_12bci_1 ._space_12bci_27 ._current_12bci_33{flex:1;font-size:1.5rem}._container_12bci_1 ._space_12bci_27 ._bar_12bci_38{flex:1;margin-bottom:0!important;background-color:#a09ba8!important}._container_12bci_1 ._space_12bci_27 ._bar_12bci_38.ui.progress .bar{background-color:#ff2d55}._worldUrl_1sb6i_1{display:flex;width:100%;justify-content:space-between}._rightContainer_1sb6i_7{display:flex;align-items:center;margin-right:20px}._rightContainer_1sb6i_7 ._copyUrn_1sb6i_13{color:var(--text)}.WorldListPage .filters{margin-bottom:16px}.WorldListPage .filters .ui.header.items-count,.WorldListPage .ui.table>thead>tr th{color:var(--text)}.WorldListPage .TableRow{cursor:default}.WorldListPage .empty-names-container{display:flex;flex-direction:column;text-align:center}.WorldListPage .empty-names-container .empty-icon{margin-bottom:30px;height:87px;width:87px}.WorldListPage .empty-names-container .empty-icon.dcl-icon{background-image:url(https://cdn.decentraland.org/@dcl/builder-site/7.4.1-13507278405.commit-84ed1ac/assets/dcl-empty-state-icon-BDDqmD-V.svg)}.WorldListPage .empty-names-container .empty-icon.ens-icon{background-image:url("data:image/svg+xml,%3csvg%20width='87'%20height='87'%20viewBox='0%200%2087%2087'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3ccircle%20cx='43.5'%20cy='43.5'%20r='43.5'%20fill='white'/%3e%3cg%20clip-path='url(%23clip0_119_22392)'%3e%3cpath%20d='M22.9004%2037.517C23.5096%2038.8466%2025.0327%2041.5058%2025.0327%2041.5058L42.4718%2011.8638L25.4896%2024.0647C24.4996%2024.7686%2023.6619%2025.7071%2023.0527%2026.8021C21.4534%2030.1652%2021.4534%2034.0757%2022.9004%2037.517Z'%20fill='url(%23paint0_linear_119_22392)'/%3e%3cpath%20d='M16.0466%2047.215C16.4274%2052.9244%2019.2451%2058.2427%2023.662%2061.684L42.4719%2075.1363C42.4719%2075.1363%2030.6681%2057.6952%2020.7681%2040.3324C19.7781%2038.5335%2019.0928%2036.5%2018.7881%2034.3884C18.6358%2033.4498%2018.6358%2032.5113%2018.7881%2031.5728C18.5597%2032.042%2018.0266%2033.0588%2018.0266%2033.0588C17.0366%2035.1705%2016.3512%2037.4386%2015.9705%2039.7849C15.742%2042.2877%2015.742%2044.7904%2016.0466%2047.215Z'%20fill='%23A0A8D4'/%3e%3cpath%20d='M64.0234%2049.5615C63.4141%2048.2319%2061.8911%2045.5728%2061.8911%2045.5728L44.4519%2075.1365L61.5103%2063.0138C62.5003%2062.3099%2063.338%2061.3714%2063.9472%2060.2764C65.4703%2056.9134%2065.5464%2053.0028%2064.0234%2049.5615Z'%20fill='url(%23paint1_linear_119_22392)'/%3e%3cpath%20d='M70.9534%2039.7851C70.5726%2034.0757%2067.7549%2028.7574%2063.338%2025.3161L44.5281%2011.8638C44.5281%2011.8638%2056.3319%2029.3048%2066.2318%2046.6677C67.2218%2048.4665%2067.9072%2050.5%2068.2118%2052.6117C68.3641%2053.5503%2068.3641%2054.4888%2068.2118%2055.4273C68.4403%2054.9581%2068.9734%2053.9413%2068.9734%2053.9413C69.9634%2051.8296%2070.6487%2049.5615%2071.0295%2047.2934C71.1818%2044.7124%2071.1818%2042.2879%2070.9534%2039.7851Z'%20fill='%23A0A8D4'/%3e%3cpath%20d='M23.0535%2026.8021C23.6627%2025.7071%2024.4242%2024.7686%2025.4904%2024.0647L42.4726%2011.8638L25.0335%2041.4275C25.0335%2041.4275%2023.5104%2038.7684%2022.9012%2037.4388C21.4543%2034.0757%2021.4543%2030.1652%2023.0535%2026.8021ZM16.0474%2047.2152C16.4281%2052.9246%2019.2458%2058.2429%2023.6627%2061.6842L42.4726%2075.1365C42.4726%2075.1365%2030.6688%2057.6954%2020.7689%2040.3326C19.7789%2038.5337%2019.0935%2036.5002%2018.7889%2034.3885C18.6366%2033.45%2018.6366%2032.5115%2018.7889%2031.573C18.5604%2032.0422%2018.0273%2033.059%2018.0273%2033.059C17.0373%2035.1707%2016.352%2037.4388%2015.9712%2039.7851C15.7427%2042.2879%2015.7427%2044.7906%2016.0474%2047.2152ZM64.0241%2049.5615C63.4149%2048.2319%2061.8918%2045.5727%2061.8918%2045.5727L44.4526%2075.1365L61.511%2063.0138C62.501%2062.3099%2063.3387%2061.3714%2063.9479%2060.2764C65.471%2056.9133%2065.5472%2053.0028%2064.0241%2049.5615ZM70.8779%2039.8633C70.4972%2034.1539%2067.6795%2028.8356%2063.2626%2025.3943L44.5288%2011.8638C44.5288%2011.8638%2056.3326%2029.3048%2066.2325%2046.6677C67.2225%2048.4665%2067.9079%2050.5%2068.2125%2052.6117C68.3649%2053.5503%2068.3649%2054.4888%2068.2125%2055.4273C68.441%2054.958%2068.9741%2053.9413%2068.9741%2053.9413C69.9641%2051.8296%2070.6495%2049.5615%2071.0302%2047.2934C71.1825%2044.7124%2071.1825%2042.2879%2070.8779%2039.8633Z'%20fill='url(%23paint2_linear_119_22392)'/%3e%3c/g%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_119_22392'%20x1='43.265'%20y1='12.6053'%20x2='20.2441'%20y2='36.9051'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.58'%20stop-color='%23A0A8D4'/%3e%3cstop%20offset='0.73'%20stop-color='%238791C7'/%3e%3cstop%20offset='0.91'%20stop-color='%236470B4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear_119_22392'%20x1='43.735'%20y1='74.4471'%20x2='66.7471'%20y2='50.1648'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20offset='0.58'%20stop-color='%23A0A8D4'/%3e%3cstop%20offset='0.73'%20stop-color='%238791C7'/%3e%3cstop%20offset='0.91'%20stop-color='%236470B4'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear_119_22392'%20x1='43.4798'%20y1='11.551'%20x2='43.4798'%20y2='75.3711'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23513EFF'/%3e%3cstop%20offset='0.18'%20stop-color='%235157FF'/%3e%3cstop%20offset='0.57'%20stop-color='%235298FF'/%3e%3cstop%20offset='1'%20stop-color='%2352E5FF'/%3e%3c/linearGradient%3e%3cclipPath%20id='clip0_119_22392'%3e%3crect%20width='55.3636'%20height='63.2727'%20fill='white'%20transform='translate(15.8181%2011.8638)'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e")}.WorldListPage .empty-names-container .empty-title{font-size:24px;font-weight:600;line-height:29px;color:var(--text)}.WorldListPage .empty-names-container .empty-description{font-size:14px;font-weight:500;line-height:24px;color:var(--text);max-width:612px}.WorldListPage .empty-names-container .empty-action{margin-top:40px;width:372px}.WorldListPage .Icon.right-round-arrow{margin-bottom:-2px}.WorldListPage .TableRow .dcl.column.subdomain-wrapper{display:flex;flex:none;flex-direction:row}.WorldListPage .TableRow .empty-url{color:#fffc;font-style:italic}.WorldListPage .TableRow .publish-scene{display:flex;width:100%;justify-content:space-between;align-items:center}.WorldListPage .TableRow .publish-scene span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;max-width:100px}.WorldListPage .TableRow .publish-scene button{margin-right:20px;width:168px}.WorldListPage .TableRow .world-status.active{color:#34ce76}.WorldListPage .TableRow .world-status.inactive{color:#cfcdd4}.WorldListPage .TableRow .world-status.warning{color:var(--danger)}.WorldListPage .TableRow .world-status.blocked{color:var(--error)}.WorldListPage .ui.pagination{width:100%;display:flex;justify-content:center}.WorldListPage .ui.pagination .item[type=nextItem],.WorldListPage .ui.pagination .item[type=prevItem]{position:absolute;background-color:var(--secondary)}.WorldListPage .ui.pagination .item[type=prevItem]{left:0}.WorldListPage .ui.pagination .item[type=nextItem]{right:0}.WorldListPage .pagination-section{width:100%}.WorldListPage .ui.sub.header.items-count{flex:1 0 auto;text-transform:uppercase;font-size:13px;line-height:18px;font-weight:500}.WorldListPage .actions{display:flex;flex:1 0 auto;align-items:center;justify-content:flex-end;font-size:13px;line-height:18px;text-transform:uppercase}.WorldListPage .actions .ui.button.basic{width:16px;height:16px;box-sizing:content-box;padding:5px 10px;border-radius:4px;border:solid 1px var(--gray)}.WorldListPage .claim-name .Icon{display:block}.WorldListPage .ui.dropdown{margin-right:20px}.WorldListPage .worlds-storage{margin-bottom:24px}.WorldListPage .insufficient-storage-message{display:flex;align-items:center;gap:1rem;background-color:var(--dark-two);border-radius:10px;padding:22px;margin-bottom:24px}