1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[8954],{54048:function(e,t,n){var i=n(64836);t.Z=void 0;var l=i(n(64938)),s=n(85893),a=(0,l.default)((0,s.jsx)("path",{d:"M19 19H5V5h7V3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"}),"OpenInNew");t.Z=a},15973:function(e,t,n){var i=n(85893),l=n(34386),s=n(93967),a=n.n(s);n(67294);var r=n(69596);t.Z=function(e){var t=e.author,n=e.verified,s=void 0!==n&&n,c=e.blacklisted,o=void 0!==c&&c,d=e.displayName,u=void 0===d?t:d,m=e.href,h=e.baseStyle,x=void 0===h?"justify-start":h;return(0,i.jsx)(r.Z,{href:void 0===m?"/collection/"+t:m,inactive:o,children:(0,i.jsx)(l.Z,{title:s&&!o?"This collection is verified":o?"This collection is blacklisted and potentially a Scam":"",children:(0,i.jsxs)("div",{className:a()("flex text-black dark:!text-white cursor-pointer items-center mt-2 px-4",x),children:[(0,i.jsx)("p",{className:a()("truncate text-left text-black dark:text-white",{"text-sm font-semibold":u&&u.length>15},{"text-base font-semibold":u&&u.length<=15}),children:u}),s&&!o&&(0,i.jsx)("img",{src:"/verified.svg",alt:"verified",width:24,height:24,className:"w-[20px] h-[20px] ml-2"}),o&&(0,i.jsx)("img",{src:"/blacklisted.svg",alt:"blacklisted",className:"w-[20px] h-[20px] ml-2",width:150,height:150})]})})})}},4e3:function(e,t,n){var i=n(85893),l=n(93967),s=n.n(l);n(67294);var a=n(15973),r=n(69596),c=n(79726);t.Z=function(e){var t=e.collection,n=e.isBeingDragged,l=t.name,o=t.image,d=t.collection,u=t.thumbnail,m=t.verified,h=t.blacklisted,x=t.customHref;return(0,i.jsx)("div",{className:"",children:(0,i.jsx)(r.Z,{className:s()("cursor-pointer min-w-48 sm:min-w-54 h-full rounded-2xl ","dark:!bg-paper bg-zinc-200 transition-colors ","backdrop-filter backdrop-blur-sm overflow-hidden"),href:x||"/collection/"+d,inactive:n,children:(0,i.jsxs)("div",{className:"h-full",children:[(0,i.jsx)("div",{className:"flex min-w-48 sm:min-w-54 h-54 m-auto cursor-pointer bg-white dark:!bg-page ",children:(0,i.jsx)("img",{className:"flex h-auto m-auto",src:u||o,alt:l,height:240,width:240})}),(0,i.jsx)(a.Z,{displayName:l,author:d,verified:m,blacklisted:h,href:x||"/collection/"+d}),(0,i.jsx)(c.m,{collectionItem:t})]})})})}},79726:function(e,t,n){n.d(t,{m:function(){return c}});var i=n(85893),l=n(93967),s=n.n(l);n(67294);var a=n(8163),r=n(22120),c=function(e){var t=e.collectionItem,n=t.waxVolume24h,l=t.waxVolume7d,c=t.collectionType,o=t.growth24h,d=t.growth7d,u=t.customVolumeDisplay,m="",h="",x=(0,r.$G)("common").t,f=c<=2||void 0===d;m=x(f?"collection.volume_24":"collection.volume_7d"),h=f?n?(0,a.wZ)(n):(0,a.wZ)(0):l?(0,a.wZ)(l):(0,a.wZ)(0);var v=f?o:d;return u||(0,i.jsx)("div",{className:"relative grid grid-cols-1 px-4 py-4 ",children:(0,i.jsxs)("div",{className:s()("w-full dark:text-white text-black relative text-base font-light grid grid-cols-2"),children:[(0,i.jsxs)("div",{className:"",children:[(0,i.jsx)("p",{className:"font-semibold truncate",children:h}),(0,i.jsx)("p",{className:"dark:!text-slate-400 text-black mx-auto text-xs font-semibold",children:m})]}),(0,i.jsxs)("div",{className:s()("flex dark:text-white text-black text-base bg-transparent justify-end font-semibold items-center",{"text-positive":v>0},{"text-negative":v<0}),children:[v>0?"+":"",(0,a.rl)(v)," ",v>0?(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"ml-1 w-4 h-4 text-green-500",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M4.5 10.5 12 3m0 0 7.5 7.5M12 3v18"})}):v<0?(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"ml-1 w-4 h-4 text-red-500",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 13.5 12 21m0 0-7.5-7.5M12 21V3"})}):0===v?(0,i.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:3,stroke:"currentColor",className:"ml-1 w-4 h-4 text-neutral",children:(0,i.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"})}):null]})]})})}},8954:function(e,t,n){n.d(t,{Z:function(){return Q}});var i=n(30137),l=n(76341),s=n(98732),a=n(97582),r=n(85893),c=n(98456),o=n(57922),d=n(93967),u=n.n(d),m=n(67294),h=n(22120),x=n(85826);n(8443);var f=n(59455),v=n(79485),p=n(4e3),j=n(48528),g=n(67037),b=n(14503),N=n(41593),_=n(20233),y=n(54066),w=n(81458),k=n(1127),C=function(e){var t=e.data,n=e.setData;return(0,r.jsx)(g.J,{className:"px-4 py-4 my-4",noMargin:!0,title:"Company Info",expandable:!0,defaultExpanded:!1,children:null!==t?(0,r.jsx)("div",{className:"grid xl
1:grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-4",children:Object.entries(t.creator_info).map(function(e,i){var l=(0,s._)(e,2),a=l[0],c=l[1];return(0,r.jsx)("div",{className:"",children:(0,r.jsx)(k.Z,{type:"text",variant:"bordered",size:"md",label:a.replaceAll("_"," ").split(" ").map(function(e){return e[0].toUpperCase()+e.slice(1)}).join(" "),value:c,onChange:function(e){var i=structuredClone(t);i.creator_info[a]=e.target.value,n(i)}},"creator_info"+i)})})}):(0,r.jsx)(w.Z,{})})},Z=n(76519),S=n(34772),D=n(54048),z=n(27597),q=n(29141),O=n(42551),A=function(e){var t=e.atomicCollectionData,n=e.loadAtomicCollectionData,i=(0,s._)((0,m.useState)(null),2),l=i[0],a=i[1],c=(0,s._)((0,m.useState)(!1),2),o=c[0],d=c[1],u=(0,s._)((0,m.useState)(!1),2),h=u[0],x=u[1];return(0,m.useEffect)(function(){var e,n,i={banner_1920x500:"",logo_512x512:""};if(null==t?void 0:null===(n=t.data)||void 0===n?void 0:null===(e=n.data)||void 0===e?void 0:e.images){var l=JSON.parse(t.data.data.images);l.banner_1920x500&&(i.banner_1920x500=l.banner_1920x500),l.logo_512x512&&(i.logo_512x512=l.logo_512x512)}a(i)},[t]),(0,r.jsxs)(g.J,{className:"mb-5",noMargin:!0,title:"Further Collection Images",expandable:!0,defaultExpanded:!1,children:[(0,r.jsx)(z.v,{open:o,setOpen:d,atomicCollectionData:t,updateAtomicCollectionData:n}),(0,r.jsx)(q.Z,{open:h,setOpen:x,atomicCollectionData:t,updateAtomicCollectionData:n}),null!==l?(0,r.jsxs)("div",{className:"flex flex-wrap justify-evenly ",children:[(0,r.jsxs)("div",{className:"border border-paperl rounded-md shadow-xl text-center p-5 m-5",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Collection Banner"}),(0,r.jsx)("div",{className:"font-mono break-all",children:l.banner_1920x500}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center mt-5 gap-4",children:[(0,r.jsx)(O.Z,{className:"",fullWidth:!1,size:"md",startContent:(0,r.jsx)(D.Z,{className:"text-[18px]"}),isExternal:!0,href:f.sD+l.banner_1920x500,isDisabled:""===l.banner_1920x500,children:"Preview"}),(0,r.jsx)(O.Z,{className:"",fullWidth:!1,size:"md",onClick:function(){d(!0)},children:"Update"})]})]}),(0,r.jsxs)("div",{className:"border border-paperl rounded-md shadow-xl text-center p-5 m-5",children:[(0,r.jsx)("h3",{className:"text-lg font-semibold",children:"Collection Logo"}),(0,r.jsx)("div",{className:"font-mono break-all",children:l.logo_512x512}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center mt-5 gap-4",children:[(0,r.jsx)(O.Z,{className:"",fullWidth:!1,size:"md",startContent:(0,r.jsx)(D.Z,{className:"text-[18px]"}),isExternal:!0,href:f.sD+l.logo_512x512,isDisabled:""===l.logo_512x512,children:"Preview"}),(0,r.jsx)(O.Z,{className:"",fullWidth:!1,size:"md",onClick:function(){return x(!0)},children:"Update"})]})]})]}):(0,r.jsx)(w.Z,{})]})},W=n(77250),J=function(e){var t=e.data,n=e.setData;return(0,r.jsx)(g.J,{className:"px-4 py-4 my-4",noMargin:!0,title:"Social Media",expandable:!0,defaultExpanded:!1,children:null!==t?(0,r.jsx)("div",{className:"grid xl:grid-cols-5 lg:grid-cols-4 md:grid-cols-3 sm:grid-cols-2 grid-cols-1 gap-4",children:Object.entries(t.socials).map(function(e,i){var l=(0,s._)(e,2),a=l[0],c=l[1];return(0,r.jsx)("div",{className:"",children:(0,r.jsx)(k.Z,{type:"text",variant:"bordered",size:"md",label:a,value:c,onChange:function(e){var i=structuredClone(t);i.socials[a]=e.target.value,n(i)}},"socials_"+i)})})}):(0,r.jsx)(w.Z,{})})},I=n(49785),F=n(59985),M=n(77163),P=n(41733),E=n(93946),U=n(69596),L=n(64666),R=n(61903),T=n(65908),V=n(8163),B=function(e){var t,n=e.action,l=e.setAction,c=e.open,d=e.setOpen,u=e.loadCollectionData,h=e.collectionName,x=(0,s._)((0,m.useState)(null),2),f=x[0],v=x[1],p=(0,s._)((0,m.useState)(null),2),b=p[0],N=p[1],_=(0,s._)((0,m.useState)(!1),2),y=_[0],k=_[1],C=(0,s._)((0,m.useState)(""),2),Z=C[0],S=C[1],D=(0,s._)((0,I.Oc)(),1)[0],z=null==D?void 0:D.activeUser,q=(null==z?void 0:z.accountName)?null==D?void 0:D.activeUser.accountName:null,O=function(){y||(d(!1),l(null),v(null),N(null))},A=(t=(0,i._)(function(){var e,t,i,l,s,r;return(0,a.Jh)(this,function(a){switch(a.label){case 0:v(null),N(null),k(!0),(e=[]).push({account:"atomicassets",name:n,authorization:[{actor:q,permission:z.requestPermission?z.requestPermission:"active"}],data:{collection_name:h,account_to_add:Z}}),t=null,i=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,z.session.transact({actions:e},{expireSeconds:300,blocksBehind:0})];case 2:return i=null===(s=a.sent())||void 0===s?void 0:null===(l=s.response)||void 0===l?void 0:l.transaction_id,[3,4];case 3:return t=(r=a.sent()).message,v(r.message),k(!1),[3,4];case 4:if(t)return[3,7];return[4,(0,V._v)(2e3)];case 5:return a.sent(),u(),[4,(0,V._v)(1e3)];case 6:a.sent(),a.label=7;case 7:return S(""),N(i),k(!1),[2]}})}),function(){return t.apply(this,arguments)});return(0,r.jsx)(L.Z,{open:c&&null!==n,onClose:function(){return O()},maxWidth:"sm",fullWidth:!0,children:(0,r.jsxs)(g.J,{title:"addcolauth"===n?"Add authorized account to collection ".concat(h):"addnotifyacc"===n?"Add account to notify to collection ".concat(h):"INVALID ACTION",noMargin:!0,children:[(0,r.jsx)("div",{className:"flex justify-center mb-2",children:(0,r.jsx)("div",{className:"w-46",children:(0,r.jsx)(R.Z,{size:"small",label:"Account to add",fullWidth:!0,value:Z,onChange:function(e){return S(e.target.value.toLowerCase())}})})}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center",children:[(0,r.jsx)(T.h,{fullWidth:!0,disabled:0===Z.length||y,className:"w-full sm:w-25 m-3",onClick:function(){return A()},children:"Add"}),(0,r.jsx)(T.h,{fullWidth:!0,disabled:y,color:"error",className:"w-full sm:w-25 m-3",onClick:function(){return O()},children:"Cancel"})]}),(0,r.jsx)(o.Z,{in:y,children:(0,r.jsx)(w.Z,{})}),(0,r.jsxs)(o.Z,{in:null!==b||null!==f,children:[(0,r.jsx)(j.C,{condition:null!==b,transactionId:b,severity:"success",title:"Success!"}),(0,r.jsx)(j.C,{condition:null!==f,severity:"error",title:"An error occured!",children:f})]})]})})},G=function(e){var t,n=e.action,l=e.setAction,c=e.account,d=e.setAccount,u=e.loadCollectionData,h=e.collectionName,x=(0,s._)((0,m.useState)(null),2),f=x[0],v=x[1],p=(0,s._)((0,m.useState)(null),2),b=p[0],N=p[1],_=(0,s._)((0,m.useState)(!1),2),y=_[0],k=_[1],C=(0,s._)((0,I.Oc)(),1)[0],Z=null==C?void 0:C.activeUser,S=(null==Z?void 0:Z.accountName)?null==C?void 0:C.activeUser.accountName:null,D=function(){y||
1(d(null),l(null),v(null),N(null))},z=(t=(0,i._)(function(){var e,t,i,l,s,r;return(0,a.Jh)(this,function(a){switch(a.label){case 0:v(null),N(null),k(!0),(e=[]).push({account:"atomicassets",name:n,authorization:[{actor:S,permission:Z.requestPermission?Z.requestPermission:"active"}],data:{collection_name:h,account_to_remove:c}}),t=null,i=null,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,Z.session.transact({actions:e},{expireSeconds:300,blocksBehind:0})];case 2:return i=null===(s=a.sent())||void 0===s?void 0:null===(l=s.response)||void 0===l?void 0:l.transaction_id,[3,4];case 3:return t=(r=a.sent()).message,v(r.message),k(!1),[3,4];case 4:if(t)return[3,7];return[4,(0,V._v)(1e3)];case 5:return a.sent(),u(),[4,(0,V._v)(1e3)];case 6:a.sent(),a.label=7;case 7:return N(i),k(!1),[2]}})}),function(){return t.apply(this,arguments)});return(0,r.jsx)(L.Z,{open:null!==c&&null!==n,onClose:function(){return D()},maxWidth:"sm",fullWidth:!0,children:(0,r.jsxs)(g.J,{title:"remcolauth"===n?"Remove ".concat(c," from authorized accounts of the collection ").concat(h,"?"):"remnotifyacc"===n?"Remove ".concat(c," from notified accounts of the collection ").concat(h,"?"):"INVALID ACTION",noMargin:!0,children:[(0,r.jsxs)("div",{className:"flex flex-wrap justify-center",children:[(0,r.jsx)("div",{className:"w-full sm:w-25 m-3",children:(0,r.jsx)(O.Z,{fullWidth:!0,disabled:null!==b||y,className:"",onClick:function(){return z()},children:"Remove"})}),(0,r.jsx)("div",{className:"w-full sm:w-25 m-3",children:(0,r.jsxs)(O.Z,{fullWidth:!0,disabled:y,color:"danger",className:"",onClick:function(){return D()},children:[" ",null===b?"Cancel":"Close"]})})]}),(0,r.jsx)(o.Z,{in:y,children:(0,r.jsx)(w.Z,{})}),(0,r.jsxs)(o.Z,{in:null!==b||null!==f,children:[(0,r.jsx)(j.C,{condition:null!==b,transactionId:b,severity:"success",title:"Success!"}),(0,r.jsx)(j.C,{condition:null!==f,severity:"error",title:"An error occured!",children:f})]})]})})},$=n(60051),H=n(19314),Y=function(e){var t=e.collectionData,n=e.loadCollectionData,i=e.collectionName,l=(0,s._)((0,m.useState)(null),2),a=l[0],c=l[1],o=(0,h.$G)("common").t,d=(0,s._)((0,m.useState)(!1),2),u=d[0],x=d[1],f=(0,s._)((0,m.useState)(null),2),v=f[0],p=f[1],j=(0,s._)((0,m.useState)(null),2),b=j[0],N=j[1];return(0,m.useEffect)(function(){t&&t.data&&c({authorizedAccounts:t.data.authorized_accounts,notifyAccounts:t.data.notify_accounts})},[t]),(0,r.jsxs)(g.J,{title:o("creator.manage_authorized_accounts"),expandable:!0,defaultExpanded:!1,children:[(0,r.jsx)(B,{action:v,setAction:p,open:u,setOpen:x,loadCollectionData:n,collectionName:i}),(0,r.jsx)(G,{action:v,setAction:p,account:b,setAccount:N,loadCollectionData:n,collectionName:i}),null===a?(0,r.jsx)(w.Z,{}):(0,r.jsxs)("div",{className:"flex flex-wrap",children:[(0,r.jsx)("div",{className:"w-full md:w-1/2",children:(0,r.jsxs)("div",{className:"border border-paperl rounded-md shadow-xl p-5 mb-5 md:mb-0 md:mr-5",children:[(0,r.jsx)("div",{className:"mb-5",children:o("creator.authorized_accounts")}),(0,r.jsx)("div",{className:"grid lg:grid-cols-2 gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-1 xl:grid-cols-3",children:0===a.authorizedAccounts.length?(0,r.jsxs)("div",{className:"font-bold italic",children:["- ",o("creator.no_accounts")," -"]}):a.authorizedAccounts.map(function(e,t){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)($.w,{children:(0,r.jsx)(H.G,{children:(0,r.jsxs)("div",{className:"flex justify-between items-center gap-2 h-full text-left",children:[(0,r.jsx)(U.Z,{href:"/user/".concat(e),external:!0,className:"dark:text-primary text-black w-full font-medium hover:underline truncate ",children:e}),0!==t?(0,r.jsx)("div",{className:"my-auto",children:(0,r.jsx)(E.Z,{color:"error",onClick:function(){N(e),p("remcolauth")},children:(0,r.jsx)(P.Z,{})})}):null]})})},"authorized_account_"+t)})})}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(O.Z,{className:"",fullWidth:!1,color:"primary",size:"md",onClick:function(){x(!0),p("addcolauth")},children:o("creator.add_account")})})]})}),(0,r.jsx)("div",{className:"w-full md:w-1/2",children:(0,r.jsxs)("div",{className:"border border-paperl rounded-md shadow-xl p-5 md:ml-5",children:[(0,r.jsx)("div",{className:"mb-5",children:o("creator.notify_accounts")}),(0,r.jsx)("div",{className:"grid lg:grid-cols-2 gap-4 grid-cols-1 sm:grid-cols-2 md:grid-cols-1 xl:grid-cols-3",children:0===a.notifyAccounts.length?(0,r.jsxs)("div",{className:"font-bold italic",children:["- ",o("creator.no_accounts")," -"]}):a.notifyAccounts.map(function(e,t){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)($.w,{children:(0,r.jsx)(H.G,{children:(0,r.jsxs)("div",{className:"flex justify-between items-center gap-2 h-full text-left",children:[(0,r.jsx)(U.Z,{href:"/user/".concat(e),external:!0,className:"dark:text-primary text-black w-full font-medium hover:underline truncate ",children:e}),0!==t?(0,r.jsx)("div",{className:"my-auto",children:(0,r.jsx)(E.Z,{color:"error",onClick:function(){N(e),p("remnotifyacc")},children:(0,r.jsx)(P.Z,{})})}):null]})})},"notify_account_"+t)})})}),(0,r.jsx)("div",{className:"mt-4",children:(0,r.jsx)(O.Z,{className:"",fullWidth:!1,color:"primary",size:"md",onClick:function(){x(!0),p("addnotifyacc")},children:o("creator.add_account")}
1)})]})})]})]})},K=n(32747),Q=function(e){var t,n,d=(0,s._)((0,I.Oc)(),1)[0],w=null==d?void 0:d.activeUser,D=(null==w?void 0:w.accountName)?null==d?void 0:d.activeUser.accountName:null,z=(0,h.$G)("common").t,q=e.collection,P=(0,s._)((0,m.useState)(!1),2),E=P[0],U=P[1],L=(0,s._)((0,m.useState)(!1),2),R=L[0],T=L[1],V=(0,s._)((0,m.useState)(!1),2),B=V[0],G=V[1],$=(0,s._)((0,m.useState)(!1),2),H=$[0],Q=$[1],X=(0,s._)((0,m.useState)(null),2),ee=X[0],et=X[1],en=(0,s._)((0,m.useState)(!1),2),ei=en[0],el=en[1],es=function(){var e=[];return ea()||e.push("The unique name of the collection must be 12 characters long, and may only contain lowercase letters and number 1-5!"),ev.displayName||e.push("Collection Name cannot be empty"),er()||e.push("The IPFS hash is not valid"),e},ea=function(){return""!==eh.uniqueName||S.fG.test(ev.uniqueName)},er=function(){return ev.image&&(0,N.m7)(ev.image)},ec=function(){return E||B||R},eo=(0,s._)((0,m.useState)(null),2),ed=eo[0],eu=eo[1];(0,m.useEffect)(function(){D&&(0,K.sP)(D,q).then(eu)},[q,D]);var em=(0,s._)((0,m.useState)(null),2),eh=em[0],ex=em[1],ef=(0,s._)((0,m.useState)(null),2),ev=ef[0],ep=ef[1],ej=(0,s._)((0,m.useState)(null),2),eg=ej[0],eb=ej[1],eN=(0,I.EM)(q),e_=(0,s._)((0,m.useState)(null),2),ey=e_[0],ew=e_[1],ek=(0,s._)((0,m.useState)(null),2),eC=ek[0],eZ=ek[1],eS=(t=(0,i._)(function(e){var t;return(0,a.Jh)(this,function(n){return t=null!==e?{uniqueName:e.uniqueName,displayName:e.displayName,image:e.image,marketFee:e.marketFee,url:e.url,description:e.description}:{uniqueName:"",displayName:"",image:"",marketFee:0,url:"",description:""},ex((0,l._)({},t)),ep((0,l._)({},t)),[2]})}),function(e){return t.apply(this,arguments)}),eD=(n=(0,i._)(function(){var e,t;return(0,a.Jh)(this,function(n){switch(n.label){case 0:return[4,(0,b.w1)(q)];case 1:return(e=n.sent()).success?(eb(e),t={socials:e.data.data.socials?JSON.parse(e.data.data.socials):{twitter:"",medium:"",facebook:"",github:"",discord:"",youtube:"",telegram:""},creator_info:e.data.data.creator_info?JSON.parse(e.data.data.creator_info):{country:"",address:"",city:"",zip:"",company:"",name:"",registration_number:""},images:e.data.data.images?JSON.parse(e.data.data.images):{banner_1920x500:"",logo_512x512:""}}):t={socials:{twitter:"",medium:"",facebook:"",github:"",discord:"",youtube:"",telegram:""},creator_info:{country:"",address:"",city:"",zip:"",company:"",name:"",registration_number:""},images:{banner_1920x500:"",logo_512x512:""}},ew(structuredClone(t)),eZ(structuredClone(t)),[2]}})}),function(){return n.apply(this,arguments)}),ez=(0,s._)((0,v.y$)("".concat(q,"_schema_names")),2),eq=ez[0],eO=ez[1],eA=(0,s._)((0,v.y$)("".concat(q,"_schema_stats")),2),eW=eA[0],eJ=eA[1],eI=(0,s._)((0,m.useState)(null),2),eF=(eI[0],eI[1]),eM=(0,s._)((0,m.useState)(null),2),eP=(eM[0],eM[1]),eE=function(e){eF(e)},eU=function(e){eP(e)},eL=function(){(0,Z.Cf)(q,eq,eO).then(eE),(0,Z.F7)(q,eW,eJ).then(eU)};(0,m.useEffect)(function(){(0,Z.$6)(q).then(eS),eD(),eL()},[q]);var eR=function(){ep(structuredClone(eh)),eZ(structuredClone(ey))},eT=function(){return JSON.stringify(eh)!==JSON.stringify(ev)||JSON.stringify(ey)!==JSON.stringify(eC)};return null===ed||null===eh||null===ev?(0,r.jsx)("div",{className:"flex justify-center mt-10",children:(0,r.jsx)(c.Z,{})}):ed?(0,r.jsxs)("div",{className:"mx-2 md:mx-5",children:[(0,r.jsx)(W.Z,{open:E,setOpen:U,isNewCollection:"new"===q,collectionData:(0,l._)({},ev,eC),setCreatedNewCollection:T}),(0,r.jsx)(M.g,{collectionUniqueName:q,collectionDisplayName:eh.displayName?eh.displayName:z("editor.create_new_collection"),path:"edit",pathDisplayName:z("editor.edit_collection")}),(0,r.jsxs)(j.C,{closable:!0,title:"New Tutorial!",severity:"info",children:["Confused about what to do here? We wrote an extensive article covering all the features, from your first collection to minting NFTs. Check it out"," ",(0,r.jsx)("a",{target:"_blank",href:"https://hivebp.medium.com/a-basic-primer-on-collections-schemas-templates-and-minting-af28fe8a5628",className:"underline",children:"by clicking here"})]}),(0,r.jsxs)(g.J,{title:"Collection Details",children:[(0,r.jsx)(j.C,{severity:"info",condition:"new"!==q,closable:!0,elementId:"manageSchemas",children:"You can update the details of your collection here or go to the schemas section below to Mint NFTs or manage your schemas."}),(0,r.jsxs)("div",{className:u()("grid grid-cols-1 justify-items-center lg:grid-cols-2 mt-10 text-center "),children:[(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("div",{className:"dark:!text-neutral text-black text-lg",children:z("editor.your_collection_header")}),(0,r.jsx)("div",{className:"flex justify-center mt-5 mb-3",children:B?(0,r.jsx)("div",{className:"grid w-56 mb-4 shadow-lg h-54 rounded-2xl bg-graphbg place-content-center",children:(0,r.jsx)(c.Z,{variant:"determinate",value:H})}):(0,r.jsx)(p.Z,{collection:{name:ev.displayName?ev.displayName:"",customVolumeDisplay:(0,r.jsx)("div",{}),image:ev.image?"".concat(f.sD).concat(ev.image):"/image-outline.svg",customHref:"/creator/".concat(ev.uniqueName?ev.uniqueName:"")}})}),(0,r.jsxs)("div",{className:"flex items-center justify-between space-x-2 mx-10 mb-10",children:[(0,r.jsx)(k.Z,{type:"text",variant:"bordered",label:z("editor.collection_image"),value:ev.image,onChange:function(e){var t=(0,l._)({},ev),n=e.target.value.trim();(0,N.jl)(n)&&(n=(0,N.FB)(n)),t.image=n,ep(t)},errorMessage:z("editor.ipfs_description"),isRequired:!0,isDisabled:ec(),isInvalid:!er()}),(0,r.jsx)("div",{children:(0,r.jsx)(_.R,{setIpfsHash:function(e){var t=(0,l._)({},ev);t.image=e,ep(t)},setError:et,setProgressPercentage:Q,setIsUploading:G,disabled:ec()})})]}),(0,r.jsx)(j.C,{condition:null!==ee,severity:"error",title:"Error occured trying to upload the image",children:ee}),(0,r.jsx)("div",{className:"mx-10 mb-10",children:(0,r.jsx)(k.Z,{type:"text",variant:"bordered",size:"md",label:z("editor.collection_display_name"),value:ev.displayName,onChange:function(e){var t=(0,l._)({},ev);t.displayName=e.target.value,ep(t)},errorMessage:z("editor.display_name_description"),isRequired:!0,isDisabled:ec(),isInvalid:!ev.displayName})})]}),(0,r.jsxs)("div",{className:"w-full",children:[(0,r.jsx)("div",{className:"mb-10 text-lg dark:!text-neutral text-black",children:z("editor.further_attributes")}),(0,r.jsx)("div",{className:"mx-10 mb-10",children:(0,r.jsx)(k.Z,{type:"text",variant:"bordered",size:"md",label:z("editor.collection_unique_name"),value:ev.uniqueName,onChange:function(e){var t=(0,l._)({},ev);t.uniqueName=e.target.value.toLowerCase().substring(0,12).replaceAll(RegExp("[^a-z0-5.]","g"),""),ep(t)},errorMessage:ea()?z("editor.collection_unique_name_description"):"max 12 characters (currently: ".concat(ev.uniqueName.length,"), lowercase, letters a-z and numbers 1-5 or . , if the collection name is less than 12 characters, you must be signed in with that account"),isRequired:!0,isDisabled:ec()||""!==eh.uniqueName,isInvalid:!ea()})}),(0,r.jsx)("div",{className:"mx-10 mb-2 text-left",children:z("editor.collection_description")}),(0,r.jsx)("div",{className:u()("text-left mx-10",ei||ev.description?"mb-2":"mb-10"),children:(0,r.jsx)(O.Z,{onClick:function(){return el(!ei)},isDisabled:ec(),size:"md",variant:"solid",fullWidth:!1,children:z(ei?"editor.close"
1:ev.description?"editor.edit":"editor.add")})}),(0,r.jsx)(o.Z,{in:ei&&!ec(),children:(0,r.jsx)("div",{className:u()("light text-black mx-10 border-8 border-graphbg rounded-md",ev.description?"mb-2":"mb-10"),children:(0,r.jsx)(x.default,{value:ev.description,disabled:ec(),onChange:function(e){var t=(0,l._)({},ev);t.description=e,ep(t)},disablePreview:!0})})}),ev.description?(0,r.jsxs)("div",{className:"mx-10 text-left",children:[ei?(0,r.jsx)("div",{className:"mb-2",children:z("editor.collection_description_preview")}):null,(0,r.jsx)("div",{className:"p-5 mb-10 border rounded-md",children:(0,r.jsx)(y.Z,{text:ev.description})})]}):null,(0,r.jsx)("div",{className:"mx-10 mb-10",children:(0,r.jsx)(k.Z,{type:"text",variant:"bordered",size:"md",label:"URL",value:ev.url,onChange:function(e){var t=(0,l._)({},ev);t.url=e.target.value,ep(t)},errorMessage:"The URL of your project",isRequired:!0,isDisabled:ec(),isInvalid:!ev.url})}),(0,r.jsx)("div",{className:"mx-10 mb-10",children:(0,r.jsx)(k.Z,{type:"number",variant:"bordered",size:"md",label:"Market Fee (in %)",value:ev.marketFee,onWheel:function(e){return e.target.blur()},onChange:function(e){var t=(0,l._)({},ev);t.marketFee=parseFloat(e.target.value),ep(t)},min:0,max:15,errorMessage:"Fee (0% - 15%)",isRequired:!0,isDisabled:ec(),isInvalid:!ev.marketFee})})]})]}),(0,r.jsx)(Y,{collectionData:eg,loadCollectionData:eD,collectionName:null==eN?void 0:eN.collection_name}),(0,r.jsx)(A,{atomicCollectionData:eg,loadAtomicCollectionData:eD}),(0,r.jsx)(J,{data:eC,setData:eZ}),(0,r.jsx)(C,{data:eC,setData:eZ}),es().map(function(e){return(0,r.jsx)(j.C,{condition:!0,severity:"error",children:e})}),(0,r.jsx)(j.C,{condition:R,severity:"success",title:"Your collection has been created!",children:"Please go back to the overview to find further options to edit this collection"}),(0,r.jsxs)("div",{className:"flex flex-wrap justify-center gap-4",children:[(0,r.jsx)(O.Z,{className:"",fullWidth:!1,color:"primary",size:"md",onClick:function(){return U(!0)},isDisabled:es().length>0||ec()||!eT(),children:z("editor.save_changes")}),(0,r.jsx)(O.Z,{className:"",fullWidth:!1,size:"md",onClick:function(){return eR()},isDisabled:ec()||!eT(),children:"Discard Changes"}),(0,r.jsx)(O.Z,{className:"",fullWidth:!1,color:"danger",size:"md",onClick:function(){return eR()},isDisabled:B,href:"/creator",children:"Back to Overview"})]})]})]}):null!==ed&&!1===ed?(0,r.jsx)(F.d,{}):null}},77250:function(e,t,n){var i=n(30137),l=n(98732),s=n(97582),a=n(85893),r=n(64666),c=n(7906),o=n(295),d=n(53816),u=n(53252),m=n(81458),h=n(67294),x=n(22120),f=n(48528),v=n(67037),p=n(32747),j=n(49785),g=n(42551);t.Z=function(e){var t,n=e.open,b=e.setOpen,N=e.isNewCollection,_=e.collectionData,y=e.setCreatedNewCollection,w=(0,x.$G)("common").t,k=(0,l._)((0,j.Oc)(),1)[0],C=null==k?void 0:k.activeUser,Z=(null==C?void 0:C.accountName)?null==k?void 0:k.activeUser.accountName:null,S=(0,l._)((0,h.useState)(!1),2),D=S[0],z=S[1],q=(0,l._)((0,h.useState)(null),2),O=q[0],A=q[1],W=(0,l._)((0,h.useState)(null),2),J=W[0],I=W[1],F=(t=(0,i._)(function(){var e,t,n,i,l;return(0,s.Jh)(this,function(s){switch(s.label){case 0:z(!0),e=[(0,p.vH)(C)],(t=[]).push({key:"description",value:["string",_.description]}),t.push({key:"name",value:["string",_.displayName]}),t.push({key:"img",value:["string",_.image]}),t.push({key:"url",value:["string",_.url]}),t.push({key:"socials",value:["string",JSON.stringify(_.socials)]}),t.push({key:"creator_info",value:["string",JSON.stringify(_.creator_info)]}),t.push({key:"images",value:["string",JSON.stringify(_.images)]}),N?t.length>0&&e.push({account:"atomicassets",name:"createcol",authorization:[{actor:Z,permission:C.requestPermission?C.requestPermission:"active"}],data:{author:Z,collection_name:_.uniqueName,allow_notify:!0,authorized_accounts:[Z],notify_accounts:[],market_fee:(_.marketFee/100).toFixed(2),data:t}}):(t.length>0&&e.push({account:"atomicassets",name:"setcoldata",authorization:[{actor:Z,permission:C.requestPermission?C.requestPermission:"active"}],data:{collection_name:_.uniqueName,data:t}}),_.marketFee&&e.push({account:"atomicassets",name:"setmarketfee",authorization:[{actor:Z,permission:C.requestPermission?C.requestPermission:"active"}],data:{collection_name:_.uniqueName,market_fee:(_.marketFee/100).toFixed(2)}})),n=null,s.label=1;case 1:return s.trys.push([1,3,,4]),[4,C.session.transact({actions:e},{expireSeconds:300,blocksBehind:0})];case 2:return n=null===(l=s.sent())||void 0===l?void 0:null===(i=l.response)||void 0===i?void 0:i.transaction_id,[3,4];case 3:return A(s.sent().message),z(!1),[3,4];case 4:return I(n),N&&y(!0),z(!1),[2]}})}),function(){return t.apply(this,arguments)}),M=function(){D||(b(!1),A(null),I(null))};return(0,a.jsx)(r.Z,{open:n,onClose:function(){return M()},maxWidth:"lg",fullWidth:!0,children:(0,a.jsxs)(v.J,{title:w("collection.edit_collection"),noMargin:!0,children:[(0,a.jsx)("div",{className:"text-lg font-bold mb-5",children:w("popups.do_you_want_to_save_these_changes")}
1),(0,a.jsx)("div",{className:"w-full mb-5 overflow-x-auto",children:(0,a.jsx)(c.Z,{size:"small",children:(0,a.jsxs)(o.Z,{children:[(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:w("collection.name")})}),(0,a.jsx)(u.Z,{children:_.uniqueName})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:w("collection.display_name")})}),(0,a.jsx)(u.Z,{children:_.displayName})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:w("collection.description")})}),(0,a.jsx)(u.Z,{children:_.description?_.description.substring(0,250):""})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:w("collection.url")})}),(0,a.jsx)(u.Z,{children:_.url})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:w("collection.market_fee")})}),(0,a.jsx)(u.Z,{children:_.marketFee+"%"})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:"Social Media"})}),(0,a.jsx)(u.Z,{children:JSON.stringify(_.socials)})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:"Company Info"})}),(0,a.jsx)(u.Z,{children:JSON.stringify(_.creator_info)})]}),(0,a.jsxs)(d.Z,{children:[(0,a.jsx)(u.Z,{children:(0,a.jsx)("b",{children:"Images"})}),(0,a.jsx)(u.Z,{children:JSON.stringify(_.images)})]})]})})}),(0,a.jsx)(f.C,{condition:null!==J,transactionId:J,severity:"success",title:"Success!"}),(0,a.jsx)(f.C,{condition:null!==O,severity:"error",title:"An error occured!",children:O}),(0,a.jsxs)("div",{className:"flex flex-wrap justify-center gap-4",children:[(0,a.jsx)(g.Z,{className:"",fullWidth:!1,color:"primary",size:"md",onClick:function(){return F()},isDisabled:D||null!==J,children:w("collection.save_collection")}),(0,a.jsx)(g.Z,{className:"",fullWidth:!1,color:"danger",size:"md",onClick:function(){return M()},isDisabled:D,children:null===J?"Cancel":"Close"})]}),D?(0,a.jsx)("div",{className:"my-5",children:(0,a.jsx)(m.Z,{})}):null]})})}}}]); 2//# sourceMappingURL=8954-837d875bcbd32dad.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.