@dcl/builder-site 7.21.2 → 7.21.3-19896835659.commit-bb1d19a
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/assets/{Back-DBc-1vBx.js → Back-Bt1TpmNC.js} +1 -1
- package/assets/{CollectionProvider.container-CrHF62H9.js → CollectionProvider.container-CdZDU931.js} +1 -1
- package/assets/{CollectionStatus.container-Ck64n9f3.js → CollectionStatus.container-D7SF6GBG.js} +1 -1
- package/assets/{ConfirmDelete-BQd9EOmm.js → ConfirmDelete-BvCbqgkr.js} +1 -1
- package/assets/{FileSaver.min-bsL10Ro_.js → FileSaver.min-DkBGT7wg.js} +1 -1
- package/assets/{ItemProvider.container-Cbkly4MW.js → ItemProvider.container-BE8u0Rvw.js} +2 -2
- package/assets/{JumpIn.container-jVEKSOXg.js → JumpIn.container-BA-hVJA8.js} +1 -1
- package/assets/{LandAction-BN__6nk1.js → LandAction-ClUpTbS0.js} +1 -1
- package/assets/{LandProviderPage-6uFqDW1t.js → LandProviderPage-Cle8Kso_.js} +1 -1
- package/assets/{LoggedInDetailPage.container-CzPOYbHr.js → LoggedInDetailPage.container-DWMoMSsT.js} +1 -1
- package/assets/{Navigation-UvvLkIhO.css → Navigation-BvYpwaZ8.css} +1 -1
- package/assets/{Navigation.container-zriX5zTq.js → Navigation.container-9A40G-C8.js} +1 -1
- package/assets/{NotFound-Bvndb2kC.js → NotFound-BGRBV5Uq.js} +1 -1
- package/assets/{OptionsDropdown-DGUcotEU.js → OptionsDropdown-CG8mCbxa.js} +1 -1
- package/assets/{RentalPeriod-BNaqZG4R.js → RentalPeriod-Em0xOmR0.js} +1 -1
- package/assets/{SDKTag-BQW0-0PP.js → SDKTag--yigH3bT.js} +1 -1
- package/assets/{SceneStats.container-D9cC9CyJ.js → SceneStats.container-CFQr-vWl.js} +1 -1
- package/assets/{SignInRequired-BesSl-uu.js → SignInRequired-B_3SXeXM.js} +1 -1
- package/assets/{ThirdPartyKindBadge-SbI32IAq.js → ThirdPartyKindBadge-BClaXwJI.js} +1 -1
- package/assets/{dataReader-Ba0Qfm0C.js → dataReader-BLycT3A3.js} +1 -1
- package/assets/{date-CQFozb1v.js → date-BuuPIXis.js} +1 -1
- package/assets/{fortmatic-DhMsr8rd.js → fortmatic-DJEz0rp3.js} +1 -1
- package/assets/{hooks-B7lAA488.js → hooks-aEto244t.js} +1 -1
- package/assets/index-3fCnTMv0.css +1 -0
- package/assets/{index-Cr_mRm0f.js → index-8iYCGnTs.js} +1 -1
- package/assets/{index-DRjHz-4W.js → index-BD8iJDzG.js} +1 -1
- package/assets/{index-DTDyEcLh.js → index-BHRIVcTs.js} +19 -19
- package/assets/{index-DGSF2LKw.js → index-BICUfUCl.js} +1 -1
- package/assets/{index-BfkmPalb.js → index-BQ0GFn_M.js} +1 -1
- package/assets/{index-CXldJysI.js → index-Bhseic3g.js} +1 -1
- package/assets/{index-B1s4cab3.js → index-BknYlUwd.js} +1 -1
- package/assets/{index-B8ErdMLy.css → index-BosWvral.css} +7 -7
- package/assets/{index-bX1evXRS.js → index-Br6hHsA1.js} +1 -1
- package/assets/{index-CSeYYmb9.js → index-CG8pSyWD.js} +1 -1
- package/assets/{index-CvE4yvoR.js → index-CGrCbrif.js} +1 -1
- package/assets/{index-larBLSdP.js → index-CJppakqi.js} +2 -2
- package/assets/{index-BNWFSvsr.css → index-CLw4Lv2v.css} +1 -1
- package/assets/{index-BGteFbti.css → index-CTAssOyf.css} +1 -1
- package/assets/index-CWPKklZI.js +2 -0
- package/assets/{index-jgmmEIg4.js → index-CZ8dfrU0.js} +1 -1
- package/assets/{index-CzzTGG0S.js → index-CbjNJ2Kx.js} +1 -1
- package/assets/{index-BxDlBBeP.js → index-CdewbTl9.js} +1 -1
- package/assets/{index-Bo5Cz4b1.js → index-CdmO0FNu.js} +1 -1
- package/assets/index-Cl_Vz47v.css +1 -0
- package/assets/index-Co_sF4mN.js +1 -0
- package/assets/{index-CqlRG6CV.js → index-D2M0UdRW.js} +1 -1
- package/assets/{index-D1gFlGB9.js → index-D39rSukq.js} +1 -1
- package/assets/{index-CcxrEafx.js → index-DAAeQbXS.js} +1 -1
- package/assets/{index-0Xvf2jZ3.js → index-DAx-r4m3.js} +1 -1
- package/assets/{index-D_rmY8ZP.js → index-DGucDtQe.js} +1 -1
- package/assets/{index-DirkaOPQ.js → index-DMJQXYRd.js} +1 -1
- package/assets/{index-DPyDxVwa.js → index-DOh8-nXu.js} +1 -1
- package/assets/index-DYzSJInl.js +1 -0
- package/assets/{index-BWDC11Ig.js → index-Db5vWMok.js} +1 -1
- package/assets/{index-QPDXbja9.js → index-DhWMukFk.js} +1 -1
- package/assets/{index-D_-h39nx.js → index-DlLGErhb.js} +1 -1
- package/assets/index-Dpo0OSlf.css +1 -0
- package/assets/index-DvQq0rNn.js +1 -0
- package/assets/{index-CLRLVYld.js → index-Gh2V6S8q.js} +1 -1
- package/assets/{index-CZsCbxPX.js → index-JkZS13Xr.js} +1 -1
- package/assets/{index-CzGYP0S7.js → index-LLu-0F-B.js} +1 -1
- package/assets/{index-BUMgfMPo.js → index-N5H4XX_z.js} +1 -1
- package/assets/{index-BUv13d3U.js → index-OtuvcX8Z.js} +1 -1
- package/assets/{index-CGN10OWJ.js → index-Pi8zH23Q.js} +1 -1
- package/assets/index-SoLXlPaG.css +1 -0
- package/assets/index-UXTmA8HS.js +1 -0
- package/assets/index-ZjF3iZ0v.js +1 -0
- package/assets/{index-YtR-0pg4.js → index-ik5xvgjC.js} +1 -1
- package/assets/{index-BvCC_SGc.js → index-koBO0cpK.js} +1 -1
- package/assets/{index-B8yYsZEA.js → index-mFsPtgxU.js} +1 -1
- package/assets/{index-BbHtKInt.js → index-rfdKGuam.js} +1 -1
- package/assets/{index-CEukFjIz.js → index-w9zwRdjL.js} +1 -1
- package/assets/{index.es-Cm5B-2RB.js → index.es-B5hd-vsJ.js} +4 -4
- package/assets/{selectors-DOsTc9Gc.js → selectors-RKMIkjNm.js} +1 -1
- package/index.html +3 -3
- package/package.json +3 -3
- package/assets/index-B6mllHGB.js +0 -1
- package/assets/index-BMoeUH8x.js +0 -1
- package/assets/index-Bb1rMbBB.js +0 -1
- package/assets/index-BsoWn_3b.js +0 -1
- package/assets/index-CASN6M_s.css +0 -1
- package/assets/index-Co2MBOkl.css +0 -1
- package/assets/index-D1zVEhUj.css +0 -1
- package/assets/index-DJne559o.css +0 -1
- package/assets/index-rRbpv6Pj.js +0 -1
- package/assets/index-sZDE9dZ6.js +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hT as ge,gC as w,gO as fe,a4 as me,J as A,hU as K,R as ve,N as o,M as c,S as l,dM as pe,eZ as J,bQ as V,T as re,aM as Ce,eC as Te,a2 as we,eE as xe,ak as _e,eF as O,b6 as be,hV as ye,eH as Ee,eK as De,ej as Oe,bd as Se,hW as Pe,ad as je,bq as $,hX as Me,eM as Ne,gF as Le,eP as Ue,eT as ke,hY as Re,eV as Ye,hZ as Ae}from"./index-DTDyEcLh.js";import{d as Ie,e as We,c as Fe}from"./selectors-DOsTc9Gc.js";import{N as Be}from"./NotFound-Bvndb2kC.js";import{L as He}from"./LoggedInDetailPage.container-CzPOYbHr.js";import{N as qe}from"./Navigation.container-zriX5zTq.js";import{C as $e}from"./CollectionStatus.container-Ck64n9f3.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-SbI32IAq.js";import{s as I,a as Ve}from"./date-CQFozb1v.js";import{g as X,e as Xe,l as Ke}from"./index-CzGYP0S7.js";import"./SignInRequired-BesSl-uu.js";function Je(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Je(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),C=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(C+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(C,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?C+1:p.getTime()>=B.getTime()?C:C-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),C=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,C),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ct=/^'([^]*?)'?$/,Tt=/''/g,wt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,C,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Ke,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((C=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&C!==void 0?C:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(T){var y=T[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(T,L.formatLong)}return T}).join("").match(vt).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return _t(T);var Y=ct[y];if(Y)return mt(T)&&te(T,t,String(n)),ft(T)&&te(T,t,String(n)),Y(le,T,L.localize,ce);if(y.match(wt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return de}function _t(n){var t=n.match(Ct);return t?t[1].replace(Tt,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return w.APPROVED;if(t.status==="rejected")return w.REJECTED}else{if(!t&&fe(n))return w.DISABLED;if(t&&t.status==="rejected")return w.REJECTED}return t&&t.status==="pending"&&t.assignee?w.UNDER_REVIEW:w.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=K.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case w.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case w.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case w.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case w.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case w.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),C=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:J(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:J(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(C,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(C,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==w.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,K.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:Ce(n),itemCount:Te(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(we(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...w,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,C=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:C.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
|
|
1
|
+
var ue=Object.defineProperty;var he=(n,t,e)=>t in n?ue(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var v=(n,t,e)=>he(n,typeof t!="symbol"?t+"":t,e);import{c0 as x,c1 as b,cm as j,hT as ge,gC as w,gO as fe,a4 as me,J as A,hU as K,R as ve,N as o,M as c,S as l,dM as pe,eZ as J,bQ as V,T as re,aM as Ce,eC as Te,a2 as we,eE as xe,ak as _e,eF as O,b6 as be,hV as ye,eH as Ee,eK as De,ej as Oe,bd as Se,hW as Pe,ad as je,bq as $,hX as Me,eM as Ne,gF as Le,eP as Ue,eT as ke,hY as Re,eV as Ye,hZ as Ae}from"./index-BHRIVcTs.js";import{d as Ie,e as We,c as Fe}from"./selectors-RKMIkjNm.js";import{N as Be}from"./NotFound-BGRBV5Uq.js";import{L as He}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as qe}from"./Navigation.container-9A40G-C8.js";import{C as $e}from"./CollectionStatus.container-D7SF6GBG.js";import{C as Ge,T as Qe}from"./ThirdPartyKindBadge-BClaXwJI.js";import{s as I,a as Ve}from"./date-BuuPIXis.js";import{g as X,e as Xe,l as Ke}from"./index-LLu-0F-B.js";import"./SignInRequired-B_3SXeXM.js";function Je(n,t){x(2,arguments);var e=b(n).getTime(),a=j(t);return new Date(e+a)}function Ze(n){return x(1,arguments),n instanceof Date||ge(n)==="object"&&Object.prototype.toString.call(n)==="[object Date]"}function ze(n){if(x(1,arguments),!Ze(n)&&typeof n!="number")return!1;var t=b(n);return!isNaN(Number(t))}function et(n,t){x(2,arguments);var e=j(t);return Je(n,-e)}var tt=864e5;function at(n){x(1,arguments);var t=b(n),e=t.getTime();t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0);var a=t.getTime(),r=e-a;return Math.floor(r/tt)+1}function W(n){x(1,arguments);var t=1,e=b(n),a=e.getUTCDay(),r=(a<t?7:0)+a-t;return e.setUTCDate(e.getUTCDate()-r),e.setUTCHours(0,0,0,0),e}function ne(n){x(1,arguments);var t=b(n),e=t.getUTCFullYear(),a=new Date(0);a.setUTCFullYear(e+1,0,4),a.setUTCHours(0,0,0,0);var r=W(a),i=new Date(0);i.setUTCFullYear(e,0,4),i.setUTCHours(0,0,0,0);var s=W(i);return t.getTime()>=r.getTime()?e+1:t.getTime()>=s.getTime()?e:e-1}function rt(n){x(1,arguments);var t=ne(n),e=new Date(0);e.setUTCFullYear(t,0,4),e.setUTCHours(0,0,0,0);var a=W(e);return a}var nt=6048e5;function it(n){x(1,arguments);var t=b(n),e=W(t).getTime()-rt(t).getTime();return Math.round(e/nt)+1}function ie(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=b(n),C=p.getUTCFullYear(),g=X(),m=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:g.firstWeekContainsDate)!==null&&a!==void 0?a:(f=g.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1);if(!(m>=1&&m<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var _=new Date(0);_.setUTCFullYear(C+1,0,m),_.setUTCHours(0,0,0,0);var M=I(_,t),D=new Date(0);D.setUTCFullYear(C,0,m),D.setUTCHours(0,0,0,0);var B=I(D,t);return p.getTime()>=M.getTime()?C+1:p.getTime()>=B.getTime()?C:C-1}function ot(n,t){var e,a,r,i,s,u,f,h;x(1,arguments);var p=X(),C=j((e=(a=(r=(i=t==null?void 0:t.firstWeekContainsDate)!==null&&i!==void 0?i:t==null||(s=t.locale)===null||s===void 0||(u=s.options)===null||u===void 0?void 0:u.firstWeekContainsDate)!==null&&r!==void 0?r:p.firstWeekContainsDate)!==null&&a!==void 0?a:(f=p.locale)===null||f===void 0||(h=f.options)===null||h===void 0?void 0:h.firstWeekContainsDate)!==null&&e!==void 0?e:1),g=ie(n,t),m=new Date(0);m.setUTCFullYear(g,0,C),m.setUTCHours(0,0,0,0);var _=I(m,t);return _}var st=6048e5;function lt(n,t){x(1,arguments);var e=b(n),a=I(e,t).getTime()-ot(e,t).getTime();return Math.round(a/st)+1}function d(n,t){for(var e=n<0?"-":"",a=Math.abs(n).toString();a.length<t;)a="0"+a;return e+a}var E={y:function(t,e){var a=t.getUTCFullYear(),r=a>0?a:1-a;return d(e==="yy"?r%100:r,e.length)},M:function(t,e){var a=t.getUTCMonth();return e==="M"?String(a+1):d(a+1,2)},d:function(t,e){return d(t.getUTCDate(),e.length)},a:function(t,e){var a=t.getUTCHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.toUpperCase();case"aaa":return a;case"aaaaa":return a[0];case"aaaa":default:return a==="am"?"a.m.":"p.m."}},h:function(t,e){return d(t.getUTCHours()%12||12,e.length)},H:function(t,e){return d(t.getUTCHours(),e.length)},m:function(t,e){return d(t.getUTCMinutes(),e.length)},s:function(t,e){return d(t.getUTCSeconds(),e.length)},S:function(t,e){var a=e.length,r=t.getUTCMilliseconds(),i=Math.floor(r*Math.pow(10,a-3));return d(i,e.length)}},P={am:"am",pm:"pm",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ct={G:function(t,e,a){var r=t.getUTCFullYear()>0?1:0;switch(e){case"G":case"GG":case"GGG":return a.era(r,{width:"abbreviated"});case"GGGGG":return a.era(r,{width:"narrow"});case"GGGG":default:return a.era(r,{width:"wide"})}},y:function(t,e,a){if(e==="yo"){var r=t.getUTCFullYear(),i=r>0?r:1-r;return a.ordinalNumber(i,{unit:"year"})}return E.y(t,e)},Y:function(t,e,a,r){var i=ie(t,r),s=i>0?i:1-i;if(e==="YY"){var u=s%100;return d(u,2)}return e==="Yo"?a.ordinalNumber(s,{unit:"year"}):d(s,e.length)},R:function(t,e){var a=ne(t);return d(a,e.length)},u:function(t,e){var a=t.getUTCFullYear();return d(a,e.length)},Q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"Q":return String(r);case"QQ":return d(r,2);case"Qo":return a.ordinalNumber(r,{unit:"quarter"});case"QQQ":return a.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return a.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return a.quarter(r,{width:"wide",context:"formatting"})}},q:function(t,e,a){var r=Math.ceil((t.getUTCMonth()+1)/3);switch(e){case"q":return String(r);case"qq":return d(r,2);case"qo":return a.ordinalNumber(r,{unit:"quarter"});case"qqq":return a.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return a.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return a.quarter(r,{width:"wide",context:"standalone"})}},M:function(t,e,a){var r=t.getUTCMonth();switch(e){case"M":case"MM":return E.M(t,e);case"Mo":return a.ordinalNumber(r+1,{unit:"month"});case"MMM":return a.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return a.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return a.month(r,{width:"wide",context:"formatting"})}},L:function(t,e,a){var r=t.getUTCMonth();switch(e){case"L":return String(r+1);case"LL":return d(r+1,2);case"Lo":return a.ordinalNumber(r+1,{unit:"month"});case"LLL":return a.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return a.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return a.month(r,{width:"wide",context:"standalone"})}},w:function(t,e,a,r){var i=lt(t,r);return e==="wo"?a.ordinalNumber(i,{unit:"week"}):d(i,e.length)},I:function(t,e,a){var r=it(t);return e==="Io"?a.ordinalNumber(r,{unit:"week"}):d(r,e.length)},d:function(t,e,a){return e==="do"?a.ordinalNumber(t.getUTCDate(),{unit:"date"}):E.d(t,e)},D:function(t,e,a){var r=at(t);return e==="Do"?a.ordinalNumber(r,{unit:"dayOfYear"}):d(r,e.length)},E:function(t,e,a){var r=t.getUTCDay();switch(e){case"E":case"EE":case"EEE":return a.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return a.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return a.day(r,{width:"short",context:"formatting"});case"EEEE":default:return a.day(r,{width:"wide",context:"formatting"})}},e:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"e":return String(s);case"ee":return d(s,2);case"eo":return a.ordinalNumber(s,{unit:"day"});case"eee":return a.day(i,{width:"abbreviated",context:"formatting"});case"eeeee":return a.day(i,{width:"narrow",context:"formatting"});case"eeeeee":return a.day(i,{width:"short",context:"formatting"});case"eeee":default:return a.day(i,{width:"wide",context:"formatting"})}},c:function(t,e,a,r){var i=t.getUTCDay(),s=(i-r.weekStartsOn+8)%7||7;switch(e){case"c":return String(s);case"cc":return d(s,e.length);case"co":return a.ordinalNumber(s,{unit:"day"});case"ccc":return a.day(i,{width:"abbreviated",context:"standalone"});case"ccccc":return a.day(i,{width:"narrow",context:"standalone"});case"cccccc":return a.day(i,{width:"short",context:"standalone"});case"cccc":default:return a.day(i,{width:"wide",context:"standalone"})}},i:function(t,e,a){var r=t.getUTCDay(),i=r===0?7:r;switch(e){case"i":return String(i);case"ii":return d(i,e.length);case"io":return a.ordinalNumber(i,{unit:"day"});case"iii":return a.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return a.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return a.day(r,{width:"short",context:"formatting"});case"iiii":default:return a.day(r,{width:"wide",context:"formatting"})}},a:function(t,e,a){var r=t.getUTCHours(),i=r/12>=1?"pm":"am";switch(e){case"a":case"aa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"aaaa":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,a){var r=t.getUTCHours(),i;switch(r===12?i=P.noon:r===0?i=P.midnight:i=r/12>=1?"pm":"am",e){case"b":case"bb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"bbbb":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,a){var r=t.getUTCHours(),i;switch(r>=17?i=P.evening:r>=12?i=P.afternoon:r>=4?i=P.morning:i=P.night,e){case"B":case"BB":case"BBB":return a.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return a.dayPeriod(i,{width:"narrow",context:"formatting"});case"BBBB":default:return a.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,a){if(e==="ho"){var r=t.getUTCHours()%12;return r===0&&(r=12),a.ordinalNumber(r,{unit:"hour"})}return E.h(t,e)},H:function(t,e,a){return e==="Ho"?a.ordinalNumber(t.getUTCHours(),{unit:"hour"}):E.H(t,e)},K:function(t,e,a){var r=t.getUTCHours()%12;return e==="Ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},k:function(t,e,a){var r=t.getUTCHours();return r===0&&(r=24),e==="ko"?a.ordinalNumber(r,{unit:"hour"}):d(r,e.length)},m:function(t,e,a){return e==="mo"?a.ordinalNumber(t.getUTCMinutes(),{unit:"minute"}):E.m(t,e)},s:function(t,e,a){return e==="so"?a.ordinalNumber(t.getUTCSeconds(),{unit:"second"}):E.s(t,e)},S:function(t,e){return E.S(t,e)},X:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();if(s===0)return"Z";switch(e){case"X":return z(s);case"XXXX":case"XX":return S(s);case"XXXXX":case"XXX":default:return S(s,":")}},x:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"x":return z(s);case"xxxx":case"xx":return S(s);case"xxxxx":case"xxx":default:return S(s,":")}},O:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+Z(s,":");case"OOOO":default:return"GMT"+S(s,":")}},z:function(t,e,a,r){var i=r._originalDate||t,s=i.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+Z(s,":");case"zzzz":default:return"GMT"+S(s,":")}},t:function(t,e,a,r){var i=r._originalDate||t,s=Math.floor(i.getTime()/1e3);return d(s,e.length)},T:function(t,e,a,r){var i=r._originalDate||t,s=i.getTime();return d(s,e.length)}};function Z(n,t){var e=n>0?"-":"+",a=Math.abs(n),r=Math.floor(a/60),i=a%60;if(i===0)return e+String(r);var s=t;return e+String(r)+s+d(i,2)}function z(n,t){if(n%60===0){var e=n>0?"-":"+";return e+d(Math.abs(n)/60,2)}return S(n,t)}function S(n,t){var e=t||"",a=n>0?"-":"+",r=Math.abs(n),i=d(Math.floor(r/60),2),s=d(r%60,2);return a+i+e+s}var ee=function(t,e){switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});case"PPPP":default:return e.date({width:"full"})}},oe=function(t,e){switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});case"pppp":default:return e.time({width:"full"})}},dt=function(t,e){var a=t.match(/(P+)(p+)?/)||[],r=a[1],i=a[2];if(!i)return ee(t,e);var s;switch(r){case"P":s=e.dateTime({width:"short"});break;case"PP":s=e.dateTime({width:"medium"});break;case"PPP":s=e.dateTime({width:"long"});break;case"PPPP":default:s=e.dateTime({width:"full"});break}return s.replace("{{date}}",ee(r,e)).replace("{{time}}",oe(i,e))},ut={p:oe,P:dt},ht=["D","DD"],gt=["YY","YYYY"];function ft(n){return ht.indexOf(n)!==-1}function mt(n){return gt.indexOf(n)!==-1}function te(n,t,e){if(n==="YYYY")throw new RangeError("Use `yyyy` instead of `YYYY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="YY")throw new RangeError("Use `yy` instead of `YY` (in `".concat(t,"`) for formatting years to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="D")throw new RangeError("Use `d` instead of `D` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"));if(n==="DD")throw new RangeError("Use `dd` instead of `DD` (in `".concat(t,"`) for formatting days of the month to the input `").concat(e,"`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md"))}var vt=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,pt=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Ct=/^'([^]*?)'?$/,Tt=/''/g,wt=/[a-zA-Z]/;function xt(n,t,e){var a,r,i,s,u,f,h,p,C,g,m,_,M,D;x(2,arguments);var B=String(t),N=X(),L=(a=(r=void 0)!==null&&r!==void 0?r:N.locale)!==null&&a!==void 0?a:Ke,H=j((i=(s=(u=(f=void 0)!==null&&f!==void 0?f:void 0)!==null&&u!==void 0?u:N.firstWeekContainsDate)!==null&&s!==void 0?s:(h=N.locale)===null||h===void 0||(p=h.options)===null||p===void 0?void 0:p.firstWeekContainsDate)!==null&&i!==void 0?i:1);if(!(H>=1&&H<=7))throw new RangeError("firstWeekContainsDate must be between 1 and 7 inclusively");var q=j((C=(g=(m=(_=void 0)!==null&&_!==void 0?_:void 0)!==null&&m!==void 0?m:N.weekStartsOn)!==null&&g!==void 0?g:(M=N.locale)===null||M===void 0||(D=M.options)===null||D===void 0?void 0:D.weekStartsOn)!==null&&C!==void 0?C:0);if(!(q>=0&&q<=6))throw new RangeError("weekStartsOn must be between 0 and 6 inclusively");if(!L.localize)throw new RangeError("locale must contain localize property");if(!L.formatLong)throw new RangeError("locale must contain formatLong property");var R=b(n);if(!ze(R))throw new RangeError("Invalid time value");var se=Xe(R),le=et(R,se),ce={firstWeekContainsDate:H,weekStartsOn:q,locale:L,_originalDate:R},de=B.match(pt).map(function(T){var y=T[0];if(y==="p"||y==="P"){var Y=ut[y];return Y(T,L.formatLong)}return T}).join("").match(vt).map(function(T){if(T==="''")return"'";var y=T[0];if(y==="'")return _t(T);var Y=ct[y];if(Y)return mt(T)&&te(T,t,String(n)),ft(T)&&te(T,t,String(n)),Y(le,T,L.localize,ce);if(y.match(wt))throw new RangeError("Format string contains an unescaped latin alphabet character `"+y+"`");return T}).join("");return de}function _t(n){var t=n.match(Ct);return t?t[1].replace(Tt,"'"):n}const bt=(n,t)=>{if(n.isApproved){if(!t||t.status==="approved")return w.APPROVED;if(t.status==="rejected")return w.REJECTED}else{if(!t&&fe(n))return w.DISABLED;if(t&&t.status==="rejected")return w.REJECTED}return t&&t.status==="pending"&&t.assignee?w.UNDER_REVIEW:w.TO_REVIEW};function yt(n){const{collection:t,curation:e,address:a,itemCount:r,onOpenModal:i}=n,s=me(),u=A.useCallback(g=>{window.open(t.forumLink,"_blank"),g.preventDefault(),g.stopPropagation()},[t]),f=A.useCallback((g,m=K.SELF_ASSIGN)=>{i("EditCurationAssigneeModal",{collectionId:t.id,type:m}),g.preventDefault(),g.stopPropagation()},[i,t]),h=A.useCallback(()=>{s.push(ve.itemEditor({collectionId:t.id,isReviewing:"true"}))},[s,t]),p=A.useCallback(()=>{switch(bt(t,e)){case w.APPROVED:return o.jsxs("div",{className:"approved action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.approved")})," ",o.jsx(l.Icon,{name:"check"})]});case w.REJECTED:return o.jsxs("div",{className:"rejected action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.rejected")})," ",o.jsx(l.Icon,{name:"close"})]});case w.DISABLED:return o.jsxs("div",{className:"disabled action",children:[o.jsx("span",{className:"action-text",children:c("collection_row.disabled")})," ",o.jsx(l.Icon,{name:"close"})]});case w.UNDER_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.under_review")]});case w.TO_REVIEW:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]});default:return o.jsxs("span",{children:[" ",c("collection_row.to_review")]})}},[t,e]),C=new Date((e==null?void 0:e.createdAt)||t.createdAt);return o.jsxs(l.Table.Row,{className:"CollectionRow",onClick:h,children:[o.jsx(l.Table.Cell,{width:5,children:o.jsxs("div",{className:"image-column",children:[o.jsx(pe,{collectionId:t.id}),o.jsxs("div",{className:"info",children:[o.jsxs("div",{className:"title",children:[o.jsx($e,{collection:t}),t.name]}),o.jsx("div",{className:"subtitle name",children:c("collection_row.items",{count:r})})]})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Ge,{isThirdParty:J(t)})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx(Qe,{isProgrammatic:t.isProgrammatic})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{children:J(t)?"-":o.jsx(V,{textOnly:!0,address:t.owner})})}),o.jsx(l.Table.Cell,{width:3,children:o.jsxs("div",{title:xt(C,"d MMMM yyyy HH:mm"),children:[o.jsx("span",{children:c(e?"collection_row.review_request":"collection_row.published")})," ",Ve(C,{addSuffix:!0})]})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"actions text-centered",children:p()})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"edit-container",children:e!=null&&e.assignee?o.jsxs(o.Fragment,{children:[o.jsxs("div",{className:"curator-name",children:[o.jsx(V,{textOnly:!0,address:e.assignee}),a===e.assignee?o.jsxs(o.Fragment,{children:[" (",c("collection_row.you"),")"]}):null," "]}),e.status!==w.APPROVED||!t.isApproved?o.jsx(l.Icon,{name:"pencil",onClick:g=>f(g,K.REASSIGN)}):null]}):o.jsxs("div",{className:"assignee-container",children:[c("collection_row.unassigned"),o.jsx("span",{className:"link",onClick:f,children:c("collection_row.assign_to_me")})]})})}),o.jsx(l.Table.Cell,{width:2,children:o.jsx("div",{className:"text-centered",children:t.forumLink?o.jsx("span",{className:"link",onClick:u,children:c("collection_row.link")}):c("collection_row.no_forum_post")})})]},t.id)}const Et=(n,t)=>({address:Ce(n),itemCount:Te(n,t.collection.id)}),Dt=n=>({onOpenModal:(t,e)=>n(we(t,e))}),Ot=re(Et,Dt)(yt);var F=(n=>(n.ALL_STATUS="ALL_STATUS",n))(F||{}),k=(n=>(n.ALL_TYPES="ALL_TYPES",n))(k||{});const U={...w,...F},ae={...xe,...k},G=12,Q="all";let St=class extends _e.PureComponent{constructor(){super(...arguments);v(this,"state",{sortBy:O.CREATED_AT_DESC,filterByStatus:F.ALL_STATUS,filterByTags:[],filterByType:k.ALL_TYPES,assignee:Q,searchText:"",page:1});v(this,"getFetchParams",e=>{const{assignee:a,filterByStatus:r,filterByType:i,page:s,searchText:u,sortBy:f,filterByTags:h}=this.state;return{page:s,limit:G,assignee:a!==Q?a:void 0,status:r!==F.ALL_STATUS?r:void 0,type:i!==k.ALL_TYPES?i:void 0,q:u||void 0,sort:f,tag:h.length>0?h:void 0,isPublished:!0,...e}});v(this,"fetchCollections",()=>{const{onFetchCollections:e}=this.props;e(this.getFetchParams())});v(this,"updateParam",e=>{this.setState(e,this.fetchCollections)});v(this,"handleSortChange",(e,{value:a})=>{this.updateParam({sortBy:a,page:1})});v(this,"handleStatusChange",(e,{value:a})=>{this.updateParam({filterByStatus:`${a}`,page:1})});v(this,"handleTypeChange",(e,{value:a})=>{this.updateParam({filterByType:`${a}`,page:1})});v(this,"handleAssigneeChange",(e,{value:a})=>{this.updateParam({assignee:`${a}`,page:1})});v(this,"handleSearchChange",e=>{const{searchText:a}=this.state;e!==a&&this.updateParam({searchText:e,page:1})});v(this,"handlePageChange",(e,a)=>{this.updateParam({page:+a.activePage})});v(this,"handleOnCampaignToggleChange",(e,a)=>{const{campaignTag:r}=this.props,{checked:i}=a;r&&(i?this.updateParam({filterByTags:[...this.state.filterByTags,r]}):this.updateParam({filterByTags:[...this.state.filterByTags.filter(s=>s!==r)]}))});v(this,"renderSortDropdown",()=>{const{sortBy:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:O.MOST_RELEVANT,text:c("curation_page.order.most_relevant")},{value:O.CREATED_AT_DESC,text:c("global.order.newest")},{value:O.NAME_ASC,text:c("global.order.name_asc")},{value:O.NAME_DESC,text:c("global.order.name_desc")}],onChange:this.handleSortChange})});v(this,"renderTypesFilterDropdown",()=>{const{filterByType:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:k.ALL_TYPES,text:c("curation_page.filter.all_types")},{value:ae.STANDARD,text:c("curation_page.filter.standard")},{value:ae.THIRD_PARTY,text:c("curation_page.filter.third_party")}],onChange:this.handleTypeChange})});v(this,"renderStatusFilterDropdown",()=>{const{filterByStatus:e}=this.state;return o.jsx(l.Dropdown,{direction:"left",value:e,options:[{value:U.ALL_STATUS,text:c("curation_page.filter.all_status")},{value:U.UNDER_REVIEW,text:c("curation_page.filter.under_review")},{value:U.TO_REVIEW,text:c("curation_page.filter.to_review")},{value:U.APPROVED,text:c("curation_page.filter.approved")},{value:U.REJECTED,text:c("curation_page.filter.rejected")}],onChange:this.handleStatusChange})});v(this,"renderAssigneeFilterDropdown",()=>{const{committeeMembers:e,wallet:a}=this.props,{assignee:r}=this.state;return o.jsx(l.Dropdown,{className:"assignees",direction:"left",value:r,options:[{value:Q,text:c("curation_page.filter.all_assignees")},...e.reduce((i,s)=>(s===a.address?i.unshift(s):i.push(s),i),[]).map(i=>({value:i,text:o.jsx(V,{textOnly:!0,address:i})}))],onChange:this.handleAssigneeChange})});v(this,"renderCampaignFilterToggle",()=>{const{isCampaignEnabled:e,campaignName:a,campaignTag:r}=this.props,{filterByTags:i}=this.state;return e&&a&&r?o.jsx(l.Radio,{toggle:!0,className:"filterByCampaignTag",checked:i.includes(r),onChange:this.handleOnCampaignToggleChange,label:a}):null})}componentDidMount(){const{onFetchCollections:e,wallet:a,isLoadingCommittee:r,isCommitteeMember:i}=this.props;a&&!r&&i&&e({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}componentDidUpdate(e){const{onFetchCollections:a,wallet:r,isLoadingCommittee:i,isCommitteeMember:s}=this.props;r&&!i&&s&&e.isCommitteeMember!==s&&a({page:1,limit:G,isPublished:!0,sort:O.MOST_RELEVANT})}renderPage(){const{isLoadingCollectionsData:e,isLoadingCommittee:a,collections:r,curationsByCollectionId:i,paginationData:s}=this.props,{page:u,searchText:f}=this.state,h=s==null?void 0:s.total,p=s==null?void 0:s.totalPages,C=r,g=e||a||!s;return o.jsxs(o.Fragment,{children:[o.jsx("div",{className:"filters",children:o.jsxs(l.Container,{children:[s?o.jsx(l.Row,{className:"text-filter-row",children:o.jsx(l.TextFilter,{placeholder:c("curation_page.search_placeholder"),value:f,onChange:this.handleSearchChange})}):null,o.jsxs(l.Row,{children:[o.jsx(l.Column,{grow:!1,shrink:!1,children:o.jsx(l.Row,{children:!e&&!!h&&h>0&&o.jsx(l.Header,{sub:!0,children:c("collections_page.results",{count:h})})})}),o.jsx(l.Column,{align:"right",shrink:!1,children:o.jsxs(l.Row,{children:[this.renderCampaignFilterToggle(),this.renderAssigneeFilterDropdown(),this.renderTypesFilterDropdown(),this.renderStatusFilterDropdown(),this.renderSortDropdown()]})})]})]})}),g?o.jsx(l.Loader,{active:!0,size:"large"}):o.jsxs(l.Container,{children:[o.jsxs(l.Section,{children:[o.jsx(l.Table,{basic:"very",children:r.length>0?o.jsxs(o.Fragment,{children:[o.jsx(l.Table.Header,{children:o.jsxs(l.Table.Row,{children:[o.jsx(l.Table.HeaderCell,{children:c("collection_row.collection")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.type")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.kind")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.owner")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.date")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.status")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.assignee")}),o.jsx(l.Table.HeaderCell,{children:c("collection_row.discussion")})]})}),o.jsx(l.Table.Body,{children:C.map(m=>o.jsx(Ot,{collection:m,curation:i[m.id]||null},m.id))})]}):null}),r.length===0?o.jsx(l.Empty,{height:200,children:o.jsx("div",{children:o.jsx(be,{id:"curation_page.empty_collections"})})}):null]}),!!p&&p>1&&o.jsx(l.Pagination,{className:"pagination",firstItem:null,lastItem:null,totalPages:p,activePage:u,onPageChange:this.handlePageChange})]})]})}render(){const{isCommitteeMember:e,isConnecting:a,isLoadingCommittee:r}=this.props,i=a||r;return o.jsx(He,{className:"CurationPage",activeTab:qe.CURATION,isLoading:i,children:e?this.renderPage():o.jsx(Be,{})})}};const Pt=n=>{var r;const t=ye(n),e=Ee(n),a=De(n);return{wallet:Oe(n),collections:e,paginationData:a,curationsByCollectionId:t,isCommitteeMember:Se(n),committeeMembers:Pe(n),isConnecting:je(n),isLoadingCommittee:$(Me(n),Re),isLoadingCollectionsData:$(Ne(n),Ye)||$(Le(n),Ae),isCampaignEnabled:Ue(n),campaignTag:Ie(n),campaignName:(r=We(n))==null?void 0:r[Fe(n)]}},jt=n=>({onFetchCollections:t=>n(ke(void 0,t))}),Ht=re(Pt,jt)(St);export{Ht as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{q as f,B as a}from"./index-
|
|
1
|
+
import{q as f,B as a}from"./index-BHRIVcTs.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 @@
|
|
|
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.21.3-19896835659.commit-bb1d19a/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
|
+
import{aq as o}from"./index-BHRIVcTs.js";export{o as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{ak as ie,N as e,S as a,M as n,J as i,fz as ae,fA as Ne,eY as k,cq as $e,aR as K,T as se,e_ as fe,fB as re,fC as Fe,a2 as A,fD as Ue,fE as ve,f7 as ee,cN as ue,fF as me,ej as ye,cO as We,bq as z,fG as He,eM as ke,fH as Oe,eD as ze,fm as Ee,b4 as Ye,a4 as Te,fI as Z,fJ as oe,R as B,e$ as Pe,eB as _e,fK as Ge,fL as qe,bp as te,fe as Qe,fd as Ve,ff as Je,f9 as Se,f1 as Re,Q as pe,fM as Ze,dN as Xe,ez as Ke,fi as es,fN as ss,fO as X,fP as as,fc as ts,eN as he,fQ as xe,aM as ns,cY as ls,fR as os,fS as is,ey as rs,fT as cs,fU as ds,b1 as us,f5 as y,fV as ms,eE as _s,P as O,fW as ge,a7 as ne,fX as ps,fg as le,fY as be,aa as hs,ab as w,fl as xs,fZ as gs,f_ as bs,f$ as Cs,g0 as js,g1 as Is}from"./index-BHRIVcTs.js";import{e as Ns}from"./hooks-aEto244t.js";import{g as fs}from"./selector-CtnQnmhq.js";import{C as vs}from"./CollectionProvider.container-CdZDU931.js";import{L as ys}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{N as ks}from"./NotFound-BGRBV5Uq.js";import{B as Es}from"./Back-Bt1TpmNC.js";import{C as Ts}from"./CollectionStatus.container-D7SF6GBG.js";import{J as Ps}from"./JumpIn.container-BA-hVJA8.js";import{C as Ss}from"./ConfirmDelete-BvCbqgkr.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";const Rs=({type:s})=>e.jsx(a.Popup,{content:n(s==="publish"?"collection_detail_page.cant_mint":"collection_detail_page.cant_push"),position:"top center",trigger:e.jsx("div",{className:"popup-button",children:e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("collection_detail_page.under_review")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:s==="publish"}),Ce=ie.memo(Rs),ws=s=>{const{collection:l,items:o,status:t,hasPendingCuration:u,onPublish:m,onPush:c,onInit:b}=s;i.useEffect(()=>{l.isPublished&&b()},[l,b]);const p=o.length>ae,I=i.useMemo(()=>o.length===0||!o.every(Ne)||p,[o,p]);let C;if(l.isPublished)l.isApproved?u?C=e.jsx(Ce,{type:"push"}):t===k.UNSYNCED?C=e.jsx(a.Button,{primary:!0,compact:!0,onClick:c,children:n("collection_detail_page.push_changes")}):C=e.jsx(a.Button,{secondary:!0,compact:!0,disabled:!0,children:n("global.published")}):C=e.jsx(Ce,{type:"publish"});else{const j=e.jsx($e,{disabled:I,primary:!0,compact:!0,onClick:m,network:K.Network.MATIC,children:n("collection_detail_page.publish")});if(I){let N;o.length>ae?N=n("collection_detail_page.publish_reason_max_items",{maxItems:ae}):o.length===0?N=n("collection_detail_page.publish_reason_no_items"):N=n("collection_detail_page.publish_reason_items_not_complete"),C=e.jsx(a.Popup,{content:N,position:"top center",trigger:e.jsx("div",{className:"popup-button",children:j}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})}else C=j}return C},Ms=ie.memo(ws),Ds=(s,l)=>{const{id:o}=l.collection,t=fe(s);return{items:re(s,o),status:t[o],hasPendingCuration:Fe(s,o)}},Ls=(s,l)=>{const{id:o}=l.collection;return{onPublish:()=>s(A("PublishWizardCollectionModal",{collectionId:o})),onPush:()=>s(A("PushCollectionChangesModal",{collectionId:o})),onInit:()=>s(Ue(o))}},je=se(Ds,Ls)(Ms),Bs="_dropdown_1a07a_1",As="_ellipsis_1a07a_9",$s="_menu_1a07a_13",Fs="_disabled_1a07a_13",Us="_item_1a07a_13",Ie={dropdown:Bs,ellipsis:As,menu:$s,disabled:Fs,item:Us},Ws=({collection:s,wallet:l,onOpenModal:o,onDelete:t})=>{const u=()=>{o("ManageCollectionRoleModal",{type:me.MANAGER,collectionId:s.id,roles:s.managers})},m=()=>{o("ManageCollectionRoleModal",{type:me.MINTER,collectionId:s.id,roles:s.minters})},c=()=>{o("AddExistingItemModal",{collectionId:s.id})},b=()=>{t(s)},p=ve(s,l.address);return e.jsx(a.Dropdown,{className:Ie.dropdown,trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{className:Ie.ellipsis,name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(a.Dropdown.Menu,{children:[s.isPublished?p?e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.managers"),onClick:u}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.minters"),onClick:m})]}):null:ee(s)?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.add_existing_item"),onClick:c}),e.jsx(Ss,{name:s.name,onDelete:b,trigger:e.jsx(a.Dropdown.Item,{text:n("global.delete")})})]}),e.jsx(ue,{role:"option",className:"item",text:s.urn,children:e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.copy_urn")})}),e.jsx(a.Popup,{content:n("collection_context_menu.unpublished"),position:"right center",disabled:s.isPublished,trigger:e.jsx(ue,{role:"option",className:"item",text:s.contractAddress,children:e.jsx(a.Dropdown.Item,{disabled:!s.isPublished,text:n("collection_context_menu.copy_address")})}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0})]})})},Hs=(s,l)=>({wallet:ye(s),items:re(s,l.collection.id),name:We(s)||"",isForumPostLoading:z(ke(s),He)}),Os=s=>({onOpenModal:(l,o)=>s(A(l,o)),onPostToForum:(l,o)=>s(Oe(l,o)),onDelete:l=>s(ze(l))}),zs=se(Hs,Os)(Ws),Ys=({isEnabled:s,onClick:l})=>s?e.jsx(a.Dropdown.Item,{text:n("collection_item.reset_item"),onClick:l}):null,Gs=ie.memo(Ys),qs=(s,l)=>{const{itemId:o}=l;return{isEnabled:Ee(s)[o]===k.UNSYNCED}},Qs=(s,l)=>{const{itemId:o}=l;return{onClick:()=>s(A("ResetItemModal",{itemId:o}))}},Vs=se(qs,Qs)(Gs),Js="_itemImage_10lcv_1",Zs="_itemStatus_10lcv_9",Xs="_mana_10lcv_13",Ks="_grid_10lcv_19",ea="_row_10lcv_30",sa="_avatarColumn_10lcv_35",aa="_avatarContainer_10lcv_40",ta="_info_10lcv_44",na="_nameWrapper_10lcv_49",la="_badgeContainer_10lcv_54",oa="_badge_10lcv_54",ia="_name_10lcv_49",ra="_linkAction_10lcv_76",ca="_subtitle_10lcv_80",da="_itemActions_10lcv_86",ua="_removeSaleButton_10lcv_93",ma="_status_10lcv_98",_a="_ready_10lcv_112",pa="_notReady_10lcv_117",ha="_incomplete_10lcv_122",xa="_published_10lcv_126",ga="_underReview_10lcv_131",ba="_unsynced_10lcv_132",Ca="_alertIcon_10lcv_137",ja="_check_10lcv_148",Ia="_contextMenuButton_10lcv_152",Na="_contextMenu_10lcv_152",r={itemImage:Js,itemStatus:Zs,mana:Xs,grid:Ks,row:ea,avatarColumn:sa,avatarContainer:aa,info:ta,nameWrapper:na,badgeContainer:la,badge:oa,name:ia,linkAction:ra,subtitle:ca,itemActions:da,removeSaleButton:ua,status:ma,ready:_a,notReady:pa,incomplete:ha,published:xa,underReview:ga,unsynced:ba,alertIcon:Ca,check:ja,contextMenuButton:Ia,contextMenu:Na},fa=25;function va({onOpenModal:s,onSetItems:l,onRemoveFromSale:o,item:t,isOffchainPublicItemOrdersEnabled:u,isOffchainPublicItemOrdersEnabledVariants:m,collection:c,status:b,ethAddress:p,wallet:I,loadingTradeIds:C,isCancellingItemOrder:j}){const N=Ye(),f=Te(),x=I&&Z(c,I),E=I&&u&&oe(c,I),Y=!u||E&&t.tradeId||x,T=i.useMemo(()=>{var R,W,Q;return((Q=(W=(R=m==null?void 0:m.payload)==null?void 0:R.value)==null?void 0:W.trim())==null?void 0:Q.toLocaleLowerCase())===(p==null?void 0:p.toLocaleLowerCase())},[m,p]),P=i.useCallback(()=>{if(u&&E&&!T){s("PutForSaleOffchainModal",{itemId:t.id});return}s("EditPriceAndBeneficiaryModal",{itemId:t.id})},[t,s]),M=i.useCallback(()=>{s("SeeInWorldModal",{itemIds:[t.id]})},[s,t]),S=i.useCallback(()=>{l([t]),f.push(B.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:Pe.COLLECTIONS}),N==null||N.track("Preview Item",{ITEM_ID:t!=null&&t.urn?_e(t.urn)?Ge(t.urn):qe(t.urn):null,ITEM_TYPE:t.type,ITEM_NAME:t.name,ITEM_IS_THIRD_PARTY:_e(t.urn)})},[t,l,f]),$=i.useCallback(()=>{s("DeleteItemModal",{item:t})},[t,s]),G=i.useCallback(()=>{s("MoveItemToAnotherCollectionModal",{item:t,fromCollection:c})},[t,s,c]),D=i.useCallback(()=>{s("PutForSaleOffchainModal",{itemId:t.id})},[]),L=i.useCallback(()=>{t.tradeId&&o(t.tradeId)},[t]),F=i.useCallback(()=>!t.price||T?e.jsx("div",{className:`link ${r.linkAction}`,onClick:te(P),children:n("collection_item.set_price")}):t.price===Qe.toString()||u&&!x&&!t.tradeId?e.jsx("span",{children:"-"}):Ve(t)?e.jsx("span",{children:n("global.free")}):e.jsx(a.Mana,{className:r.mana,network:K.Network.MATIC,showTooltip:!0,children:Je(t.price)}),[t,x,u,P]),q=i.useCallback(()=>b===k.UNSYNCED?e.jsxs("div",{className:`${r.unsynced} ${r.status}`,children:[e.jsx("div",{className:r.alertIcon}),n("collection_item.unsynced")]}):b===k.UNDER_REVIEW||t.isPublished&&!t.isApproved?e.jsxs("div",{className:`${r.underReview} ${r.status}`,children:[e.jsx(a.Icon,{name:"clock outline"}),n("collection_item.under_review")]}):t.isPublished&&t.isApproved?e.jsxs("div",{className:`${r.published} ${r.status}`,children:[e.jsx(a.Icon,{name:"check circle outline"}),n("collection_item.published")]}):Ne(t)?e.jsxs("div",{className:`${r.ready} ${r.status}`,children:[e.jsx(a.Icon,{className:r.check,name:"cloud upload"}),n("collection_item.ready")]}):!t.price||Se(t)&&!(Re in t.contents)?e.jsxs("div",{className:`${r.notReady} ${r.status}`,children:[e.jsx(a.Icon,{name:"exclamation circle"}),n("collection_item.not_ready")]}):e.jsx("span",{onClick:te(S),className:`link ${r.linkAction}`,children:n("collection_item.edit_item")}),[S,t,b]),U=i.useCallback(()=>e.jsx("div",{className:r.itemActions,children:e.jsx(a.Dropdown,{trigger:e.jsx(a.Button,{basic:!0,children:e.jsx(a.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:r.action,onClick:te(),children:e.jsxs(a.Dropdown.Menu,{className:r.contextMenu,children:[e.jsx(a.Dropdown.Item,{text:n("collection_item.see_details"),as:pe,to:B.itemDetail(t.id)}),e.jsx(a.Dropdown.Item,{text:n("collection_context_menu.see_in_decentraland"),onClick:M}),e.jsx(a.Dropdown.Item,{text:n("collection_item.preview"),onClick:S}),!c.isPublished&&e.jsx(a.Dropdown.Item,{text:n("collection_item.move_to_another_collection"),onClick:G}),Ze(c,t,p)&&!ee(c)?e.jsxs(e.Fragment,{children:[t.price&&Y?e.jsx(a.Dropdown.Item,{text:n("collection_item.edit_price"),onClick:P}):null,e.jsx(Vs,{itemId:t.id}),t.isPublished?null:e.jsxs(e.Fragment,{children:[e.jsx(a.Dropdown.Divider,{}),e.jsx(a.Dropdown.Item,{text:n("collection_item.delete_item"),onClick:$})]})]}):null]})})}),[c,t,p,M,S,G,P,$]),v=t.data;return e.jsxs(a.Table.Row,{className:`CollectionItem ${r.row}`,children:[e.jsx(a.Table.Cell,{className:`${r.avatarColumn}`,width:t.name.length>fa?6:5,children:e.jsx(pe,{to:B.itemDetail(t.id),className:"CollectionItem",children:e.jsxs("div",{className:r.avatarContainer,children:[e.jsx(Xe,{className:r.itemImage,item:t}),e.jsx("div",{className:r.info,children:e.jsx("div",{className:r.nameWrapper,children:e.jsxs("div",{className:r.name,title:t.name,children:[e.jsx(Ke,{className:r.itemStatus,item:t}),t.name,e.jsx("div",{className:r.badgeContainer,children:e.jsx(es,{className:r.badge,item:t,size:"small"})})]})})})]})})}),e.jsx(a.Table.Cell,{className:r.column,children:t.rarity&&v.category?e.jsx(ss,{size:"medium",rarity:t.rarity,withTooltip:!0}):null}),e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`${t.type}.category.${v.category}`)}):null}),X(t)&&as(v)?e.jsx(a.Table.Cell,{className:r.column,children:v.category?e.jsx("div",{children:n(`emote.play_mode.${v.loop?"loop":"simple"}.text`)}):null}):null,u&&!c.isPublished?null:e.jsx(a.Table.Cell,{className:r.column,children:F()}),t.isPublished&&t.isApproved?e.jsx(a.Table.Cell,{className:r.column,children:e.jsxs("div",{children:[t.totalSupply,"/",ts(t)]})}):null,e.jsx(a.Table.Cell,{children:q()}),u&&!x&&!t.tradeId&&t.isPublished&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{primary:!0,size:"tiny",disabled:!E,onClick:D,children:n("collection_item.put_for_sale")})}),u&&t.tradeId&&e.jsx(a.Table.Cell,{children:e.jsx(a.Button,{secondary:!0,size:"tiny",className:r.removeSaleButton,onClick:L,loading:j&&C.includes(t.tradeId),children:n("collection_item.remove_from_sale")})}),e.jsx(a.Table.Cell,{className:r.contextMenuButton,children:U()})]})}const ya=(s,l)=>{const o=Ee(s),t=he(s).filter(u=>u.type===xe).map(u=>u.payload.tradeId);return{ethAddress:ns(s),status:o[l.item.id],wallet:ls(s),isOffchainPublicItemOrdersEnabled:os(s),isOffchainPublicItemOrdersEnabledVariants:is(s),isCancellingItemOrder:z(he(s),xe),loadingTradeIds:t}},ka=s=>({onOpenModal:(l,o)=>s(A(l,o)),onDeleteItem:l=>s(rs(l)),onSetItems:l=>s(cs(l)),onRemoveFromSale:l=>s(ds(l,!0))}),Ea=se(ya,ka)(va);function Ta({collection:s,wallet:l,items:o,isOnSaleLoading:t,lastLocation:u,status:m,onOpenModal:c,isLoading:b,onFetchCollectionForumPostReply:p}){const I=us(),C=i.useMemo(()=>new URLSearchParams(I.search).get("tab"),[I]),[j,N]=i.useState(C||y.WEARABLE),f=Te(),x=u===B.collections(),E=i.useCallback(()=>{s&&s.isPublished&&!s.isApproved&&s.forumLink&&p(s.id)},[s,p]);i.useEffect(()=>{s&&E()},[s]);const Y=i.useCallback(()=>{c("MintItemsModal",{collectionId:s.id})},[s,c]),T=i.useCallback(()=>{c("CreateSingleItemModal",{collectionId:s.id})},[s,c]),P=i.useCallback(()=>{s&&!s.isPublished&&c("EditCollectionNameModal",{collection:s})},[s,c]),M=i.useCallback(()=>{s&&c("SellCollectionModal",{collectionId:s.id,isOnSale:oe(s,l)||Z(s,l)})},[s,l,c]),S=i.useCallback(()=>{x?f.goBack():f.push(B.collections())},[f,x]),$=i.useCallback(()=>{s&&f.push(ms(s,o),{fromParam:Pe.COLLECTIONS})},[f,s,o]),G=i.useCallback((d,h="")=>{const _=window.open(d,h);_&&_.focus()},[]),D=i.useCallback(()=>{s&&s.isPublished&&s.forumLink&&G(s.forumLink,"_blank")},[s]),L=i.useCallback(d=>{N(d),f.push(B.collectionDetail(s.id,_s.STANDARD,{tab:j}))},[s,f]),F=i.useCallback(d=>{const h=d===y.WEARABLE?n("collection_detail_page.wearables"):n("collection_detail_page.emotes");return e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_item_price",{item_type:h.toLowerCase()}),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})})},[]),q=i.useCallback(()=>e.jsx(a.Popup,{className:"modal-tooltip",content:n("collection_detail_page.missing_smart_wearable_video"),position:"top center",trigger:e.jsx("i",{"aria-hidden":"true",className:"circle icon tiny"})}),[]),U=i.useCallback(d=>{if(!s)return null;const h=ee(s),_=d.length>0;return e.jsxs(e.Fragment,{children:[e.jsx(Ps,{size:"small",active:!0,collection:s,text:n("global.see_in_decentraland"),disabled:h||!_}),e.jsxs(a.Button,{basic:!0,className:"action-button",disabled:h||!_,onClick:$,children:[e.jsx(O,{name:"cube"}),e.jsx("span",{className:"text",children:n("collection_detail_page.preview")})]}),_&&!s.isPublished?e.jsxs(a.Button,{basic:!0,className:"action-button add-items",disabled:h,onClick:T,children:[e.jsx(O,{name:"add-active"}),e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})]}):null]})},[s,$,T]),v=i.useCallback(()=>{if(!s)return null;const d=Z(s,l),h=oe(s,l);return d?e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsx(a.Button,{className:ne("action-button",d?"basic":"primary"),disabled:t||!_,onClick:M,children:e.jsx("span",{className:"text",children:d?n("collection_detail_page.remove_from_marketplace"):n("collection_detail_page.put_for_sale")})})}):h?null:e.jsx(ge,{network:K.Network.MATIC,children:_=>e.jsxs(a.Button,{className:ne("action-button",h?"secondary":"primary"),disabled:t||!_,onClick:M,children:[e.jsx(a.Icon,{name:"lock"}),e.jsx("span",{className:"text",children:n("collection_detail_page.enable_sales")})]})})},[s,M]),R=i.useCallback((d="tiny")=>{if(s!=null&&s.forumPostReply){const{highest_post_number:h,last_read_post_number:_}=s.forumPostReply,V=h-(_??0);return e.jsx(a.Label,{className:"badge-forum-unread-posts",circular:!0,size:d,children:V})}return null},[s]),W=i.useCallback(()=>!(s!=null&&s.isApproved)||![k.UNSYNCED,k.UNDER_REVIEW].includes(m)?null:e.jsxs("div",{className:"unsynced-collection container",children:[e.jsx("i",{className:"unsynced-collection alert-icon"}),e.jsxs("div",{className:"unsynced-collection message",children:[e.jsx("h4",{className:"unsynced-collection title",children:n("collection_detail_page.unsynced_collection_title")}),e.jsx("p",{className:"unsynced-collection text",children:n(`collection_detail_page.${m}_collection_message`,{br:e.jsx("br",{})})})]}),m===k.UNDER_REVIEW?e.jsxs(a.Button,{primary:!0,onClick:D,className:"unsynced-collection action-button",children:[e.jsx("span",{children:n("collection_context_menu.forum_post")}),R("medium")]}):null,m===k.UNSYNCED?e.jsx(je,{collection:s}):null]}),[s,m,R,D]),Q=i.useCallback(d=>{if(!s)return null;const h=ps(s,l.address),_=ee(s),V=Z(s,l),J=d.some(X),H=d.some(le),we=J?d.some(g=>X(g)&&!g.price):!1,Me=H?d.some(g=>le(g)&&!g.price):!1,De=H&&d.some(g=>Se(g)&&!(Re in g.contents)),de=J&&!H,Le=H&&!J,Be=d.filter(g=>Le?le(g):de?X(g):g.type===j),Ae=J&&H;return e.jsxs(e.Fragment,{children:[e.jsx(a.Section,{className:ne({"is-published":s.isPublished}),children:e.jsxs(a.Row,{children:[e.jsx(Es,{absolute:!0,onClick:S}),e.jsx(a.Narrow,{children:e.jsxs(a.Row,{children:[e.jsx(a.Column,{grow:!1,className:"name-container",children:_?e.jsxs(a.Header,{size:"huge",className:"name",children:[s.isPublished&&e.jsx(Ts,{collection:s}),s.name]}):e.jsxs(a.Row,{className:"header-row",onClick:P,children:[e.jsx(a.Header,{size:"huge",className:"name",children:s.name}),e.jsx(O,{name:"edit",className:"edit-collection-name"}),V?e.jsx(a.Label,{className:"badge-on-sale",size:"small",circular:!0,children:n("collection_detail_page.on_sale")}):null]})}),e.jsx(a.Column,{align:"right",className:"actions-container",shrink:!1,grow:!1,children:e.jsxs(a.Row,{className:"actions",children:[s.isPublished&&s.isApproved?e.jsx(a.Popup,{content:n("collection_detail_page.can_mint"),className:"CollectionDetailPage popup-mint",position:"top center",trigger:e.jsx(a.Button,{basic:!0,className:"action-button",disabled:!h,onClick:Y,children:e.jsx("span",{className:"text",children:n("collection_detail_page.mint_items")})}),on:"hover",inverted:!0,flowing:!0}):null,s.isPublished&&s.forumLink&&!s.isApproved?e.jsxs(e.Fragment,{children:[e.jsx(a.Button,{basic:!0,onClick:D,children:e.jsx("span",{children:n("collection_context_menu.forum_post")})}),s!=null&&s.forumPostReply?R():null]}):null,!(s.isPublished&&s.isApproved)&&m!==k.UNSYNCED?e.jsx(je,{collection:s}):null,ve(s,l.address)&&s.isPublished&&s.isApproved?v():null,be(s,l.address)?e.jsx(zs,{collection:s}):null]})})]})})]})}),e.jsxs(a.Narrow,{children:[W(),Ae?e.jsxs(a.Tabs,{isFullscreen:!0,children:[e.jsxs(a.Tabs.Tab,{active:j===y.WEARABLE,onClick:()=>L(y.WEARABLE),children:[e.jsx(O,{name:"wearable"}),n("collection_detail_page.wearables"),Me?F(y.WEARABLE):De?q():null]}),e.jsxs(a.Tabs.Tab,{active:j===y.EMOTE,onClick:()=>L(y.EMOTE),children:[e.jsx(O,{name:"emote"}),n("collection_detail_page.emotes"),we?F(y.EMOTE):null]}),e.jsx("div",{className:"secondary-actions tab",children:U(d)})]}):e.jsx("div",{className:"secondary-actions",children:U(d)}),d.length>0?e.jsxs(a.Table,{basic:"very",children:[e.jsx(a.Table.Header,{children:e.jsxs(a.Table.Row,{children:[e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.item")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.rarity")}),e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.category")}),j===y.EMOTE||de?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.play_mode")}):null,s.isPublished?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.price")}):null,s.isPublished&&s.isApproved?e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.supply")}):null,e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.status")}),!V&&e.jsx(a.Table.HeaderCell,{children:n("collection_detail_page.table.actions")}),e.jsx(a.Table.HeaderCell,{})]})}),e.jsx(a.Table.Body,{children:Be.map(g=>e.jsx(Ea,{collection:s,item:g},g.id))})]}):e.jsxs("div",{className:"empty",children:[e.jsx("div",{className:"sparkles"}),e.jsxs("div",{children:[e.jsx("span",{className:"empty-collection-title",children:n("collection_detail_page.add_items_title")}),e.jsx("br",{}),n("collection_detail_page.add_items_subtitle"),e.jsx("br",{}),n("collection_detail_page.cant_remove"),e.jsx("br",{}),e.jsx(a.Button,{basic:!0,className:"empty-action-button",disabled:_,onClick:T,children:e.jsx("span",{className:"text",children:n("collection_detail_page.add_item")})})]})]})]})]})},[j,m,l,s,T,U,P,F,L,W,v,L,D,q,R,Y,S]),ce=l!==null&&s!==null&&be(s,l.address);return e.jsx(vs,{id:s==null?void 0:s.id,itemsPage:1,itemsPageSize:5e3,children:({isLoadingCollection:d,isLoadingCollectionItems:h,items:_})=>e.jsx(ys,{className:"CollectionDetailPage",hasNavigation:!ce&&!b&&!d,isLoading:b||d||h,children:ce?Q(_):e.jsx(ks,{})})})}const Pa=()=>{const s=hs(),l=Ns()||"",o=w(ye),t=w(x=>xs(x,l)),u=w(fe),m=w(gs),c=w(ke),b=w(x=>re(x,l)),p=w(fs),I=i.useMemo(()=>m||z(c,Cs),[m,c]),C=u[l],j=z(c,js)||z(c,Is),N=i.useCallback((x,E)=>s(A(x,E)),[s]),f=i.useCallback(x=>s(bs(x)),[s]);return e.jsx(Ta,{wallet:o,collection:t,isOnSaleLoading:I,isLoading:j,items:b,status:C,lastLocation:p,onOpenModal:N,onFetchCollectionForumPostReply:f})},za=Pa;export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var S=Object.defineProperty;var L=(n,a,s)=>a in n?S(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s;var r=(n,a,s)=>L(n,typeof a!="symbol"?a+"":a,s);import{aG as b,J as x,dp as g,N as e,S as c,M as o,Q as m,R as p,b6 as j,cq as R,aR as C,T as w,bE as P,dq as f,cZ as k}from"./index-
|
|
1
|
+
var S=Object.defineProperty;var L=(n,a,s)=>a in n?S(n,a,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[a]=s;var r=(n,a,s)=>L(n,typeof a!="symbol"?a+"":a,s);import{aG as b,J as x,dp as g,N as e,S as c,M as o,Q as m,R as p,b6 as j,cq as R,aR as C,T as w,bE as P,dq as f,cZ as k}from"./index-BHRIVcTs.js";import{L as v}from"./LandAction-ClUpTbS0.js";import{L as F}from"./LandProviderPage-Cle8Kso_.js";import"./Back-Bt1TpmNC.js";import"./NotFound-BGRBV5Uq.js";import"./hooks-aEto244t.js";const u=b.get("MARKETPLACE_WEB_URL","");class B extends x.PureComponent{constructor(){super(...arguments);r(this,"state",{selectedName:""});r(this,"handleChange",(s,i)=>{const{onFetchENS:l,land:t}=this.props,d=i.value;l(d,t),this.setState({selectedName:d})});r(this,"handleContinue",()=>{const{selectedName:s}=this.state,{onUpdateSubdomain:i,ensList:l}=this.props,t=l.find(d=>d.name===s);i(t.subdomain)})}render(){const{land:s,ensList:i,isLoading:l}=this.props,{selectedName:t}=this.state,d=i.map(({name:_,subdomain:N})=>({value:_,text:N})),h=i.find(_=>_.name===t),E=!h||g(h,s);return e.jsx(c.Form,{className:"LandSelectENSForm",children:!l&&d.length===0?e.jsxs(e.Fragment,{children:[e.jsx(c.Section,{size:"large",children:o("land_select_ens_page.empty_options_message")}),e.jsxs(c.Row,{children:[e.jsx(m,{className:"cancel",to:p.landDetail(s.id),children:e.jsx(c.Button,{children:o("global.cancel")})}),e.jsx(m,{to:`${u}/names/claim`,children:e.jsx(c.Button,{primary:!0,children:o("land_select_ens_page.claim_new_name")})})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs(c.Section,{size:"large",children:[e.jsxs("div",{className:"select-names",children:[e.jsx(c.Header,{sub:!0,className:"name",children:o("land_select_ens_page.select_name_title")}),e.jsx(c.Dropdown,{value:t,options:d,placeholder:o("land_select_ens_page.select_name_placeholder"),onChange:this.handleChange})]}),e.jsx("div",{className:"select-message",children:h&&g(h,s)?e.jsx("span",{className:"danger-text",children:o("land_select_ens_page.name_assigned")}):e.jsx(j,{id:"land_select_ens_page.click_to_claim_new_name",values:{click_here:e.jsx(m,{to:`${u}/names/claim`,children:o("global.click_here")})}})})]}),e.jsxs(c.Row,{children:[e.jsx(m,{className:"cancel",to:p.landDetail(s.id),children:e.jsx(c.Button,{children:o("global.cancel")})}),e.jsx(R,{type:"submit",disabled:E||l,primary:!0,onClick:this.handleContinue,loading:l,network:C.Network.ETHEREUM,children:o("global.continue")})]})]})})}}let U=class extends x.PureComponent{constructor(){super(...arguments);r(this,"handleUpdateSubdomain",(s,i)=>{const{history:l}=this.props;l.push(p.landAssignENS(s.id,i))})}render(){const{ensList:s,isLoading:i,onFetchENS:l}=this.props;return e.jsx(F,{children:t=>e.jsx(v,{land:t,title:o("land_select_ens_page.title"),subtitle:e.jsx(j,{id:"land_select_ens_page.subtitle",values:{land:e.jsx(m,{to:p.landDetail(t.id),children:t.name})}}),children:e.jsx(B,{land:t,ensList:s,isLoading:i,onUpdateSubdomain:d=>this.handleUpdateSubdomain(t,d),onFetchENS:l})})})}};const A=n=>({ensList:f(n)}),D=n=>({onFetchENS:(a,s)=>n(k(a,s))}),W=w(A,D)(P(U));export{W as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap as u}from"./index-
|
|
1
|
+
var i=Object.defineProperty;var c=(n,e,t)=>e in n?i(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var s=(n,e,t)=>c(n,typeof e!="symbol"?e+"":e,t);import{ak as r,al as d,N as a,am as p,S as h,an as g,ao as l,T as C,aj as m,ad as x,ap as u}from"./index-BHRIVcTs.js";let j=class extends r.PureComponent{constructor(){super(...arguments);s(this,"handleOnConnect",t=>{this.props.onConnect(t)});s(this,"handleRedirectToAuthDapp",()=>{if(!this.props.isConnected&&!this.props.isConnecting){const t=new URLSearchParams(window.location.search),o=/^decentraland.(zone|org|today)$/.test(window.location.host)?"/builder":"";d(`${o}${t.get("redirectTo")||"/"}`)}})}render(){const{isConnected:t}=this.props;return a.jsxs(a.Fragment,{children:[a.jsx(p,{}),a.jsx(h.Page,{children:a.jsx(g,{onConnect:this.handleRedirectToAuthDapp,isConnected:t,handleLoginConnect:this.handleOnConnect})}),a.jsx(l,{})]})}};const P=n=>({isConnected:m(n),isConnecting:x(n)}),S=n=>({onConnect:e=>n(u(e))}),T=C(P,S)(j);export{T as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as e,ga as Ge,gb as Re,a7 as Z,dM as Ue,S as s,T as F,fl as Ie,a4 as Q,f7 as We,M as o,fV as Oe,e$ as te,gc as He,cO as Fe,a2 as M,eD as ze,gd as qe,g3 as Ve,bq as ke,g5 as Ye,g6 as Ze,eO as Ne,ge as Qe,J as l,R as $,gf as Je,gg as Ke,eY as B,dN as fe,ez as Xe,gh as et,bp as ye,Q as be,fm as ve,ey as we,eB as ue,gi as tt,gj as ge,gk as st,gl as nt,gm as at,gn as it,go as ot,fp as lt,gp as rt,gq as Se,eE as ct,gr as dt,gs as mt,gt as he,P as _t,cM as ut,cN as gt,aa as ht,ab as w,eZ as pe,eJ as Ce,fB as pt,ej as Ct,gu as xt,gv as jt,gw as It,eM as kt,gx as Nt,gy as ft,gz as yt,gA as bt,gB as vt,g0 as wt}from"./index-DTDyEcLh.js";import{e as St,f as Pt}from"./hooks-B7lAA488.js";import{g as Dt}from"./selector-CtnQnmhq.js";import{L as Et}from"./LoggedInDetailPage.container-CzPOYbHr.js";import{C as Mt}from"./CollectionProvider.container-CrHF62H9.js";import{N as Tt}from"./NotFound-Bvndb2kC.js";import{B as Bt}from"./Back-DBc-1vBx.js";import{C as $t,T as Lt}from"./ThirdPartyKindBadge-SbI32IAq.js";import{C as se}from"./ConfirmDelete-BQd9EOmm.js";import"./Navigation.container-zriX5zTq.js";import"./selectors-DOsTc9Gc.js";import"./SignInRequired-BesSl-uu.js";const At=t=>e.jsx("img",{"data-testid":Ge,src:Re[t.network],alt:t.network,className:t.className}),Gt="_image_142g7_1",Rt="_main_142g7_2",Ut="_network_142g7_13",q={image:Gt,main:Rt,network:Ut},Wt=t=>{const{collection:n,collectionId:r,className:i,shape:m}=t;return e.jsxs("div",{className:Z(q.main,i),children:[n!=null&&n.itemCount?e.jsx(Ue,{collectionId:r,className:q.image}):e.jsx(s.Blockie,{className:q.image,seed:r,size:8,scale:8,shape:m??"circle"}),n!=null&&n.linkedContractNetwork?e.jsx(At,{network:n==null?void 0:n.linkedContractNetwork,className:q.network}):null]})},Ot=(t,n)=>({collection:Ie(t,n.collectionId)}),Ht=F(Ot)(Wt),Ft="_ellipsis_4huv2_1",xe={ellipsis:Ft},zt=t=>{const{collection:n}=t,r=Q(),i=()=>{n.isPublished&&n.forumLink&&S(n.forumLink,"_blank")},m=()=>{const{items:_,onOpenModal:d}=t;d("SeeInWorldModal",{itemIds:_.map(f=>f.id)})},a=()=>{const{collection:_,items:d}=t;r.push(Oe(_,d),{fromParam:te.TP_COLLECTIONS})},j=()=>{const{collection:_,onDelete:d}=t;d(_)},C=()=>{const{collection:_,onOpenModal:d}=t;_.isPublished||d("EditCollectionURNModal",{collection:_})},b=()=>{const{collection:_,onOpenModal:d}=t;d("CreateAndEditMultipleItemsModal",{collectionId:_.id,type:He.EDIT})},S=(_,d="")=>{const f=window.open(_,d);f&&f.focus()},I=!We(n)&&!n.isPublished;return e.jsx(s.Dropdown,{className:xe.dropdown,trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{className:xe.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:m}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:a}),e.jsx(s.Popup,{content:o("collection_context_menu.delete_published_collection"),position:"right center",disabled:I,trigger:I?e.jsx(se,{name:n.name,onDelete:j,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})}):e.jsx(s.Dropdown.Item,{text:o("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Popup,{content:o("collection_context_menu.change_published_urn"),position:"right center",disabled:!n.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_urn"),onClick:C,disabled:n.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_in_bulk"),onClick:b}),e.jsx(s.Popup,{content:o("collection_context_menu.unpublished"),position:"right center",disabled:n.isPublished||!!n.forumLink,trigger:e.jsx(s.Dropdown.Item,{disabled:!n.isPublished||!n.forumLink,text:o("collection_context_menu.forum_post"),onClick:i}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},qt=t=>({name:Fe(t)||""}),Vt=t=>({onOpenModal:(n,r)=>t(M(n,r)),onDelete:n=>t(ze(n))}),Yt=F(qt,Vt)(zt),Zt=(t,n)=>{const{collection:r,items:i}=n;return{itemCurations:Ve(t,r.id),isLoadingItemCurations:ke(Ze(t),Ye),isLinkedWearablesPaymentsEnabled:Ne(t),itemsStatus:Qe(t,i.map(m=>m.id))}},Qt=t=>({onNewClick:(n,r,i)=>t(M("PublishWizardCollectionModal",{collectionId:n,itemsWithChanges:r,itemsToPublish:i})),onPushChangesClick:(n,r)=>t(M("PushChangesModal",{collectionId:n,itemsWithChanges:r})),onClick:(n,r,i)=>t(M("PublishThirdPartyCollectionModal",{collectionId:n,itemIds:r,action:i}))}),Jt=F(Zt,Qt)(qe),Kt="_itemImage_1y9df_1",Xt="_itemStatus_1y9df_10",es="_grid_1y9df_14",ts="_row_1y9df_25",ss="_column_1y9df_30",ns="_statusColumn_1y9df_34",as="_synced_1y9df_39",is="_unsynced_1y9df_43",os="_avatarColumn_1y9df_47",ls="_nameWrapper_1y9df_52",rs="_name_1y9df_52",cs="_itemActions_1y9df_65",ds="_action_1y9df_72",x={itemImage:Kt,itemStatus:Xt,grid:es,row:ts,column:ss,statusColumn:ns,synced:as,unsynced:is,avatarColumn:os,nameWrapper:ls,name:rs,itemActions:cs,action:ds};function ms({item:t,status:n,selected:r,onSelect:i,onOpenModal:m,onDelete:a}){const j=Q(),C=l.useCallback((h,D)=>{i(t,D.checked)},[t,i]),b=l.useCallback(()=>{m("SeeInWorldModal",{itemIds:[t.id]})},[t,m]),S=l.useCallback(()=>{t.isPublished||m("EditItemURNModal",{item:t})},[t,m]),I=l.useCallback(()=>{j.push($.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,j]),_=l.useCallback(()=>{a(t)},[a,t]),d=l.useMemo(()=>{if(!t.urn)return"";try{const h=Je(t.urn);return Ke(h)?h.thirdPartyTokenId??"":""}catch{return""}},[t]),f=l.useMemo(()=>{switch(n){case B.UNDER_REVIEW:return e.jsx(s.Icon,{name:"clock outline"});case B.SYNCED:return e.jsx(s.Icon,{name:"check circle outline"});case B.UNSYNCED:return e.jsx(s.Icon,{name:"exclamation circle"});default:return null}},[n]),y=t.data;return e.jsx(s.Grid,{className:`CollectionItem ${x.grid}`,columns:"equal",children:e.jsxs(s.Grid.Row,{className:x.row,children:[e.jsxs(s.Grid.Column,{className:`${x.column} ${x.avatarColumn}`,width:5,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished,onClick:C}),e.jsx(fe,{className:x.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:x.nameWrapper,children:e.jsxs("div",{className:x.name,title:t.name,children:[e.jsx(Xe,{className:x.itemStatus,item:t}),t.name]})})]}),e.jsx(s.Grid.Column,{className:x.column,children:y.category?e.jsx("div",{children:o(`wearable.category.${y.category}`)}):null}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:o(`body_shapes.${et(t)}`)})}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:d})}),e.jsxs(s.Grid.Column,{width:3,className:`${x.column} ${x.statusColumn} ${x[n]}`,children:[f,e.jsx("div",{children:o(`third_party_collection_detail_page.synced_statuses.${n}`)})]}),e.jsx(s.Grid.Column,{width:1,className:x.column,children:e.jsx("div",{className:x.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:x.action,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:$.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:b}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:I}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:S,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:_,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})})}const _s=(t,n)=>({status:ve(t)[n.item.id]}),us=t=>({onDelete:n=>t(we(n)),onOpenModal:(n,r)=>t(M(n,r))}),gs=F(_s,us)(ms),hs="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",Cs="_status_rgxu1_1",xs="_pending_migration_rgxu1_14",js="_synced_rgxu1_19",Is="_unpublished_rgxu1_24",ks="_unsynced_rgxu1_25",Ns="_pending_mapping_rgxu1_30",fs="_under_review_rgxu1_31",ys="_icon_rgxu1_10",V={status:Cs,pending_migration:xs,synced:js,unpublished:Is,unsynced:ks,pending_mapping:Ns,under_review:fs,icon:ys},bs=t=>{const{status:n,item:r}=t,i=!r.mappings&&ue(r.urn),m=!r.isMappingComplete&&ue(r.urn),a=l.useMemo(()=>{if(i)return e.jsx("img",{src:hs,className:V.icon});if(m)return e.jsx(s.Icon,{name:"warning circle"});switch(n){case B.UNDER_REVIEW:return e.jsx("img",{src:ps,className:V.icon});case B.SYNCED:return e.jsx(s.Icon,{name:"check circle"});case B.UNSYNCED:case B.UNPUBLISHED:return e.jsx(s.Icon,{name:"cloud upload"})}},[n,i,m]),j=l.useMemo(()=>i?o("item_status.pending_mapping"):m?o("item_status.pending_migration"):o(`item_status.${n}`),[n,i,m]),C=l.useMemo(()=>i?"pending_mapping":m?"pending_migration":n,[n,i,m]);return e.jsxs("div",{className:Z(V[C],V.status),children:[a," ",j]})},vs="_itemImage_1rili_1",ws="_itemStatus_1rili_10",Ss="_grid_1rili_14",Ps="_loading_1rili_21",Ds="_row_1rili_26",Es="_column_1rili_31",Ms="_avatarColumn_1rili_35",Ts="_nameWrapper_1rili_40",Bs="_name_1rili_40",$s="_itemActions_1rili_53",Ls="_action_1rili_60",As="_overlay_1rili_65",N={itemImage:vs,itemStatus:ws,grid:Ss,loading:Ps,row:Ds,column:Es,avatarColumn:Ms,nameWrapper:Ts,name:Bs,itemActions:$s,action:Ls,overlay:As};function Gs({item:t,status:n,selected:r,loading:i,collection:m,onSaveItem:a,onSelect:j,onOpenModal:C,onDelete:b}){const S=Q(),I=l.useMemo(()=>tt(t),[t]),_=l.useMemo(()=>m.linkedContractAddress&&m.linkedContractNetwork?{address:m.linkedContractAddress,network:m.linkedContractNetwork}:null,[m]),[d,f]=l.useState(I),y=l.useMemo(()=>{if(d&&_){const v=ge(d,_);return st(v)?void 0:"Invalid mapping"}},[d,_]);l.useEffect(()=>{!_||y||(!I&&d||I&&d&&!nt(I,d))&&h(d,_)},[I,y,d,_]);const h=l.useCallback(at((v,T)=>{const A=ge(v,T);a({...t,mappings:A})},1e3),[a]),D=l.useCallback((v,T)=>{i||j(t,T.checked)},[t,i,j]),P=l.useCallback(()=>{C("SeeInWorldModal",{itemIds:[t.id]})},[t,C]),L=l.useCallback(()=>{t.isPublished||C("EditItemURNModal",{item:t})},[t,C]),R=l.useCallback(()=>{S.push($.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,S]),c=l.useCallback(()=>{b(t)},[b,t]);return e.jsxs(s.Grid,{className:Z(N.grid,i&&N.loading),columns:"equal",children:[i&&e.jsx("div",{className:N.overlay,children:e.jsx(s.Loader,{size:"large",active:!0})}),e.jsxs(s.Grid.Row,{className:N.row,children:[e.jsxs(s.Grid.Column,{className:`${N.column} ${N.avatarColumn}`,width:4,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished||i,onClick:D}),e.jsx(fe,{className:N.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:N.nameWrapper,children:e.jsx("div",{className:N.name,title:t.name,children:t.name})})]}),e.jsx(s.Grid.Column,{children:_&&e.jsx(it,{disabled:i,mapping:d,error:y,onChange:f,isCompact:!0})}),e.jsx(s.Grid.Column,{width:3,className:Z(N.column,N.statusColumn),children:e.jsx(bs,{status:n,item:t})}),e.jsx(s.Grid.Column,{width:1,className:N.column,children:e.jsx("div",{className:N.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:N.action,disabled:i,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:$.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:P}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:R}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:L,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:c,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})]})}const Rs=(t,n)=>{const r=ve(t);return{loading:!!ot(t)[n.item.id],status:r[n.item.id]}},Us=t=>({onDelete:n=>t(we(n)),onSaveItem:n=>t(lt(n,{},{onlySaveItem:!0})),onOpenModal:(n,r)=>t(M(n,r))}),Ws=F(Rs,Us)(Gs),G=50,Os="_itemCheckbox_2k9qa_1",Hs="_gridHeader_2k9qa_5",Fs="_itemColumn_2k9qa_15",ee={itemCheckbox:Os,gridHeader:Hs,itemColumn:Fs},zs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:ee.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:5,className:ee.itemColumn,children:[e.jsx(s.Checkbox,{className:ee.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsx(s.Grid.Column,{children:o("global.category")}),e.jsx(s.Grid.Column,{children:o("global.body_shape")}),e.jsx(s.Grid.Column,{children:"URN ID"}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),qs="_gridHeader_4acv6_1",Vs="_itemColumn_4acv6_11",Ys="_itemCheckbox_4acv6_16",Zs="_linkedToColumn_4acv6_20",Y={gridHeader:qs,itemColumn:Vs,itemCheckbox:Ys,linkedToColumn:Zs},Qs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:Y.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:4,className:Y.itemColumn,children:[e.jsx(s.Checkbox,{className:Y.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsxs(s.Grid.Column,{className:Y.linkedToColumn,children:[e.jsx("span",{children:o("third_party_collection_detail_page.linked_to")}),e.jsx(rt,{})]}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),Js="_main_16i8r_3",Ks="_slots_16i8r_11",Xs="_empty_16i8r_28",en="_searchContainer_16i8r_32",tn="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",nn="_selectionInfo_16i8r_53",an="_header_16i8r_63",on="_content_16i8r_74",ln="_title_16i8r_83",rn="_editCollectionName_16i8r_96",cn="_name_16i8r_101",dn="_nameAndType_16i8r_105",mn="_nameWrapper_16i8r_115",_n="_size_16i8r_139",un="_actions_16i8r_143",gn="_body_16i8r_151",hn="_info_16i8r_162",pn="_infoHeader_16i8r_170",Cn="_infoContent_16i8r_178",xn="_slotsIcon_16i8r_195",jn="_copyButton_16i8r_207",In="_sparkles_16i8r_232",kn="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",yn="_linkedWearableBadge_16i8r_283",bn="_typeBadge_16i8r_288",vn="_programmaticBadge_16i8r_292",wn="_standardBadge_16i8r_296",Sn="_loader_16i8r_302",u={main:Js,slots:Ks,empty:Xs,searchContainer:en,searchInfo:tn,syncedStatusList:sn,selectionInfo:nn,header:an,content:on,title:ln,editCollectionName:rn,name:cn,nameAndType:dn,nameWrapper:mn,size:_n,actions:un,body:gn,info:hn,infoHeader:pn,infoContent:Cn,slotsIcon:xn,copyButton:jn,sparkles:In,start:kn,migrationBanner:Nn,type:fn,linkedWearableBadge:yn,typeBadge:bn,programmaticBadge:vn,standardBadge:wn,loader:Sn},je=({children:t,title:n,info:r})=>e.jsxs("div",{className:u.info,children:[e.jsxs("div",{className:u.infoHeader,children:[n," ",r&&e.jsx(s.InfoTooltip,{content:r})]}),e.jsx("div",{className:u.infoContent,children:t})]});function Pn({currentPage:t,lastLocation:n,wallet:r,thirdParty:i,items:m,collection:a,totalItems:j,isLoading:C,isThirdPartyV2Enabled:b,isLinkedWearablesPaymentsEnabled:S,onFetchAvailableSlots:I,onFetchThirdParty:_,onNewItem:d,onEditName:f,isLoadingAvailableSlots:y}){const[h,D]=l.useState({}),[P,L]=l.useState(t),[R,c]=l.useState(!1),[v,T]=l.useState(!1),[A,ne]=l.useState("ALL"),U=Q(),ae=n===$.collections();l.useEffect(()=>{i&&i.availableSlots===void 0&&!y&&I(i.id)},[i,y,I]),l.useEffect(()=>{!C&&!i&&(a!=null&&a.urn)&&_(Se(a.urn))},[a==null?void 0:a.urn,C,i]),l.useEffect(()=>{if(t!==P&&L(t),v){const g=m.reduce((p,k)=>(p[k.id]=!0,p),{});D(g),c(!1)}},[P,v,m,i,t]);const Pe=l.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),De=l.useCallback(()=>{a&&f(a)},[a,f]),Ee=l.useCallback(()=>{ae?U.goBack():U.push($.collections(ct.THIRD_PARTY))},[U,ae]),Me=l.useCallback((g,p)=>{L(+p.activePage),U.push($.thirdPartyCollectionDetail(a.id,{page:+p.activePage}))},[a,U]),J=l.useCallback((g,p)=>{D({...h,[g.id]:p}),T(!1),c(!1)},[h]),W=l.useCallback(g=>g.every(p=>h[p.id]),[h]),ie=l.useCallback((g,p)=>{const k={...h},O=!W(g);for(const H of g)k[H.id]=O;D(k),c(!0),T(v&&!!p.checked)},[h,v,W]),oe=l.useCallback(()=>{D({})},[]),le=l.useMemo(()=>a&&i&&r&&dt(r.address,i),[a,i,r]),Te=l.useCallback(g=>{if(T(!0),a){const p=Math.ceil(j/G);g(a.id,{page:mt(p),limit:G,overridePaginationData:!1})}},[j]),re=l.useCallback((g,{value:p})=>{ne(p)},[ne]),Be=[{value:"ALL",text:o("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:o("item_status.synced")},{value:"UNSYNCED",text:o("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:o("item_status.pending_migration")},{value:"MAPPING_PENDING",text:o("item_status.pending_mapping")}]],$e=l.useMemo(()=>{switch(A){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:he.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:he.MISSING_MAPPING};default:return{}}},[A]),Le=l.useCallback((g,p,k,O,H)=>{const ce=p.filter(E=>h[E.id]),de=ce.length,me=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),z=j,K=Math.ceil(z/G),_e=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u.header,children:[e.jsx(Bt,{absolute:!0,onClick:Ee}),e.jsxs("div",{className:u.content,children:[e.jsxs("div",{className:u.title,children:[e.jsx(Ht,{collectionId:a.id}),e.jsxs("div",{className:u.nameAndType,children:[e.jsxs("div",{className:u.nameWrapper,children:[e.jsx(s.Header,{size:"large",className:u.name,onClick:De,children:a.name}),!a.isPublished&&e.jsx(_t,{name:"edit",className:u.editCollectionName})]}),e.jsxs("div",{className:u.type,children:[e.jsx($t,{isThirdParty:!0}),e.jsx(Lt,{isProgrammatic:g.isProgrammatic})]})]})]}),e.jsxs("div",{className:u.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(je,{title:o("third_party_collection_detail_page.smart_contract_address_short"),info:o("third_party_collection_detail_page.smart_contract_address_long"),children:[ut(a.linkedContractAddress)," ",e.jsx(gt,{className:u.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(s.Icon,{name:"copy outline"})})]}),!S&&e.jsxs(je,{title:o("third_party_collection_detail_page.slots_short"),info:o("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:u.slotsIcon}),y?e.jsx(s.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[g.availableSlots??0," / ",g.maxItems]})]}),e.jsxs(s.Button,{inverted:!0,onClick:Pe,children:[e.jsx(s.Icon,{name:"plus"}),o("third_party_collection_detail_page.new_items")]}),g.availableSlots!==void 0?e.jsx(Jt,{collection:a,items:ce,slots:g.availableSlots}):null,e.jsx(Yt,{collection:a,items:k})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:u.migrationBanner,children:[e.jsx(s.Icon,{name:"sync"})," ",o("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:u.body,children:O?e.jsx("div",{className:u.loader,children:e.jsx(s.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:u.searchContainer,children:[k.length>0&&e.jsx("div",{className:u.searchInfo,children:o("third_party_collection_detail_page.search_info",{page:(P-1)*G+1,pageTotal:Math.min(z,P*G),total:z})}),e.jsx(s.Dropdown,{className:u.syncedStatusList,direction:"left",value:A,options:Be,onChange:re})]}),k.length?e.jsxs(e.Fragment,{children:[de>0?e.jsxs("div",{className:u.selectionInfo,children:[o("third_party_collection_detail_page.selection",{count:de})," ",e.jsx("span",{className:"link",onClick:oe,children:o("third_party_collection_detail_page.clear_selection")}),". ",R&&K>1?e.jsx("span",{className:"link",onClick:()=>Te(H),children:o("third_party_collection_detail_page.select_all",{total:z})}):null," "]}):null,e.jsxs("div",{children:[b&&me?e.jsx(Qs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}):e.jsx(zs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}),k.map(E=>b&&me?e.jsx(Ws,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id):e.jsx(gs,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id)),K>1?e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:K,activePage:P,onPageChange:Me}):null]})]}):e.jsxs("div",{className:u.empty,children:[e.jsx("div",{className:_e?u.start:u.sparkles}),_e?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:o("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:o("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,S,b,j,P,J,W,re,oe,A]),Ae=le&&a;return e.jsx(Mt,{id:a==null?void 0:a.id,itemsPage:P,itemsPageSize:G,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:g,isLoadingCollectionItems:p,items:k,paginatedItems:O,onFetchCollectionItemsPages:H})=>e.jsx(Et,{className:u.main,hasNavigation:!le&&!C&&!g,isLoading:C||g,children:Ae&&i?Le(i,k,O,p,H):e.jsx(Tt,{})})})}const Dn=()=>{const t=ht(),n=St()||"",r=Pt(),i=w(c=>Ie(c,n)),m=l.useMemo(()=>i?pe(i):!1,[i]),a=w(c=>{var v;return((v=Ce(c,n))==null?void 0:v.total)||null}),j=w(c=>i?pt(c,i.id):[]),C=w(c=>i&&Ce(c,i.id)||null),b=w(Ct),S=w(xt),I=w(Ne),_=w(c=>i&&pe(i)?jt(c,i):null),d=w(c=>It(c)),f=w(c=>ke(kt(c),wt)||Nt(c)||!!(m&&i&&ft(c,Se(i.urn)))),y=w(c=>yt(c)),h=w(c=>Dt(c)),D=l.useCallback(c=>t(M("CreateItemsModal",{collectionId:c})),[t]),P=l.useCallback(c=>t(M("EditCollectionNameModal",{collection:c})),[t]),L=l.useCallback(c=>t(bt(c)),[t]),R=l.useCallback(c=>t(vt(c)),[t]);return e.jsx(Pn,{items:j,totalItems:a,currentPage:r,paginatedData:C,wallet:b,collection:i,isThirdPartyV2Enabled:S,isLinkedWearablesPaymentsEnabled:I,thirdParty:_,authorizations:d,isLoading:f,isLoadingAvailableSlots:y,lastLocation:h,onNewItem:D,onEditName:P,onFetchAvailableSlots:L,onFetchThirdParty:R})},Hn=Dn;export{Hn as default};
|
|
1
|
+
import{N as e,ga as Ge,gb as Re,a7 as Z,dM as Ue,S as s,T as F,fl as Ie,a4 as Q,f7 as We,M as o,fV as Oe,e$ as te,gc as He,cO as Fe,a2 as M,eD as ze,gd as qe,g3 as Ve,bq as ke,g5 as Ye,g6 as Ze,eO as Ne,ge as Qe,J as l,R as $,gf as Je,gg as Ke,eY as B,dN as fe,ez as Xe,gh as et,bp as ye,Q as be,fm as ve,ey as we,eB as ue,gi as tt,gj as ge,gk as st,gl as nt,gm as at,gn as it,go as ot,fp as lt,gp as rt,gq as Se,eE as ct,gr as dt,gs as mt,gt as he,P as _t,cM as ut,cN as gt,aa as ht,ab as w,eZ as pe,eJ as Ce,fB as pt,ej as Ct,gu as xt,gv as jt,gw as It,eM as kt,gx as Nt,gy as ft,gz as yt,gA as bt,gB as vt,g0 as wt}from"./index-BHRIVcTs.js";import{e as St,f as Pt}from"./hooks-aEto244t.js";import{g as Dt}from"./selector-CtnQnmhq.js";import{L as Et}from"./LoggedInDetailPage.container-DWMoMSsT.js";import{C as Mt}from"./CollectionProvider.container-CdZDU931.js";import{N as Tt}from"./NotFound-BGRBV5Uq.js";import{B as Bt}from"./Back-Bt1TpmNC.js";import{C as $t,T as Lt}from"./ThirdPartyKindBadge-BClaXwJI.js";import{C as se}from"./ConfirmDelete-BvCbqgkr.js";import"./Navigation.container-9A40G-C8.js";import"./selectors-RKMIkjNm.js";import"./SignInRequired-B_3SXeXM.js";const At=t=>e.jsx("img",{"data-testid":Ge,src:Re[t.network],alt:t.network,className:t.className}),Gt="_image_142g7_1",Rt="_main_142g7_2",Ut="_network_142g7_13",q={image:Gt,main:Rt,network:Ut},Wt=t=>{const{collection:n,collectionId:r,className:i,shape:m}=t;return e.jsxs("div",{className:Z(q.main,i),children:[n!=null&&n.itemCount?e.jsx(Ue,{collectionId:r,className:q.image}):e.jsx(s.Blockie,{className:q.image,seed:r,size:8,scale:8,shape:m??"circle"}),n!=null&&n.linkedContractNetwork?e.jsx(At,{network:n==null?void 0:n.linkedContractNetwork,className:q.network}):null]})},Ot=(t,n)=>({collection:Ie(t,n.collectionId)}),Ht=F(Ot)(Wt),Ft="_ellipsis_4huv2_1",xe={ellipsis:Ft},zt=t=>{const{collection:n}=t,r=Q(),i=()=>{n.isPublished&&n.forumLink&&S(n.forumLink,"_blank")},m=()=>{const{items:_,onOpenModal:d}=t;d("SeeInWorldModal",{itemIds:_.map(f=>f.id)})},a=()=>{const{collection:_,items:d}=t;r.push(Oe(_,d),{fromParam:te.TP_COLLECTIONS})},j=()=>{const{collection:_,onDelete:d}=t;d(_)},C=()=>{const{collection:_,onOpenModal:d}=t;_.isPublished||d("EditCollectionURNModal",{collection:_})},b=()=>{const{collection:_,onOpenModal:d}=t;d("CreateAndEditMultipleItemsModal",{collectionId:_.id,type:He.EDIT})},S=(_,d="")=>{const f=window.open(_,d);f&&f.focus()},I=!We(n)&&!n.isPublished;return e.jsx(s.Dropdown,{className:xe.dropdown,trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{className:xe.ellipsis,size:"large",name:"ellipsis horizontal"})}),inline:!0,direction:"left",children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:m}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:a}),e.jsx(s.Popup,{content:o("collection_context_menu.delete_published_collection"),position:"right center",disabled:I,trigger:I?e.jsx(se,{name:n.name,onDelete:j,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})}):e.jsx(s.Dropdown.Item,{text:o("global.delete"),disabled:!0}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Popup,{content:o("collection_context_menu.change_published_urn"),position:"right center",disabled:!n.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_urn"),onClick:C,disabled:n.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.edit_in_bulk"),onClick:b}),e.jsx(s.Popup,{content:o("collection_context_menu.unpublished"),position:"right center",disabled:n.isPublished||!!n.forumLink,trigger:e.jsx(s.Dropdown.Item,{disabled:!n.isPublished||!n.forumLink,text:o("collection_context_menu.forum_post"),onClick:i}),hideOnScroll:!0,on:"hover",inverted:!0})]})})},qt=t=>({name:Fe(t)||""}),Vt=t=>({onOpenModal:(n,r)=>t(M(n,r)),onDelete:n=>t(ze(n))}),Yt=F(qt,Vt)(zt),Zt=(t,n)=>{const{collection:r,items:i}=n;return{itemCurations:Ve(t,r.id),isLoadingItemCurations:ke(Ze(t),Ye),isLinkedWearablesPaymentsEnabled:Ne(t),itemsStatus:Qe(t,i.map(m=>m.id))}},Qt=t=>({onNewClick:(n,r,i)=>t(M("PublishWizardCollectionModal",{collectionId:n,itemsWithChanges:r,itemsToPublish:i})),onPushChangesClick:(n,r)=>t(M("PushChangesModal",{collectionId:n,itemsWithChanges:r})),onClick:(n,r,i)=>t(M("PublishThirdPartyCollectionModal",{collectionId:n,itemIds:r,action:i}))}),Jt=F(Zt,Qt)(qe),Kt="_itemImage_1y9df_1",Xt="_itemStatus_1y9df_10",es="_grid_1y9df_14",ts="_row_1y9df_25",ss="_column_1y9df_30",ns="_statusColumn_1y9df_34",as="_synced_1y9df_39",is="_unsynced_1y9df_43",os="_avatarColumn_1y9df_47",ls="_nameWrapper_1y9df_52",rs="_name_1y9df_52",cs="_itemActions_1y9df_65",ds="_action_1y9df_72",x={itemImage:Kt,itemStatus:Xt,grid:es,row:ts,column:ss,statusColumn:ns,synced:as,unsynced:is,avatarColumn:os,nameWrapper:ls,name:rs,itemActions:cs,action:ds};function ms({item:t,status:n,selected:r,onSelect:i,onOpenModal:m,onDelete:a}){const j=Q(),C=l.useCallback((h,D)=>{i(t,D.checked)},[t,i]),b=l.useCallback(()=>{m("SeeInWorldModal",{itemIds:[t.id]})},[t,m]),S=l.useCallback(()=>{t.isPublished||m("EditItemURNModal",{item:t})},[t,m]),I=l.useCallback(()=>{j.push($.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,j]),_=l.useCallback(()=>{a(t)},[a,t]),d=l.useMemo(()=>{if(!t.urn)return"";try{const h=Je(t.urn);return Ke(h)?h.thirdPartyTokenId??"":""}catch{return""}},[t]),f=l.useMemo(()=>{switch(n){case B.UNDER_REVIEW:return e.jsx(s.Icon,{name:"clock outline"});case B.SYNCED:return e.jsx(s.Icon,{name:"check circle outline"});case B.UNSYNCED:return e.jsx(s.Icon,{name:"exclamation circle"});default:return null}},[n]),y=t.data;return e.jsx(s.Grid,{className:`CollectionItem ${x.grid}`,columns:"equal",children:e.jsxs(s.Grid.Row,{className:x.row,children:[e.jsxs(s.Grid.Column,{className:`${x.column} ${x.avatarColumn}`,width:5,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished,onClick:C}),e.jsx(fe,{className:x.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:x.nameWrapper,children:e.jsxs("div",{className:x.name,title:t.name,children:[e.jsx(Xe,{className:x.itemStatus,item:t}),t.name]})})]}),e.jsx(s.Grid.Column,{className:x.column,children:y.category?e.jsx("div",{children:o(`wearable.category.${y.category}`)}):null}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:o(`body_shapes.${et(t)}`)})}),e.jsx(s.Grid.Column,{className:x.column,children:e.jsx("div",{children:d})}),e.jsxs(s.Grid.Column,{width:3,className:`${x.column} ${x.statusColumn} ${x[n]}`,children:[f,e.jsx("div",{children:o(`third_party_collection_detail_page.synced_statuses.${n}`)})]}),e.jsx(s.Grid.Column,{width:1,className:x.column,children:e.jsx("div",{className:x.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:x.action,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:$.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:b}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:I}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:S,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:_,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})})}const _s=(t,n)=>({status:ve(t)[n.item.id]}),us=t=>({onDelete:n=>t(we(n)),onOpenModal:(n,r)=>t(M(n,r))}),gs=F(_s,us)(ms),hs="data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20clip-path='url(%23clip0_8524_427)'%3e%3cpath%20d='M20.5%203L20.34%203.03L15%205.1L9%203L3.36%204.9C3.15%204.97%203%205.15%203%205.38V20.5C3%2020.78%203.22%2021%203.5%2021L3.66%2020.97L9%2018.9L15%2021L20.64%2019.1C20.85%2019.03%2021%2018.85%2021%2018.62V3.5C21%203.22%2020.78%203%2020.5%203ZM15%2019L9%2016.89V5L15%207.11V19Z'%20fill='%23A09BA8'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_8524_427'%3e%3crect%20width='24'%20height='24'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",ps="data:image/svg+xml,%3csvg%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M10.669%200H1.33362C0.593463%200%200%200.600131%200%201.33362V10.669C0%2011.4025%200.593463%2012.0026%201.33362%2012.0026H10.669C11.4025%2012.0026%2012.0026%2011.4025%2012.0026%2010.669V1.33362C12.0026%200.600131%2011.4092%200%2010.669%200ZM10.669%2010.669H1.33362V2.66725H10.669V10.669ZM7.00152%206.66812C7.00152%207.22157%206.55476%207.66834%206.00131%207.66834C5.44785%207.66834%205.00109%207.22157%205.00109%206.66812C5.00109%206.11466%205.44785%205.6679%206.00131%205.6679C6.55476%205.6679%207.00152%206.11466%207.00152%206.66812ZM6.00131%204.00087C4.18091%204.00087%202.62724%205.10778%202.00044%206.66812C2.62724%208.22846%204.18091%209.33537%206.00131%209.33537C7.8217%209.33537%209.37537%208.22846%2010.0022%206.66812C9.37537%205.10778%207.8217%204.00087%206.00131%204.00087ZM6.00131%208.33515C5.08111%208.33515%204.33428%207.58832%204.33428%206.66812C4.33428%205.74792%205.08111%205.00109%206.00131%205.00109C6.92151%205.00109%207.66834%205.74792%207.66834%206.66812C7.66834%207.58832%206.92151%208.33515%206.00131%208.33515Z'%20fill='%23ECEBED'/%3e%3c/svg%3e",Cs="_status_rgxu1_1",xs="_pending_migration_rgxu1_14",js="_synced_rgxu1_19",Is="_unpublished_rgxu1_24",ks="_unsynced_rgxu1_25",Ns="_pending_mapping_rgxu1_30",fs="_under_review_rgxu1_31",ys="_icon_rgxu1_10",V={status:Cs,pending_migration:xs,synced:js,unpublished:Is,unsynced:ks,pending_mapping:Ns,under_review:fs,icon:ys},bs=t=>{const{status:n,item:r}=t,i=!r.mappings&&ue(r.urn),m=!r.isMappingComplete&&ue(r.urn),a=l.useMemo(()=>{if(i)return e.jsx("img",{src:hs,className:V.icon});if(m)return e.jsx(s.Icon,{name:"warning circle"});switch(n){case B.UNDER_REVIEW:return e.jsx("img",{src:ps,className:V.icon});case B.SYNCED:return e.jsx(s.Icon,{name:"check circle"});case B.UNSYNCED:case B.UNPUBLISHED:return e.jsx(s.Icon,{name:"cloud upload"})}},[n,i,m]),j=l.useMemo(()=>i?o("item_status.pending_mapping"):m?o("item_status.pending_migration"):o(`item_status.${n}`),[n,i,m]),C=l.useMemo(()=>i?"pending_mapping":m?"pending_migration":n,[n,i,m]);return e.jsxs("div",{className:Z(V[C],V.status),children:[a," ",j]})},vs="_itemImage_1rili_1",ws="_itemStatus_1rili_10",Ss="_grid_1rili_14",Ps="_loading_1rili_21",Ds="_row_1rili_26",Es="_column_1rili_31",Ms="_avatarColumn_1rili_35",Ts="_nameWrapper_1rili_40",Bs="_name_1rili_40",$s="_itemActions_1rili_53",Ls="_action_1rili_60",As="_overlay_1rili_65",N={itemImage:vs,itemStatus:ws,grid:Ss,loading:Ps,row:Ds,column:Es,avatarColumn:Ms,nameWrapper:Ts,name:Bs,itemActions:$s,action:Ls,overlay:As};function Gs({item:t,status:n,selected:r,loading:i,collection:m,onSaveItem:a,onSelect:j,onOpenModal:C,onDelete:b}){const S=Q(),I=l.useMemo(()=>tt(t),[t]),_=l.useMemo(()=>m.linkedContractAddress&&m.linkedContractNetwork?{address:m.linkedContractAddress,network:m.linkedContractNetwork}:null,[m]),[d,f]=l.useState(I),y=l.useMemo(()=>{if(d&&_){const v=ge(d,_);return st(v)?void 0:"Invalid mapping"}},[d,_]);l.useEffect(()=>{!_||y||(!I&&d||I&&d&&!nt(I,d))&&h(d,_)},[I,y,d,_]);const h=l.useCallback(at((v,T)=>{const A=ge(v,T);a({...t,mappings:A})},1e3),[a]),D=l.useCallback((v,T)=>{i||j(t,T.checked)},[t,i,j]),P=l.useCallback(()=>{C("SeeInWorldModal",{itemIds:[t.id]})},[t,C]),L=l.useCallback(()=>{t.isPublished||C("EditItemURNModal",{item:t})},[t,C]),R=l.useCallback(()=>{S.push($.itemEditor({itemId:t.id,collectionId:t.collectionId}),{fromParam:te.TP_COLLECTIONS})},[t,S]),c=l.useCallback(()=>{b(t)},[b,t]);return e.jsxs(s.Grid,{className:Z(N.grid,i&&N.loading),columns:"equal",children:[i&&e.jsx("div",{className:N.overlay,children:e.jsx(s.Loader,{size:"large",active:!0})}),e.jsxs(s.Grid.Row,{className:N.row,children:[e.jsxs(s.Grid.Column,{className:`${N.column} ${N.avatarColumn}`,width:4,children:[e.jsx(s.Checkbox,{checked:r,disabled:t.isPublished||i,onClick:D}),e.jsx(fe,{className:N.itemImage,item:t,hasBadge:!0,badgeSize:"small"}),e.jsx("div",{className:N.nameWrapper,children:e.jsx("div",{className:N.name,title:t.name,children:t.name})})]}),e.jsx(s.Grid.Column,{children:_&&e.jsx(it,{disabled:i,mapping:d,error:y,onChange:f,isCompact:!0})}),e.jsx(s.Grid.Column,{width:3,className:Z(N.column,N.statusColumn),children:e.jsx(bs,{status:n,item:t})}),e.jsx(s.Grid.Column,{width:1,className:N.column,children:e.jsx("div",{className:N.itemActions,children:e.jsx(s.Dropdown,{trigger:e.jsx(s.Button,{basic:!0,children:e.jsx(s.Icon,{name:"ellipsis horizontal"})}),inline:!0,direction:"left",className:N.action,disabled:i,onClick:ye(),children:e.jsxs(s.Dropdown.Menu,{children:[e.jsx(s.Dropdown.Item,{text:o("collection_item.see_details"),as:be,to:$.itemDetail(t.id)}),e.jsx(s.Dropdown.Item,{text:o("collection_context_menu.see_in_decentraland"),onClick:P}),e.jsx(s.Dropdown.Item,{text:o("global.open_in_editor"),onClick:R}),e.jsx(s.Popup,{content:o("collection_item.cannot_edit_urn"),position:"right center",disabled:!t.isPublished,trigger:e.jsx(s.Dropdown.Item,{text:o("collection_item.edit_urn"),onClick:L,disabled:t.isPublished}),hideOnScroll:!0,on:"hover",inverted:!0,flowing:!0}),!t.isPublished&&e.jsx(se,{name:t.name,onDelete:c,trigger:e.jsx(s.Dropdown.Item,{text:o("global.delete")})})]})})})})]})]})}const Rs=(t,n)=>{const r=ve(t);return{loading:!!ot(t)[n.item.id],status:r[n.item.id]}},Us=t=>({onDelete:n=>t(we(n)),onSaveItem:n=>t(lt(n,{},{onlySaveItem:!0})),onOpenModal:(n,r)=>t(M(n,r))}),Ws=F(Rs,Us)(Gs),G=50,Os="_itemCheckbox_2k9qa_1",Hs="_gridHeader_2k9qa_5",Fs="_itemColumn_2k9qa_15",ee={itemCheckbox:Os,gridHeader:Hs,itemColumn:Fs},zs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:ee.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:5,className:ee.itemColumn,children:[e.jsx(s.Checkbox,{className:ee.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsx(s.Grid.Column,{children:o("global.category")}),e.jsx(s.Grid.Column,{children:o("global.body_shape")}),e.jsx(s.Grid.Column,{children:"URN ID"}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),qs="_gridHeader_4acv6_1",Vs="_itemColumn_4acv6_11",Ys="_itemCheckbox_4acv6_16",Zs="_linkedToColumn_4acv6_20",Y={gridHeader:qs,itemColumn:Vs,itemCheckbox:Ys,linkedToColumn:Zs},Qs=({areAllSelected:t,onSelectedAllClick:n})=>e.jsx(s.Grid,{columns:"equal",className:Y.gridHeader,children:e.jsxs(s.Grid.Row,{children:[e.jsxs(s.Grid.Column,{width:4,className:Y.itemColumn,children:[e.jsx(s.Checkbox,{className:Y.itemCheckbox,checked:t,onClick:n})," ",o("global.item")]}),e.jsxs(s.Grid.Column,{className:Y.linkedToColumn,children:[e.jsx("span",{children:o("third_party_collection_detail_page.linked_to")}),e.jsx(rt,{})]}),e.jsxs(s.Grid.Column,{width:3,children:[" ",o("collection_row.status")," "]}),e.jsx(s.Grid.Column,{width:1})]})}),Js="_main_16i8r_3",Ks="_slots_16i8r_11",Xs="_empty_16i8r_28",en="_searchContainer_16i8r_32",tn="_searchInfo_16i8r_42",sn="_syncedStatusList_16i8r_46",nn="_selectionInfo_16i8r_53",an="_header_16i8r_63",on="_content_16i8r_74",ln="_title_16i8r_83",rn="_editCollectionName_16i8r_96",cn="_name_16i8r_101",dn="_nameAndType_16i8r_105",mn="_nameWrapper_16i8r_115",_n="_size_16i8r_139",un="_actions_16i8r_143",gn="_body_16i8r_151",hn="_info_16i8r_162",pn="_infoHeader_16i8r_170",Cn="_infoContent_16i8r_178",xn="_slotsIcon_16i8r_195",jn="_copyButton_16i8r_207",In="_sparkles_16i8r_232",kn="_start_16i8r_241",Nn="_migrationBanner_16i8r_254",fn="_type_16i8r_277",yn="_linkedWearableBadge_16i8r_283",bn="_typeBadge_16i8r_288",vn="_programmaticBadge_16i8r_292",wn="_standardBadge_16i8r_296",Sn="_loader_16i8r_302",u={main:Js,slots:Ks,empty:Xs,searchContainer:en,searchInfo:tn,syncedStatusList:sn,selectionInfo:nn,header:an,content:on,title:ln,editCollectionName:rn,name:cn,nameAndType:dn,nameWrapper:mn,size:_n,actions:un,body:gn,info:hn,infoHeader:pn,infoContent:Cn,slotsIcon:xn,copyButton:jn,sparkles:In,start:kn,migrationBanner:Nn,type:fn,linkedWearableBadge:yn,typeBadge:bn,programmaticBadge:vn,standardBadge:wn,loader:Sn},je=({children:t,title:n,info:r})=>e.jsxs("div",{className:u.info,children:[e.jsxs("div",{className:u.infoHeader,children:[n," ",r&&e.jsx(s.InfoTooltip,{content:r})]}),e.jsx("div",{className:u.infoContent,children:t})]});function Pn({currentPage:t,lastLocation:n,wallet:r,thirdParty:i,items:m,collection:a,totalItems:j,isLoading:C,isThirdPartyV2Enabled:b,isLinkedWearablesPaymentsEnabled:S,onFetchAvailableSlots:I,onFetchThirdParty:_,onNewItem:d,onEditName:f,isLoadingAvailableSlots:y}){const[h,D]=l.useState({}),[P,L]=l.useState(t),[R,c]=l.useState(!1),[v,T]=l.useState(!1),[A,ne]=l.useState("ALL"),U=Q(),ae=n===$.collections();l.useEffect(()=>{i&&i.availableSlots===void 0&&!y&&I(i.id)},[i,y,I]),l.useEffect(()=>{!C&&!i&&(a!=null&&a.urn)&&_(Se(a.urn))},[a==null?void 0:a.urn,C,i]),l.useEffect(()=>{if(t!==P&&L(t),v){const g=m.reduce((p,k)=>(p[k.id]=!0,p),{});D(g),c(!1)}},[P,v,m,i,t]);const Pe=l.useCallback(()=>{a!=null&&a.id&&d(a.id)},[a==null?void 0:a.id,d]),De=l.useCallback(()=>{a&&f(a)},[a,f]),Ee=l.useCallback(()=>{ae?U.goBack():U.push($.collections(ct.THIRD_PARTY))},[U,ae]),Me=l.useCallback((g,p)=>{L(+p.activePage),U.push($.thirdPartyCollectionDetail(a.id,{page:+p.activePage}))},[a,U]),J=l.useCallback((g,p)=>{D({...h,[g.id]:p}),T(!1),c(!1)},[h]),W=l.useCallback(g=>g.every(p=>h[p.id]),[h]),ie=l.useCallback((g,p)=>{const k={...h},O=!W(g);for(const H of g)k[H.id]=O;D(k),c(!0),T(v&&!!p.checked)},[h,v,W]),oe=l.useCallback(()=>{D({})},[]),le=l.useMemo(()=>a&&i&&r&&dt(r.address,i),[a,i,r]),Te=l.useCallback(g=>{if(T(!0),a){const p=Math.ceil(j/G);g(a.id,{page:mt(p),limit:G,overridePaginationData:!1})}},[j]),re=l.useCallback((g,{value:p})=>{ne(p)},[ne]),Be=[{value:"ALL",text:o("third_party_collection_detail_page.synced_filter.all")},{value:"SYNCED",text:o("item_status.synced")},{value:"UNSYNCED",text:o("item_status.unsynced")},...a!=null&&a.isMappingComplete?[]:[{value:"MIGRATION_REQUIRED",text:o("item_status.pending_migration")},{value:"MAPPING_PENDING",text:o("item_status.pending_mapping")}]],$e=l.useMemo(()=>{switch(A){case"SYNCED":return{synced:!0};case"UNSYNCED":return{synced:!1};case"MIGRATION_REQUIRED":return{mappingStatus:he.UNPUBLISHED_MAPPING};case"MAPPING_PENDING":return{mappingStatus:he.MISSING_MAPPING};default:return{}}},[A]),Le=l.useCallback((g,p,k,O,H)=>{const ce=p.filter(E=>h[E.id]),de=ce.length,me=!!(a!=null&&a.linkedContractAddress&&(a!=null&&a.linkedContractNetwork)),z=j,K=Math.ceil(z/G),_e=(a==null?void 0:a.itemCount)===0;return a?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:u.header,children:[e.jsx(Bt,{absolute:!0,onClick:Ee}),e.jsxs("div",{className:u.content,children:[e.jsxs("div",{className:u.title,children:[e.jsx(Ht,{collectionId:a.id}),e.jsxs("div",{className:u.nameAndType,children:[e.jsxs("div",{className:u.nameWrapper,children:[e.jsx(s.Header,{size:"large",className:u.name,onClick:De,children:a.name}),!a.isPublished&&e.jsx(_t,{name:"edit",className:u.editCollectionName})]}),e.jsxs("div",{className:u.type,children:[e.jsx($t,{isThirdParty:!0}),e.jsx(Lt,{isProgrammatic:g.isProgrammatic})]})]})]}),e.jsxs("div",{className:u.actions,children:[a.linkedContractAddress&&a.linkedContractNetwork&&e.jsxs(je,{title:o("third_party_collection_detail_page.smart_contract_address_short"),info:o("third_party_collection_detail_page.smart_contract_address_long"),children:[ut(a.linkedContractAddress)," ",e.jsx(gt,{className:u.copyButton,showPopup:!0,text:a.linkedContractAddress,role:"button",children:e.jsx(s.Icon,{name:"copy outline"})})]}),!S&&e.jsxs(je,{title:o("third_party_collection_detail_page.slots_short"),info:o("third_party_collection_detail_page.slots_long"),children:[e.jsx("div",{className:u.slotsIcon}),y?e.jsx(s.Loader,{active:!0,inline:!0,size:"tiny"}):e.jsxs("span",{children:[g.availableSlots??0," / ",g.maxItems]})]}),e.jsxs(s.Button,{inverted:!0,onClick:Pe,children:[e.jsx(s.Icon,{name:"plus"}),o("third_party_collection_detail_page.new_items")]}),g.availableSlots!==void 0?e.jsx(Jt,{collection:a,items:ce,slots:g.availableSlots}):null,e.jsx(Yt,{collection:a,items:k})]})]})]}),!a.isMappingComplete&&e.jsxs("div",{className:u.migrationBanner,children:[e.jsx(s.Icon,{name:"sync"})," ",o("third_party_collection_detail_page.migration_banner")]}),e.jsx("div",{className:u.body,children:O?e.jsx("div",{className:u.loader,children:e.jsx(s.Loader,{size:"massive",inline:!0,active:!0})}):e.jsxs(e.Fragment,{children:[(a.itemCount??0)>0&&e.jsxs("div",{className:u.searchContainer,children:[k.length>0&&e.jsx("div",{className:u.searchInfo,children:o("third_party_collection_detail_page.search_info",{page:(P-1)*G+1,pageTotal:Math.min(z,P*G),total:z})}),e.jsx(s.Dropdown,{className:u.syncedStatusList,direction:"left",value:A,options:Be,onChange:re})]}),k.length?e.jsxs(e.Fragment,{children:[de>0?e.jsxs("div",{className:u.selectionInfo,children:[o("third_party_collection_detail_page.selection",{count:de})," ",e.jsx("span",{className:"link",onClick:oe,children:o("third_party_collection_detail_page.clear_selection")}),". ",R&&K>1?e.jsx("span",{className:"link",onClick:()=>Te(H),children:o("third_party_collection_detail_page.select_all",{total:z})}):null," "]}):null,e.jsxs("div",{children:[b&&me?e.jsx(Qs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}):e.jsx(zs,{areAllSelected:W(k),onSelectedAllClick:(E,X)=>ie(k,X)}),k.map(E=>b&&me?e.jsx(Ws,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id):e.jsx(gs,{collection:a,item:E,selected:!!h[E.id],onSelect:J},E.id)),K>1?e.jsx(s.Pagination,{firstItem:null,lastItem:null,totalPages:K,activePage:P,onPageChange:Me}):null]})]}):e.jsxs("div",{className:u.empty,children:[e.jsx("div",{className:_e?u.start:u.sparkles}),_e?e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.start_adding_items")}),e.jsx("p",{children:o("third_party_collection_detail_page.cant_remove")})]}):e.jsxs(e.Fragment,{children:[e.jsx("h3",{children:o("third_party_collection_detail_page.not_found")}),e.jsx("p",{children:o("third_party_collection_detail_page.try_again")})]})]})]})})]}):(console.error("No collection defined"),null)},[a,h,y,S,b,j,P,J,W,re,oe,A]),Ae=le&&a;return e.jsx(Mt,{id:a==null?void 0:a.id,itemsPage:P,itemsPageSize:G,fetchCollectionItemsOptions:$e,children:({isLoadingCollection:g,isLoadingCollectionItems:p,items:k,paginatedItems:O,onFetchCollectionItemsPages:H})=>e.jsx(Et,{className:u.main,hasNavigation:!le&&!C&&!g,isLoading:C||g,children:Ae&&i?Le(i,k,O,p,H):e.jsx(Tt,{})})})}const Dn=()=>{const t=ht(),n=St()||"",r=Pt(),i=w(c=>Ie(c,n)),m=l.useMemo(()=>i?pe(i):!1,[i]),a=w(c=>{var v;return((v=Ce(c,n))==null?void 0:v.total)||null}),j=w(c=>i?pt(c,i.id):[]),C=w(c=>i&&Ce(c,i.id)||null),b=w(Ct),S=w(xt),I=w(Ne),_=w(c=>i&&pe(i)?jt(c,i):null),d=w(c=>It(c)),f=w(c=>ke(kt(c),wt)||Nt(c)||!!(m&&i&&ft(c,Se(i.urn)))),y=w(c=>yt(c)),h=w(c=>Dt(c)),D=l.useCallback(c=>t(M("CreateItemsModal",{collectionId:c})),[t]),P=l.useCallback(c=>t(M("EditCollectionNameModal",{collection:c})),[t]),L=l.useCallback(c=>t(bt(c)),[t]),R=l.useCallback(c=>t(vt(c)),[t]);return e.jsx(Pn,{items:j,totalItems:a,currentPage:r,paginatedData:C,wallet:b,collection:i,isThirdPartyV2Enabled:S,isLinkedWearablesPaymentsEnabled:I,thirdParty:_,authorizations:d,isLoading:f,isLoadingAvailableSlots:y,lastLocation:h,onNewItem:D,onEditName:P,onFetchAvailableSlots:L,onFetchThirdParty:R})},Hn=Dn;export{Hn as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{q as le}from"./index-
|
|
1
|
+
import{q as le}from"./index-BHRIVcTs.js";function me(w,f){for(var h=0;h<f.length;h++){const x=f[h];if(typeof x!="string"&&!Array.isArray(x)){for(const u in x)if(u!=="default"&&!(u in w)){const s=Object.getOwnPropertyDescriptor(x,u);s&&Object.defineProperty(w,u,s.get?s:{enumerable:!0,get:()=>x[u]})}}}return Object.freeze(Object.defineProperty(w,Symbol.toStringTag,{value:"Module"}))}var J=function(w,f){var h={};function x(u){if(h[u])return h[u].exports;var s=h[u]={i:u,l:!1,exports:{}};return w[u].call(s.exports,s,s.exports,x),s.l=!0,s.exports}return x(732)}({336:function(w,f,h){Object.defineProperty(f,"__esModule",{value:!0});const x=h(946),u=h(623);class s extends u.SceneWriter{constructor(){super(...arguments),this.instanceCount=0,this.nameMapping={}}addEntity(a,e){if(this.entities.has(a))throw new Error(`There is already an entity with name "${a}"`);this.nameMapping[a]=++this.instanceCount,this.entities.set(a,e)}getEntityName(a){const e=super.getEntityName(a);return e&&""+this.nameMapping[e]}stepPrologue(){return`dcl.subscribe('sceneStart');
|
|
2
2
|
`}stepStartEntity(a,e){return`dcl.addEntity('${e}');
|
|
3
3
|
`}stepSetEntityParent(a,e,n){let t="0";if(n&&(t=this.getEntityName(n),!t))throw new Error(`Parent entity of "${super.getEntityName(a)}" is missing, you should add parents first.`);return`dcl.setParent('${e}', '${t}');
|
|
4
4
|
`}stepWriteComponentDeclaration(a,e,n,t){return x.getComponentName(e)==="engine.transform"?`dcl.updateEntityComponent('${this.getEntityName(a)}', 'engine.transform', ${x.getComponentClassId(e)}, JSON.stringify(${JSON.stringify(e)}));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-
|
|
1
|
+
import{T as xt,M as re,R as N,E as k,C as x,a as X,b as Wo,O as Z,c as ht}from"./index-CWPKklZI.js";import"./index-BHRIVcTs.js";/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2019 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|