1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7371],{96540:function(e,t,l){var a=l(64836);t.Z=void 0;var i=a(l(64938)),n=l(85893),s=(0,i.default)((0,n.jsx)("path",{d:"M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"}),"Add");t.Z=s},54741:function(e,t,l){l.d(t,{a:function(){return p}});var a=l(30137),i=l(98732),n=l(97582),s=l(85893),r=l(96540),c=l(34386),d=l(93946),o=l(98456),m=l(67294),h=l(69596),u=l(14503),x=l(22120),b=l(3887),p=function(e){var t,l=e.collectionName,p=e.schema,v=e.templateId,f=e.templateName,_=e.image,g=e.assetId,j=e.matchAttribute,N=e.amount,w=e.odds,k=e.calcTotalNftOutcomesOdds,y=e.guaranteed,T=e.index,Z=e.setSelectedUploadAsset,F=e.isFromPool,S=e.burnIngredient,z=e.isNoNFTOutcome,L=(0,i._)((0,m.useState)(l),2),A=L[0],I=L[1],O=(0,i._)((0,m.useState)(null),2),Q=O[0],C=O[1],E=(0,i._)((0,m.useState)(null),2),G=E[0],V=E[1],H=(0,i._)((0,m.useState)(null),2),M=H[0],U=H[1],$=(0,i._)((0,m.useState)(null),2),B=$[0],D=$[1],J=(0,i._)((0,m.useState)(v),2),K=J[0],P=J[1],Y=(0,i._)((0,m.useState)(null),2),q=Y[0],R=Y[1],W=(0,x.$G)("common").t,X=(t=(0,a._)(function(){var e,t,a,i,s,r,c,d,o,m;return(0,n.Jh)(this,function(n){switch(n.label){case 0:if(!F)return[3,1];return D("pool_image"),[3,14];case 1:if(!(_&&l&&p&&f&&v&&g))return[3,2];return V(p),U(f),R(g),D(_?_.replace("https://ipfs.hivebp.io/ipfs/",""):"no_image"),[3,14];case 2:if(!(_&&l&&p&&f&&v))return[3,3];return V(p),U(f),R(g),D(_?_.replace("https://ipfs.hivebp.io/ipfs/",""):"no_image"),[3,14];case 3:if(!(l&&v))return[3,5];return[4,(0,u.jH)(v,l)];case 4:return C(null===(e=r=n.sent().data)||void 0===e?void 0:e.collection.name),V(null===(t=r)||void 0===t?void 0:t.schema.schema_name),U(null===(a=r)||void 0===a?void 0:a.name),(null===(i=r)||void 0===i?void 0:i.immutable_data)&&r.immutable_data.img?D(r.immutable_data.img):D("no_image"),(null===(s=r)||void 0===s?void 0:s.immutable_data)&&r.immutable_data.video&&D(r.immutable_data.video),[3,14];case 5:if(!(l&&p))return[3,7];return[4,(0,u.Ve)(p,l)];case 6:return C((c=n.sent().data).collection.name),V(p),D(c.collection.img),[3,14];case 7:if(!(l&&!z))return[3,9];return[4,(0,u.w1)(l)];case 8:return C((d=n.sent().data).name),D(d.img),[3,14];case 9:if(!v)return[3,11];return[4,(0,u.Zy)(v)];case 10:return I((o=n.sent().data[0]).collection.collection_name),C(o.collection.name),V(o.schema.schema_name),U(o.name),o.immutable_data&&o.immutable_data.img?D(o.immutable_data.img):D("no_image"),o.immutable_data&&o.immutable_data.video&&D(o.immutable_data.video),[3,14];case 11:if(!g)return[3,13];return[4,(0,u.fb)(g)];case 12:return I((m=n.sent().data).collection.collection_name),C(m.collection.name),V(m.schema.schema_name),U(m.name),P(m.template.template_id),m.template.immutable_data&&m.template.immutable_data.img?D(m.template.immutable_data.img):D("no_image"),m.template.immutable_data&&m.template.immutable_data.video&&D(m.template.immutable_data.video),[3,14];case 13:z&&D("no_outcome"),n.label=14;case 14:return[2]}})}),function(){return t.apply(this,arguments)});return(0,m.useEffect)(function(){X()},[l,p,v]),(0,s.jsxs)("div",{className:"rounded-md shadow-md w-46",children:[(0,s.jsxs)("div",{className:"h-60 w-46 relative bg-white dark:!bg-black rounded-t-md border-l border-t border-r border-zinc-200 dark:!border-paperl",children:[Z?(0,s.jsx)(c.Z,{title:"Click here to select matching assets from your inventory",children:(0,s.jsx)("div",{className:"absolute z-10 top-2 right-2 bg-white dark:!bg-black rounded-full animate-pulse",children:(0,s.jsx)(d.Z,{color:"primary",onClick:function(){Z(T)},children:(0,s.jsx)(r.Z,{})})})}):null,N?(0,s.jsx)(c.Z,{title:"".concat(N," NFT").concat(N>
11?"s":""),children:(0,s.jsx)("div",{className:"absolute z-10 top-2 left-2 bg-white dark:!bg-black font-medium rounded-lg px-2",children:N})}):null,y?(0,s.jsx)(c.Z,{title:W("craft.the_chance_that_the_user_will_get_this_nft_is_x",{x:100}),children:(0,s.jsx)("div",{className:"absolute z-10 top-2 left-2 bg-white dark:!bg-black font-medium rounded-lg px-2",children:"100%"})}):w?(0,s.jsx)(c.Z,{title:W("craft.the_chance_that_the_user_will_get_this_nft_is_x",{x:w/k()*100}),children:(0,s.jsxs)("div",{className:"absolute z-10 top-2 left-2 bg-white dark:!bg-black font-medium rounded-lg px-2",children:[parseInt(w/k()*100),"%"]})}):null,S?(0,s.jsx)("div",{className:"h-full w-full rounded-t-md",children:(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold text-center",children:(0,s.jsx)(b.Z,{})})}):null===B?(0,s.jsx)("div",{className:"h-full w-full rounded-t-md",children:(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",children:(0,s.jsx)(o.Z,{})})}):"no_image"===B?(0,s.jsx)("div",{className:"h-full w-full rounded-t-md",children:(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold text-center",children:(0,s.jsx)("i",{children:"invalid image"})})}):"pool_image"===B?(0,s.jsx)("img",{className:"h-full w-full object-fill rounded-t-md bg-zinc-300",src:"https://ipfs.hivebp.io/ipfs/QmUQyQYmSAwdQLK3QyfMrASkd668sgB1GS3SLoV6F6a7A9"}):z?"no_outcome"===B?(0,s.jsx)("div",{className:"h-full w-full rounded-t-md",children:(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold text-center",children:(0,s.jsx)("i",{children:"No outcome"})})}):"":(0,s.jsx)("img",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2",src:"https://ipfs.hivebp.io/preview?collection=".concat(A,"&size=320&hash=").concat(B?B.replace("video:",""):B)})]}),(0,s.jsx)("div",{className:"w-46 bg-white dark:!bg-black rounded-b-md text-center p-3 border-l border-b border-r border-zinc-200 dark:!border-paperl",children:S?W("craft.burns_ingredient_x",{x:S}):F?(0,s.jsx)("div",{children:W("craft.select_from_pool_of_preminted_nfts")}):(0,s.jsxs)(s.Fragment,{children:[A&&!z?(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:["NFT is from the ",(0,s.jsx)("b",{children:A})," ","collection"]}),disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{className:"hover:text-primary",children:(0,s.jsx)(h.r,{href:"/collection/".concat(A),external:!0,children:Q||A})})}):z?(0,s.jsx)("div",{className:"h-6"}):(0,s.jsx)("div",{children:"<loading..a.>"}),G?(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:["NFT belongs to the ",(0,s.jsx)("b",{children:G})," ","schema"]}),disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{className:"hover:text-primary",children:(0,s.jsx)(h.r,{href:"/collection/".concat(A,"/").concat(G),external:!0,children:G})})}):z?(0,s.jsx)("div",{className:"h-6",children:""}):(0,s.jsx)(c.Z,{title:"NFT belongs to any schema of the collection",disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{children:"<any schema>"})}),M||K?(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:["NFT has the template ID ",(0,s.jsx)("b",{children:K})]}),disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{className:"hover:text-primary",children:(0,s.jsx)(h.r,{href:"/template/".concat(K),external:!0,children:M||K})})}):j&&""!==j.attribute_name?(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:["NFT has an attribute"," ",(0,s.jsx)("b",{children:j.attribute_name})," ","with the value"," ",(0,s.jsx)("b",{children:j.values[0]})]}),disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsxs)("div",{children:[j.attribute_name," -"," ",j.values[0]]})}):z?(0,s.jsx)("div",{className:"h-6"}):(0,s.jsx)(c.Z,{title:"NFT belongs to any template of the collection",disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{children:"<any template>"})}),q?(0,s.jsx)(c.Z,{title:(0,s.jsxs)("div",{children:["NFT belongs has the assetId"," ",(0,s.jsx)("b",{children:q})]}),disableTouchListener:!0,placement:"right",arrow:!0,children:(0,s.jsx)("div",{className:"hover:text-primary",children:(0,s.jsx)(h.r,{href:"/asset/".concat(q),external:!0,children:q})})}):null," "]})})]})}},69756:function(e,t,l){l.d(t,{x:function(){return s}});var a=l(85893),i=l(34386),n=l(22120),s=function(e){var t=e.token,l=e.minAmount,s=e.maxAmount,r=e.odds,c=e.calcTotalTokenOutcomesOdds,d=e.guaranteed,o=null!=t?parseFloat(t.split(" ")[0]).toString():null,m=null!=l?parseFloat(l.split(" ")[0]).toString():null,h=null!=s?parseFloat(s.split(" ")[0]).toString():null;h!==m||t||(o=h);var u=null!=t?t.split(" ")[1]:null!=l?l.split(" ")[1]:null,x=(0,n.$G)("common").t;return(0,a.jsx)("div",{children:(0,a.jsxs)("div",{className:"border dark:!border-paperl border-zinc-200 rounded-md shadow-md h-84 w-46 bg-white dark:!bg-black relative",children:[d?(0,a.jsx)(i.Z,{title:"The chance that the user will get this Token is 100%",children:(0,a.jsx)("div",{className:"absolute z-2 top-2 left-2 bg-white dark:!bg-black font-medium rounded-lg px-2",children:"100%"})}):r?(0,a.jsx)(i.Z,{title:x("craft.chance_that_the_user_will_get_token",{x:r/c()
1*100}),children:(0,a.jsxs)("div",{className:"absolute z-2 top-2 left-2 bg-white dark:!bg-black font-medium rounded-lg px-2",children:[parseInt(r/c()*100),"%"]})}):null,(0,a.jsxs)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 font-bold text-center",children:[null!==o?(0,a.jsx)("div",{className:o.length<=8?"text-2xl":o.length<=16?"text-lg":"",children:o}):null!==m&&null!==h?(0,a.jsxs)("div",{children:[(0,a.jsx)("div",{className:"italic text-sm text-zinc-400",children:"from"}),(0,a.jsx)("div",{className:m.length<=8?"text-2xl":m.length<=16?"text-lg":"",children:m}),(0,a.jsx)("div",{className:"italic text-sm text-zinc-400",children:"up to"}),(0,a.jsx)("div",{className:h.length<=8?"text-2xl":h.length<=16?"text-lg":"",children:h})]}):(0,a.jsx)("i",{children:"invalid token"}),(0,a.jsx)("div",{className:"text-2xl",children:u})]})]})})}}}]); 2//# sourceMappingURL=7371-f644e4054905676f.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.