Files
hictoaster/hen/static/js/main.7b1dd184.chunk.js
Victor Giers a14333e6e6 initial commit
2021-11-19 21:59:43 +01:00

2 lines
210 KiB
JavaScript

(this["webpackJsonphicetnunc-ui"]=this["webpackJsonphicetnunc-ui"]||[]).push([[0],{106:function(e,t,n){e.exports={html:"styles_html__1kmcX",container:"styles_container__lu2xv",interactive:"styles_interactive__15Bjr",preview:"styles_preview__2rSQU",button:"styles_button__3WtNX",gradient:"styles_gradient__3pShs",warning:"styles_warning__16Ugt",error:"styles_error__393uj"}},11:function(e,t,n){"use strict";n.d(t,"q",(function(){return a})),n.d(t,"m",(function(){return c})),n.d(t,"r",(function(){return i})),n.d(t,"n",(function(){return o})),n.d(t,"s",(function(){return u})),n.d(t,"o",(function(){return d})),n.d(t,"p",(function(){return j})),n.d(t,"l",(function(){return h})),n.d(t,"j",(function(){return b})),n.d(t,"i",(function(){return p})),n.d(t,"f",(function(){return f})),n.d(t,"d",(function(){return x})),n.d(t,"c",(function(){return O})),n.d(t,"b",(function(){return m})),n.d(t,"a",(function(){return v})),n.d(t,"g",(function(){return g})),n.d(t,"k",(function(){return y})),n.d(t,"h",(function(){return _})),n.d(t,"e",(function(){return w}));var r={},a=function(e){return r=e},c=function(){return r},s=[],i=function(e){return s=e},o=function(){return s},l=[],u=function(e){return l=e},d=function(){return l},j=function(e){return e},h={FEED:"/",ISSUER:"/tz",COLLAB:"/kt",ABOUT:"/about",FAQ:"/faq",SYNC:"/sync",MINT:"/mint",OBJKT:"/objkt",GALLERY:"/gallery",TAGS:"/tags"},b=100,p={BMP:"image/bmp",GIF:"image/gif",JPEG:"image/jpeg",PNG:"image/png",SVG:"image/svg+xml",TIFF:"image/tiff",WEBP:"image/webp",MP4:"video/mp4",OGV:"video/ogg",QUICKTIME:"video/quicktime",WEBM:"video/webm",GLB:"model/gltf-binary",GLTF:"model/gltf+json",MP3:"audio/mpeg",OGA:"audio/ogg",WAV:"audio/wav",XWAV:"audio/x-wav",FLAC:"audio/flac",PDF:"application/pdf",ZIP:"application/zip",ZIP1:"application/x-zip-compressed",ZIP2:"multipart/x-zip",MD:"text/markdown"},f="application/x-directory",x=Object.keys(p).map((function(e){return p[e]})).filter((function(e){return e!==p.GLTF})),O=Object.entries(p).filter((function(e){return x.includes(e[1])})).filter((function(e){return!["ZIP1","ZIP2","OGA","OGV","BMP","TIFF","XWAV","QUICKTIME","WEBP"].includes(e[0])})).map((function(e){return"ZIP"===e[0]?"HTML (ZIP ARCHIVE)":e[0]})).join(", "),m=[p.JPEG,p.PNG,p.GIF,p.MP4],v=["jpeg, png, gif"],g=1e4,y=10,_=25,w="ipfs://QmNrhZHUaEqxhyLfqoq1mtHSipkWHeT31LNHb1QEbDHgnc"},115:function(e,t,n){e.exports={container:"styles_container__pQJ-c",image:"styles_image__3kUoH",info:"styles_info__1NqAJ",number:"styles_number__Ml7lu",title:"styles_title__aRg7I",description:"styles_description__3e4qG",links:"styles_links__2F1AB",collect:"styles_collect__3Z7tm"}},122:function(e,t,n){"use strict";n(2),n(426),n(0)},126:function(e,t,n){e.exports={container:"styles_container__1LAgr",swap:"styles_swap__1FCaL",issuer:"styles_issuer__1JbeZ",buttons:"styles_buttons__15n2t"}},135:function(e,t,n){"use strict";n.r(t),n.d(t,"prepareFilesFromZIP",(function(){return u})),n.d(t,"unzipBuffer",(function(){return j})),n.d(t,"injectCSPMetaTagIntoDataURI",(function(){return b})),n.d(t,"injectCSPMetaTagIntoBuffer",(function(){return p})),n.d(t,"injectCSPMetaTagIntoHTML",(function(){return f})),n.d(t,"getCoverImagePathFromBuffer",(function(){return x})),n.d(t,"validateFiles",(function(){return O})),n.d(t,"dataRUIToBuffer",(function(){return v}));var r=n(1),a=n.n(r),c=n(6),s=n(428),i=n(265),o=n.n(i),l=n(11);function u(e){return d.apply(this,arguments)}function d(){return(d=Object(c.a)(a.a.mark((function e(t){var n,r,c,s,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,j(t);case 2:n=e.sent,r=n["index.html"],n["index_raw.html"]=new Blob([r],{type:r.type}),e.t0=a.a.keys(n);case 6:if((e.t1=e.t0()).done){e.next=16;break}if(!(c=e.t1.value).endsWith(".html")&&!c.endsWith(".htm")){e.next=14;break}return e.next=11,n[c].arrayBuffer();case 11:s=e.sent,i=p(s),n[c]=new Blob([i],{type:r.type});case 14:e.next=6;break;case 16:return n=(n=Object.entries(n).map((function(e){return{path:e[0],blob:e[1]}}))).filter((function(e){return""!==e.path})),e.abrupt("return",n);case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function j(e){return h.apply(this,arguments)}function h(){return(h=Object(c.a)(a.a.mark((function e(t){var n,r,c,i,u,d,j;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=s.a(t),n=Object.entries(n).map((function(e){return{path:e[0],buffer:e[1]}})),r=null,c=0;case 4:if(!(c<n.length)){e.next=15;break}if(i=n[c].path.split("/"),"index.html"!==i[i.length-1]){e.next=12;break}return(u=n[c].path.split("/")).pop(),r=u.join("/"),e.abrupt("break",15);case 12:c++,e.next=4;break;case 15:if(null!==r){e.next=19;break}throw d="No index.html file found!",window.alert(d),new Error(d);case 19:return j={},n.forEach((function(e,t){var n,a=e.path.replace("".concat(r,"/"),"");n=0===e.buffer.length&&e.path.endsWith("/")?l.f:o.a.lookup(e.path),j[a]=new Blob([e.buffer],{type:n})})),e.abrupt("return",j);case 22:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function b(e){var t="data:text/html;base64,",n=e.replace(t,""),r=f(atob(n));return"".concat(t).concat(btoa(r))}function p(e){var t=f((new TextDecoder).decode(e));return(new TextEncoder).encode(t)}function f(e){var t=(new DOMParser).parseFromString(e,"text/html"),n=t.head.querySelectorAll('meta[http-equiv="Content-Security-Policy"]');if(n.length)for(var r=0;r<n.length;r++)n[r].remove();if(!t.head){var a="index.html is missing <head> tag!";throw window.alert(a),new Error(a)}return t.head.insertAdjacentHTML("afterbegin","\n <meta http-equiv=\"Content-Security-Policy\" content=\"\n upgrade-insecure-requests;\n default-src\n 'none';\n frame-src\n 'self';\n child-src\n 'self'\n 'unsafe-inline'\n blob:;\n script-src\n 'self'\n 'unsafe-inline'\n 'unsafe-eval'\n blob:;\n style-src\n 'self'\n 'unsafe-inline';\n img-src\n 'self'\n 'unsafe-inline'\n data:\n blob:\n https://services.tzkt.io\n https://ipfs.infura.io\n https://*.infura-ipfs.io\n https://cloudflare-ipfs.com/\n https://ipfs.io/\n https://templewallet.com/logo.png\n https://gateway.pinata.cloud/;\n font-src\n 'self'\n data:\n https://ipfs.infura.io\n https://*.infura-ipfs.io\n https://cloudflare-ipfs.com/\n https://fonts.googleapis.com/\n https://ipfs.io/\n https://gateway.pinata.cloud/;\n connect-src\n 'self'\n https://better-call.dev\n https://*.better-call.dev\n https://*.cryptonomic-infra.tech\n https://cryptonomic-infra.tech\n https://*.infura.io\n https://*.infura-ipfs.io\n https://infura.io\n blob:\n data:\n ws:\n wss:\n bootstrap.libp2p.io\n preload.ipfs.io\n https://mainnet.smartpy.io\n https://mainnet-tezos.giganode.io\n https://api.etherscan.io\n https://api.thegraph.com\n https://*.tzkt.io\n https://api.hicdex.com\n\t https://hdapi.teztools.io\n https://api.tzstats.com\n https://*.wikidata.org\n https://*.coinmarketcap.com\n https://api.openweathermap.org\n https://hicetnunc.xyz\n https://*.hicetnunc.xyz;\n manifest-src\n 'self';\n base-uri\n 'self';\n form-action\n 'none';\n media-src\n 'self'\n 'unsafe-inline'\n data:\n blob:\n https://ipfs.infura.io\n https://*.infura-ipfs.io\n https://cloudflare-ipfs.com/\n https://ipfs.io/\n https://gateway.pinata.cloud/;\n prefetch-src\n 'self'\n https://ipfs.infura.io\n https://*.infura-ipfs.io\n https://cloudflare-ipfs.com/\n https://fonts.googleapis.com/\n https://ipfs.io/\n https://gateway.pinata.cloud/;\n worker-src\n 'self'\n 'unsafe-inline'\n blob:;\">\n "),"<!DOCTYPE html><html>".concat(t.documentElement.innerHTML,"</html>")}function x(e){var t=(new TextDecoder).decode(e);return function(e){var t=e.head.querySelector('meta[property="cover-image"]');t||(t=e.head.querySelector('meta[property="og:image"]'));return t?t.getAttribute("content"):null}((new DOMParser).parseFromString(t,"text/html"))}function O(e){return m.apply(this,arguments)}function m(){return(m=Object(c.a)(a.a.mark((function e(t){var n,r,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t["index.html"]){e.next=2;break}return e.abrupt("return",{valid:!1,error:"Missing index.html file"});case 2:return n=t["index.html"],e.next=5,n.text();case 5:if(r=e.sent,c=new DOMParser,c.parseFromString(r,"text/html").head){e.next=10;break}return e.abrupt("return",{valid:!1,error:"Missing <head> tag in index.html. Please refer to the Interactive OBJKTs Guide.."});case 10:return e.abrupt("return",{valid:!0});case 11:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){for(var t=e.split(",")[1],n=atob(t),r=n.length,a=new Uint8Array(r),c=0;c<r;c++)a[c]=n.charCodeAt(c);return a}},136:function(e,t,n){e.exports={container:"styles_container__161Xd"}},137:function(e,t,n){e.exports={container:"styles_container__1q-zX",content:"styles_content__3YwU-",logo:"styles_logo__1x4uj",right:"styles_right__1hTGF",hamburger:"styles_hamburger__1Mv_n",menu:"styles_menu__3_OV-"}},152:function(e,t,n){e.exports={objktview:"styles_objktview__mIwe4",history:"styles_history__2n8VK"}},153:function(e,t,n){e.exports={container:"styles_container__3L678",media:"styles_media__1WUZH",info:"styles_info__2m5IH",description:"styles_description__3ViTs",title:"styles_title__2zLPu"}},154:function(e,t,n){e.exports={mb1:"styles_mb1__2Ab_R",mt1:"styles_mt1__1PXLe",mb2:"styles_mb2__smx2W",mt2:"styles_mt2__AyCS6",mb3:"styles_mb3__3Ws9S",mt3:"styles_mt3__2mxhK",muted:"styles_muted__3SCO7"}},155:function(e,t,n){e.exports={container:"styles_container__3vLk8",close:"styles_close__3DGXq",content:"styles_content__2XaX5",block:"styles_block__39a-o",modal:"styles_modal__2Yi2m",background:"styles_background__1gOPk"}},171:function(e,t,n){e.exports={loader:"styles_loader__gGoGs",container:"styles_container__3gSuG",circle:"styles_circle__2oCav",message:"styles_message__2jEl4",flicker:"styles_flicker__2bDI7"}},172:function(e,t,n){e.exports={container:"styles_container__3Wzyi",content:"styles_content__Bluow",message:"styles_message__29H4U",buttons:"styles_buttons__ATAj5"}},173:function(e,t,n){e.exports={vector:"styles_vector__2SoJd",display:"styles_display__28Ist",container:"styles_container__16Osc",interactive:"styles_interactive__3dnh5"}},175:function(e,t,n){e.exports={container:"styles_container__MNIXz",tag:"styles_tag__3C_88"}},18:function(e,t,n){e.exports={input:"styles_input__2KMqJ",link:"styles_link__HAiIJ",textarea:"styles_textarea__1r2r-",table:"styles_table__1cyut",reviewTable:"styles_reviewTable__DTOKj",row:"styles_row__BHWty",borderBottom:"styles_borderBottom__3jXWe",addressCell:"styles_addressCell__3yYfu",cellWithPadding:"styles_cellWithPadding__rALCl",sharesCell:"styles_sharesCell__MLAhL",actionCell:"styles_actionCell__2KMrv",absolute:"styles_absolute__1sdYd",alignRight:"styles_alignRight__uWaoO",projectList:"styles_projectList__301OF",mt1:"styles_mt1__3MFfd",mb1:"styles_mb1__1FDew",mt2:"styles_mt2__1ZJMW",mb2:"styles_mb2__luZ4H",mt3:"styles_mt3__2TcN0",mb3:"styles_mb3__2PUFL",checkbox:"styles_checkbox__3A2UE",list:"styles_list__1DgxT",check:"styles_check__28kBY",flex:"styles_flex__27wK6",flexBetween:"styles_flexBetween__1jKa7",tipSelect:"styles_tipSelect__2BbgB",btn:"styles_btn__3rnA6",disabled:"styles_disabled__13_i9",selected:"styles_selected__22hgh",muted:"styles_muted__3qY-N",secondary:"styles_secondary__DtbnQ",textInput:"styles_textInput__25jg6",relative:"styles_relative__Ac-qN",collabInfo:"styles_collabInfo__o3ylU",descriptive:"styles_descriptive__ceehp"}},196:function(e,t,n){"use strict";n.d(t,"a",(function(){return a})),n.d(t,"b",(function(){return c}));var r=n(11),a=function(e){return e.filter((function(t){return 0===Object.keys(t).length||(!!t.token_info||(console.warn("objkt flagged as corrupt",e),!1))}))},c=function(e){return new Promise((function(t){var n=new FileReader;n.onloadend=function(e){if(e.target.readyState===FileReader.DONE){var n,a=new Uint8Array(e.target.result),c=[];switch(a.forEach((function(e){c.push(e.toString(16))})),c.join("").toUpperCase()){case"7BA2020":n=r.i.GLTF;break;case"676C5446":n=r.i.GLB;break;default:n="Unknown MimeType"}t(n)}},n.onerror=function(){return t("Unknown MimeType")},n.readAsArrayBuffer(e.slice(0,4))}))}},198:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(10),a=(n(2),n(263)),c=n.n(a),s=n(272),i=n.n(s),o=n(0),l=c()("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),u=64;function d(e,t){return Math.abs((t-e)%t)}function j(e){var t=e.x,n=e.y;return t+n<13||t+n>102||t>51&&n<13||n>51&&t<13}function h(e){return"M "!==e.substr(-2)}var b=[function(e,t){return Object(o.jsx)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:Object(o.jsx)("path",{id:"path",d:"".concat(e)})})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsx)("filter",{id:"filter".concat(t),x:"0%",y:"0%",width:"100%",height:"100%",filterUnits:"objectBoundingBox",primitiveUnits:"userSpaceOnUse",children:Object(o.jsx)("feMorphology",{operator:"erode",radius:"3 1",x:"0%",y:"0%",width:"100%",height:"100%",in:"SourceGraphic",result:"morphology"})}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),children:[Object(o.jsx)("feTurbulence",{type:"turbulence",baseFrequency:"0.005",numOctaves:"4",result:"turbulence"}),Object(o.jsx)("feDisplacementMap",{in2:"turbulence",in:"SourceGraphic",scale:"30",xChannelSelector:"R",yChannelSelector:"G"}),Object(o.jsx)("feMorphology",{operator:"dilate",radius:"0.5"}),Object(o.jsx)("feMorphology",{operator:"erode",radius:"0.5"})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),children:[Object(o.jsx)("feTurbulence",{type:"turbulence",baseFrequency:"0.005",numOctaves:"4",result:"turbulence"}),Object(o.jsx)("feDisplacementMap",{in2:"turbulence",in:"SourceGraphic",scale:"50",xChannelSelector:"R",yChannelSelector:"G"}),Object(o.jsx)("feMorphology",{operator:"erode",radius:"0.5"})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),children:[Object(o.jsx)("feTurbulence",{type:"turbulence",baseFrequency:"0.5 0",numOctaves:"1",result:"turbulence"}),Object(o.jsx)("feDisplacementMap",{in2:"turbulence",in:"SourceGraphic",scale:"10",xChannelSelector:"R",yChannelSelector:"G"})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),children:[Object(o.jsx)("feTurbulence",{type:"turbulence",baseFrequency:"0.05 0.5",numOctaves:"1",result:"turbulence"}),Object(o.jsx)("feDisplacementMap",{in2:"turbulence",in:"SourceGraphic",scale:"10",xChannelSelector:"R",yChannelSelector:"G"})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsx)("filter",{id:"filter".concat(t),children:Object(o.jsx)("feMorphology",{operator:"erode",radius:"1"})}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsx)("filter",{id:"filter".concat(t),children:Object(o.jsx)("feMorphology",{operator:"dilate",radius:"1.2"})}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),x:"0",y:"0",width:"100%",height:"100%",children:[Object(o.jsx)("feTile",{in:"SourceGraphic",x:"16",y:"16",width:"98",height:"98"}),Object(o.jsx)("feTile",{})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})},function(e,t){return Object(o.jsxs)("svg",{viewBox:"0 0 ".concat(u," ").concat(u),xmlns:"http://www.w3.org/2000/svg",children:[Object(o.jsxs)("filter",{id:"filter".concat(t),children:[Object(o.jsx)("feTurbulence",{type:"turbulence",baseFrequency:"0.05",numOctaves:"2",result:"turbulence"}),Object(o.jsx)("feDisplacementMap",{in2:"turbulence",in:"SourceGraphic",scale:"20",xChannelSelector:"R",yChannelSelector:"G"})]}),Object(o.jsx)("path",{id:"path",d:"".concat(e),style:{filter:"url(#filter".concat(t,")")}})]})}],p=function(e){var t=e.address,n=void 0===t?"":t,a=e.logo;if(a)return Object(o.jsx)("div",{className:i.a.identicon,children:Object(o.jsx)("img",{src:"https://dweb.link/ipfs/"+a.split("//")[1],alt:"identicon"})});var c=function(e){console.log("trim",e);for(var t=l.decode(e.trim().substr(3)).toString("hex"),n=t.split("").reduce((function(e,t){return e+parseInt(t,16)}),0),r=t.split("").slice(-5).reduce((function(e,t){return e+parseInt(t,16)}),0),a=[],c=0;c<t.length-2;c++){var s=parseInt("".concat(t[c]).concat(t[c+1]).concat(t[c+2]),16)+n,i=d(Math.round((s||32)/u),u),o=d(Math.round(s/(i||32)),u);a.push({x:i,y:o,n:s})}for(var b="M ",p=!1,f=0;f<a.length;f++){var x=a[f];if(h(b))if(j(x)&&x.n%2===0&&(x.x+x.y)%7<2){var O=x.x%5+x.y%7;b+="\n M ".concat(d(x.x+6.4,u)-O,", ").concat(d(x.y+6.4,u),"\n a ").concat(O,",").concat(O," 0 1,0 ").concat(2*O,",0\n a ").concat(O,",").concat(O," 0 1,0 -").concat(2*O,",0\n "),p=!0}else if(x.n%7===3){var m=x.x%5+x.y%7;b+="\n M ".concat(d(x.x+6.4,u)-m,", ").concat(d(x.y+6.4,u),"\n a ").concat(m,",").concat(m," 0 1,0 ").concat(2*m,",0\n a ").concat(m,",").concat(m," 0 1,0 -").concat(2*m,",0\n "),p=!0}else x.n%2===0&&x.x%5<3?(b+=" M ".concat(x.x,",").concat(x.y),b+=" L ".concat(x.x,",").concat(x.y),p=!1):x.n%2===1?(b+=" M ".concat(x.x,",").concat(x.y),b+=" L ".concat(x.y,",").concat(x.x),p=!1):(b+=" M ".concat(x.x,",").concat(x.y),b+=" L ".concat(x.x,",").concat(x.y),p=!1,f<a.length-2&&(b+=" ".concat(a[f+1].x,",").concat(a[f+1].y),b+=" ".concat(a[f+2].x,",").concat(a[f+2].y)));else p?(b+=" M ".concat(x.x,",").concat(x.y),b+=" L ".concat(x.x,",").concat(x.y),p=!1):(b+=" ".concat(x.x,",").concat(x.y),p=!1)}return[b,r]}(n),s=Object(r.a)(c,2),p=s[0],f=s[1],x=b[f%b.length](p,n);return Object(o.jsx)("div",{className:i.a.identicon,children:x})}},199:function(e,t,n){"use strict";n.d(t,"a",(function(){return p}));var r=n(20),a=n(1),c=n.n(a),s=n(6),i=n(10),o=n(2),l=n(11),u=n(196),d=n(274),j=n.n(d),h=n(0),b=n(19).Buffer,p=function(e){var t=e.label,n=e.allowedTypes,a=e.allowedTypesLabel,d=e.onChange,p=void 0===d?function(){return null}:d,f=Object(l.m)(),x=Object(o.useState)(t),O=Object(i.a)(x,2),m=O[0],v=O[1],g=function(){var e=Object(s.a)(c.a.mark((function e(t){var n,r,a,s,i;return c.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=t.target.files,r=n[0],v(r.name),""===r.type){e.next=7;break}e.t0=r.type,e.next=10;break;case 7:return e.next=9,Object(u.b)(r);case 9:e.t0=e.sent;case 10:return a=e.t0,e.t1=b,e.next=14,r.arrayBuffer();case 14:e.t2=e.sent,s=e.t1.from.call(e.t1,e.t2),(i=new FileReader).addEventListener("load",(function(e){p({title:m,mimeType:a,file:r,buffer:s,reader:e.target.result})})),i.readAsDataURL(r);case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),y={type:"file",name:"file"};return n&&(y.accept=n.join(",")),Object(h.jsxs)("div",{className:j.a.container,children:[Object(h.jsxs)("label",{children:[m,Object(h.jsx)("input",Object(r.a)(Object(r.a)({},y),{},{onChange:g}))]}),Object(h.jsxs)("div",{className:j.a.allowed,children:[f.mint.supports,":\xa0",a]})]})}},200:function(e,t,n){e.exports={container:"styles_container__2dyud",copy:"styles_copy__2Y7a-",buttons:"styles_buttons__2Wjkl",warning:"styles_warning__Jbe2P"}},201:function(e,t,n){e.exports={container:"styles_container__1Yt5m",large:"styles_large__3HUg_",xlarge:"styles_xlarge__1dVRr"}},202:function(e,t,n){e.exports={buttons:"styles_buttons__23vi5"}},203:function(e,t,n){e.exports={viewer:"styles_viewer__xdp7q",container:"styles_container__2ex09",arButton:"styles_arButton__lU3m5"}},204:function(e,t,n){e.exports={style:"styles_style__1TcGF",container:"styles_container__2aeq3",image:"styles_image__RLsyH"}},205:function(e,t,n){e.exports={container:"styles_container__wNbun",video:"styles_video__32uJf"}},206:function(e,t,n){e.exports={container:"styles_container__16cxk",fullscreen:"styles_fullscreen__P9Gcw",icon:"styles_icon__2Fs38"}},207:function(e,t,n){e.exports={container:"styles_container__CmtLf",image:"styles_image__2lina",number:"styles_number__3kN1Q",info:"styles_info__31_0L"}},208:function(e,t,n){e.exports={artist:"styles_artist__2ObIM",icon:"styles_icon__2jZ75",text:"styles_text__2Uvfd"}},25:function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(1),a=n.n(r),c=n(20),s=n(6),i=n(9),o=n(14),l=n(22),u=n(21),d=n(2),j=n(39),h=n(412),b=n(69),p=n(105),f=n(264),x=n(86),O=(n(616),n(38),n(265),n(0)),m=n(38).NetworkType,v=n(250),g=n(57),y=n(693),_=Object(d.createContext)(),w=new b.c("https://mainnet.api.tez.ie"),k=new h.a({name:"hicetnunc.xyz",preferredNetwork:"mainnet"});w.setWalletProvider(k);var S=function(e){Object(l.a)(n,e);var t=Object(u.a)(n);function n(e){var r;return Object(i.a)(this,n),(r=t.call(this,e)).state={hDAO:"KT1AFA2mwNUMNd4SsujE1YYp29vd8BZejyKW",subjkt:"KT1My1wDZHDGweCrJnQJi3wcFaS67iksirvj",v1:"KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9",unregistry:"KT18xby6bb1ur1dKe7i6YVrBaksP4AgtuLES",v2:"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn",objkts:"KT1RJ6PbjHpwc3M5rw5s2Nbmefwbuwbdxton",hDAO_curation:"KT1TybhR7XraG75JFYKSrh7KnxukMBT5dor6",hDAO_marketplace:"KT1QPvv7sWVaT9PcPiC4fN9BgfX8NB2d5WzL",lastId:void 0,setId:function(e){return r.setState({lastId:e})},subjktInfo:{},setSubjktInfo:function(e){return r.setState({subjktInfo:e})},cancel_hdao:void 0,collect_hdao:function(){var e=Object(s.a)(a.a.mark((function e(t,n,s,i){var o,l,u,d;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.hDAO);case 2:return o=e.sent,e.next=5,w.wallet.at(r.state.hDAO_marketplace);case 5:return l=e.sent,u=[Object(c.a)({kind:b.b.TRANSACTION},o.methods.update_operators([{add_operator:{operator:r.state.hDAO_marketplace,token_id:parseFloat(0),owner:t}}]).toTransferParams({amount:0,mutez:!0,storageLimit:150})),Object(c.a)({kind:b.b.TRANSACTION},l.methods.collect(n).toTransferParams({amount:0,mutez:!0,storageLimit:250}))],e.next=9,w.wallet.batch(u);case 9:return d=e.sent,e.next=12,d.send();case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e)})));return function(t,n,r,a){return e.apply(this,arguments)}}(),swap_hDAO:function(){var e=Object(s.a)(a.a.mark((function e(t,n,s,i,o,l){var u,d,j,h;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.objkts);case 2:return u=e.sent,e.next=5,w.wallet.at(r.state.hDAO_marketplace);case 5:return d=e.sent,j=[Object(c.a)({kind:b.b.TRANSACTION},u.methods.update_operators([{add_operator:{operator:r.state.hDAO_marketplace,token_id:parseFloat(i),owner:t}}]).toTransferParams({amount:0,mutez:!0,storageLimit:175})),Object(c.a)({kind:b.b.TRANSACTION},d.methods.swap(r.state.hDAO_marketplace,o,parseFloat(l),parseFloat(i),parseFloat(n),parseFloat(0),parseFloat(s)).toTransferParams({amount:0,mutez:!0,storageLimit:300}))],e.next=9,w.wallet.batch(j);case 9:return h=e.sent,e.next=12,h.send();case 12:return e.abrupt("return",e.sent);case 13:case"end":return e.stop()}}),e)})));return function(t,n,r,a,c,s){return e.apply(this,arguments)}}(),collectv2:function(){var e=Object(s.a)(a.a.mark((function e(t,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.v2).then((function(e){return e.methods.collect(parseFloat(t)).send({amount:parseFloat(n),mutez:!0,storageLimit:310})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),swapv2:function(){var e=Object(s.a)(a.a.mark((function e(t,n,s,i,o,l){var u,d,j,h,p,f,x;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return u=r.state.proxyAddress||r.state.objkts,d=r.state.proxyAddress||r.state.v2,j=r.state.proxyAddress||t,e.next=5,w.wallet.at(u);case 5:return h=e.sent,e.next=8,w.wallet.at(d);case 8:return p=e.sent,f=[Object(c.a)({kind:b.b.TRANSACTION},h.methods.update_operators([{add_operator:{operator:r.state.v2,token_id:parseFloat(i),owner:j}}]).toTransferParams({amount:0,mutez:!0,storageLimit:175})),Object(c.a)({kind:b.b.TRANSACTION},p.methods.swap(o,parseFloat(l),parseFloat(i),parseFloat(n),parseFloat(s)).toTransferParams({amount:0,mutez:!0,storageLimit:300}))],e.next=12,w.wallet.batch(f);case 12:return x=e.sent,e.next=15,x.send();case 15:return e.abrupt("return",e.sent);case 16:case"end":return e.stop()}}),e)})));return function(t,n,r,a,c,s){return e.apply(this,arguments)}}(),batch_cancel:function(){var e=Object(s.a)(a.a.mark((function e(t){var n,c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.v1);case 2:return n=e.sent,e.next=5,t.map((function(e){return parseInt(e.id)})).reduce((function(e,t){return e.withContractCall(n.methods.cancel_swap(t))}),w.wallet.batch());case 5:return c=e.sent,e.next=8,c.send();case 8:return e.abrupt("return",e.sent);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fullscreen:!1,setFullscreen:function(e){return r.setState({fullscreen:e})},theme:"light",setTheme:function(e){var t=document.documentElement,n="light"===e;Object(x.b)("theme",n?"light":"dark"),t.style.setProperty("--background-color",n?"#ffffff":"#111111"),t.style.setProperty("--text-color",n?"#000000":"#dedede"),t.style.setProperty("--border-color",n?"rgba(0,0,0,0.1)":"rgba(255,255,255,0.3)"),t.style.setProperty("--shadow-color",n?"rgba(0,0,0,0.2)":"rgba(255,255,255,0.3)"),r.setState({theme:e})},feedback:{visible:!1,message:"OBJKT minted",progress:!0,confirm:!0,confirmCallback:function(){return null}},setFeedback:function(e){return r.setState({feedback:Object(c.a)(Object(c.a)({},r.state.feedback),e)})},progress:void 0,setProgress:function(e){return r.setState({progress:e})},message:void 0,setMessage:function(e){return r.setState({message:e})},pathname:"",address:"",op:void 0,contract:"",setAddress:function(e){return r.setState({address:e})},setAuth:function(e){v.set("auth",e)},updateLs:function(e,t){v.set(e,t)},getLs:function(e){return v.get(e)},getAuth:function(){return v.get("auth")},client:null,setClient:function(e){r.setState({client:e})},dAppClient:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.state.client=k.client,r.state.client.requestPermissions({network:{type:m.MAINNET,rpcUrl:"https://mainnet.smartpy.io"}}).then((function(e){r.setState({address:e.address}),r.state.setAuth(e.address)})).catch((function(e){return console.log(e)}));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),proxyAddress:null,originatedContract:null,setProxyAddress:function(e){r.setState({proxyAddress:e})},getProxy:function(){return r.state.proxyAddress},objkt:"KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9",mint:function(){var e=Object(s.a)(a.a.mark((function e(t,n,c,s){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(c),r.state.setFeedback({visible:!0,message:"preparing OBJKT",progress:!0,confirm:!1}),e.next=4,w.wallet.at(r.state.proxyAddress||r.state.v1).then((function(e){return e.methods.mint_OBJKT(t,parseFloat(n),("ipfs://"+c).split("").reduce((function(e,t){return e+t.charCodeAt(0).toString(16).padStart(2,"0")}),""),10*parseFloat(s)).send({amount:0,storageLimit:310})})).then((function(e){return e.confirmation(1).then((function(){r.setState({op:e.hash}),r.state.setFeedback({message:"OBJKT minted successfully",progress:!0,confirm:!1}),setTimeout((function(){r.state.setFeedback({visible:!1})}),1e3)}))})).catch((function(e){r.state.setFeedback({message:"an error occurred \u274c",progress:!0,confirm:!1}),setTimeout((function(){r.state.setFeedback({visible:!1})}),1e3)}));case 4:case"end":return e.stop()}}),e)})));return function(t,n,r,a){return e.apply(this,arguments)}}(),collect:function(){var e=Object(s.a)(a.a.mark((function e(t,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.proxyAddress||r.state.v2).then((function(e){return e.methods.collect(parseFloat(t)).send({amount:parseFloat(n),mutez:!0,storageLimit:350})})).catch((function(e){return e}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),swap:function(){var e=Object(s.a)(a.a.mark((function e(t,n,c){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.v1).then((function(e){return e.methods.swap(parseFloat(t),parseFloat(n),parseFloat(c)).send({amount:0,storageLimit:310})})).catch((function(e){return e}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}(),curate:function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.v1).then((function(e){return e.methods.curate(null!=v.get("hDAO_config")?parseInt(v.get("hDAO_config")):1,t).send()}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),claim_hDAO:function(){var e=Object(s.a)(a.a.mark((function e(t,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.hDAO_curation).then((function(e){e.methods.claim_hDAO(parseInt(t),parseInt(n)).send()}));case 2:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),batch_claim:function(){var e=Object(s.a)(a.a.mark((function e(t){var n,s,i;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),e.next=3,w.wallet.at(r.state.hDAO_curation);case 3:return n=e.sent,s=t.map((function(e){return Object(c.a)({kind:b.b.TRANSACTION},n.methods.claim_hDAO(e.hdao_balance,e.id).toTransferParams({amount:0,mutez:!0,storageLimit:175}))})),e.next=7,w.wallet.batch(s);case 7:return i=e.sent,e.next=10,i.send();case 10:return e.abrupt("return",e.sent);case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),burn:function(){var e=Object(s.a)(a.a.mark((function e(t,n){var c;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.client.getActiveAccount();case 2:return c=e.sent,e.next=5,w.wallet.at(r.state.objkts).then(function(){var e=Object(s.a)(a.a.mark((function e(r){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",r.methods.transfer([{from_:c.address,txs:[{to_:"tz1burnburnburnburnburnburnburjAYjjX",token_id:parseInt(t),amount:parseInt(n)}]}]).send());case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}());case 5:r.state.setProgress(!1);case 6:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),cancelv1:function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.v1).then((function(e){return e.methods.cancel_swap(parseFloat(t)).send({amount:0,storageLimit:310})})).catch((function(e){return e}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),cancel:function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.proxyAddress||r.state.v2).then((function(e){return e.methods.cancel_swap(parseFloat(t)).send({amount:0,storageLimit:310})})).catch((function(e){return e}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),signStr:function(){var e=Object(s.a)(a.a.mark((function e(t){var n,r;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.client.requestSignPayload(t);case 2:return n=e.sent,r=n,e.t0=y.crypto,e.t1=t.payload.toString(),e.t2=r.signature,e.t3=g,e.t4="https://tezos-prod.cryptonomic-infra.tech/chains/main/blocks/head/context/contracts/",e.next=11,k.getPKH();case 11:return e.t5=e.sent,e.t6=e.t4.concat.call(e.t4,e.t5,"/manager_key"),e.next=15,e.t3.get.call(e.t3,e.t6);case 15:return e.t7=e.sent,e.next=18,e.t0.verify.call(e.t0,e.t1,e.t2,e.t7);case 18:e.sent;case 19:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),registry:function(){var e=Object(s.a)(a.a.mark((function e(t,n){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(n),r.state.proxyAddress||r.state.subjkt,e.next=4,w.wallet.at(r.state.subjkt).then((function(e){return e.methods.registry(("ipfs://"+n.path).split("").reduce((function(e,t){return e+t.charCodeAt(0).toString(16).padStart(2,"0")}),""),t.split("").reduce((function(e,t){return e+t.charCodeAt(0).toString(16).padStart(2,"0")}),"")).send({amount:0})}));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),hDAO_update_operators:function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.hDAO).then((function(e){return e.methods.update_operators([{add_operator:{owner:t,operator:r.state.subjkt,token_id:0}}]).send({amount:0})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),unregister:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,w.wallet.at(r.state.unregistry).then((function(e){e.methods.sign(void 0).send({amount:0})}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),load:!1,loading:function(){return r.setState({load:!r.state.load})},Tezos:null,wallet:null,acc:null,updateMessage:function(e){return r.setState({message:e})},setAccount:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(e.t0=r,void 0===w){e.next=7;break}return e.next=4,k.client.getActiveAccount();case 4:e.t1=e.sent,e.next=8;break;case 7:e.t1=void 0;case 8:return e.t2=e.t1,e.next=11,k.client.getActiveAccount();case 11:e.t3=e.sent,e.t4={acc:e.t2,address:e.t3},e.t0.setState.call(e.t0,e.t4);case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),syncTaquito:function(){var e=Object(s.a)(a.a.mark((function e(){var t;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t={type:"mainnet",rpcUrl:"https://mainnet.smartpy.io"},e.next=3,k.client.getActiveAccount();case 3:if(void 0!==e.sent){e.next=8;break}return console.log("permissions"),e.next=8,k.requestPermissions({network:t});case 8:return e.t0=r,e.t1=w,e.next=12,k.getPKH();case 12:return e.t2=e.sent,e.next=15,k.client.getActiveAccount();case 15:return e.t3=e.sent,e.t4=k,e.t5={Tezos:e.t1,address:e.t2,acc:e.t3,wallet:e.t4},e.t0.setState.call(e.t0,e.t5),e.t6=r.state,e.next=22,k.getPKH();case 22:e.t7=e.sent,e.t6.setAuth.call(e.t6,e.t7);case 24:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),disconnect:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.client.clearActiveAccount();case 2:r.setState({address:void 0,acc:void 0});case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),operationRequest:function(){var e=Object(s.a)(a.a.mark((function e(t){var n;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:delete(n=t.result).mutez,n.destination=n.to,n.kind="transaction",delete n.to,r.state.client.requestOperation({operationDetails:[t.result]});case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),timeout:function(e){return new Promise((function(t){return setTimeout(t,e)}))},signPayload:function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,k.client.requestSignPayload({payload:t.payload}).then(function(){var e=Object(s.a)(a.a.mark((function e(t){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",t.signature);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()).catch((function(e){return console.error(e)}));case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),balance:0,getBalance:function(e){g.get("https://api.tzkt.io/v1/accounts/".concat(e,"/balance_history"),{params:{address:e}}).then((function(e){console.log("balance",parseFloat(e.data[e.data.length-1].balance/1e6))})).catch((function(e){return console.error("balance error",e)}))},collapsed:!0,feed:[],offset:0,setFeed:function(e){return r.setState({feed:e})},toogleNavbar:function(){r.setState({collapsed:!r.state.collapsed})},setMenu:function(e){r.setState({collapsed:e})},getStyle:function(e){return e?{background:"white"}:{display:"none"}},lastPath:"",setPath:function(e){r.setState({lastPath:e})},title:"",setTitle:function(e){r.setState({title:e})},hDAO_vote:v.get("hDAO_vote"),proxyFactoryAddress:"KT1DoyD6kr8yLK8mRBFusyKYJUk2ZxNHKP1N",mockProxy:function(){var e=Object(s.a)(a.a.mark((function e(){return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r.state.setFeedback({visible:!0,message:"creating collaborative contract",progress:!0,confirm:!1}),setTimeout((function(){g.get("https://api.tzkt.io/v1/operations/originations/".concat("opQ2gLDiqHCqhQTKK5h9vCnL3c3izFeB11SQRuFzUricptKH6pJ")).then((function(e){var t=e.data[0].originatedContract;r.setState({originatedContract:t}),r.state.setFeedback({message:"Collaborative contract created successfully",progress:!0,confirm:!1}),setTimeout((function(){r.state.setFeedback({visible:!1})}),2e3)}))}),2e3);case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),originateProxy:function(){var e=Object(s.a)(a.a.mark((function e(t,n){var c,s,i,o,l,u,d;return a.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r.state.setFeedback({visible:!0,message:"creating collaborative contract",progress:!0,confirm:!1}),c=b.a.fromLiteral(n),s=new p.a,i=s.parseData("\n (map address (pair (bool %isCore) (nat %share))))\n"),o=new f.a(i),l=o.Encode(c),e.next=8,w.rpc.packData({data:l,type:i});case 8:return u=e.sent,d=u.packed,e.next=12,w.wallet.at(r.state.proxyFactoryAddress).then((function(e){return e.methods.create_proxy(d,"hic_proxy").send({amount:0})})).then((function(e){r.setState({op:e.opHash}),g.get("https://api.tzkt.io/v1/operations/originations/".concat(e.opHash)).then((function(e){var t=e.originatedContract;r.setState({originatedContract:t}),r.state.setFeedback({message:"Collaborative contract created successfully",progress:!0,confirm:!1}),setTimeout((function(){r.state.setFeedback({visible:!1})}),1e3)}))})).catch((function(e){r.state.setFeedback({message:e.message||"an error occurred",progress:!1,confirm:!0,confirmCallback:function(){r.state.setFeedback({visible:!1})}})}));case 12:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()},r}return Object(o.a)(n,[{key:"render",value:function(){return Object(O.jsx)(_.Provider,{value:Object(c.a)({},this.state),children:this.props.children})}}]),n}(d.Component),C=Object(j.i)(S);t.b=C},267:function(e,t,n){e.exports={container:"styles_container__3A2-N",large:"styles_large__1NK1c"}},269:function(e,t,n){e.exports={audio:"styles_audio__3el8l",container:"styles_container__2vyQ4",userTouch:"styles_userTouch__Ig7vu",icons:"styles_icons__3ZNUL"}},270:function(e,t,n){e.exports={container:"styles_container__1DKyt",square:"styles_square__3HCRn"}},271:function(e,t,n){e.exports={container:"styles_container__34mLF",pdfNav:"styles_pdfNav__-BZT2"}},272:function(e,t,n){e.exports={identicon:"styles_identicon__1F5nd"}},273:function(e,t,n){e.exports={grid:"styles_grid__1QPCO",column:"styles_column__m8LQL"}},274:function(e,t,n){e.exports={container:"styles_container__2hTuV",allowed:"styles_allowed__3eXuT",selected:"styles_selected__2EdAr"}},275:function(e,t,n){e.exports={container:"styles_container__2t8VV",owner:"styles_owner__2rtkt"}},276:function(e,t,n){e.exports={item:"styles_item__1ymhI",image:"styles_image__eL5g5",number:"styles_number__aWecf",title:"styles_title__8Wa6a"}},277:function(e,t,n){e.exports={container:"styles_container__17XUG",bio:"styles_bio__13kqN"}},278:function(e,t,n){e.exports={container:"styles_container__2ADv-",number:"styles_number__3LWL0"}},281:function(e,t){},3:function(e,t,n){"use strict";n.d(t,"a",(function(){return u})),n.d(t,"c",(function(){return d})),n.d(t,"e",(function(){return j})),n.d(t,"d",(function(){return h})),n.d(t,"b",(function(){return b}));var r=n(8),a=(n(2),n(103)),c=n(41),s=n.n(c),i=n(89),o=n.n(i),l=n(0),u=function(e){var t,n=e.to,c=void 0===n?null:n,i=e.href,u=void 0===i?null:i,d=e.onClick,j=void 0===d?function(){return null}:d,h=e.children,b=e.disabled,p=e.fit,f=s()((t={},Object(r.a)(t,o.a.container,!0),Object(r.a)(t,o.a.disabled,b),Object(r.a)(t,o.a.fit,p),t));return c?Object(l.jsx)(a.b,{to:c,className:f,children:h}):u?Object(l.jsx)("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:f,children:h}):Object(l.jsx)("button",{onClick:j,className:f,children:h})},d=function(e){var t,n=e.children,a=void 0===n?null:n,c=e.selected,i=s()((t={},Object(r.a)(t,o.a.primary,!0),Object(r.a)(t,o.a.selected,c),t));return Object(l.jsx)("div",{className:i,children:a})},j=function(e){var t,n=e.children,a=void 0===n?null:n,c=e.selected,i=s()((t={},Object(r.a)(t,o.a.secondary,!0),Object(r.a)(t,o.a.selected,c),t));return Object(l.jsx)("div",{className:i,children:a})},h=function(e){var t,n=e.children,a=void 0===n?null:n,c=e.selected,i=s()((t={},Object(r.a)(t,o.a.purchase,!0),Object(r.a)(t,o.a.selected,c),t));return Object(l.jsx)("div",{className:i,children:a})},b=function(e){var t,n=e.children,a=void 0===n?null:n,c=e.selected,i=s()((t={},Object(r.a)(t,o.a.curate,!0),Object(r.a)(t,o.a.selected,c),t));return Object(l.jsx)("div",{className:i,children:a})}},362:function(e,t){},4:function(e,t,n){"use strict";n.d(t,"c",(function(){return d})),n.d(t,"a",(function(){return b})),n.d(t,"b",(function(){return x}));var r=n(8),a=(n(2),n(419)),c=n(41),s=n.n(c),i=n(51),o=n(267),l=n.n(o),u=n(0),d=function(e){var t,n=e.title,c=void 0===n?"hic et nunc":n,o=e.children,d=void 0===o?null:o,j=e.large,h=s()((t={},Object(r.a)(t,l.a.container,!0),Object(r.a)(t,l.a.large,j),t));return Object(u.jsxs)("main",{className:h,children:[Object(u.jsx)(a.a,{children:""!==c?Object(u.jsxs)("title",{children:[c," - hic et nunc"]}):Object(u.jsx)("title",{children:"hic et nunc"})}),Object(u.jsx)(i.a,{as:"h1",children:c}),d]})},j=n(201),h=n.n(j),b=function(e){var t,n=e.children,a=void 0===n?null:n,c=e.large,i=e.xlarge,o=s()((t={},Object(r.a)(t,h.a.container,!0),Object(r.a)(t,h.a.large,c),Object(r.a)(t,h.a.xlarge,i),t));return Object(u.jsx)("div",{className:o,children:a})},p=n(424),f=n.n(p),x=function(e){var t=e.children,n=void 0===t?null:t;return Object(u.jsx)("div",{className:f.a.container,children:n})}},409:function(e,t){},410:function(e,t,n){},411:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return d}));var r=n(10),a=n(2),c=n(25),s=n(4),i=n(3),o=n(54),l=n(46),u=n(0),d=function(t){var n=Object(a.useContext)(c.a),d=n.burn,j=n.address,h=n.message,b=n.setMessage,p=n.setProgress,f=n.progress,x=Object(a.useState)(""),O=Object(r.a)(x,2),m=O[0],v=O[1],g=0,y=t.token_holders.find((function(e){return e.holder_id===(null===j||void 0===j?void 0:j.address)}));y&&(g=y.quantity);return Object(u.jsx)(u.Fragment,{children:f?Object(u.jsxs)("div",{children:[Object(u.jsxs)("p",{tyle:{position:"absolute",left:"50%",top:"35%"},children:[" ",h]}),f&&Object(u.jsx)(l.a,{})]}):Object(u.jsxs)("div",{children:[Object(u.jsx)(s.a,{children:Object(u.jsx)(s.b,{children:Object(u.jsxs)("p",{children:["You own ",g," editions of OBJKT#",t.id,". How many would you like to burn?"]})})}),Object(u.jsx)(s.a,{children:Object(u.jsx)(s.b,{children:Object(u.jsx)(o.a,{type:"number",placeholder:"OBJKTs to burn",min:1,max:g,onChange:function(e){return v(e.target.value)},disabled:f})})}),Object(u.jsx)(s.a,{children:Object(u.jsxs)(s.b,{children:[Object(u.jsx)("p",{style:{fontSize:"14px"},children:"Burning will transfer the OBJKTs from your possession to a burn address. Once in the burn address, the OBJKT can't be recovered or sold. You can only burn tokens that you own. If you have them swapped, you first need to cancel that swap before you try to burn them."}),Object(u.jsx)("br",{}),Object(u.jsx)("p",{children:Object(u.jsx)("strong",{children:"NB: This action is not reversable."})})]})}),Object(u.jsx)(s.a,{children:Object(u.jsx)(s.b,{children:Object(u.jsx)(i.a,{onClick:function(){""!==m?m>g?alert("Error: You're trying to burn ".concat(m,", but you only own ").concat(g,".")):e.confirm("Are you sure you want to burn ".concat(m," of ").concat(g,"?"))&&(p(!0),b("burning OBJKT"),d(t.id,m)):alert("Error: No amount specified.")},fit:!0,children:Object(u.jsx)(i.d,{children:"burn"})})})})]})})}}).call(this,n(30))},417:function(e,t,n){e.exports={container:"styles_container__GZzHE"}},418:function(e,t,n){e.exports={container:"styles_container__qxBg_"}},423:function(e,t,n){e.exports={container:"styles_container__1VTzs"}},424:function(e,t,n){},425:function(e,t,n){e.exports={menu:"styles_menu__1oMTN"}},426:function(e,t,n){e.exports={container:"styles_container__3Lh1E"}},427:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(20),a=n(10),c=n(2),s=n(203),i=n.n(s),o=n(0),l=function(t){var n=t.artifactUri,s=t.previewUri,l=t.preview,u=t.onDetailView,d=t.displayView,j=Object(c.useRef)(),h=Object(c.useState)("100px"),b=Object(a.a)(h,2),p=b[0],f=b[1],x=Object(c.useState)("100px"),O=Object(a.a)(x,2),m=O[0],v=O[1],g={src:l?s:n,autoplay:!0,"auto-rotate":!0,"data-js-focus-visible":!0,"interaction-prompt":"none"};u&&(g.ar=!0,g["ar-modes"]="webxr scene-viewer quick-look",g["camera-controls"]=!0);var y=function(){if(j.current){var e=j.current.getBoundingClientRect(),t=e.width,n=e.height;f(t),v(n)}};return Object(c.useEffect)((function(){return y(),e.addEventListener("resize",y),function(){e.removeEventListener("resize",y)}}),[p,m]),d?Object(o.jsx)("div",{className:i.a.container,ref:j,children:Object(o.jsx)("model-viewer",Object(r.a)(Object(r.a)({},g),{},{style:{width:p,height:m},children:Object(o.jsx)("button",{slot:"ar-button",className:i.a.arButton,children:"AR"})}))}):Object(o.jsx)("div",{children:Object(o.jsx)("model-viewer",Object(r.a)(Object(r.a)({},g),{},{children:Object(o.jsx)("button",{slot:"ar-button",className:i.a.arButton,children:"AR"})}))})}}).call(this,n(30))},432:function(e,t,n){e.exports={container:"styles_container__1Wfg2"}},434:function(e,t,n){e.exports={container:"styles_container__qTtAh"}},435:function(e,t,n){e.exports={container:"styles_container__3snt0"}},436:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return N}));var r=n(10),a=n(8),c=n(1),s=n.n(c),i=n(9),o=n(14),l=n(22),u=n(21),d=n(6),j=n(2),h=n(25),b=n(4),p=(n(122),n(54)),f=n(3),x=(n(199),n(198)),O=(n(38),n(33),n(955),n(57)),m=n.n(O),v=n(0),g=(0,n(191).create)("https://ipfs.infura.io:5001"),y=n(250),_="\nquery addressQuery($address: String!) {\n hic_et_nunc_holder(where: { address: {_eq: $address}}) {\n address\n name\n hdao_balance\n metadata\n metadata_file\n }\n}\n";function w(e){return k.apply(this,arguments)}function k(){return(k=Object(d.a)(s.a.mark((function e(t){var n,r,a,c;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,S(_,"addressQuery",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_holder,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function S(e,t,n){return C.apply(this,arguments)}function C(){return(C=Object(d.a)(s.a.mark((function e(t,n,r){var a;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var N=function(t){Object(l.a)(c,t);var n=Object(u.a)(c);function c(){var t;Object(i.a)(this,c);for(var o=arguments.length,l=new Array(o),u=0;u<o;u++)l[u]=arguments[u];return(t=n.call.apply(n,[this].concat(l))).state={loading:!0,vote:0,address:"",subjkt:"",description:"",social_media:"",identicon:"",subjktUri:"",cid:void 0,toogled:!1},t.componentWillMount=Object(d.a)(s.a.mark((function e(){var n,r;return s.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,t.context.syncTaquito();case 2:return t.setState({address:t.context.acc.address}),e.next=5,w(t.context.acc.address);case 5:if(n=e.sent,t.context.subjktInfo=n[0],console.log(t.context.subjktInfo),!t.context.subjktInfo){e.next=16;break}return e.next=11,m.a.get("https://ipfs.io/ipfs/"+t.context.subjktInfo.metadata_file.split("//")[1]).then((function(e){return e.data}));case 11:r=e.sent,t.context.subjktInfo.gravatar=r,r.description&&t.setState({description:r.description}),r.identicon&&t.setState({identicon:r.identicon}),t.context.subjktInfo.name&&t.setState({subjkt:t.context.subjktInfo.name});case 16:t.setState({loading:!1});case 17:case"end":return e.stop()}}),e)}))),t.handleChange=function(e){"subjkt"!=e.target.name||e.target.checkValidity()||(console.log(e.target.pattern),e.target.value=e.target.value.replace(/[^a-z0-9-._]/g,"")),console.log("set",e.target.name,"to",e.target.value),t.setState(Object(a.a)({},e.target.name,e.target.value))},t.subjkt_config=Object(d.a)(s.a.mark((function n(){var a,c,i;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(!t.state.selectedFile){n.next=15;break}return a=Object(r.a)(t.state.selectedFile,1),c=a[0],n.t0=e,n.next=5,c.arrayBuffer();case 5:return n.t1=n.sent,i=n.t0.from.call(n.t0,n.t1),console.log(i),n.t2=t,n.next=11,g.add(i);case 11:n.t3=n.sent.path,n.t4="ipfs://"+n.t3,n.t5={identicon:n.t4},n.t2.setState.call(n.t2,n.t5);case 15:return console.log(t.state),n.t6=t.context,n.t7=t.state.subjkt,n.next=20,g.add(e.from(JSON.stringify({description:t.state.description,identicon:t.state.identicon})));case 20:n.t8=n.sent,n.t6.registry.call(n.t6,n.t7,n.t8);case 22:case"end":return n.stop()}}),n)}))),t.onFileChange=function(){var n=Object(d.a)(s.a.mark((function n(a){var c,i,o;return s.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return t.setState({selectedFile:a.target.files,fileTitle:a.target.files[0].name}),c=Object(r.a)(a.target.files,1),i=c[0],n.t0=e,n.next=5,i.arrayBuffer();case 5:return n.t1=n.sent,o=n.t0.from.call(n.t0,n.t1),n.t2=t,n.next=10,g.add(o);case 10:n.t3=n.sent.path,n.t4="ipfs://"+n.t3,n.t5={identicon:n.t4},n.t2.setState.call(n.t2,n.t5);case 14:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),t.hDAO_operators=function(){t.context.hDAO_update_operators(t.context.acc.address)},t.unregister=function(){return t.context.unregister()},t.hDAO_config=function(){y.set("hDAO_config",t.state.vote)},t.toogle=function(){return t.setState({toogled:!t.state.toogled})},t.sign=function(){console.log(t.context.addr),t.context.signStr({payload:t.state.str.split("").reduce((function(e,t){return e+t.charCodeAt(0).toString(16).padStart(2,"0")}),"")})},t}return Object(o.a)(c,[{key:"render",value:function(){return Object(v.jsxs)(b.c,{children:[Object(v.jsxs)(b.a,{children:[Object(v.jsx)(x.a,{address:this.state.address,logo:this.state.identicon}),Object(v.jsx)("div",{style:{height:"20px"}}),Object(v.jsx)("input",{type:"file",onChange:this.onFileChange}),Object(v.jsx)("div",{style:{height:"20px"}}),Object(v.jsxs)(b.b,{children:[Object(v.jsx)(p.a,{name:"subjkt",onChange:this.handleChange,placeholder:"Username",label:"Username",value:this.context.subjktInfo?this.context.subjktInfo.name:void 0,pattern:"^[a-z0-9-._]*$"}),Object(v.jsx)(p.a,{name:"description",onChange:this.handleChange,placeholder:"Description",label:"Description",value:this.state.description}),Object(v.jsx)(f.a,{onClick:this.subjkt_config,children:Object(v.jsx)(f.d,{children:"Save Profile"})})]}),Object(v.jsx)("div",{style:{display:"inline"},children:Object(v.jsxs)("p",{style:{paddingTop:"7.5px"},children:[Object(v.jsx)("span",{children:"link your Twitter, Discord, GitHub, and website with "}),Object(v.jsx)("span",{children:Object(v.jsx)("a",{href:"https://tzprofiles.com",children:Object(v.jsx)(f.a,{children:Object(v.jsx)("a",{href:"#",style:{fontWeight:"bold"},children:"Tezos Profiles"})})})})]})})]}),Object(v.jsx)(b.a,{children:Object(v.jsx)(b.b,{children:Object(v.jsx)("div",{onClick:this.toogle,children:Object(v.jsx)(f.c,{children:"+ advanced"})})})}),this.state.toogled?Object(v.jsx)(b.a,{children:Object(v.jsxs)(b.b,{children:[Object(v.jsx)(p.a,{name:"vote",onChange:this.handleChange,placeholder:"hDAO Curation",label:"hDAO Curation",value:void 0}),Object(v.jsx)(f.a,{onClick:this.hDAO_config,children:Object(v.jsx)(f.d,{children:"Save \u25cb"})}),Object(v.jsx)("p",{style:{marginTop:"7.5px"},children:"hic et nunc DAO \u25cb curation parameter"})]})}):void 0]})}}]),c}(j.Component);N.contextType=h.a}).call(this,n(19).Buffer)},447:function(e,t){},449:function(e,t){},459:function(e,t){},46:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));n(2);var r=n(171),a=n.n(r),c=n(0),s=function(e){var t=e.message;return Object(c.jsxs)("div",{className:a.a.container,children:[Object(c.jsx)("div",{className:a.a.circle}),t&&Object(c.jsx)("p",{className:a.a.message,children:t})]})},i=function(e){var t=e.loading,n=e.children,r=void 0===n?null:n;return t?Object(c.jsx)("div",{className:a.a.loader,children:Object(c.jsx)(s,{})}):r}},461:function(e,t){},487:function(e,t){},488:function(e,t){},494:function(e,t){},51:function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));n(2);var r=n(423),a=n.n(r),c=n(0),s=function(e){var t=e.children,n=void 0===t?null:t,r=e.as,s=void 0===r?"span":r;return Object(c.jsx)(s,{className:a.a.container,children:n})}},513:function(e,t){},54:function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));n(2);var r=n(136),a=n.n(r),c=n(0),s=function(e){var t=e.type,n=void 0===t?"text":t,r=e.placeholder,s=void 0===r?"placeholder":r,i=e.name,o=void 0===i?"input-name-not-set":i,l=e.min,u=e.max,d=e.maxlength,j=void 0===d?500:d,h=e.label,b=e.onChange,p=void 0===b?function(){return null}:b,f=e.onBlur,x=void 0===f?function(){return null}:f,O=e.onWheel,m=void 0===O?function(){return null}:O,v=(e.disabled,e.value),g=e.pattern,y=e.onKeyPress;return Object(c.jsx)("div",{className:a.a.container,children:Object(c.jsxs)("label",{children:[Object(c.jsx)("input",{type:n,placeholder:s,name:o,min:l,max:u,maxLength:j,defaultValue:v,onChange:p,onBlur:x,pattern:g,onWheel:m,onKeyPress:y}),Object(c.jsx)("p",{children:h})]})})},i=function(e){var t=e.type,n=void 0===t?"text":t,r=e.placeholder,s=void 0===r?"placeholder":r,i=e.name,o=void 0===i?"input-name-not-set":i,l=e.min,u=e.max,d=e.maxlength,j=void 0===d?5e3:d,h=e.label,b=e.onChange,p=void 0===b?function(){return null}:b,f=e.onBlur,x=void 0===f?function(){return null}:f,O=e.disabled,m=e.value;return Object(c.jsx)("div",{className:a.a.container,children:Object(c.jsxs)("label",{children:[Object(c.jsx)("textarea",{type:n,placeholder:s,name:o,min:l,max:u,maxLength:j,defaultValue:m,onChange:p,onBlur:x,disabled:O}),Object(c.jsx)("p",{children:h})]})})}},55:function(e,t,n){e.exports={profile:"styles_profile__3TJpq",info:"styles_info__1pmjc",menu:"styles_menu__3EDGn",container:"styles_container__WB30Y",number:"styles_number__3kwPM",filter:"styles_filter__1WAfJ",card:"styles_card__AOy-s",cardContainer:"styles_cardContainer__37NQQ",cardText:"styles_cardText__3-sQT",cardTitle:"styles_cardTitle__3ZtVv",cardCollect:"styles_cardCollect__1yuLp",cardCollectPrice:"styles_cardCollectPrice__1u6pR",tag:"styles_tag__3inuH",top:"styles_top__bFVcx"}},551:function(e,t){},553:function(e,t){},633:function(e,t){},71:function(e,t,n){e.exports={container:"styles_container__1pGa0",spread:"styles_spread__2wxAV",objktContainer:"styles_objktContainer__3keuE",edition:"styles_edition__-K8p4",inline:"styles_inline__mZHhk",hdaoButton:"styles_hdaoButton__3XZh0",issuer:"styles_issuer__32zZh",top:"styles_top__2ZE35"}},762:function(e,t){},84:function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return l}));var r=n(10),a=n(2),c=n(431),s=n(273),i=n.n(s),o=n(0),l=function(t){var n=t.children,s=function(){return e.innerWidth>1024?4:e.innerWidth>600?3:1},l=Object(a.useState)(s()),u=Object(r.a)(l,2),d=u[0],j=u[1];return Object(a.useEffect)((function(){var t=function(){j(s())};return e.addEventListener("resize",t),function(){return e.removeEventListener("resize",t)}}),[]),Object(o.jsx)(c.a,{breakpointCols:d,className:i.a.grid,columnClassName:i.a.column,children:n})}}).call(this,n(30))},86:function(e,t,n){"use strict";n.d(t,"a",(function(){return r})),n.d(t,"b",(function(){return a}));var r=function(e){return JSON.parse(localStorage.getItem(e))},a=function(e,t){return localStorage.setItem(e,JSON.stringify(t)),r(e)}},89:function(e,t,n){e.exports={container:"styles_container__2e6-S",fit:"styles_fit__3eUTf",disabled:"styles_disabled__FvkPc",primary:"styles_primary__2LQRG",selected:"styles_selected__3MM1R",secondary:"styles_secondary__zQrlQ",purchase:"styles_purchase__UxMYZ",curate:"styles_curate__rRIDz"}},941:function(e,t){},943:function(e,t,n){},944:function(e,t,n){"use strict";(function(e){var t=n(9),r=n(14),a=n(22),c=n(21),s=n(2),i=n(0);s.PureComponent}).call(this,n(30))},945:function(e,t,n){},946:function(e,t){},947:function(e,t){},948:function(e,t){},949:function(e,t){},95:function(e,t,n){e.exports={buttons:"styles_buttons__3QtO2"}},950:function(e,t){},952:function(e,t,n){},955:function(e,t,n){},956:function(e,t,n){},957:function(e,t,n){},958:function(e,t,n){"use strict";n.r(t);var r=n(2),a=n.n(r),c=n(262),s=n.n(c),i=n(103),o=n(10),l=n(39),u=n(25),d=n(192),j=n(1),h=n.n(j),b=n(6),p=(n(196),n(86)),f=n(11),x=n(57),O=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,x.post("https://indexer.tzprofiles.com/v1/graphql",{query:'query MyQuery { tzprofiles_by_pk(account: "'.concat(t,'") { valid_claims } }'),variables:null,operationName:"MyQuery"});case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),m=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r,a,c,s,i,o;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n={},r={},e.prev=2,e.next=5,O(t);case 5:if(null!==(a=e.sent).data.data.tzprofiles_by_pk){c=Object(d.a)(a.data.data.tzprofiles_by_pk.valid_claims);try{for(c.s();!(s=c.n()).done;)i=s.value,(o=JSON.parse(i[1])).type.includes("TwitterVerification")?n.data&&n.data.twitter||(r.twitter=o.evidence.handle):o.type.includes("BasicProfile")?(""===o.credentialSubject.alias||n.data&&n.data.alias||(r.alias=o.credentialSubject.alias),r.tzprofile=t):o.type.includes("DiscordVerification")?n.data||(r.discord=o.evidence.handle):o.type.includes("GitHubVerification")?n.data||(r.github=o.evidence.handle):o.type.includes("DnsVerification")&&(n.data||(r.dns=o.credentialSubject.sameAs.slice(4)))}catch(l){c.e(l)}finally{c.f()}}e.next=12;break;case 9:e.prev=9,e.t0=e.catch(2),console.error(e.t0,e.t0.stack);case 12:return r&&(n.data=r),e.abrupt("return",n);case 14:case"end":return e.stop()}}),e,null,[[2,9]])})));return function(t){return e.apply(this,arguments)}}(),v=n(20),g=n(963),y=n(962),_=(n(417),n(0)),w=n(418),k=n.n(w),S=function(){var e=Object(r.useContext)(u.a);return Object(_.jsx)("div",{className:k.a.container,onClick:function(){return e.setTheme("light"===e.theme?"dark":"light")}})},C=n(200),N=n.n(C),T=function(){var e=Object(f.m)();return Object(_.jsxs)("footer",{className:N.a.container,children:[Object(_.jsxs)("div",{children:[Object(_.jsx)("div",{className:N.a.copy,children:e.footer.mint}),Object(_.jsxs)("div",{className:N.a.buttons,children:[!1,Object(_.jsx)(S,{})]})]}),!1]})},A=n(4),F=n(3),z=n(425),B=n.n(z),P={duration:.5,ease:[.43,.13,.23,.96]},L=function(e){var t=e.isOpen,n={strokeWidth:2,vectorEffect:"non-scaling-stroke",initial:"closed",animate:void 0!==t&&t?"opened":"closed",transition:P};return Object(_.jsx)("div",{className:B.a.menu,children:Object(_.jsxs)(y.a.svg,{viewBox:"0 0 14 14",overflow:"visible",preserveAspectRatio:"none",children:[Object(_.jsx)(y.a.line,Object(v.a)({x1:"2",x2:"12",y1:"4",y2:"4",variants:{closed:{rotate:0,translateY:0},opened:{rotate:45,translateY:3}}},n)),Object(_.jsx)(y.a.line,Object(v.a)({x1:"2",x2:"12",y1:"7",y2:"7",variants:{closed:{opacity:1},opened:{opacity:0}}},n)),Object(_.jsx)(y.a.line,Object(v.a)({x1:"2",x2:"12",y1:"10",y2:"10",variants:{closed:{rotate:0,translateY:0},opened:{rotate:-45,translateY:-3}}},n))]})})},I=function(e){try{return"".concat(e.slice(0,5),"...").concat(e.slice(e.length-5,e.length))}catch(t){return""}},M=n(51),q=n(137),U=n.n(q),V=function(){var e,t,n=Object(l.g)(),a=Object(r.useContext)(u.a);Object(r.useEffect)((function(){a.setAccount(),a.setTheme(Object(p.a)("theme")||Object(p.b)("theme","dark"))}),[]);var c="sync";if(null===(e=a.acc)||void 0===e?void 0:e.address)if(a.collapsed){var s=a.proxyAddress?" ("+a.proxyAddress+")":"";c=I(a.acc.address)+s}else c="unsync";var i=function(e){a.setMenu(!0),n.push(e)};return Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)("header",{className:U.a.container,children:Object(_.jsxs)("div",{className:U.a.content,children:[Object(_.jsx)("a",{href:"/",children:Object(_.jsxs)("div",{className:U.a.logo,children:[Object(_.jsxs)("svg",{viewBox:"0 0 196.87 53.23",fill:"var(--text-color)",children:[Object(_.jsx)("path",{d:"M228.9,79.31H211.51a2.26,2.26,0,0,1-.35-.34.75.75,0,0,1-.16-.42c0-11.42,0-22.85,0-34.43H193.24v35H175.41V26.27H228.9Z",transform:"translate(-32.03 -26.27)"}),Object(_.jsx)("path",{d:"M67.74,43.78V26.42H85.41V79.19H67.91V62.38a4.24,4.24,0,0,0-.52-.57.77.77,0,0,0-.42-.17H50V79.08H32V26.48H49.78v17.3Z",transform:"translate(-32.03 -26.27)"}),Object(_.jsx)("path",{d:"M103.62,43.79V26.43h53.6c.09,5.62,0,11.41.05,17.36Z",transform:"translate(-32.03 -26.27)"}),Object(_.jsx)("path",{d:"M103.71,61.71h53.38V78.84c-4.05.69-38.16.91-53.38.31Z",transform:"translate(-32.03 -26.27)"})]}),!1]})}),Object(_.jsxs)("div",{className:U.a.right,children:[Object(_.jsx)(F.a,{onClick:function(){var e;(null===(e=a.acc)||void 0===e?void 0:e.address)&&!a.collapsed?a.disconnect():a.syncTaquito()},secondary:!0,children:Object(_.jsx)(F.c,{children:c})}),Object(_.jsxs)(F.a,{onClick:a.toogleNavbar,secondary:!0,children:[Object(_.jsx)(M.a,{children:"".concat(a.collapsed?"show":"hide"," menu")}),Object(_.jsx)(L,{isOpen:!a.collapsed})]})]})]})}),Object(_.jsx)(g.a,{children:!a.collapsed&&Object(_.jsxs)(y.a.div,Object(v.a)(Object(v.a)({className:U.a.menu},{initial:{opacity:0,transition:{duration:.2,ease:"easeOut"}},animate:{opacity:1,transition:{duration:.2,ease:"easeOut"}},exit:{opacity:0,transition:{duration:.2,ease:"easeOut"}}}),{},{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("nav",{className:U.a.content,children:Object(_.jsxs)("ul",{children:[Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/")},children:Object(_.jsx)(F.c,{children:"home"})})}),Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/galleries")},children:Object(_.jsx)(F.c,{children:"galleries"})})}),Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/mint")},children:Object(_.jsxs)(F.c,{children:["OBJKT",Object(_.jsx)("span",{style:{fontSize:"16px"},children:" (mint)"})]})})}),Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/sync")},children:Object(_.jsx)(F.c,{children:"manage assets"})})}),(null===(t=a.acc)||void 0===t?void 0:t.address)?Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/config")},children:Object(_.jsx)(F.c,{children:"edit profile"})})}):null,Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/about")},children:Object(_.jsx)(F.c,{children:"about"})})}),Object(_.jsx)("li",{children:Object(_.jsx)(F.a,{onClick:function(){return i("/faq")},children:Object(_.jsx)(F.c,{children:"faq"})})})]})})})}),Object(_.jsx)(T,{})]}))})]})},D=n(46),E=n(172),H=n.n(E),K=function(){var e=Object(r.useContext)(u.a).feedback,t=e.visible,n=e.message,a=e.progress,c=e.confirm,s=e.confirmCallback;return Object(_.jsx)(g.a,{children:t&&Object(_.jsx)(y.a.div,Object(v.a)(Object(v.a)({className:H.a.container},{initial:{opacity:0,transition:{duration:.2,ease:"easeOut"}},animate:{opacity:1,transition:{duration:.2,ease:"easeOut"}},exit:{opacity:0,transition:{duration:.2,ease:"easeOut"}}}),{},{children:Object(_.jsxs)("div",{className:H.a.content,children:[a&&Object(_.jsx)(D.a,{}),Object(_.jsx)("div",{className:H.a.message,children:n}),c&&Object(_.jsx)("div",{className:H.a.buttons,children:Object(_.jsx)(F.a,{onClick:function(){return s()},children:Object(_.jsx)(F.d,{children:"close"})})})]})}))})},R=n(9),G=n(14),J=n(22),W=n(21),Z=function(e){Object(J.a)(n,e);var t=Object(W.a)(n);function n(e){var r;return Object(R.a)(this,n),(r=t.call(this,e)).componentWillMount=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null!=r.context.acc){e.next=7;break}return e.next=3,r.context.syncTaquito();case 3:return e.next=5,r.context.setAccount();case 5:e.next=9;break;case 7:return e.next=9,r.context.setAccount();case 9:case"end":return e.stop()}}),e)}))),r.state={addr:""},r}return Object(G.a)(n,[{key:"render",value:function(){return void 0!==this.context.acc?Object(_.jsx)(l.a,{to:"/tz/".concat(this.context.getProxy()||this.context.acc.address)}):Object(_.jsx)(A.c,{title:"",children:Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("p",{children:"requesting permissions"}),Object(_.jsx)(F.a,{to:"/sync",children:Object(_.jsx)(F.c,{children:"try again?"})}),Object(_.jsx)(D.b,{})]})})})}}]),n}(r.Component);Z.contextType=u.a;n(122);var Q=n(202),Y=n.n(Q),$=function(e){Object(J.a)(n,e);var t=Object(W.a)(n);function n(){var e;Object(R.a)(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return(e=t.call.apply(t,[this].concat(a))).language=Object(f.m)(),e.state={reveal:!1},e.reveal=function(){e.setState({reveal:!e.state.reveal})},e}return Object(G.a)(n,[{key:"render",value:function(){return Object(_.jsxs)(A.c,{title:"about",large:!0,children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("strong",{children:"hic et nunc"})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:this.language.about.paragraphs[0]})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:this.language.about.paragraphs[1]})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:this.language.about.paragraphs[2]})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{className:Y.a.buttons,children:[Object(_.jsx)("p",{children:"Join or contact hic et nunc on"}),"\xa0",Object(_.jsx)(F.a,{href:"https://hicetnunc2000.medium.com",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"medium"})})}),Object(_.jsx)("p",{children:","}),"\xa0",Object(_.jsx)(F.a,{href:"mailto:hicetnunc2000@protonmail.com",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"email"})})}),Object(_.jsx)("p",{children:","}),"\xa0",Object(_.jsx)(F.a,{href:"https://discord.gg/W8vQ7REym7",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"discord"})})}),Object(_.jsx)("p",{children:","}),"\xa0",Object(_.jsx)(F.a,{href:"https://reddit.com/r/hicetnunc",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"reddit"})})}),Object(_.jsx)("p",{children:","}),"\xa0",Object(_.jsx)(F.a,{href:"https://t.me/hicetnunc2000",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"telegram"})})}),"\xa0or through our",Object(_.jsx)(F.a,{href:"https://community.hicetnunc.xyz",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"\xa0community forum"})})}),"."]})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{className:Y.a.buttons,children:[Object(_.jsx)("p",{children:"WIKI is available on"}),"\xa0",Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"github"})})})]})})}),Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Tools-made-by-the-community",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"Community tools"})})}),!1]})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{className:Y.a.buttons,children:[Object(_.jsx)("p",{children:"Report"}),"\xa0",Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/issues",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"issues"})})})]})})})]})}}]),n}(r.Component);$.contextType=u.a;var X=n(95),ee=n.n(X),te=function(e){Object(J.a)(n,e);var t=Object(W.a)(n);function n(){var e;Object(R.a)(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return(e=t.call.apply(t,[this].concat(a))).state={reveal:!1},e.reveal=function(){e.setState({reveal:!e.state.reveal})},e}return Object(G.a)(n,[{key:"render",value:function(){return Object(_.jsxs)(A.c,{title:"faq",large:!0,children:[Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Getting-Started-with-Tezos",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I get tezos/make a wallet?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Introduction",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I mint?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Edit-your-profile",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I edit my profile?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-swap-%F0%9F%94%83",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I add/change the price of my OBJKT?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-burn-%F0%9F%94%A5",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I burn my OBJKT?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/How-to-resell-%F0%9F%8F%AA",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"how do I resell an OBJKT?"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/hDAO",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"what is hDAO \u25cb?"})})})})]})}),Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/General",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"general faq"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Troubleshooting",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"troubleshooting"})})})}),Object(_.jsx)("div",{className:ee.a.buttons,children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Tools-made-by-the-community",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"useful tools"})})})})]})})]})}}]),n}(r.Component);te.contextType=u.a;var ne=n(8),re=n(191),ae=n.n(re),ce=n(427),se=n(268),ie=n(204),oe=n.n(ie),le=function(e){var t=e.artifactUri,n=e.displayUri,r=e.previewUri,a=e.onDetailView?t:n||t;return e.preview&&(a=r),e.displayView?Object(_.jsx)("div",{className:oe.a.container,children:Object(_.jsx)(se.LazyLoadImage,{className:oe.a.image,src:a})}):Object(_.jsx)("div",{children:Object(_.jsx)("div",{children:Object(_.jsx)(se.LazyLoadImage,{className:oe.a.style,src:a})})})},ue=["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document,de=n(205),je=n.n(de),he=(n(943),function(e){var t=e.artifactUri,n=e.displayUri,a=e.previewUri,c=e.preview,s=e.interactive,i=e.inView,o=e.displayView,l=Object(r.useRef)();return Object(r.useEffect)((function(){var e,t=function(e){return ue||e.readyState>2};if(i){if(t(l.current))try{l.current.play()}catch(n){console.error(n)}}else if(t(l.current)&&((e=l.current).currentTime>0&&!e.paused&&!e.ended&&e.readyState>2))try{l.current.pause()}catch(n){console.error(n)}}),[i]),o?Object(_.jsx)("div",{className:je.a.video,children:Object(_.jsx)("video",{ref:l,className:je.a.displayviewVideo,autoPlay:i,playsInline:!0,muted:!0,loop:!0,controls:s,src:c?a:t,poster:n})}):Object(_.jsx)(_.Fragment,{children:Object(_.jsx)("video",{ref:l,className:je.a.video,autoPlay:i,playsInline:!0,muted:!0,loop:!0,controls:s,src:c?a:t,poster:n})})}),be=n(41),pe=n.n(be),fe=(n(944),n(269)),xe=n.n(fe),Oe=function(e){var t,n=e.artifactUri,a=e.displayUri,c=e.previewUri,s=e.preview,i=e.displayView,l=Object(r.useRef)(),u=Object(r.useState)(!1),d=Object(o.a)(u,2),j=d[0],h=(d[1],Object(r.useState)(!1)),b=Object(o.a)(h,2),p=b[0];b[1];Object(r.useEffect)((function(){j&&l.current.init()}),[j]),Object(r.useEffect)((function(){j&&(p?l.current.play():l.current.pause())}),[p]);pe()((t={},Object(ne.a)(t,xe.a.container,!0),Object(ne.a)(t,xe.a.userTouch,j),t));return i?Object(_.jsx)(_.Fragment,{children:Object(_.jsxs)("div",{children:[Object(_.jsxs)("span",{children:[Object(_.jsx)("img",{style:{width:"100%"},src:a}),Object(_.jsx)("br",{}),Object(_.jsx)("audio",{style:{width:"100%"},src:s?c:n,controls:!0})]}),!1,!1]})}):Object(_.jsxs)("div",{children:[Object(_.jsxs)("div",{children:[Object(_.jsx)("img",{style:{height:"50vh",display:"block",margin:"0 auto"},src:a}),Object(_.jsx)("br",{}),Object(_.jsx)("audio",{style:{display:"block",margin:"0 auto"},src:s?c:n,controls:!0})]}),!1,!1]})},me=n(173),ve=n.n(me),ge=(n(945),function(e){var t,n,a=e.artifactUri,c=(e.displayUri,e.previewUri),s=e.creator,i=e.objkt,o=e.onDetailView,l=e.preview,d=e.displayView,j=Object(r.useContext)(u.a),h=pe()((t={},Object(ne.a)(t,ve.a.container,!0),Object(ne.a)(t,ve.a.interactive,o),t)),b=!1,p=!1,f=!1;return s&&s.address&&(b=s.address),j.address&&j.address.address&&(p=j.address.address),i&&(f=i),n=l?c:"".concat(a,"?creator=").concat(b,"&viewer=").concat(p,"&objkt=").concat(f),d?Object(_.jsx)("div",{className:h,children:Object(_.jsx)("iframe",{title:"hic et nunc SVG renderer",src:n,sandbox:"allow-scripts",scrolling:"no"})}):Object(_.jsx)("div",{className:ve.a.container+" vector-container",children:Object(_.jsx)("iframe",{className:ve.a.vector+" vector",title:"hic et nunc SVG renderer",src:n,sandbox:"allow-scripts",scrolling:"no",onLoad:'javascript:(function(o){o.style.height=o.contentWindow.document.body.scrollHeight+"px";}(this));'})})}),ye=n(135),_e=n(106),we=n.n(_e),ke=Math.round(1e8*Math.random()).toString(),Se=function(e){var t,n=e.artifactUri,a=e.displayUri,c=e.previewUri,s=e.creator,i=e.objkt,l=e.onDetailView,d=e.preview,j=e.displayView,p=Object(r.useContext)(u.a),f=!1,x=!1,O=!1;s&&s.address&&(f=s.address),p.address&&p.address.address&&(x=p.address.address),i&&(O=String(i));var m=Object(r.useRef)(null),v=Object(r.useRef)(null),g=Object(r.useRef)(!1),y=Object(r.useState)(null),w=Object(o.a)(y,2),k=w[0],S=w[1],C=Object(r.useState)(null),N=Object(o.a)(C,2),T=N[0],A=N[1],z=Object(r.useState)(null),B=Object(o.a)(z,2),P=(B[0],B[1],function(){var e=Object(b.a)(h.a.mark((function e(){var t,n,r,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return g.current=!0,t=Object(ye.dataRUIToBuffer)(c),e.next=4,Object(ye.prepareFilesFromZIP)(t);case 4:return n=e.sent,r={},n.forEach((function(e){r[e.path]=e.blob})),v.current=r,e.next=10,Object(ye.validateFiles)(v.current);case 10:(a=e.sent).error?(console.error(a.error),A(a.error)):A(null),S(a.valid),g.current=!1;case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());!d||v.current||g.current||P(),Object(r.useEffect)((function(){var e=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.data===ke){e.next=2;break}return e.abrupt("return");case 2:m.current.contentWindow.postMessage({target:"hicetnunc-html-preview",data:v.current},"*");case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return window.addEventListener("message",e),function(){return window.removeEventListener("message",e)}}),[c]);var L=pe()((t={},Object(ne.a)(t,we.a.container,!0),Object(ne.a)(t,we.a.interactive,l),t));if(d){if(f=x,k)return Object(_.jsx)("div",{className:L,children:Object(_.jsx)("iframe",{ref:m,title:"html-zip-embed",src:"https://hicetnunc2000.github.io/hicetnunc/gh-pages/html-preview/?uid=".concat(ke,"&creator=").concat(f,"&viewer=").concat(x,"&objkt=").concat(O),sandbox:"allow-scripts allow-same-origin allow-modals",allow:"accelerometer; camera; gyroscope; microphone; xr-spatial-tracking;"})});if(!1===k)return Object(_.jsxs)("div",{className:we.a.error,children:["Preview Error: ",T]})}if(!l)return Object(_.jsx)("div",{className:L,children:Object(_.jsxs)("div",{className:we.a.preview,children:[Object(_.jsx)("img",{src:a,alt:"display"}),Object(_.jsx)("div",{className:we.a.button,children:Object(_.jsx)(F.a,{children:Object(_.jsx)(M.a,{children:"View"})})})]})});if(j)return Object(_.jsx)("div",{children:Object(_.jsx)("iframe",{className:we.a.html,title:"html-embed",src:"".concat(n,"/?creator=").concat(f,"&viewer=").concat(x,"&objkt=").concat(O),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; camera; gyroscope; microphone; xr-spatial-tracking;"})});try{return Object(_.jsx)("div",{children:Object(_.jsx)("iframe",{className:we.a.html+" zip-embed",title:"html-embed",src:"".concat(n,"/?creator=").concat(f,"&viewer=").concat(x,"&objkt=").concat(O),sandbox:"allow-scripts allow-same-origin",allow:"accelerometer; camera; gyroscope; microphone; xr-spatial-tracking;"})})}catch(I){return}},Ce=n(270),Ne=n.n(Ce),Te=(n(57),function(e){e.mimeType;return Object(_.jsx)("div",{className:Ne.a.container,children:Object(_.jsx)("div",{className:Ne.a.square,children:"Metadata on queue"})})}),Ae=n(271),Fe=n.n(Ae),ze=n(176);n(951);ze.c.GlobalWorkerOptions.workerSrc="//cdnjs.cloudflare.com/ajax/libs/pdf.js/".concat(ze.c.version,"/pdf.worker.js");var Be=function(e){var t=e.artifactUri,n=(e.displayUri,e.previewUri),a=e.preview,c=e.onDetailView,s=Object(r.useState)(null),i=Object(o.a)(s,2),l=i[0],u=i[1],d=Object(r.useState)(1),j=Object(o.a)(d,2),h=j[0],b=j[1];function p(e){b((function(t){return t+e}))}return Object(_.jsx)("div",{className:Fe.a.container,children:Object(_.jsxs)(ze.a,{file:a?n:t,onLoadSuccess:function(e){var t=e.numPages;u(t)},onItemClick:function(e){b(e.pageNumber)},children:[Object(_.jsx)(ze.b,{pageNumber:h}),c&&Object(_.jsxs)("div",{className:Fe.a.pdfNav,children:[Object(_.jsx)(F.a,{disabled:h<=1,onClick:function(){p(-1)},children:Object(_.jsx)(F.c,{children:"Prev \xab"})}),Object(_.jsxs)("p",{children:["Page ",h||(l?1:"--")," of ",l||"--"]}),Object(_.jsx)(F.a,{disabled:h>=l,onClick:function(){p(1)},children:Object(_.jsx)(F.c,{children:"\xbb Next"})})]})]})})},Pe=n(174),Le=n.n(Pe),Ie=n(197),Me=n(206),qe=n.n(Me),Ue=(n(952),function(e){var t,n=e.children,c=void 0===n?null:n,s=e.interactive,i=e.nofullscreen,o=void 0!==i&&i,l=Object(r.useContext)(u.a),d=Object(r.useRef)(),j=Object(Ie.a)({threshold:0}),h=j.ref,b=j.inView,p=function(e){ue||(Le.a.isFullscreen?l.setFullscreen(!0):l.setFullscreen(!1),window.dispatchEvent(new Event("resize")))};Object(r.useEffect)((function(){return!o&&ue||(document.addEventListener("fullscreenchange",p),document.addEventListener("webkitfullscreenchange",p,!1)),function(){!o&&ue||(document.removeEventListener("fullscreenchange",p),document.removeEventListener("webkitfullscreenchange",p,!1))}}),[]);var f=pe()((t={},Object(ne.a)(t,qe.a.container,!0),Object(ne.a)(t,qe.a.fullscreen,l.fullscreen),t)),x=a.a.Children.map(c,(function(e){return a.a.isValidElement(e)?a.a.cloneElement(e,{inView:b,interactive:s}):e}));return Object(_.jsx)("div",{ref:h,style:{width:"100%"},className:"objktview-container",children:Object(_.jsxs)("div",{ref:d,className:f,children:[s&&!ue&&!o&&Object(_.jsx)("div",{onClick:function(){Le.a.isFullscreen?Le.a.exit():Le.a.request(d.current,{navigationUI:"hide"})},className:qe.a.icon+" svg-icon",children:l.fullscreen?Object(_.jsx)("svg",{viewBox:"0 0 14 14",children:Object(_.jsx)("g",{fill:"none",fillRule:"evenodd",id:"Page-1",stroke:"none",strokeWidth:"1",children:Object(_.jsx)("g",{fill:"#000000",transform:"translate(-257.000000, -257.000000)",children:Object(_.jsx)("g",{transform:"translate(257.000000, 257.000000)",children:Object(_.jsx)("path",{d:"M0,11 L3,11 L3,14 L5,14 L5,9 L0,9 L0,11 L0,11 Z M3,3 L0,3 L0,5 L5,5 L5,0 L3,0 L3,3 L3,3 Z M9,14 L11,14 L11,11 L14,11 L14,9 L9,9 L9,14 L9,14 Z M11,3 L11,0 L9,0 L9,5 L14,5 L14,3 L11,3 L11,3 Z"})})})})}):Object(_.jsx)("svg",{viewBox:"0 0 14 14",children:Object(_.jsx)("g",{fill:"none",fillRule:"evenodd",stroke:"none",strokeWidth:"1",children:Object(_.jsx)("g",{fill:"#000000",transform:"translate(-215.000000, -257.000000)",children:Object(_.jsx)("g",{transform:"translate(215.000000, 257.000000)",children:Object(_.jsx)("path",{d:"M2,9 L0,9 L0,14 L5,14 L5,12 L2,12 L2,9 L2,9 Z M0,5 L2,5 L2,2 L5,2 L5,0 L0,0 L0,5 L0,5 Z M12,12 L9,12 L9,14 L14,14 L14,9 L12,9 L12,12 L12,12 Z M9,0 L9,2 L12,2 L12,5 L14,5 L14,0 L9,0 L9,0 Z"})})})})})}),x]})})}),Ve=n(430),De=n(57),Ee=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.artifactUri,e.next=3,De.get("https://cloudflare-ipfs.com/ipfs/".concat(n.split("//"))).then((function(e){return e.data}));case 3:return r=e.sent,e.abrupt("return",Object(_.jsx)("div",{children:Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Ve.a,{children:r})})})}));case 5:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),He=function(e,t){if(void 0==e)return"";switch(t){case"HIC":return e.replace("ipfs://","https://pinata.hicetnunc.xyz/ipfs/");case"CLOUDFLARE":return e.replace("ipfs://","https://cloudflare-ipfs.com/ipfs/");case"PINATA":return e.replace("ipfs://","https://gateway.pinata.cloud/ipfs/");case"IPFS":return e.replace("ipfs://","https://ipfs.io/ipfs/");case"INFURA":try{var n=new ae.a.CID(e.replace("ipfs://","")).toV1().toBaseEncodedString("base32");return"https://".concat(n,".ipfs.infura-ipfs.io/")}catch(r){return}case"DWEB":return e.replace("ipfs://","http://dweb.link/ipfs/");default:return console.error("please specify type"),e}},Ke=function(e){var t,n,r=e.mimeType,a=e.artifactUri,c=e.displayUri,s=e.previewUri,i=e.creator,o=e.objkt,l=e.interactive,u=void 0!==l&&l,d=e.preview,j=void 0!==d&&d,h=e.displayView;switch(r){case f.i.BMP:case f.i.GIF:case f.i.JPEG:case f.i.PNG:case f.i.TIFF:case f.i.WEBP:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(le,{artifactUri:t,displayUri:n,previewUri:s,onDetailView:u||r===f.i.GIF,preview:j,displayView:h})});case f.i.SVG:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(ge,{artifactUri:t,displayUri:n,previewUri:s,preview:j,creator:i,objkt:o,onDetailView:u,displayView:h})});case f.f:case f.i.ZIP:case f.i.ZIP1:case f.i.ZIP2:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(Se,{artifactUri:t,displayUri:n,previewUri:s,creator:i,objkt:o,preview:j,onDetailView:u,displayView:h})});case f.i.MP4:case f.i.OGV:case f.i.QUICKTIME:case f.i.WEBM:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,nofullscreen:!0,children:Object(_.jsx)(he,{artifactUri:t,displayUri:n,previewUri:s,preview:j,onDetailView:u,displayView:h})});case f.i.GLB:case f.i.GLTF:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(ce.a,Object(ne.a)({artifactUri:t,displayUri:n,previewUri:s,preview:j,onDetailView:u,displayView:h},"displayView",h))});case f.i.MP3:case f.i.OGA:case f.i.FLAC:case f.i.WAV:case f.i.XWAV:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(Oe,{artifactUri:t,displayUri:n,previewUri:s,preview:j,onDetailView:u,displayView:h})});case f.i.PDF:return t=He(a,"IPFS"),n=He(c,"IPFS"),Object(_.jsx)(Ue,{interactive:u,children:Object(_.jsx)(Be,{artifactUri:t,displayUri:n,previewUri:s,preview:j,onDetailView:u,displayView:h})});case f.i.MD:return t=He(a,"IPFS"),Object(_.jsx)(Ee,{artifactUri:He(a,"IPFS"),displayView:h});default:return Object(_.jsx)(Te,{mimeType:r})}},Re=n(198),Ge=n(84),Je=n(93),We=n(55),Ze=n.n(We),Qe=n(57),Ye=n(166),$e=function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Qe.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json").then((function(e){return e.data}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xe='\nquery collectorGallery($address: String!) {\n hic_et_nunc_token_holder(where: {holder_id: {_eq: $address}, token: {creator: {address: {_neq: $address}}}, quantity: {_gt: "0"}}, order_by: {token_id: desc}) {\n token {\n id\n artifact_uri\n display_uri\n thumbnail_uri\n timestamp\n mime\n title\n description\n supply\n royalties\n creator {\n address\n name\n }\n }\n }\n}\n';function et(e,t,n){return tt.apply(this,arguments)}function tt(){return(tt=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ye("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function nt(e){return rt.apply(this,arguments)}function rt(){return(rt=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(Xe,"collectorGallery",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token_holder,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var at='\nquery creatorGallery($address: String!) {\n hic_et_nunc_token(where: {creator: {address: {_eq: $address}}, supply: {_gt: 0}}, order_by: {id: desc}) {\n id\n artifact_uri\n display_uri\n mime\n title\n description\n supply\n swaps(order_by: {price: asc}, limit: 1, where: {amount_left: {_gte: "1"}, status: {_eq: "0"}}) {\n id\n status\n amount_left\n creator_id\n contract_version\n creator {\n address\n }\n price\n }\n }\n}\n',ct="\nquery subjktsQuery($subjkt: String!) {\n hic_et_nunc_holder(where: { name: {_eq: $subjkt}}) {\n address\n name\n hdao_balance\n metadata\n metadata_file\n }\n}\n",st="\nquery addressQuery($address: String!) {\n hic_et_nunc_holder(where: { address: {_eq: $address}}) {\n address\n name\n hdao_balance\n metadata\n metadata_file\n }\n}\n",it='\nquery querySwaps($address: String!) {\n hic_et_nunc_swap(where: {contract_version: {_eq: "1"}, creator_id: {_eq: $address}, status: {_eq: "0"}}) {\n token {\n id\n title\n creator {\n address\n }\n creator_id\n }\n creator {\n address\n }\n creator_id\n amount_left\n price\n id\n token_id\n contract_version\n }\n}\n',ot='\nquery querySwaps($address: String!) {\n hic_et_nunc_swap(where: {token: {creator: {address: {_neq: $address}}}, creator_id: {_eq: $address}, status: {_eq: "0"}, contract_version: {_eq: "2"}}, distinct_on: token_id) {\n creator_id\n token {\n id\n title\n artifact_uri\n display_uri\n mime\n description\n supply\n royalties\n creator {\n name\n address\n }\n }\n amount_left\n price\n id\n }\n}\n';function lt(e){return ut.apply(this,arguments)}function ut(){return(ut=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(it,"querySwaps",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_swap,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dt(e){return jt.apply(this,arguments)}function jt(){return(jt=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(ot,"querySwaps",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_swap,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ht(e){return bt.apply(this,arguments)}function bt(){return(bt=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(ct,"subjktsQuery",{subjkt:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_holder,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function pt(e){return ft.apply(this,arguments)}function ft(){return(ft=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(at,"creatorGallery",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xt(e){return Ot.apply(this,arguments)}function Ot(){return(Ot=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et(st,"addressQuery",{address:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_holder,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function mt(e){return vt.apply(this,arguments)}function vt(){return(vt=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,et('\n query hdaobalances {\n hic_et_nunc_token(where: {creator_id: {_eq: "'.concat(t,'"}, supply: {_gt: 0}, hdao_balance : {_gt: 0}}) {\n id\n hdao_balance\n }\n }\n '),"hdaobalances",{});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.log(r),c=a.hic_et_nunc_token,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var gt=function(e){Object(J.a)(n,e);var t=Object(W.a)(n);function n(){var e;Object(R.a)(this,n);for(var r=arguments.length,a=new Array(r),c=0;c<r;c++)a[c]=arguments[c];return(e=t.call.apply(t,[this].concat(a))).state={wallet:"",walletPrev:"tz"===window.location.pathname.split("/")[1]?I(window.location.pathname.split("/")[2]):window.location.pathname.split("/")[1],subjkt:"",render:!1,loading:!0,hasMore:!0,rstricted:!1,offset:0,results:[],objkts:[],creations:[],collection:[],forSale:[],notForSale:[],marketV1:[],items:[],creationsState:!0,collectionState:!1,collectionType:"notForSale",hdao:0,claim:[]},e.componentWillMount=Object(b.a)(h.a.mark((function t(){var n,r,a,c,s,i;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if("tz"!==window.location.pathname.split("/")[1]){t.next=26;break}return n=window.location.pathname.split("/")[2],e.setState({wallet:n,walletPreview:I(n)}),t.next=6,m(n).then((function(t){var n=t.data,r=n.twitter,a=n.tzprofile,c=n.discord,s=n.github,i=n.dns;t.data.twitter&&e.setState({twitter:r}),t.data.tzprofile&&e.setState({tzprofile:a}),t.data.discord&&e.setState({discord:c,copied:!1}),t.data.github&&e.setState({github:s}),t.data.dns&&e.setState({dns:i})}));case 6:return t.next=8,xt(n);case 8:if(r=t.sent,t.prev=9,!r[0]){t.next=18;break}return t.next=13,Qe.get("https://cloudflare-ipfs.com/ipfs/"+r[0].metadata_file.split("//")[1]).then((function(e){return e.data}));case 13:(a=t.sent).description&&e.setState({description:a.description}),a.identicon&&e.setState({identicon:a.identicon}),r[0]&&e.setState({subjkt:r[0].name}),r[0]&&e.setState({hdao:Math.floor(r[0].hdao_balance/1e6)});case 18:t.next=23;break;case 20:t.prev=20,t.t0=t.catch(9),console.log("error "+t.t0);case 23:e.onReady(),t.next=50;break;case 26:return t.next=28,ht(decodeURI(window.location.pathname.split("/")[1]));case 28:if(c=t.sent,console.log(c),!c[0].metadata_file){t.next=37;break}return t.next=33,Qe.get("https://cloudflare-ipfs.com/ipfs/"+c[0].metadata_file.split("//")[1]).then((function(e){return e.data}));case 33:s=t.sent,console.log(s),s.description&&e.setState({description:s.description}),s.identicon&&e.setState({identicon:s.identicon});case 37:if(!(c.length>=1)){t.next=46;break}return e.setState({wallet:c[0].address,walletPreview:I(c[0].address),subjkt:window.location.pathname.split("/")[1]}),t.next=41,xt(e.state.wallet);case 41:i=t.sent,console.log(i),e.setState({hdao:Math.floor(i[0].hdao_balance/1e6)}),t.next=47;break;case 46:e.props.history.push("/");case 47:return t.next=49,m(e.state.wallet).then((function(t){var n=t.data,r=n.dns,a=n.github,c=n.discord,s=n.twitter,i=n.tzprofile;t.data.dns&&e.setState({dns:r}),t.data.github&&e.setState({github:a}),t.data.discord&&e.setState({discord:c}),t.data.twitter&&e.setState({twitter:s}),t.data.tzprofile&&e.setState({tzprofile:i})}));case 49:e.onReady();case 50:return t.t1=console,t.next=53,mt(e.state.wallet);case 53:return t.t2=t.sent,t.t1.log.call(t.t1,t.t2),t.t3=e,t.next=58,mt(e.state.wallet);case 58:t.t4=t.sent,t.t5={claim:t.t4},t.t3.setState.call(t.t3,t.t5);case 61:case"end":return t.stop()}}),t,null,[[9,20]])}))),e.creations=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.setState({creationsState:!0,collectionState:!1,collectionType:"notForSale"}),e.reset(),t.next=4,$e();case 4:if(t.sent.includes(e.state.wallet)){t.next=21;break}return t.t0=e,t.next=9,pt(e.state.wallet);case 9:return t.t1=t.sent,t.t2={creations:t.t1},t.t0.setState.call(t.t0,t.t2),e.setState({objkts:e.state.creations,loading:!1,items:[]}),t.t3=e,t.next=16,lt(e.state.wallet);case 16:t.t4=t.sent,t.t5={marketV1:t.t4},t.t3.setState.call(t.t3,t.t5),t.next=22;break;case 21:e.setState({restricted:!0,loading:!1});case 22:e.setState({items:e.state.objkts.slice(0,15),offset:15}),""!==e.state.subjkt?e.props.history.push("/".concat(e.state.subjkt)):e.props.history.push("/tz/".concat(e.state.wallet));case 24:case"end":return t.stop()}}),t)}))),e.creationsNotForSale=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.setState({collectionType:"notForSale"}),t.t0=e,t.next=4,e.filterCreationsNotForSale(e.state.objkts);case 4:t.t1=t.sent,t.t2=[],t.t3={objkts:t.t1,loading:!1,items:t.t2},t.t0.setState.call(t.t0,t.t3),e.setState({items:e.state.objkts.slice(0,15),offset:15});case 9:case"end":return t.stop()}}),t)}))),e.filterCreationsNotForSale=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state.creations.filter((function(e){return 0===e.swaps.length})),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t)}))),e.creationsForSale=function(){var t=Object(b.a)(h.a.mark((function t(n){var r;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e.setState({collectionType:"forSale"}),r=e.state.marketV1.filter((function(t){return t.token.creator.address==e.state.wallet})),e.setState({marketV1:r,loading:!1}),e.setState({objkts:e.state.creations,loading:!1,items:[]}),null===n){t.next=23;break}if(0!=n){t.next=14;break}return t.t0=e,t.next=9,e.filterCreationsForSalePrimary(e.state.objkts);case 9:t.t1=t.sent,t.t2={objkts:t.t1},t.t0.setState.call(t.t0,t.t2),t.next=21;break;case 14:if(1!=n){t.next=21;break}return t.t3=e,t.next=18,e.filterCreationsForSaleSecondary(e.state.objkts);case 18:t.t4=t.sent,t.t5={objkts:t.t4},t.t3.setState.call(t.t3,t.t5);case 21:t.next=24;break;case 23:console.log("forSaleType is null");case 24:e.setState({items:e.state.objkts.slice(0,15),offset:15});case 25:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.filterCreationsForSalePrimary=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state.creations.filter((function(t){var n=t.swaps.filter((function(t){return 0==t.status&&2==t.contract_version&&t.creator_id==e.state.wallet}));return n&&n.length>0})),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t)}))),e.filterCreationsForSaleSecondary=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state.creations.filter((function(t){var n=t.swaps.filter((function(t){return 0==t.status&&t.creator_id!==e.state.wallet}));return n&&n.length>0})),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t)}))),e.combineCollection=function(){var e=Object(b.a)(h.a.mark((function e(t,n){var r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=[],t.forEach((function(e){r.push(e)})),n.forEach((function(e){r.push(e)})),e.abrupt("return",r);case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),e.sortCollection=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t.sort((function(e,t){return t.token.id-e.token.id}));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),e.collectionFull=Object(b.a)(h.a.mark((function t(){var n,r,a;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.reset(),e.setState({creationsState:!1,collectionState:!0}),e.setState({collectionType:"notForSale"}),t.next=5,$e();case 5:if(t.sent.includes(e.state.wallet)){t.next=28;break}return e.setState({loading:!1,items:[]}),t.next=10,nt(e.state.wallet);case 10:return n=t.sent,t.next=13,dt(e.state.wallet);case 13:return r=t.sent,t.next=16,e.combineCollection(n,r);case 16:return a=t.sent,e.sortCollection(a),console.log(a),e.setState({collection:a}),t.t0=e,t.next=23,lt(e.state.wallet);case 23:t.t1=t.sent,t.t2={marketV1:t.t1},t.t0.setState.call(t.t0,t.t2),t.next=29;break;case 28:e.setState({restricted:!0,loading:!1});case 29:e.setState({objkts:e.state.collection,loading:!1,items:[]}),e.setState({items:e.state.objkts.slice(0,15),offset:15}),""!==e.state.subjkt?e.props.history.push("/".concat(e.state.subjkt,"/collection")):e.props.history.push("/tz/".concat(e.state.wallet,"/collection"));case 32:case"end":return t.stop()}}),t)}))),e.collectionForSale=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.setState({collectionType:"forSale"}),n=e.state.marketV1.filter((function(t){return t.token.creator.address!==e.state.wallet})),e.setState({marketV1:n,loading:!1}),t.t0=e,t.next=6,e.filterCollectionForSale(e.state.objkts);case 6:t.t1=t.sent,t.t2=[],t.t3={objkts:t.t1,loading:!1,items:t.t2},t.t0.setState.call(t.t0,t.t3),e.setState({items:e.state.objkts.slice(0,15),offset:15});case 11:case"end":return t.stop()}}),t)}))),e.collectionNotForSale=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e.reset(),e.setState({collectionType:"notForSale"}),t.t0=e,t.next=5,e.filterCollectionNotForSale(e.state.objkts);case 5:t.t1=t.sent,t.t2=[],t.t3={objkts:t.t1,loading:!1,items:t.t2},t.t0.setState.call(t.t0,t.t3),e.setState({items:e.state.objkts.slice(0,15),offset:15});case 10:case"end":return t.stop()}}),t)}))),e.filterCollectionNotForSale=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state.collection.filter((function(t){return t.token.creator.address!==e.state.wallet&&t.creator_id!==e.state.wallet})),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t)}))),e.filterCollectionForSale=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=e.state.collection.filter((function(t){return t.creator_id==e.state.wallet})),t.abrupt("return",n);case 2:case"end":return t.stop()}}),t)}))),e.batch_claim=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",e.context.batch_claim(e.state.claim));case 1:case"end":return t.stop()}}),t)}))),e.onReady=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:""!==e.state.subjkt?"creations"===window.location.pathname.split("/")[2]?e.creations():"collection"===window.location.pathname.split("/")[2]?e.collectionFull():e.creations():"creations"===window.location.pathname.split("/")[3]?e.creations():"collection"===window.location.pathname.split("/")[3]?e.collectionFull():e.creations();case 1:case"end":return t.stop()}}),t)}))),e.loadMore=function(){e.setState({items:e.state.items.concat(e.state.objkts.slice(e.state.offset,e.state.offset+20)),offset:e.state.offset+20})},e.cancel_batch=Object(b.a)(h.a.mark((function t(){return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e.context.batch_cancel(e.state.marketV1.slice(0,10));case 1:case"end":return t.stop()}}),t)}))),e}return Object(G.a)(n,[{key:"reset",value:function(){this.setState({items:[],objkts:[],render:!1,loading:!0,hasMore:!0})}},{key:"getDiscordTooltip",value:function(){var e=this.state.discord.length-6,t="\u2002".repeat(Math.ceil(Math.abs(e/2)));return"".concat(e<0?this.state.copied?"Copied":"".concat(t).concat(this.state.discord).concat(t):this.state.copied?"".concat(t,"Copied").concat(t):"".concat(this.state.discord))}},{key:"render",value:function(){var e=this;return Object(_.jsxs)(A.c,{title:this.state.alias,children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{className:Ze.a.profile,children:[Object(_.jsx)(Re.a,{address:this.state.wallet,logo:this.state.identicon}),Object(_.jsxs)("div",{className:Ze.a.info,children:[this.state.alias&&!this.state.subjkt?Object(_.jsx)("p",{children:Object(_.jsx)("strong",{children:this.state.alias})}):Object(_.jsx)("p",{children:Object(_.jsx)("strong",{children:this.state.subjkt})}),this.state.description&&Object(_.jsx)("p",{children:this.state.description}),Object(_.jsx)(F.a,{href:"https://tzkt.io/".concat(this.state.wallet),children:Object(_.jsx)(F.c,{children:I(this.state.wallet)})}),0==this.state.claim.length?Object(_.jsxs)("p",{children:[this.state.hdao," \u25cb"]}):Object(_.jsx)("a",{onClick:function(){return e.context.batch_claim(e.state.claim)},children:Object(_.jsxs)(F.c,{children:[this.state.hdao+parseInt(this.state.claim.map((function(e){return e.hdao_balance})).reduce((function(e,t){return e+t}),0)/1e6)," \u25cb"]})}),Object(_.jsxs)("div",{children:[this.state.twitter&&Object(_.jsxs)(F.a,{href:"https://twitter.com/".concat(this.state.twitter),children:[Object(_.jsx)(M.a,{children:"https://twitter.com/".concat(this.state.twitter)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"})})]}),this.state.tzprofile&&Object(_.jsxs)(F.a,{href:"https://tzprofiles.com/view/".concat(this.state.tzprofile),children:[Object(_.jsx)(M.a,{children:"https://tzprofiles.com/view/".concat(this.state.tzprofile)}),Object(_.jsx)("svg",{height:"16",viewBox:"0 0 16 16",width:"16",xmlns:"http://www.w3.org/2000/svg",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsxs)("g",{children:[Object(_.jsx)("rect",{x:"1",y:"1",width:"9",height:"14"}),Object(_.jsx)("rect",{x:"1",y:"1",width:"14",height:"9"})]})})]}),this.state.discord&&Object(_.jsx)(F.a,{onClick:function(){e.setState({copied:!0}),setTimeout((function(){return e.setState({copied:!1})}),1e3),navigator.clipboard.writeText(e.state.discord)},children:Object(_.jsx)(F.c,{children:Object(_.jsxs)("span",{className:Ze.a.top,"data-position":"top","data-tooltip":this.getDiscordTooltip(),style:{marginRight:"10px"},children:[Object(_.jsx)(M.a,{children:"".concat(this.state.discord)}),Object(_.jsx)("svg",{width:"20",height:"15",viewBox:"0 0 20 15",xmlns:"http://www.w3.org/2000/svg",style:{fill:"var(--text-color)",stroke:"transparent"},children:Object(_.jsx)("path",{d:"M16.9308 1.24342C15.6561 0.667894 14.2892 0.243873 12.8599 0.00101874C12.8339 -0.00366827 12.8079 0.00804483 12.7945 0.0314716C12.6187 0.339138 12.4239 0.740513 12.2876 1.05599C10.7503 0.829542 9.22099 0.829542 7.71527 1.05599C7.57887 0.733501 7.37707 0.339138 7.20048 0.0314716C7.18707 0.00882646 7.16107 -0.00288664 7.13504 0.00101874C5.70659 0.243097 4.33963 0.667118 3.06411 1.24342C3.05307 1.2481 3.04361 1.25592 3.03732 1.26606C0.444493 5.07759 -0.265792 8.79544 0.0826501 12.4672C0.0842267 12.4852 0.0944749 12.5023 0.108665 12.5133C1.81934 13.7494 3.47642 14.4998 5.10273 14.9973C5.12876 15.0051 5.15634 14.9957 5.1729 14.9746C5.55761 14.4577 5.90054 13.9126 6.19456 13.3394C6.21192 13.3059 6.19535 13.266 6.15989 13.2528C5.61594 13.0497 5.098 12.8022 4.59977 12.5211C4.56037 12.4984 4.55721 12.443 4.59347 12.4164C4.69831 12.3391 4.80318 12.2587 4.9033 12.1775C4.92141 12.1626 4.94665 12.1595 4.96794 12.1689C8.24107 13.6393 11.7846 13.6393 15.0191 12.1689C15.0404 12.1587 15.0657 12.1619 15.0846 12.1767C15.1847 12.2579 15.2895 12.3391 15.3952 12.4164C15.4314 12.443 15.4291 12.4984 15.3897 12.5211C14.8914 12.8076 14.3735 13.0497 13.8288 13.252C13.7933 13.2653 13.7775 13.3059 13.7949 13.3394C14.0952 13.9118 14.4381 14.4569 14.8157 14.9738C14.8315 14.9957 14.8599 15.0051 14.8859 14.9973C16.5201 14.4998 18.1772 13.7494 19.8879 12.5133C19.9028 12.5023 19.9123 12.4859 19.9139 12.468C20.3309 8.22302 19.2154 4.53566 16.9568 1.26684C16.9513 1.25592 16.9419 1.2481 16.9308 1.24342ZM6.68335 10.2315C5.69792 10.2315 4.88594 9.34128 4.88594 8.24802C4.88594 7.15476 5.68217 6.26456 6.68335 6.26456C7.69239 6.26456 8.49651 7.16258 8.48073 8.24802C8.48073 9.34128 7.68451 10.2315 6.68335 10.2315ZM13.329 10.2315C12.3435 10.2315 11.5316 9.34128 11.5316 8.24802C11.5316 7.15476 12.3278 6.26456 13.329 6.26456C14.338 6.26456 15.1421 7.16258 15.1264 8.24802C15.1264 9.34128 14.338 10.2315 13.329 10.2315Z"})})]})})}),this.state.github&&Object(_.jsxs)(F.a,{href:"https://github.com/".concat(this.state.github),children:[Object(_.jsx)(M.a,{children:"https://github.com/".concat(this.state.github)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})]}),this.state.dns&&Object(_.jsxs)(F.a,{href:"http://".concat(this.state.dns),children:[Object(_.jsx)(M.a,{children:this.state.dns}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855.173-.324.33-.682.468-1.068H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5a6.959 6.959 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5h2.49zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4a7.966 7.966 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4h2.355z"})})]})]})]})]})})}),Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("p",{}),Object(_.jsxs)("div",{className:Ze.a.menu,children:[Object(_.jsx)(F.a,{onClick:this.creations,children:Object(_.jsx)(F.c,{selected:this.state.creationsState,children:"creations"})}),Object(_.jsx)(F.a,{onClick:this.collectionFull,children:Object(_.jsx)(F.c,{selected:this.state.collectionState,children:"collection"})}),Object(_.jsx)("div",{className:Ze.a.filter,children:Object(_.jsx)(F.a,{onClick:function(){return e.setState({filter:!e.state.filter})},children:Object(_.jsx)(F.c,{children:Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round",class:"feather feather-filter",children:Object(_.jsx)("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"})})})})})]})]})}),this.state.loading&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(D.a,{})})}),!this.state.loading&&this.state.restricted&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("div",{style:{color:"white",background:"black",textAlign:"center"},children:"restricted account"})})}),!this.state.loading&&this.state.creationsState&&Object(_.jsxs)("div",{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:this.state.filter&&Object(_.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end"},children:[Object(_.jsx)(F.a,{onClick:function(){e.creations()},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"all"})}),Object(_.jsx)(F.a,{onClick:function(){e.creationsForSale(0)},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"primary"})}),Object(_.jsx)(F.a,{onClick:function(){e.creationsForSale(1)},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"secondary"})}),Object(_.jsx)(F.a,{onClick:function(){e.creationsNotForSale()},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"not for sale"})})]})})}),Object(_.jsxs)(A.a,{xlarge:!0,children:["forSale"==this.state.collectionType?Object(_.jsx)(_.Fragment,{children:null!=this.context.acc&&this.context.acc.address==this.state.wallet?Object(_.jsxs)(_.Fragment,{children:[0!==Object.keys(this.state.marketV1).length&&Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("p",{children:["We're currently migrating the marketplace smart contract. We ask for users to cancel their listings as the v1 marketplace will no longer be maintained. Auditing tools for the v1 protocol can be found at ",Object(_.jsx)("a",{href:"https://hictory.xyz",children:"hictory.xyz"})]})})})}),0!==this.state.marketV1.length?Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("p",{children:"One can delist multiple swaps in once batch transaction or delist each single one at a time."}),Object(_.jsx)("br",{}),Object(_.jsx)(F.a,{onClick:this.cancel_batch,children:Object(_.jsx)(F.c,{children:"Batch Cancel"})})]})}):null,this.state.marketV1.map((function(t,n){return Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t.token_id),children:Object(_.jsx)(F.c,{children:Object(_.jsxs)("strong",{children:[t.amount_left,"x OBJKT#",t.token_id," ",t.price,"\xb5tez"]})})}),Object(_.jsx)(F.a,{onClick:function(){return e.context.cancel(t.id)},children:Object(_.jsx)(F.e,{children:"Cancel Swap"})})]})},n)})}))]}):null}):null,Object(_.jsx)(Je.a,{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.state.hasMore,loader:void 0,endMessage:void 0,children:Object(_.jsx)(Ge.a,{children:this.state.items.map((function(e){return Object(_.jsx)("div",{className:Ze.a.cardContainer,children:Object(_.jsx)(F.a,{style:{positon:"relative"},to:"".concat(f.l.OBJKT,"/").concat(e.id),children:Object(_.jsx)("div",{className:Ze.a.container,children:Ke({mimeType:e.mime,artifactUri:e.artifact_uri,displayUri:e.display_uri,displayView:!0})})},e.id)})}))})})]})]}),!this.state.loading&&this.state.collectionState&&Object(_.jsxs)("div",{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:this.state.filter&&Object(_.jsx)("div",{children:Object(_.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end"},children:[Object(_.jsx)(F.a,{onClick:function(){e.collectionFull()},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"all"})}),Object(_.jsx)(F.a,{onClick:function(){e.collectionForSale()},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"for sale"})}),Object(_.jsx)(F.a,{onClick:function(){e.collectionNotForSale()},children:Object(_.jsx)("div",{className:Ze.a.tag,children:"not for sale"})})]})})})}),Object(_.jsxs)(A.a,{xlarge:!0,children:["forSale"==this.state.collectionType?Object(_.jsx)(_.Fragment,{children:null!=this.context.acc&&this.context.acc.address==this.state.wallet?Object(_.jsxs)(_.Fragment,{children:[0!==Object.keys(this.state.marketV1).length&&Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("p",{children:["We're currently migrating the marketplace smart contract. We ask for users to cancel their listings as the v1 marketplace will no longer be maintained. Auditing tools for the v1 protocol can be found at ",Object(_.jsx)("a",{href:"https://hictory.xyz",children:"hictory.xyz"})]})})})}),0!==this.state.marketV1.length?Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("p",{children:"One can delist multiple swaps in once batch transaction or delist each single one at a time."}),Object(_.jsx)("br",{}),Object(_.jsx)(F.a,{onClick:this.cancel_batch,children:Object(_.jsx)(F.c,{children:"Batch Cancel"})})]})}):null,this.state.marketV1.map((function(t,n){return Object(_.jsx)(_.Fragment,{children:Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t.token_id),children:Object(_.jsx)(F.c,{children:Object(_.jsxs)("strong",{children:[t.amount_left,"x OBJKT#",t.token_id," ",t.price,"\xb5tez"]})})}),Object(_.jsx)(F.a,{onClick:function(){return e.context.cancel(t.id)},children:Object(_.jsx)(F.e,{children:"Cancel Swap"})})]})},n)})}))]}):null}):null,Object(_.jsx)(Je.a,{dataLength:this.state.items.length,next:this.loadMore,hasMore:this.state.hasMore,loader:void 0,endMessage:Object(_.jsx)("p",{}),children:Object(_.jsx)(Ge.a,{children:this.state.items.map((function(e){return Object(_.jsx)("div",{className:Ze.a.cardContainer,children:Object(_.jsx)(F.a,{style:{position:"relative"},to:"".concat(f.l.OBJKT,"/").concat(e.token.id),children:Object(_.jsx)("div",{className:Ze.a.container,children:Ke({mimeType:e.token.mime,artifactUri:e.token.artifact_uri,displayUri:e.token.display_uri,displayView:!0})})},e.token.id)})}))})})]})]})]})}}]),n}(r.Component);gt.contextType=u.a;var yt=n(16),_t=n(71),wt=n.n(_t),kt=n(18),St=n.n(kt),Ct=n(102),Nt=function(e){var t=e.id,n=(e.creator_id,e.owners,e.swaps),a=e.creator,c=e.feed,s=e.token_holders,i=e.supply,o=(e.hDAO_balance,e.isDetailView),l=e.restricted,d=Object(r.useContext)(u.a),j=d.syncTaquito,h=d.collect,b=d.curate,p=(d.claim_hDAO,d.acc);if(o){var x;x=i;var O=s.filter((function(e){return"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn"===e.holder_id})).length>0?s.filter((function(e){return"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn"===e.holder_id}))[0].quantity:"X";n=n.filter((function(e){return 2===parseInt(e.contract_version)&&0===parseInt(e.status)&&e.is_valid})),console.log(n);var m=Ct.minBy(n,(function(e){return Number(e.price)})),v=(Ct.maxBy(n,(function(e){return Number(e.price)})),"");try{v=void 0!==n[0]?"collect for "+Number(m.price)/1e6+" tez":"not for sale"}catch(w){v="not for sale"}var g=f.l.ISSUER,y=f.l.COLLAB;a.address.substring(0,2);return Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)("div",{style:{height:"30px"}}),Object(_.jsxs)("div",{className:wt.a.container,children:[Object(_.jsxs)("div",{className:wt.a.edition,children:[Object(_.jsx)("div",{className:wt.a.inline,children:Object(_.jsx)(F.a,{to:"/tz/".concat(a.address),children:a.name?Object(_.jsx)(F.c,{children:encodeURI(a.name)}):Object(_.jsx)(F.c,{children:I(a.address)})})}),!c&&Object(_.jsx)("div",{children:Object(_.jsx)("p",{children:Object(_.jsxs)("span",{children:["Editions:",Object(_.jsxs)("span",{children:[O,"/",x]})]})})})]}),c&&Object(_.jsx)("div",{className:wt.a.objktContainer,children:Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t),disabled:o,children:Object(_.jsxs)(F.c,{children:["OBJKT#",t]})})})]}),o&&!l&&Object(_.jsxs)("div",{className:wt.a.spread,children:[Object(_.jsxs)("p",{style:{paddingBottom:"7.5px"},children:["OBJKT#",t]}),Object(_.jsx)(F.a,{onClick:function(){null==p?j():h(m.id,1*m.price)},children:Object(_.jsx)(F.d,{children:v})})]}),Object(_.jsx)("div",{className:wt.a.spread,children:Object(_.jsx)(F.a,{onClick:function(){return b(t)},children:Object(_.jsx)(F.c,{children:Object(_.jsx)("span",{className:wt.a.top,"data-position":"top","data-tooltip":"curate",children:"\u3007"})})})})]})}return Object(_.jsx)("div",{className:wt.a.container,children:Object(_.jsxs)("div",{className:wt.a.edition,children:[Object(_.jsx)("div",{className:wt.a.inline,children:Object(_.jsx)(F.a,{to:"/tz/".concat(null===a||void 0===a?void 0:a.address),children:(null===a||void 0===a?void 0:a.name)?Object(_.jsx)(F.c,{children:encodeURI(null===a||void 0===a?void 0:a.name)}):Object(_.jsx)(F.c,{children:I(null===a||void 0===a?void 0:a.address)})})}),Object(_.jsxs)("div",{className:wt.a.objktContainer,children:[Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t),children:Object(_.jsxs)(F.c,{children:["OBJKT#",t]})}),Object(_.jsx)(F.a,{onClick:function(){return b(t)},children:Object(_.jsx)(F.c,{children:Object(_.jsx)("span",{className:wt.a.top,"data-position":"top","data-tooltip":"curate",children:"\u3007"})})})]})]})})},Tt=n(432),At=n.n(Tt),Ft=function(e){return Object(_.jsxs)(A.b,{children:[Object(_.jsxs)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(e.id),children:[Object(_.jsx)(M.a,{children:"Go to OBJKT: ".concat(e.title)}),Object(_.jsx)("div",{className:At.a.container,children:Ke({mimeType:e.mime,artifactUri:e.artifact_uri,displayUri:e.display_uri,creator:e.creator_id,objkt:String(e.id),displayView:!0})})]}),Object(_.jsx)("div",{style:{paddingLeft:"15px",paddingRight:"15px"},children:Object(_.jsx)(Nt,Object(v.a)({},e))})]})},zt=n(57),Bt=n(102),Pt='\nquery LatestFeed($lastId: bigint = 99999999) {\n hic_et_nunc_token(order_by: {id: desc}, limit: 10, where: {id: {_lt: $lastId}, artifact_uri: {_neq: ""}}) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n creator {\n name\n address\n }\n }\n}';function Lt(e){return It.apply(this,arguments)}function It(){return(It=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Mt(Pt,"LatestFeed",{lastId:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mt(e,t,n){return qt.apply(this,arguments)}function qt(){return(qt=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ut=function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,zt.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json").then((function(e){return e.data}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Vt=function(e){var t,n,a=e.type,c=Object(r.useState)(!1),s=Object(o.a)(c,2),i=s[0],l=(s[1],Object(r.useState)([])),u=Object(o.a)(l,2),d=u[0],j=u[1],p=Object(r.useState)(0),f=Object(o.a)(p,2),x=f[0],O=(f[1],Object(r.useState)(999999)),m=Object(o.a)(O,2),g=m[0],y=(m[1],Object(r.useState)(0)),w=Object(o.a)(y,2),k=(w[0],w[1],Object(r.useState)(!0)),S=Object(o.a)(k,2),C=S[0],N=(S[1],Object(r.useState)([])),T=Object(o.a)(N,2),F=T[0],z=T[1],B=(t=Date.now(),n=6e4,Math.floor(t/n),function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,P(Math.min.apply(Math,d.map((function(e){return e.id}))));case 2:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}());Object(r.useEffect)(Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!i){e.next=3;break}return console.log("returning on error"),e.abrupt("return");case 3:return e.next=5,P(g);case 5:case"end":return e.stop()}}),e)}))),[x,a]);var P=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Lt(t);case 2:return n=e.sent,z([].concat(Object(yt.a)(F),[n.map((function(e){return e.creator_id}))])),n=Bt.uniqBy(n,"creator_id"),z(F.concat(n.map((function(e){return e.creator_id})))),n=n.filter((function(e){return!F.includes(e.creator_id)})),e.next=9,Ut();case 9:r=e.sent,n=n.filter((function(e){return!r.includes(e.creator_id)})),a=d.concat(n),j(a);case 13:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();return Object(_.jsx)(A.c,{title:"",children:d.length>0?Object(_.jsxs)(A.a,{xlarge:!0,children:[Object(_.jsx)(Je.a,{dataLength:d.length,next:B,hasMore:C,loader:void 0,endMessage:Object(_.jsxs)("p",{children:["mint mint mint"," ",Object(_.jsx)("span",{role:"img","aria-labelledby":"Sparkles emoji",children:"\u2728"})]}),children:Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:d.map((function(e,t){return Object(_.jsx)(Ft,Object(v.a)({},e),"".concat(e.id,"-").concat(t))}))})})}),"\xa0"]}):Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(D.a,{})})})})},Dt=n(433),Et=n.n(Dt),Ht=n(54),Kt=n(199),Rt=n(175),Gt=n.n(Rt),Jt=function(e){var t=e.token_tags,n=e.preview;return console.log(t),n?Object(_.jsx)("div",{className:Gt.a.container,children:t.filter((function(e){return""!==e})).map((function(e,t){return Object(_.jsx)(F.a,{to:"".concat(f.l.TAGS,"/").concat(encodeURI(e)),children:Object(_.jsx)("div",{className:Gt.a.tag,children:e})},"tag".concat(e).concat(t))}))}):Object(_.jsx)("div",{className:Gt.a.container,children:t.filter((function(e){return""!==e.tag.tag})).map((function(e,t){return Object(_.jsx)("a",{href:"".concat(f.l.TAGS,"/").concat(encodeURI(e.tag.tag)),children:Object(_.jsx)("div",{className:Gt.a.tag,children:e.tag.tag})},"tag".concat(e.tag.tag).concat(t))}))})};function Wt(){return Object(_.jsxs)("div",{className:we.a.warning,children:[Object(_.jsx)("p",{children:"IMPORTANT: Please read the guide before minting!"}),Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/wiki/Interactive-OBJKTs",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"Interactive OBJKTs Guide"})})})]})}var Zt=n(153),Qt=n.n(Zt);function Yt(e){return e===f.i.ZIP||e===f.i.ZIP1||e===f.i.ZIP2}var $t=function(e){var t=e.title,n=e.description,r=e.mimeType,a=e.previewUri,c=e.tags,s=""!==c?c.replace(/\s/g,"").split(","):[];return Object(_.jsxs)("div",{className:Qt.a.container,children:[Yt(r)&&Object(_.jsx)(Wt,{}),Object(_.jsx)("div",{className:Qt.a.media,children:Ke({mimeType:r,previewUri:a,interactive:!0,preview:!0,displayView:!0})}),Object(_.jsxs)("div",{className:Qt.a.info,children:[Object(_.jsx)("div",{className:Qt.a.title,children:t}),Object(_.jsx)("div",{className:Qt.a.description,children:n}),Object(_.jsx)(Jt,{token_tags:s,preview:!0})]})]})},Xt=n(191).create,en=n(19).Buffer,tn=n(57),nn=n(953).default,rn=n(135).getCoverImagePathFromBuffer,an="https://ipfs.infura.io:5001",cn=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r,a,c,s,i,o,l,u,d,j,b,p,x;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,r=t.description,a=t.tags,c=t.address,s=t.buffer,i=t.mimeType,o=t.cover,t.thumbnail,l=t.generateDisplayUri,u=Xt(an),e.next=4,u.add(new Blob([s]));case 4:if(d=e.sent,console.log(d),j="ipfs://".concat(d.path),b="",!l){e.next=14;break}return e.next=11,u.add(new Blob([o.buffer]));case 11:p=e.sent,console.log(p),b="ipfs://".concat(p.path);case 14:return x=f.e,e.next=17,dn({name:n,description:r,tags:a,cid:j,address:c,mimeType:i,displayUri:b,thumbnailUri:x});case 17:return e.abrupt("return",e.sent);case 18:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),sn=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r,a,c,s,i,o,l,u,d,j,b,p,x;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,r=t.description,a=t.tags,c=t.address,s=t.files,i=t.cover,t.thumbnail,o=t.generateDisplayUri,e.next=3,ln(s);case 3:if(l=e.sent,u="ipfs://".concat(l.directory),d=Xt(an),j="",!o){e.next=15;break}return e.next=10,d.add(i.buffer);case 10:b=e.sent,p=b.path,j="ipfs://".concat(p),e.next=16;break;case 15:l.cover&&(j="ipfs://".concat(l.cover));case 16:return x=f.e,e.next=19,dn({name:n,description:r,tags:a,cid:u,address:c,mimeType:f.f,displayUri:j,thumbnailUri:x});case 19:return e.abrupt("return",e.sent);case 20:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();function on(e){return e.blob.type!==f.f}function ln(e){return un.apply(this,arguments)}function un(){return(un=Object(b.a)(h.a.mark((function e(t){var n,r,a,c,s,i,o,l,u,d,j;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=t.filter(on),n=new FormData,t.forEach((function(e){n.append("file",e.blob,encodeURIComponent(e.path))})),r="".concat(an,"/api/v0/add?pin=true&recursive=true&wrap-with-directory=true"),e.next=6,tn.post(r,n,{headers:{"Content-Type":"multipart/form-data"}});case 6:if(a=e.sent,c=nn(a.data),s=null,!(i=t.find((function(e){return"index.html"===e.path})))){e.next=16;break}return e.next=13,i.blob.arrayBuffer();case 13:o=e.sent,(l=rn(o))&&(u=c.find((function(e){return e.Name===l})))&&(s=u.Hash);case 16:return d=c.find((function(e){return""===e.Name})),j=d.Hash,e.abrupt("return",{directory:j,cover:s});case 19:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function dn(e){return jn.apply(this,arguments)}function jn(){return(jn=Object(b.a)(h.a.mark((function e(t){var n,r,a,c,s,i,o,l,u,d,j;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=t.name,r=t.description,a=t.tags,c=t.cid,s=t.address,i=t.mimeType,o=t.displayUri,l=void 0===o?"":o,u=t.thumbnailUri,d=void 0===u?f.e:u,j=Xt(an),e.next=4,j.add(en.from(JSON.stringify({name:n,description:r,tags:a.replace(/\s/g,"").split(","),symbol:"OBJKT",artifactUri:c,displayUri:l,thumbnailUri:d,creators:[s],formats:[{uri:c,mimeType:i}],decimals:0,isBooleanAmount:!1,shouldPreferSymbol:!1})));case 4:return e.abrupt("return",e.sent);case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var hn={quality:.85,maxWidth:1024,maxHeight:1024},bn={quality:.85,maxWidth:350,maxHeight:350},pn=!0,fn=n(434),xn=n.n(fn),On=function(e){var t=e.children,n=void 0===t?null:t;return Object(_.jsx)("div",{className:xn.a.container,children:n})},mn=(n(410),n(275)),vn=n.n(mn),gn=function(e){var t=e.owners;e.creator_id,e.acc,e.swaps,e.cancelv1;return t=t.filter((function(e){return"tz1burnburnburnburnburnburnburjAYjjX"!==e.holder_id&&"KT1HbQepzV1nVGg8QVznG7z4RcHseD5kwqBn"!==e.holder_id})),Object(_.jsx)("div",{className:vn.a.container,children:t.map((function(e,t){var n=e.quantity,r=e.holder_id,a=e.holder;e.creator_id;return Object(_.jsxs)("div",{className:vn.a.owner,children:[n,"\xa0ed.\xa0",a.name?Object(_.jsx)(F.a,{to:"/tz/".concat(r),children:Object(_.jsx)(F.c,{children:encodeURI(a.name)})}):"KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9"!==r?Object(_.jsx)(F.a,{to:"/tz/".concat(r),children:Object(_.jsx)(F.c,{children:I(r)})}):Object(_.jsx)(F.a,{to:"/tz/".concat(r),children:Object(_.jsx)(F.c,{children:"OBJKTSWAP V1"})})]},"".concat(r,"-").concat(t))}))})},yn=n(126),_n=n.n(yn),wn=(n(57),function(e,t){return Number(e.xtz_per_objkt)-Number(t.xtz_per_objkt)}),kn=function(e){var t=e.swaps,n=e.handleCollect,r=e.acc,a=e.cancel,c=e.restricted,s=e.ban,i=e.cancelv1,o=t.filter((function(e){return 2===parseInt(e.contract_version)&&0===parseInt(e.status)&&e.is_valid})),l=t.filter((function(e){return 1===parseInt(e.contract_version)&&0===parseInt(e.status)}));return Object(_.jsxs)("div",{className:_n.a.container,children:[l.length>0&&Object(_.jsx)("div",{children:l.map((function(e,t){return r&&r.address==e.creator_id?Object(_.jsx)("div",{children:Object(_.jsxs)("div",{className:_n.a.swap,children:[Object(_.jsxs)("div",{className:_n.a.issuer,children:[e.amount_left," ed.\xa0",Object(_.jsx)(F.a,{to:"/tz/KT1Hkg5qeNhfwpKW4fXvq7HGZB9z2EnmCCA9",children:Object(_.jsx)(F.c,{children:"OBJKTSWAP V1"})})]}),Object(_.jsx)("div",{className:_n.a.buttons,children:Object(_.jsx)(F.a,{onClick:function(){return i(e.id)},children:Object(_.jsx)(F.d,{children:"cancel"})})})]},"".concat(e.id,"-").concat(t))}):void 0}))}),o.sort(wn).map((function(e,t){return Object(_.jsxs)("div",{className:_n.a.swap,children:[Object(_.jsxs)("div",{className:_n.a.issuer,children:[e.amount_left," ed.\xa0",e.creator.name?Object(_.jsx)(F.a,{to:"/tz/".concat(e.creator.address),children:Object(_.jsx)(F.c,{children:encodeURI(e.creator.name)})}):Object(_.jsx)(F.a,{to:"/tz/".concat(e.creator.address),children:Object(_.jsx)(F.c,{children:I(e.creator.address)})})]}),Object(_.jsxs)("div",{className:_n.a.buttons,children:[!c&&!s.includes(e.creator_id)&&Object(_.jsx)(F.a,{onClick:function(){return n(e.id,e.price)},children:Object(_.jsxs)(F.d,{children:["collect for ",parseFloat(e.price/1e6)," tez"]})}),e.creator.address===(void 0!==r?r.address:"")&&Object(_.jsx)(F.a,{onClick:function(){return a(e.id)},children:Object(_.jsx)(F.d,{children:"cancel"})})]})]},"".concat(e.id,"-").concat(t))}))]})},Sn=n(102),Cn=(n(102),n(411)),Nn=n(152),Tn=n.n(Nn),An=n(57),Fn=[{title:"info",component:function(e){var t=e.title,n=e.description,r=e.metadata,a=e.token_tags,c=e.mime,s=e.artifact_uri;e.royalties,e.timestamp;console.log(e);var i="https://ipfs.io/ipfs/",o={"&:hover":{textDecoration:"underline"},color:"var(--text-color)"};return Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("div",{style:{fontFamily:"monospace",fontWeight:"bold",fontSize:"20px"},children:t})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("div",{style:{whiteSpace:"pre-wrap"},children:n})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Jt,{token_tags:a})})}),Object(_.jsxs)(A.a,{children:[Object(_.jsxs)(A.b,{children:["mimetype: ",c]}),Object(_.jsx)(A.b,{className:"tag",children:Object(_.jsxs)("div",{children:[Object(_.jsx)("br",{}),Object(_.jsx)("a",{style:o,href:r.replace("ipfs://",i),children:"metadata"}),"\xa0//\xa0",Object(_.jsx)("a",{style:o,href:s.replace("ipfs://",i),children:"view on ipfs"})]})})]})]})}},{title:"listings",component:function(e){e.owners;var t=e.swaps,n=e.token_holders,a=e.restricted,c=e.ban,s=Object(r.useContext)(u.a),i=s.syncTaquito,o=s.collect,l=s.acc,d=s.getAccount,j=s.cancel,h=s.cancelv1;t=Sn.orderBy(t,"price","asc");return Object(_.jsxs)(_.Fragment,{children:[t.length>0&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(kn,{swaps:t,handleCollect:function(e,t){null==l?(i(),d()):o(e,t)},acc:l,cancel:j,cancelv1:h,restricted:a,ban:c})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(gn,{owners:n,acc:l,swaps:t})})})]})}},{title:"history",component:function(e){var t=e.trades.map((function(e){return e.trade=!0,e})),n=e.swaps.map((function(e){return e.trade=!1,e})),r=[].concat(Object(yt.a)(t),Object(yt.a)(n)).sort((function(e,t){return Date.parse(e.timestamp)-Date.parse(t.timestamp)})).reverse();return Object(_.jsx)("div",{children:Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[r.map((function(e){return e.trade?Object(_.jsxs)("div",{className:Tn.a.history,children:["trade ",e.timestamp," ",encodeURI(e.seller.name)?Object(_.jsx)("span",{children:Object(_.jsxs)("a",{href:"/tz/".concat(encodeURI(e.seller.address)),children:[" ",Object(_.jsxs)(F.c,{children:["\xa0",encodeURI(e.seller.name)]})]})}):Object(_.jsx)("span",{children:Object(_.jsx)("a",{href:"/tz/".concat(e.seller.address),children:Object(_.jsxs)(F.c,{children:["\xa0",I(e.seller.address)]})})}),"\xa0",e.amount," ed. ",parseFloat(e.swap.price/1e6)," tez",e.buyer.name?Object(_.jsx)("span",{children:Object(_.jsx)("a",{href:"/".concat(encodeURI(e.buyer.name)),children:Object(_.jsxs)(F.c,{children:["\xa0",encodeURI(e.buyer.name)]})})}):Object(_.jsx)("span",{children:Object(_.jsx)("a",{href:"/tz/".concat(e.buyer.address),children:Object(_.jsxs)(F.c,{children:["\xa0",I(e.buyer.address)]})})})]}):Object(_.jsxs)("div",{className:Tn.a.history,children:["swap ",e.timestamp," ",e.creator.name?Object(_.jsx)("span",{children:Object(_.jsx)("a",{href:"/tz/".concat(e.creator.address),children:Object(_.jsxs)(F.c,{children:["\xa0",encodeURI(e.creator.name),"\xa0"]})})}):Object(_.jsx)("span",{children:Object(_.jsx)("a",{href:"/tz/".concat(e.creator.address),children:Object(_.jsxs)(F.c,{children:["\xa0",I(e.creator.address)]})})})," ",e.amount," ed. ",parseFloat(e.price/1e6)," tez"]})})),"minted ",e.timestamp," ",e.supply," ed. ",e.royalties/10,"% royalties"]})})})}},{title:"swap",component:function(e){e.total_amount,e.owners;var t=e.creator,n=e.royalties,a=(e.token_info,e.address,e.restricted,Object(l.h)().id),c=Object(r.useContext)(u.a),s=(c.swap,c.swapv2),i=c.acc,d=c.swap_hDAO,j=c.progress,h=c.setProgress,b=c.message,p=c.setMessage,f=Object(r.useState)(),x=Object(o.a)(f,2),O=x[0],m=x[1],v=Object(r.useState)(),g=Object(o.a)(v,2),y=g[0],w=g[1],k=Object(r.useState)("tez"),S=Object(o.a)(k,2),C=S[0],N=S[1];return Object(_.jsx)(_.Fragment,{children:j?Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{children:[Object(_.jsx)("p",{children:b}),j&&Object(_.jsx)(D.a,{})]})})}):Object(_.jsxs)("div",{children:[Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(Ht.a,{type:"number",placeholder:"OBJKT quantity",min:1,defaultValue:O,onChange:function(e){return m(e.target.value)},onWheel:function(e){return e.target.blur()},disabled:j}),Object(_.jsxs)("div",{style:{width:"100%",display:"flex"},children:[Object(_.jsx)("div",{style:{width:"90%"},children:Object(_.jsx)(Ht.a,{style:{width:"75% !important"},type:"number",placeholder:"price per OBJKT",min:0,max:1e4,onChange:function(e){return(t=e.target.value)<=.1?(w(t),p("please note that items intended to be giveaways can be collected in multiple editions and resold in large quantities. please ensure you are happy with the quantity and price chosen before swapping")):(w(t),p("")),void(""===t&&(w(t),p("")));var t},onWheel:function(e){return e.target.blur()},disabled:j})}),Object(_.jsx)("div",{children:Object(_.jsx)("select",{onChange:function(e){return N(e.target.value)},style:{float:"right",display:"inline"},children:Object(_.jsx)("option",{value:"tezos",children:"tez"})})})]}),Object(_.jsx)(F.a,{onClick:function(){console.log(C),O&&""!==O&&y&&""!==y?(h(!0),p("preparing swap"),console.log(i.address,n,1e6*parseFloat(y),a,t.address,parseFloat(O)),"tez"===C&&s(i.address,n,1e6*parseFloat(y),a,t.address,parseFloat(O)).then((function(e){h(!1),p(e.description)})).catch((function(e){h(!1),p("error")})),"hDAO"===C&&d(i.address,n,1e6*parseFloat(y),a,t.address,parseFloat(O)).then((function(e){h(!1),p(e.description)})).catch((function(e){h(!1),p("error")}))):alert("invalid input")},fit:!0,disabled:j,children:Object(_.jsx)(F.d,{children:"swap"})})]})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:"swaps which carry values are charged with a 2.5% fee for platform maintenance"})})})]})})},private:!0,restricted:!0},{title:"burn",component:Cn.a,private:!0}],zn='\nquery objkt($id: bigint!) {\n hic_et_nunc_token_by_pk(id: $id) {\nid\nmime\ntimestamp\ndisplay_uri\ndescription\nartifact_uri\nmetadata\ncreator {\n address\n name\n}\nthumbnail_uri\ntitle\nsupply\nroyalties\nswaps {\n amount\n amount_left\n id\n price\n timestamp\n creator {\n address\n name\n }\n contract_version\n status\n royalties\n creator_id\n is_valid\n}\ntoken_holders(where: {quantity: {_gt: "0"}}) {\n holder_id\n quantity\n holder {\n name\n }\n}\ntoken_tags {\n tag {\n tag\n }\n}\ntrades(order_by: {timestamp: asc}) {\n amount\n swap {\n price\n }\n seller {\n address\n name\n }\n buyer {\n address\n name\n }\n timestamp\n}\n}\n}\n';function Bn(e){return Pn.apply(this,arguments)}function Pn(){return(Pn=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Ln(zn,"objkt",{id:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token_by_pk,console.log(c),e.abrupt("return",c);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ln(e,t,n){return In.apply(this,arguments)}function In(){return(In=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Mn=n(57),qn=n.n(Mn),Un=function(e){var t=e.collabData,n=Object(r.useState)({}),a=Object(o.a)(n,2),c=a[0],s=a[1];return Object(r.useEffect)((function(){m(t.address).then((function(e){var t=e.data;return s(t)}))}),[t.address]),Object(_.jsx)(i.b,{className:St.a.link,to:"".concat(f.l.ISSUER,"/").concat(t.address),children:c.alias||t.address})},Vn=function(e){var t=e.collaborators;return Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("h1",{children:t.length>0&&Object(_.jsxs)(r.Fragment,{children:[Object(_.jsx)("span",{children:"A collaboration between "}),t.map((function(e,n){return[n>0&&n<t.length-1&&", ",n===t.length-1&&" and ",Object(_.jsx)(Un,{collabData:e},e.address)]}))]})})})})},Dn=function(e){var t=/^.*(tz[\w\d]{34}).*$/i.exec(e.trim());if(!t){t=/^.*(kt[\w\d]{34}).*$/i.exec(e.trim())}return!!t&&t[1]},En=function(e){return e.reduce((function(e,t){return(t.shares||0)+e}),0)},Hn=[{name:"H=N Tezos Fountain",address:"tz1eggoxCes1qYRGLc3E1bg4uzuCUUuuQBb9"},{name:"three.js",address:"tz1ZUohCAkGjp7vPjQcC4VWcpgYZR1t3Si5C"},{name:"Processing",address:"tz1aPHze1U5BEEKrGYt3dvY6aAQEeiWm8jjK"}],Kn={address:"",shares:void 0},Rn=[1,5,10],Gn=[{address:"tz1YJvMiZyXnzvV9pxtAiuCFvaG7XoBZhbUQ",shares:50},{address:"tz2Hz4TVJZjoQVks4SfWgt38RfZTmrHmVH62",shares:50}],Jn=function(e){var t=e.onSelect;return Object(_.jsx)("div",{className:St.a.tipSelect,children:Rn.map((function(e){return Object(_.jsxs)("button",{onClick:function(){return t(e)},children:[e,isNaN(e)?"":"%"]},"btn-".concat(e))}))})},Wn=n(136),Zn=n.n(Wn),Qn=function(e){var t=e.benefactor,n=e.onUpdate,a=e.onAdd,c=e.onRemove,s=e.onPasteMulti,i=e.onSelectPercentage,l=e.minimalView,u=Object(r.useState)(),d=Object(o.a)(u,2),j=d[0],h=d[1],b=Object(r.useState)(t.address),p=Object(o.a)(b,2),f=p[0],x=p[1],O=Object(r.useState)(t.shares),g=Object(o.a)(O,2),y=g[0],w=g[1];Object(r.useEffect)((function(){var e=t.address,n=t.shares;!j&&e&&m(e).then((function(e){var t=e.data;return h(t)})),j&&!e&&h(),x(e),w(n)}),[t]);var k=function(e,r){if(r.replace(/\r/g,"").split(/\n/).length>1)s(r);else{var a=Object(v.a)(Object(v.a)({},t),{},Object(ne.a)({},e,isNaN(r)?r:Number(r)));n(a)}},S=pe()(Zn.a.container,St.a.input),C=(j?j.alias:null)||"address ".concat(f?"":"(tz... or KT...)");return l?Object(_.jsxs)("tr",{className:St.a.row,children:[Object(_.jsx)("td",{className:St.a.addressCell,children:f}),Object(_.jsxs)("td",{className:St.a.sharesCell,children:[t.share,"%"]})]}):Object(_.jsxs)("tr",{className:St.a.row,children:[Object(_.jsx)("td",{className:St.a.addressCell,children:Object(_.jsx)("div",{className:S,children:Object(_.jsxs)("label",{children:[Object(_.jsx)("textarea",{rows:1,value:f||"",className:St.a.textInput,placeholder:"address (tz... or KT...)",autoFocus:!f||""===f,onChange:function(e){return k("address",e.target.value)}}),Object(_.jsx)("p",{children:C})]})})}),Object(_.jsx)("td",{className:St.a.sharesCell,children:Object(_.jsxs)("div",{className:S,children:[Object(_.jsxs)("label",{children:[Object(_.jsx)("input",{type:"number",label:"shares",placeholder:"shares",value:y||"",onKeyDown:function(e){13===e.keyCode&&a&&a(t)},autoFocus:Boolean(f),onChange:function(e){return k("shares",e.target.value)}}),Object(_.jsx)("p",{children:"shares"})]}),!y&&i&&Object(_.jsx)(Jn,{onSelect:i})]})}),Object(_.jsx)("td",{className:St.a.actionCell,children:Object(_.jsx)(F.a,{onClick:c,children:Object(_.jsx)(F.e,{children:Object(_.jsx)(nr,{})})})})]})},Yn=function(e){var t,n=e.benefactors,a=e.onSelect,c=Object(r.useState)(!1),s=Object(o.a)(c,2),i=s[0],l=s[1],u=n.map((function(e){return e.address})),d=n.filter((function(e){return e.address&&e.shares})),j=Hn.filter((function(e){return-1===u.indexOf(e.address)})),h=pe()(St.a.btn,(t={},Object(ne.a)(t,St.a.muted,i||j.length<Hn.length||d.length>0),Object(ne.a)(t,St.a.absolute,i),t));return j.length>0?Object(_.jsxs)("div",{className:i?St.a.projectList:null,children:[Object(_.jsx)("button",{className:h,onClick:function(){return l(!i)},children:Object(_.jsx)(F.e,{children:i?"close":"choose from popular projects"})}),i&&Object(_.jsx)("ul",{className:St.a.list,children:j.map((function(e){var t=e.name,n=e.address;return Object(_.jsx)("li",{children:Object(_.jsx)("button",{className:St.a.btn,onClick:function(){return function(e,t){a(e,t),l(!1)}(n,t)},children:t})},n)}))})]}):null},$n=function(e){var t=e.collaborators,n=e.onClick,r=e.threshold,a=void 0===r?2:r,c=t.filter((function(e){return e.shares&&e.address}));return Object(_.jsx)("div",{className:St.a.mt3,children:Object(_.jsx)(F.a,{onClick:n,disabled:c.length<a,className:St.a.btnSecondary,children:Object(_.jsx)(F.d,{children:0===c.length?"skip":"next"})})})},Xn=function(e){var t,n,a=e.benefactors,c=e.setBenefactors,s=e.onSelectPercentage,i=e.totalParticipants,l=e.onComplete,u=Object(r.useState)(""),d=Object(o.a)(u,2),j=d[0],h=d[1],b=function(e,t){var n=a.filter((function(e){return e.address})),r=Object(v.a)(Object(v.a)({},Kn),{},{address:e||"",name:t});c([].concat(Object(yt.a)(n),[r]))};if(j.length){var p=a.filter((function(e){return e.address})).map((function(e){return e.address})),f=j.replace(/\r/g,"").split(/\n/).map((function(e){return Dn(e)})).filter((function(e){return e})),x=p.concat(f).map((function(e){return Object(v.a)(Object(v.a)({},Kn),{},{address:e})}));c(x),h("")}var O=pe()(St.a.mt3,(t={},Object(ne.a)(t,St.a.mb1,0===a.length),Object(ne.a)(t,St.a.mb2,a.length>0),t)),m=pe()(St.a.muted,(n={},Object(ne.a)(n,St.a.mb1,0===a.length),Object(ne.a)(n,St.a.mb2,a.length>0),n)),g=a.filter((function(e){return e.address&&e.shares})),y=a[a.length-1],w=!y||!y.address,k=i===a.length;console.log("Total",i,"ben",a.length);var S=k?null:function(e,t){return s(e,t)};return Object(_.jsxs)(r.Fragment,{children:[Object(_.jsx)("h2",{className:O,children:Object(_.jsx)("strong",{children:"benefactors"})}),0===a.length&&Object(_.jsx)("p",{className:m,children:"Do you want to include anyone that wasn\u2019t a collaborator, eg. a donation to the H=N Tezos Fountain?"}),0===a.length&&Object(_.jsx)("button",{className:St.a.btn,onClick:function(){return b()},children:Object(_.jsx)(F.e,{children:"add address manually"})}),a.length>0&&Object(_.jsxs)("table",{className:St.a.table,children:[Object(_.jsx)("tbody",{children:a.map((function(e,t){return Object(_.jsx)(Qn,{benefactor:e,onUpdate:function(e){return function(e,t){var n=Object(yt.a)(a);n[e]=Object(v.a)(Object(v.a)({},t),{},{share:t.percentage}),c(Object(yt.a)(n))}(t,e)},onRemove:function(){return function(e){var t=Object(yt.a)(a);t.splice(e,1),c(t)}(t)},onAdd:b,onPasteMulti:h,onSelectPercentage:function(e){return S(t,e)}},"benefactor-".concat(t))}))}),a.filter((function(e){return e.address})).length>0&&Object(_.jsx)("tfoot",{children:Object(_.jsx)("tr",{children:Object(_.jsx)("td",{children:Object(_.jsx)("button",{className:St.a.btn,onClick:function(){return b()},disabled:w,children:"add another benefactor"})})})})]}),Object(_.jsx)(Yn,{benefactors:a,onSelect:b}),g.length>0&&i>=2&&Object(_.jsx)($n,{threshold:i-g.length,collaborators:a,onClick:l}),(0===g.length||i<2)&&Object(_.jsxs)("div",{className:St.a.mt2,children:[i>2&&Object(_.jsx)(F.a,{onClick:l,children:Object(_.jsx)(F.d,{children:"Skip"})}),i<2&&Object(_.jsx)("p",{className:St.a.muted,children:"You need to have at least two participants to create a collaborative contract"})]})]})},er=function(e){var t=e.collaborator,n=e.onUpdate,a=e.onAdd,c=e.onRemove,s=e.onPasteMulti,i=e.minimalView,l=e.onEdit,u=Object(r.useState)(),d=Object(o.a)(u,2),j=d[0],h=d[1],b=Object(r.useState)(t.address),p=Object(o.a)(b,2),f=p[0],x=p[1],O=Object(r.useState)(t.shares),g=Object(o.a)(O,2),y=g[0],w=g[1];Object(r.useEffect)((function(){var e=t.address,n=t.shares;!j&&e&&m(e).then((function(e){var t=e.data;return h(t)})),x(e),w(n)}),[t,j]);var k=function(e,r){if(r.replace(/\r/g,"").split(/\n/).length>1)s(r);else{var a=Object(v.a)(Object(v.a)({},t),{},Object(ne.a)({},e,isNaN(r)?r:Number(r)));n(a)}},S=pe()(Zn.a.container,St.a.input),C=j?j.alias:null,N=C||"address ".concat(f?"":"(tz... or KT...)");return i?Object(_.jsxs)("tr",{className:St.a.row,onClick:l,children:[Object(_.jsxs)("td",{className:St.a.cellWithPadding,children:[C&&Object(_.jsx)("p",{children:C}),Object(_.jsx)("span",{children:f})]}),Object(_.jsxs)("td",{className:St.a.cellWithPadding,children:[t.shares," shares"]})]}):Object(_.jsxs)("tr",{className:St.a.row,children:[Object(_.jsx)("td",{className:St.a.addressCell,children:Object(_.jsx)("div",{className:S,children:Object(_.jsxs)("label",{children:[Object(_.jsx)("textarea",{rows:1,className:St.a.textInput,onChange:function(e){return k("address",e.target.value)},placeholder:N,value:f||"",autoFocus:!f}),Object(_.jsx)("p",{children:N})]})})}),Object(_.jsx)("td",{className:St.a.sharesCell,children:Object(_.jsx)("div",{className:S,children:Object(_.jsxs)("label",{children:[Object(_.jsx)("input",{type:"number",onChange:function(e){return k("shares",e.target.value)},onKeyDown:function(e){13===e.keyCode&&a&&a(t)},placeholder:"shares",label:"shares",value:y||"",autoFocus:f&&!y}),Object(_.jsx)("p",{children:"shares"})]})})}),c&&Object(_.jsx)("td",{className:St.a.actionCell,children:Object(_.jsx)(F.a,{onClick:c,children:Object(_.jsx)(F.e,{children:Object(_.jsx)(nr,{})})})})]})},tr=function(e){var t=e.collaborators,n=e.setCollaborators,a=e.availableShares,c=e.minimalView,s=e.onEdit,i=Object(r.useState)(""),l=Object(o.a)(i,2),u=l[0],d=l[1],j=Object(r.useState)(!1),h=Object(o.a)(j,2),b=h[0],p=h[1],f=function(){n([].concat(Object(yt.a)(t),[Object(v.a)({},Kn)])),c&&s()};Object(r.useEffect)((function(){if(u.length){var e=t.filter((function(e){return e.address})).map((function(e){return e.address})),r=u.replace(/\r/g,"").split(/\n/).map((function(e){return Dn(e)})).filter((function(e){return e})),a=e.concat(r),c=Math.floor(100/a.length),s=a.map((function(e){return{address:e,shares:c}}));p(!0),n(s),d("")}0===t.length&&(b||n([Object(v.a)({},Kn)]))}),[u,t,n,b,p]);var x=t[t.length-1],O=!x||!x.address;return Object(_.jsx)("div",{children:Object(_.jsxs)("table",{className:St.a.table,children:[Object(_.jsx)("tbody",{children:t.map((function(e,r){return Object(_.jsx)(er,{collaborator:e,availableShares:a,onUpdate:function(e){return function(e,r){var a=Object(yt.a)(t);a[e]=r,n(Object(yt.a)(a))}(r,e)},onRemove:function(){return function(e){var r=Object(yt.a)(t);r.splice(e,1),n(r)}(r)},onAdd:f,onEdit:s,onPasteMulti:d,minimalView:c},"collaborator-".concat(r))}))}),t.filter((function(e){return e.address})).length>0&&Object(_.jsx)("tfoot",{children:Object(_.jsx)("tr",{children:Object(_.jsx)("td",{colSpan:c?2:3,children:Object(_.jsx)("button",{className:St.a.btn,onClick:function(){return f()},disabled:O,children:"add another collaborator"})})})})]})})},nr=function(){return Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 145.2 145.2",children:Object(_.jsx)("path",{fill:"#fff",d:"M145.2 15.7L129.8.3l-57.1 57-57-57L.3 15.7l57 57-57 57.1 15.4 15.4 57-57 57.1 57 15.4-15.4-57-57.1z"})})},rr=function(e){var t=e.collaborators,n=e.benefactors,a=e.onEdit,c=En(t)+En(n),s=t.length,i=n.length,o=Object(r.useContext)(u.a).originateProxy,l=function(){var e=Object(b.a)(h.a.mark((function e(){var r,a,c,s,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t[0].address,a={},c=t.filter((function(e){return e.shares})).map((function(e){return Object(v.a)(Object(v.a)({},e),{},{role:"collaborator"})})),s=n.filter((function(e){return e.shares})).map((function(e){return Object(v.a)(Object(v.a)({},e),{},{role:"benefactor"})})),i=c.concat(s),Object.values(i).forEach((function(e){return a[e.address]={share:parseFloat(Math.floor(1e3*e.shares)),isCore:"collaborator"===e.role}})),console.log("ReviewStage::originateContract - participantData",a),e.next=9,o(r,a);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("h1",{className:St.a.mb1,children:Object(_.jsx)("strong",{children:"review & create"})}),Object(_.jsxs)("p",{className:St.a.descriptive,children:["You have a total of ",c," shares divided between ",s+i," addresses. Percentages may not total 100% due to rounding."]}),Object(_.jsx)("h2",{className:St.a.mt3,children:"collaborators"}),t.length>0&&Object(_.jsxs)("table",{className:St.a.reviewTable,children:[Object(_.jsx)("thead",{children:Object(_.jsxs)("tr",{children:[Object(_.jsx)("th",{children:"address"}),Object(_.jsx)("th",{children:"shares"}),Object(_.jsx)("th",{style:{textAlign:"right"},children:"%"})]})}),Object(_.jsx)("tbody",{children:t.map((function(e){var t=e.address,n=e.shares,r=e.name,a=(n/c*100).toFixed(2);return Object(_.jsxs)("tr",{children:[Object(_.jsxs)("td",{className:St.a.cellWithPadding,children:[r&&Object(_.jsx)("p",{className:St.a.muted,children:r}),t]}),Object(_.jsx)("td",{className:St.a.cellWithPadding,children:n}),Object(_.jsx)("td",{className:St.a.cellWithPadding,style:{textAlign:"right"},children:a})]},t)}))})]}),0===t.length&&Object(_.jsx)("p",{className:St.a.muted,children:"No core collaborators"}),n.length>0&&Object(_.jsxs)(r.Fragment,{children:[Object(_.jsx)("h2",{className:St.a.mt3,children:"benefactors"}),Object(_.jsxs)("table",{className:St.a.reviewTable,children:[Object(_.jsx)("thead",{children:Object(_.jsxs)("tr",{children:[Object(_.jsx)("th",{children:"address"}),Object(_.jsx)("th",{children:"shares"}),Object(_.jsx)("th",{style:{textAlign:"right"},children:"%"})]})}),Object(_.jsx)("tbody",{children:n.map((function(e){var t=e.address,n=e.shares,r=e.name,a=(n/c*100).toFixed(2);return Object(_.jsxs)("tr",{children:[Object(_.jsxs)("td",{className:St.a.cellWithPadding,children:[r&&Object(_.jsx)("p",{className:St.a.muted,children:r}),t]}),Object(_.jsx)("td",{className:St.a.cellWithPadding,children:n}),Object(_.jsx)("td",{className:St.a.cellWithPadding,style:{textAlign:"right"},children:a})]},t)}))})]})]}),Object(_.jsx)("div",{className:St.a.mt3,children:Object(_.jsx)(F.a,{onClick:function(){return l()},children:Object(_.jsx)(F.b,{children:"create collaborative contract"})})}),Object(_.jsx)("button",{className:St.a.btn,onClick:a,children:"< go back"})]})})},ar=n(154),cr=n.n(ar),sr=[{title:"create collaboration",component:function(){var e=Object(r.useState)(!0),t=Object(o.a)(e,2),n=t[0],a=t[1],c=Object(r.useState)(Gn),s=Object(o.a)(c,2),i=s[0],l=s[1],u=Object(r.useState)([]),d=Object(o.a)(u,2),j=d[0],h=d[1],b=Object(r.useState)(!1),p=Object(o.a)(b,2),f=p[0],x=p[1],O=Object(r.useState)(!1),m=Object(o.a)(O,2),g=m[0],y=m[1],w=En(i)+En(j),k=i.filter((function(e){return e.shares&&e.address}));Object(r.useEffect)((function(){0===j.length&&x(!1)}),[g,j.length]),Object(r.useEffect)((function(){n||f||x(!0),0===k.length&&l([])}),[n,f]);var S=k.length+j.length,C=pe()(cr.a.mb2,cr.a.muted),N=!n&&(f||g),T=n||k.length>0;return g?Object(_.jsx)(rr,{collaborators:i,benefactors:j,onEdit:function(){return y(!1)}}):Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("h1",{className:0===k.length?cr.a.mb1:cr.a.mb2,children:Object(_.jsx)("strong",{children:"core collaborators"})}),0===k.length&&T&&Object(_.jsxs)(r.Fragment,{children:[Object(_.jsx)("p",{className:C,children:"Note: shares don\u2019t have to add up to 100% - splits are calculated as proportions of the total shares."}),Object(_.jsx)("p",{className:C,children:"You can paste multiple addresses to get an auto split"})]}),T&&Object(_.jsx)(tr,{collaborators:i,setCollaborators:l,minimalView:N,onEdit:function(){return a(!0)}}),!T&&Object(_.jsx)("p",{className:cr.a.muted,children:"No core collaborators"}),!N&&Object(_.jsx)($n,{threshold:0,collaborators:i,onClick:function(){return a(!1)}}),f&&Object(_.jsx)(Xn,{totalParticipants:S,totalShares:w,benefactors:j,setBenefactors:h,minimalView:g,onComplete:function(){return y(!0)},onSelectPercentage:function(e,t){return function(e,t){var n=j[e],r=Object(yt.a)(j);console.log("_calculateShares",e,t),r[e]=Object(v.a)(Object(v.a)({},n),{},{shares:Math.ceil(w*t/100)});var a=w-En(r),c=i.map((function(e){var t=e.shares/En(i),n=Math.floor(t*a*100)/100;return Object(v.a)(Object(v.a)({},e),{},{shares:n})}));h(r),l(c)}(e,t)}})]})})}},{title:"use collaboration",component:function(){var e=Object(r.useContext)(u.a),t=e.proxyAddress,n=e.setProxyAddress,a=e.originatedContract,c=Object(r.useState)(t),s=Object(o.a)(c,2),i=s[0],l=s[1],d=Object(r.useState)(!1),j=Object(o.a)(d,2),h=j[0],b=j[1];return Object(r.useEffect)((function(){a&&l(a.address)}),[a]),Object(r.useEffect)((function(){b(!1)}),[i]),Object(_.jsxs)(A.a,{children:[Object(_.jsx)(A.b,{children:Object(_.jsx)(Ht.a,{type:"text",onChange:function(e){return l(e.target.value)},placeholder:"collaborative contract address",label:"collaborative contract address",value:i})}),h&&Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:"Sorry - this is not a valid collaborative contract address"})}),!t&&Object(_.jsx)(A.b,{children:Object(_.jsx)(F.a,{onClick:function(){"KT"===i.substr(0,2)&&36===i.length?n(i):i.length>0&&b(!0)},fit:!0,children:Object(_.jsx)(F.b,{children:"Sign in with this collaborative contract"})})}),t&&Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{className:St.a.mt3,children:"You are now signed in with your collaborative address and can mint OBJKTs with it (copy TBC)"})})]})}}],ir=n(276),or=n.n(ir),lr=n(102);function ur(e){return dr.apply(this,arguments)}function dr(){return(dr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,jr('\n query Objkts($_in: [bigint!] = "") {\n hic_et_nunc_token(where: { id: {_in: $_in}}) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n hdao_balance\n }\n }',"Objkts",{_in:t});case 2:return n=e.sent,n.errors,r=n.data,e.abrupt("return",r.hic_et_nunc_token);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function jr(e,t,n){return hr.apply(this,arguments)}function hr(){return(hr=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}n(207);var br=n(435),pr=n.n(br),fr=function(e){var t=e.site,n=e.telegram,r=e.twitter,a=e.instagram,c=e.github,s=e.reddit;return Object(_.jsxs)("div",{className:pr.a.container,children:[t&&Object(_.jsxs)(F.a,{href:t,children:[Object(_.jsx)(M.a,{children:t}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm7.5-6.923c-.67.204-1.335.82-1.887 1.855A7.97 7.97 0 0 0 5.145 4H7.5V1.077zM4.09 4a9.267 9.267 0 0 1 .64-1.539 6.7 6.7 0 0 1 .597-.933A7.025 7.025 0 0 0 2.255 4H4.09zm-.582 3.5c.03-.877.138-1.718.312-2.5H1.674a6.958 6.958 0 0 0-.656 2.5h2.49zM4.847 5a12.5 12.5 0 0 0-.338 2.5H7.5V5H4.847zM8.5 5v2.5h2.99a12.495 12.495 0 0 0-.337-2.5H8.5zM4.51 8.5a12.5 12.5 0 0 0 .337 2.5H7.5V8.5H4.51zm3.99 0V11h2.653c.187-.765.306-1.608.338-2.5H8.5zM5.145 12c.138.386.295.744.468 1.068.552 1.035 1.218 1.65 1.887 1.855V12H5.145zm.182 2.472a6.696 6.696 0 0 1-.597-.933A9.268 9.268 0 0 1 4.09 12H2.255a7.024 7.024 0 0 0 3.072 2.472zM3.82 11a13.652 13.652 0 0 1-.312-2.5h-2.49c.062.89.291 1.733.656 2.5H3.82zm6.853 3.472A7.024 7.024 0 0 0 13.745 12H11.91a9.27 9.27 0 0 1-.64 1.539 6.688 6.688 0 0 1-.597.933zM8.5 12v2.923c.67-.204 1.335-.82 1.887-1.855.173-.324.33-.682.468-1.068H8.5zm3.68-1h2.146c.365-.767.594-1.61.656-2.5h-2.49a13.65 13.65 0 0 1-.312 2.5zm2.802-3.5a6.959 6.959 0 0 0-.656-2.5H12.18c.174.782.282 1.623.312 2.5h2.49zM11.27 2.461c.247.464.462.98.64 1.539h1.835a7.024 7.024 0 0 0-3.072-2.472c.218.284.418.598.597.933zM10.855 4a7.966 7.966 0 0 0-.468-1.068C9.835 1.897 9.17 1.282 8.5 1.077V4h2.355z"})})]}),n&&Object(_.jsxs)(F.a,{href:"https://t.me/".concat(n),children:[Object(_.jsx)(M.a,{children:"https://t.me/".concat(n)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M6,13.9l0.2-3.8L13.1,4c0.3-0.3-0.1-0.4-0.5-0.2L4.2,9.2L0.6,8c-0.8-0.2-0.8-0.8,0.2-1.2l14.2-5.5c0.6-0.3,1.3,0.2,1,1.2l-2.4,11.4c-0.2,0.8-0.7,1-1.3,0.6l-3.7-2.7l-1.8,1.7C6.6,13.7,6.4,13.9,6,13.9z"})})]}),r&&Object(_.jsxs)(F.a,{href:"https://twitter.com/".concat(r),children:[Object(_.jsx)(M.a,{children:"https://twitter.com/".concat(r)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M5.026 15c6.038 0 9.341-5.003 9.341-9.334 0-.14 0-.282-.006-.422A6.685 6.685 0 0 0 16 3.542a6.658 6.658 0 0 1-1.889.518 3.301 3.301 0 0 0 1.447-1.817 6.533 6.533 0 0 1-2.087.793A3.286 3.286 0 0 0 7.875 6.03a9.325 9.325 0 0 1-6.767-3.429 3.289 3.289 0 0 0 1.018 4.382A3.323 3.323 0 0 1 .64 6.575v.045a3.288 3.288 0 0 0 2.632 3.218 3.203 3.203 0 0 1-.865.115 3.23 3.23 0 0 1-.614-.057 3.283 3.283 0 0 0 3.067 2.277A6.588 6.588 0 0 1 .78 13.58a6.32 6.32 0 0 1-.78-.045A9.344 9.344 0 0 0 5.026 15z"})})]}),a&&Object(_.jsxs)(F.a,{href:"https://instagram.com/".concat(a),children:[Object(_.jsx)(M.a,{children:"https://instagram.com/".concat(a)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M8 0C5.829 0 5.556.01 4.703.048 3.85.088 3.269.222 2.76.42a3.917 3.917 0 0 0-1.417.923A3.927 3.927 0 0 0 .42 2.76C.222 3.268.087 3.85.048 4.7.01 5.555 0 5.827 0 8.001c0 2.172.01 2.444.048 3.297.04.852.174 1.433.372 1.942.205.526.478.972.923 1.417.444.445.89.719 1.416.923.51.198 1.09.333 1.942.372C5.555 15.99 5.827 16 8 16s2.444-.01 3.298-.048c.851-.04 1.434-.174 1.943-.372a3.916 3.916 0 0 0 1.416-.923c.445-.445.718-.891.923-1.417.197-.509.332-1.09.372-1.942C15.99 10.445 16 10.173 16 8s-.01-2.445-.048-3.299c-.04-.851-.175-1.433-.372-1.941a3.926 3.926 0 0 0-.923-1.417A3.911 3.911 0 0 0 13.24.42c-.51-.198-1.092-.333-1.943-.372C10.443.01 10.172 0 7.998 0h.003zm-.717 1.442h.718c2.136 0 2.389.007 3.232.046.78.035 1.204.166 1.486.275.373.145.64.319.92.599.28.28.453.546.598.92.11.281.24.705.275 1.485.039.843.047 1.096.047 3.231s-.008 2.389-.047 3.232c-.035.78-.166 1.203-.275 1.485a2.47 2.47 0 0 1-.599.919c-.28.28-.546.453-.92.598-.28.11-.704.24-1.485.276-.843.038-1.096.047-3.232.047s-2.39-.009-3.233-.047c-.78-.036-1.203-.166-1.485-.276a2.478 2.478 0 0 1-.92-.598 2.48 2.48 0 0 1-.6-.92c-.109-.281-.24-.705-.275-1.485-.038-.843-.046-1.096-.046-3.233 0-2.136.008-2.388.046-3.231.036-.78.166-1.204.276-1.486.145-.373.319-.64.599-.92.28-.28.546-.453.92-.598.282-.11.705-.24 1.485-.276.738-.034 1.024-.044 2.515-.045v.002zm4.988 1.328a.96.96 0 1 0 0 1.92.96.96 0 0 0 0-1.92zm-4.27 1.122a4.109 4.109 0 1 0 0 8.217 4.109 4.109 0 0 0 0-8.217zm0 1.441a2.667 2.667 0 1 1 0 5.334 2.667 2.667 0 0 1 0-5.334z"})})]}),c&&Object(_.jsxs)(F.a,{href:"https://github.com/".concat(c),children:[Object(_.jsx)(M.a,{children:"https://github.com/".concat(c)}),Object(_.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"16",height:"16",fill:"currentColor",viewBox:"0 0 16 16",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:Object(_.jsx)("path",{d:"M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.012 8.012 0 0 0 16 8c0-4.42-3.58-8-8-8z"})})]}),s&&Object(_.jsxs)(F.a,{href:"https://reddit.com/".concat(s),children:[Object(_.jsx)(M.a,{children:"https://reddit.com/".concat(s)}),Object(_.jsxs)("svg",{height:"16",viewBox:"0 0 512 512",width:"16",xmlns:"http://www.w3.org/2000/svg",style:{fill:"var(--text-color)",stroke:"transparent",marginRight:"10px"},children:[Object(_.jsx)("path",{d:"m309.605469 343.347656c-11.46875 11.46875-36.042969 15.5625-53.554688 15.5625-17.5625 0-42.085937-4.09375-53.554687-15.5625-2.714844-2.714844-7.066406-2.714844-9.777344 0-2.714844 2.714844-2.714844 7.066406 0 9.777344 18.175781 18.175781 53.09375 19.609375 63.332031 19.609375s45.105469-1.433594 63.335938-19.609375c2.660156-2.714844 2.660156-7.066406 0-9.777344-2.714844-2.714844-7.066407-2.714844-9.78125 0zm0 0"}),Object(_.jsx)("path",{d:"m224 282.675781c0-14.695312-11.980469-26.675781-26.675781-26.675781-14.691407 0-26.675781 11.980469-26.675781 26.675781 0 14.691407 11.984374 26.675781 26.675781 26.675781 14.695312 0 26.675781-11.980468 26.675781-26.675781zm0 0"}),Object(_.jsx)("path",{d:"m256 0c-141.363281 0-256 114.636719-256 256s114.636719 256 256 256 256-114.636719 256-256-114.636719-256-256-256zm148.53125 290.148438c.5625 3.6875.871094 7.425781.871094 11.214843 0 57.445313-66.867188 103.988281-149.351563 103.988281s-149.351562-46.542968-149.351562-103.988281c0-3.839843.308593-7.628906.871093-11.316406-13.003906-5.835937-22.066406-18.890625-22.066406-34.046875 0-20.582031 16.691406-37.324219 37.324219-37.324219 10.035156 0 19.097656 3.941407 25.804687 10.394531 25.90625-18.6875 61.75-30.621093 101.632813-31.644531 0-.511719 18.636719-89.292969 18.636719-89.292969.359375-1.738281 1.382812-3.226562 2.867187-4.195312 1.484375-.972656 3.277344-1.28125 5.019531-.921875l62.054688 13.207031c4.351562-8.804687 13.308594-14.898437 23.804688-14.898437 14.746093 0 26.675781 11.929687 26.675781 26.675781s-11.929688 26.675781-26.675781 26.675781c-14.285157 0-25.855469-11.265625-26.519532-25.394531l-55.554687-11.828125-16.996094 80.027344c39.167969 1.378906 74.34375 13.257812 99.839844 31.691406 6.707031-6.5 15.820312-10.496094 25.90625-10.496094 20.636719 0 37.324219 16.691407 37.324219 37.324219 0 15.257812-9.164063 28.3125-22.117188 34.148438zm0 0"}),Object(_.jsx)("path",{d:"m314.675781 256c-14.695312 0-26.675781 11.980469-26.675781 26.675781 0 14.691407 11.980469 26.675781 26.675781 26.675781 14.691407 0 26.675781-11.984374 26.675781-26.675781 0-14.695312-11.980468-26.675781-26.675781-26.675781zm0 0"})]})]})]})},xr=n(208),Or=n.n(xr),mr=function(e){var t=e.wallet,n=e.name,r=e.site,a=e.telegram,c=e.twitter,s=e.instagram,i=e.github,o=e.reddit;return Object(_.jsxs)("div",{className:Or.a.artist,children:[t&&Object(_.jsx)(F.a,{to:"".concat(f.l.ISSUER,"/").concat(t),children:Object(_.jsx)("div",{className:Or.a.icon,children:Object(_.jsx)("img",{src:"https://services.tzkt.io/v1/avatars2/".concat(t),alt:"profile"})})}),Object(_.jsxs)("div",{className:Or.a.text,children:[n&&Object(_.jsx)(F.a,{to:"".concat(f.l.ISSUER,"/").concat(t),children:Object(_.jsx)("p",{children:Object(_.jsx)("strong",{children:n})})}),Object(_.jsx)(fr,{site:r,telegram:a,twitter:c,instagram:s,github:i,reddit:o})]})]})},vr=n(115),gr=n.n(vr),yr=function(e){var t=e.info,n=Object(r.useState)(!1),a=Object(o.a)(n,2),c=a[0],s=a[1],i=t.token_info.creators[0],l="";try{var u=t.swaps.map((function(e){return parseFloat(e.xtz_per_objkt)}));u.sort((function(e,t){return e-t})),l=void 0!==u[0]?"collect for "+Number(u[0])/1e6+" tez":"not for sale"}catch(d){l="not for sale"}return Object(r.useEffect)((function(){function e(){return(e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,m(i).then((function(e){s(e.data)}));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[]),Object(_.jsxs)("div",{className:gr.a.container,children:[Object(_.jsx)("div",{className:gr.a.image,children:Ke({mimeType:t.mimeType,artifactUri:t.token_info.artifactUri,displayUri:t.token_info.displayUri,creator:t.token_info.creators[0],objkt:t.token_id,interactive:!0})}),Object(_.jsx)("div",{className:gr.a.info,children:Object(_.jsxs)("div",{children:[Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t.objectId),children:Object(_.jsxs)("div",{className:gr.a.number,children:["OBJKT#",t.objectId]})}),Object(_.jsx)("div",{className:gr.a.title,children:t.token_info.name}),Object(_.jsx)("div",{className:gr.a.description,children:t.token_info.description}),Object(_.jsxs)("div",{className:gr.a.links,children:[Object(_.jsx)(mr,{wallet:i,name:c.alias,site:c.site,telegram:c.telegram,twitter:c.twitter,github:c.github,reddit:c.reddit}),Object(_.jsx)("div",{className:gr.a.collect,children:Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(t.objectId),children:Object(_.jsx)(F.d,{children:l})})})]})]})})]})},_r=(n(277),n(155)),wr=n.n(_r),kr=n(102);function Sr(e){return Cr.apply(this,arguments)}function Cr(){return(Cr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Nr('\n query Objkts($_in: [bigint!] = "") {\n hic_et_nunc_token(where: { id: {_in: $_in}}) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n hdao_balance\n }\n }',"Objkts",{_in:t});case 2:return n=e.sent,n.errors,r=n.data,e.abrupt("return",r.hic_et_nunc_token);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Nr(e,t,n){return Tr.apply(this,arguments)}function Tr(){return(Tr=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Ar=n(436),Fr=(n(956),n(57)),zr=(n(250),n(102));function Br(e){return Pr.apply(this,arguments)}function Pr(){return(Pr=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa("\nquery LatestFeed {\n hic_et_nunc_token(order_by: {id: desc}, limit: 15, where: {id: {_lt: ".concat(t,'}, artifact_uri: {_neq: ""}}) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n creator {\n name\n address\n }\n }\n}'),"LatestFeed",{});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Lr(e){return Ir.apply(this,arguments)}function Ir(){return(Ir=Object(b.a)(h.a.mark((function e(t){var n,r,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query Objkts($ids: [bigint!] = "") {\n hic_et_nunc_token(where: {id: {_in: $ids}, supply : { _neq : 0 }}) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n creator {\n name\n address\n }\n }\n }',"Objkts",{ids:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.log(r),e.abrupt("return",a);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Mr(){return qr.apply(this,arguments)}function qr(){return(qr=Object(b.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa("\n query LastId {\n hic_et_nunc_token(limit: 1, order_by: {id: desc}) {\n id\n }\n }","LastId");case 2:return t=e.sent,t.errors,n=t.data,e.abrupt("return",n.hic_et_nunc_token[0].id);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ur(e,t){return Math.floor(Math.random()*(t-e+1)+e)}function Vr(e){return Dr.apply(this,arguments)}function Dr(){return(Dr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query GLBObjkts {\n hic_et_nunc_token(where : { mime : {_in : ["model/gltf-binary"] }, supply : { _neq : 0 }}, limit : 15, offset : '.concat(t,", order_by: {id: desc}) {\n id\n artifact_uri\n display_uri\n mime\n creator_id\n creator {\n address\n name\n }\n }\n }\n "),"GLBObjkts",{});case 2:return n=e.sent,n.errors,r=n.data,e.prev=5,e.abrupt("return",r.hic_et_nunc_token);case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})))).apply(this,arguments)}function Er(e){return Hr.apply(this,arguments)}function Hr(){return(Hr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query InteractiveObjkts {\n hic_et_nunc_token(where: { mime: {_in : [ "application/x-directory", "image/svg+xml" ]}, supply : { _neq : 0 } }, limit : 30, offset : '.concat(t,", order_by: {id: desc}) {\n id\n artifact_uri\n display_uri\n mime\n creator_id\n creator {\n name\n address\n }\n }\n }\n "),"InteractiveObjkts",{});case 2:return n=e.sent,n.errors,r=n.data,e.prev=5,e.abrupt("return",r.hic_et_nunc_token);case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})))).apply(this,arguments)}function Kr(e){return Rr.apply(this,arguments)}function Rr(){return(Rr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query Gifs ($offset: Int = 0) {\n hic_et_nunc_token(where: { mime: {_in : [ "image/gif" ]}, supply : { _neq : 0 }}, order_by: {id: desc}, limit: 15, offset: '.concat(t,") {\n id\n artifact_uri\n display_uri\n mime\n creator_id\n creator {\n name\n address\n }\n }\n }\n "),"Gifs",{});case 2:return n=e.sent,n.errors,r=n.data,e.prev=5,e.abrupt("return",r.hic_et_nunc_token);case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})))).apply(this,arguments)}function Gr(e){return Jr.apply(this,arguments)}function Jr(){return(Jr=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query AudioObjkts {\n hic_et_nunc_token(where: {mime: {_in: ["audio/ogg", "audio/wav", "audio/mpeg"]}, supply : { _neq : 0 }}, limit : 15, offset : '.concat(t,", order_by: {id: desc}) {\n id\n artifact_uri\n display_uri\n mime\n creator_id\n creator {\n address\n name\n }\n }\n }\n "),"AudioObjkts",{});case 2:return n=e.sent,n.errors,r=n.data,e.prev=5,e.abrupt("return",r.hic_et_nunc_token);case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})))).apply(this,arguments)}function Wr(){return Zr.apply(this,arguments)}function Zr(){return(Zr=Object(b.a)(h.a.mark((function e(){var t,n,r,a,c,s,i;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=196,e.next=3,Mr();case 3:for(n=e.sent,r=new Set;r.size<15;)r.add(Ur(t,n));return e.next=8,Lr(Array.from(r));case 8:return a=e.sent,c=a.errors,s=a.data,e.next=13,Lr(Array.from(r));case 13:return i=e.sent,c&&console.error(c),s,e.abrupt("return",i.hic_et_nunc_token);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Qr(e,t){return Yr.apply(this,arguments)}function Yr(){return(Yr=Object(b.a)(h.a.mark((function e(t,n){var r,a,c,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('query dayTrades {\n hic_et_nunc_trade(where: {timestamp: {_gte: "'.concat(t,'"}}, order_by: {swap: {price: desc}}, limit : 15, offset : ').concat(n,") {\n timestamp\n swap {\n price\n }\n token {\n artifact_uri\n display_uri\n id\n mime\n creator {\n name\n address\n }\n }\n }\n }"),"dayTrades",{});case 2:r=e.sent,a=r.errors,c=r.data,a&&console.log(a),s=[];try{s=c.hic_et_nunc_trade}catch(i){}return e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $r(e){return Xr.apply(this,arguments)}function Xr(){return(Xr=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa("\n query sales {\n hic_et_nunc_trade(order_by: {timestamp: desc}, limit : 15, offset : ".concat(t,', where: {swap: {price: {_gte: "500000"}}}) {\n timestamp\n swap {\n price\n }\n token {\n artifact_uri\n display_uri\n id\n mime\n creator_id\n creator {\n name\n address\n }\n }\n }\n }'),"sales",{});case 2:n=e.sent,r=n.errors,a=n.data,r&&console.log(r),c=[];try{c=a.hic_et_nunc_trade}catch(s){}return e.abrupt("return",c);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ea(e){return ta.apply(this,arguments)}function ta(){return(ta=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa('\n query subjktsQuery {\n hic_et_nunc_holder(where: { name: {_ilike: "%'.concat(t,'%"}}, order_by: {hdao_balance: desc}) {\n address\n name\n hdao_balance\n metadata\n }\n }\n '),"subjktsQuery",{});case 2:n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=[];try{c=a.hic_et_nunc_holder}catch(s){}return e.abrupt("return",c);case 9:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function na(e,t){return ra.apply(this,arguments)}function ra(){return(ra=Object(b.a)(h.a.mark((function e(t,n){var r,a,c,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa("query ObjktsByTag {\n hic_et_nunc_token(where: {supply : { _neq : 0 }, token_tags: {tag: {tag: {_eq: ".concat(t,"}}}, id: {_lt: ").concat(n,"}}, limit : 15, order_by: {id: desc}) {\n id\n artifact_uri\n display_uri\n mime\n creator_id\n token_tags {\n tag {\n tag\n }\n }\n creator {\n address\n name\n }\n }\n}"),"ObjktsByTag",{});case 2:return r=e.sent,a=r.errors,c=r.data,a&&console.error(a),s=c.hic_et_nunc_token,e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function aa(e,t,n){return ca.apply(this,arguments)}function ca(){return(ca=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var sa="query hDAOFeed($offset: Int = 0) {\n hic_et_nunc_token(order_by: {hdao_balance: desc}, limit: 15, where: {hdao_balance: {_gt: 100}}, offset: $offset) {\n artifact_uri\n display_uri\n creator_id\n id\n mime\n thumbnail_uri\n timestamp\n title\n hdao_balance\n creator {\n name\n address\n }\n }\n}";function ia(e){return oa.apply(this,arguments)}function oa(){return(oa=Object(b.a)(h.a.mark((function e(t){var n,r,a,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,aa(sa,"hDAOFeed",{offset:t});case 2:return n=e.sent,r=n.errors,a=n.data,r&&console.error(r),c=a.hic_et_nunc_token,e.abrupt("return",c);case 8:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var la=function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Fr.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json").then((function(e){return e.data}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ua=function(e){Object(J.a)(n,e);var t=Object(W.a)(n);function n(){var e,r;Object(R.a)(this,n);for(var a=arguments.length,c=new Array(a),s=0;s<a;s++)c[s]=arguments[s];return(r=t.call.apply(t,[this].concat(c))).state=(e={subjkt:[],items:[],feed:[],search:"",select:"",prev:"",reset:!1,flag:!1,lastId:void 0,tags:[{id:0,value:"\u25cb hDAO"},{id:1,value:"random"},{id:2,value:"glb"},{id:3,value:"music"},{id:4,value:"html/svg"},{id:5,value:"gif"},{id:6,value:"new OBJKTs"},{id:7,value:"recent sales"},{id:8,value:"1D"},{id:9,value:"1W"},{id:10,value:"1M"},{id:11,value:"ATH"}]},Object(ne.a)(e,"select",[]),Object(ne.a)(e,"mouse",!1),Object(ne.a)(e,"hasMore",!0),Object(ne.a)(e,"offset",0),e),r.componentWillMount=Object(b.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,la();case 2:return t=e.sent,r.setState({select:"recent sales"}),e.next=6,$r(r.state.offset);case 6:n=(n=(n=e.sent).map((function(e){return e.token}))).filter((function(e){return!t.includes(e.creator_id)})),r.setState({feed:zr.uniqBy(zr.uniqBy([].concat(Object(yt.a)(r.state.feed),Object(yt.a)(n)),"id"),"creator_id")});case 10:case"end":return e.stop()}}),e)}))),r.handleChange=function(e){r.setState(Object(ne.a)({},e.target.name,e.target.value))},r.update=function(){var e=Object(b.a)(h.a.mark((function e(t,n){var a,c,s,i,o,l,u,d,j,b;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,la();case 2:if(a=e.sent,r.setState({select:t}),n&&(r.state.feed=[],r.state.offset=0),"1D"!==t){e.next=14;break}return e.next=8,Qr(new Date((new Date).getTime()-864e5).toISOString(),r.state.offset);case 8:c=(c=e.sent).map((function(e){return e.token})),c=(c=[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(c))).filter((function(e){return!a.includes(e.creator.address)})),c=zr.uniqBy(c,"id"),r.setState({feed:c});case 14:if("1W"!==t){e.next=23;break}return e.next=17,Qr(new Date((new Date).getTime()-6048e5).toISOString(),r.state.offset);case 17:s=(s=e.sent).map((function(e){return e.token})),s=(s=[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(s))).filter((function(e){return!a.includes(e.creator.address)})),s=zr.uniqBy(s,"id"),r.setState({feed:s});case 23:if("1M"!==t){e.next=32;break}return e.next=26,Qr(new Date((new Date).getTime()-2592e6).toISOString(),r.state.offset);case 26:i=(i=e.sent).map((function(e){return e.token})),i=(i=[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(i))).filter((function(e){return!a.includes(e.creator.address)})),i=zr.uniqBy(i,"id"),r.setState({feed:i});case 32:if("ATH"!==t){e.next=41;break}return e.next=35,Qr(new Date("2021-05-01").toISOString(),r.state.offset);case 35:o=(o=e.sent).map((function(e){return e.token})),o=[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(o)),o=zr.uniqBy(o,"id"),console.log("ath",o),r.setState({feed:o});case 41:if("num"!==t){e.next=47;break}return e.next=44,Br(Number(r.state.search)+1-r.state.offset);case 44:l=(l=e.sent).filter((function(e){return!a.includes(e.creator_id)})),r.setState({feed:[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(l))});case 47:if("\u25cb hDAO"!==t){e.next=67;break}return e.next=50,ia(r.state.offset);case 50:return e.sent.filter((function(e){return!a.includes(e.creator_id)})),e.t0=r,e.t1=zr,e.t2=zr,e.t3=[],e.t4=Object(yt.a)(r.state.feed),e.t5=yt.a,e.next=60,ia(r.state.offset);case 60:e.t6=e.sent,e.t7=(0,e.t5)(e.t6),e.t8=e.t3.concat.call(e.t3,e.t4,e.t7),e.t9=e.t2.uniqBy.call(e.t2,e.t8,"id"),e.t10=e.t1.uniqBy.call(e.t1,e.t9,"creator_id"),e.t11={feed:e.t10,hdao:!0},e.t0.setState.call(e.t0,e.t11);case 67:if("music"!==t){e.next=81;break}return e.t12=r,e.t13=zr,e.t14=[],e.t15=Object(yt.a)(r.state.feed),e.t16=yt.a,e.next=75,Gr(r.state.offset);case 75:e.t17=e.sent,e.t18=(0,e.t16)(e.t17),e.t19=e.t14.concat.call(e.t14,e.t15,e.t18),e.t20=e.t13.uniqBy.call(e.t13,e.t19,"creator_id"),e.t21={feed:e.t20},e.t12.setState.call(e.t12,e.t21);case 81:if("glb"!==t){e.next=100;break}return e.next=85,Vr(r.state.offset);case 85:return e.sent.filter((function(e){return!a.includes(e.creator_id)})),e.t22=r,e.t23=zr,e.t24=[],e.t25=Object(yt.a)(r.state.feed),e.t26=yt.a,e.next=94,Vr(r.state.offset);case 94:e.t27=e.sent,e.t28=(0,e.t26)(e.t27),e.t29=e.t24.concat.call(e.t24,e.t25,e.t28),e.t30=e.t23.uniqBy.call(e.t23,e.t29,"creator_id"),e.t31={feed:e.t30},e.t22.setState.call(e.t22,e.t31);case 100:if("html/svg"!==t){e.next=106;break}return e.next=103,Er(r.state.offset);case 103:u=(u=e.sent).filter((function(e){return!a.includes(e.creator_id)})),r.setState({feed:zr.uniqBy([].concat(Object(yt.a)(r.state.feed),Object(yt.a)(u)),"creator_id")});case 106:if("random"!=t){e.next=112;break}return e.next=109,Wr();case 109:d=(d=e.sent).filter((function(e){return!a.includes(e.creator_id)})),r.setState({feed:[].concat(Object(yt.a)(r.state.feed),Object(yt.a)(d))});case 112:if("gif"!=t){e.next=130;break}return e.next=115,Kr(r.state.offset);case 115:return e.sent.filter((function(e){return!a.includes(e.creator_id)})),e.t32=r,e.t33=zr,e.t34=[],e.t35=Object(yt.a)(r.state.feed),e.t36=yt.a,e.next=124,Kr(r.state.offset);case 124:e.t37=e.sent,e.t38=(0,e.t36)(e.t37),e.t39=e.t34.concat.call(e.t34,e.t35,e.t38),e.t40=e.t33.uniqBy.call(e.t33,e.t39,"creator_id"),e.t41={feed:e.t40},e.t32.setState.call(e.t32,e.t41);case 130:if("illustration"!=t){e.next=136;break}return e.t42=console,e.next=134,na("illustration");case 134:e.t43=e.sent,e.t42.log.call(e.t42,e.t43);case 136:if("tag"!=t){e.next=142;break}return e.next=139,na(r.state.search,r.state.feed[r.state.feed.length-1].id);case 139:j=(j=e.sent).filter((function(e){return!a.includes(e.creator_id)})),r.setState({feed:zr.uniqBy([].concat(Object(yt.a)(r.state.feed),Object(yt.a)(j)),"creator_id")});case 142:if("recent sales"!=t){e.next=149;break}return e.next=145,$r(r.state.offset);case 145:b=(b=e.sent).map((function(e){return e.token})),b=b.filter((function(e){return!a.includes(e.creator_id)})),r.setState({feed:zr.uniqBy(zr.uniqBy([].concat(Object(yt.a)(r.state.feed),Object(yt.a)(b)),"id"),"creator_id")});case 149:"new OBJKTs"==r.state.select&&r.latest(),r.setState({reset:!1});case 151:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),r.latest=Object(b.a)(h.a.mark((function e(){var t,n;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=[],!r.state.flag){e.next=7;break}return e.next=4,Br(Math.min.apply(Math,r.state.feed.map((function(e){return e.id}))));case 4:t=e.sent,e.next=10;break;case 7:return e.next=9,Br(999999);case 9:t=e.sent;case 10:return console.log(t),e.next=13,la();case 13:n=e.sent,t=(t=zr.uniqBy([].concat(Object(yt.a)(r.state.feed),Object(yt.a)(t)),"creator_id")).filter((function(e){return!n.includes(e.creator_id)})),r.setState({feed:Object(yt.a)(t),flag:!0});case 17:case"end":return e.stop()}}),e)}))),r.search=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),r.setState({items:[],feed:[],search:t}),e.t0=r,e.next=5,ea(r.state.search);case 5:if(e.t1=e.sent,e.t2={subjkt:e.t1},e.t0.setState.call(e.t0,e.t2),isNaN(r.state.search)){e.next=17;break}return e.t3=r,e.next=12,Br(Number(r.state.search)+1);case 12:e.t4=e.sent,e.t5={feed:e.t4,select:"num"},e.t3.setState.call(e.t3,e.t5),e.next=25;break;case 17:return e.t6=r,e.t7=zr,e.next=21,na(r.state.search.toLowerCase(),9999999);case 21:e.t8=e.sent,e.t9=e.t7.uniqBy.call(e.t7,e.t8,"creator_id"),e.t10={feed:e.t9,select:"tag"},e.t6.setState.call(e.t6,e.t10);case 25:console.log(r.state.feed);case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),r.hoverState=function(e){return r.setState({mouse:e})},r.select=function(e){return r.setState({select:[].concat(Object(yt.a)(r.state.select),[e])})},r.loadMore=function(){r.setState({offset:r.state.offset+15}),r.update(r.state.select,!1)},r.handleKey=function(e){console.log(r.state.search),"Enter"==e.key&&r.search(r.state.search)},r}return Object(G.a)(n,[{key:"render",value:function(){var e=this;return Object(_.jsxs)(A.c,{children:[Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(Ht.a,{type:"text",name:"search",onChange:this.handleChange,label:"search \u21b5",placeholder:"search \u21b5",onKeyPress:this.handleKey}),Object(_.jsx)("div",{style:{marginTop:"15px"},children:this.state.tags.map((function(t){return Object(_.jsxs)("a",{className:"tag",href:"#",onClick:function(){e.update(t.value,!0)},children:[t.value," "]})}))}),this.state.subjkt.length>0&&""!==this.state.search?Object(_.jsx)("div",{style:{maxHeight:"200px",overflow:"scroll"},children:this.state.subjkt.map((function(e){return Object(_.jsxs)("div",{style:{marginTop:"10px"},children:[Object(_.jsx)("a",{href:"/".concat(e.name),children:e.name})," ",e.metadata.description]})}))}):void 0]})}),Object(_.jsx)(A.a,{xlarge:!0,children:this.state.feed.length>0?Object(_.jsx)(Je.a,{dataLength:this.state.feed.length,next:this.loadMore,hasMore:this.state.hasMore,loader:void 0,endMessage:void 0,children:Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:this.state.feed.map((function(e,t){return Object(_.jsx)(Ft,Object(v.a)({},e),"".concat(e.id,"-").concat(t))}))})})}):void 0})]})}}]),n}(r.Component);ua.contextType=u.a;var da=n(278),ja=n.n(da),ha=n(57),ba=n(102);function pa(e,t,n){return fa.apply(this,arguments)}function fa(){return(fa=Object(b.a)(h.a.mark((function e(t,n,r){var a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://hdapi.teztools.io/v1/graphql",{method:"POST",body:JSON.stringify({query:t,variables:r,operationName:n})});case 2:return a=e.sent,e.next=5,a.json();case 5:return e.abrupt("return",e.sent);case 6:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function xa(e,t){return Oa.apply(this,arguments)}function Oa(){return(Oa=Object(b.a)(h.a.mark((function e(t,n){var r,a;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,pa('query ObjktsByTag($tag: String = "3d", $lastId: bigint = 99999999) {\n hic_et_nunc_token(where: {token_tags: {tag: {tag: {_eq: '.concat(t,'}}}, id: {_lt: $lastId}, supply: {_gt: "0"}}, order_by: {id: desc}, limit : 35, offset : ').concat(n,") {\n id\n artifact_uri\n display_uri\n creator_id\n mime\n creator {\n address\n name\n }\n }\n }"),"ObjktsByTag",{});case 2:return r=e.sent,r.errors,a=r.data,e.prev=5,e.abrupt("return",a.hic_et_nunc_token);case 9:return e.prev=9,e.t0=e.catch(5),e.abrupt("return",void 0);case 12:case"end":return e.stop()}}),e,null,[[5,9]])})))).apply(this,arguments)}var ma=function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ha.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json").then((function(e){return e.data}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),va=[{exact:!0,path:"/",component:ua},{exact:!1,path:"/hdao",component:function(){return Object(_.jsx)(Vt,{type:1})}},{exact:!1,path:"/random",component:function(){return Object(_.jsx)(Vt,{type:2})}},{exact:!1,path:"/latest",component:function(){return Object(_.jsx)(Vt,{type:0})}},{exact:!1,path:"/tz/:id/:collection?",component:gt},{exact:!1,path:"/kt/:id",component:function(){var e=Object(r.useState)([]),t=Object(o.a)(e,2),n=t[0],a=t[1],c=Object(r.useState)([]),s=Object(o.a)(c,2),i=s[0],u=(s[1],Object(r.useState)(!0)),d=Object(o.a)(u,2),j=d[0],h=(d[1],Object(r.useState)(null)),b=Object(o.a)(h,2),p=b[0],x=b[1],O=Object(l.h)().id;Object(r.useEffect)((function(){O&&qn.a.get("https://api.tzkt.io/v1/contracts/".concat(O,"/storage")).then((function(e){var t=e.data;return x(t)}))}),[O]),Object(r.useEffect)((function(){if(p){console.log(p);var e=[];for(var t in p.shares)e.push({address:t,share:Number(p.shares[t]),role:void 0});a(e)}}),[p]);return Object(_.jsxs)(A.c,{title:"Collaboration",children:[Object(_.jsx)(Vn,{collaborators:n}),j&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(D.a,{})})}),i.length>0&&Object(_.jsx)(A.a,{xlarge:!0,children:Object(_.jsx)(Ge.a,{children:i.map((function(e){var t=e.token_info.formats[0],n=t.mimeType,r=t.uri;return Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(e.token_id),children:Object(_.jsx)("div",{className:Ze.a.container,children:Ke({mimeType:n,uri:r.split("//")[1],metadata:e})})},e.token_id)}))})})]})}},{exact:!1,path:"/about",component:$},{exact:!1,path:"/faq",component:te},{exact:!1,path:"/sync",component:Z},{exact:!1,path:"/mint",component:function(){var e=Object(r.useContext)(u.a),t=e.mint,n=(e.getAuth,e.acc),a=e.setAccount,c=e.getProxy,s=e.setFeedback,i=e.syncTaquito,l=Object(r.useState)(0),d=Object(o.a)(l,2),j=d[0],p=d[1],x=Object(r.useState)(""),O=Object(o.a)(x,2),m=O[0],g=O[1],y=Object(r.useState)(""),w=Object(o.a)(y,2),k=w[0],S=w[1],C=Object(r.useState)(""),N=Object(o.a)(C,2),T=N[0],z=N[1],B=Object(r.useState)(),P=Object(o.a)(B,2),L=P[0],I=P[1],M=Object(r.useState)(),q=Object(o.a)(M,2),U=q[0],V=q[1],D=Object(r.useState)(),E=Object(o.a)(D,2),H=E[0],K=E[1],R=Object(r.useState)(),G=Object(o.a)(R,2),J=G[0],W=G[1],Z=Object(r.useState)(),Q=Object(o.a)(Z,2),Y=Q[0],$=Q[1],X=Object(r.useState)(!1),ee=Object(o.a)(X,2),te=ee[0],ne=ee[1],re=function(){var e=Object(b.a)(h.a.mark((function e(){var r,o,l,u;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=7;break}return s({visible:!0,message:"sync your wallet",progress:!0,confirm:!1}),e.next=4,i();case 4:s({visible:!1}),e.next=34;break;case 7:return e.next=9,a();case 9:if(console.log(H.mimeType),console.log(f.d),-1!==f.d.indexOf(H.mimeType)){e.next=14;break}return s({visible:!0,message:"File format invalid. supported formats include: ".concat(f.c.toLocaleLowerCase()),progress:!1,confirm:!0,confirmCallback:function(){s({visible:!1})}}),e.abrupt("return");case 14:if(!((r=(H.file.size/1024/1024).toFixed(4))>f.j)){e.next=18;break}return s({visible:!0,message:"Max file size (".concat(r,"). Limit is currently ").concat(f.j,"MB"),progress:!1,confirm:!0,confirmCallback:function(){s({visible:!1})}}),e.abrupt("return");case 18:if(p(2),s({visible:!0,message:"preparing OBJKT",progress:!0,confirm:!1}),o=c()||n.address,![f.i.ZIP,f.i.ZIP1,f.i.ZIP2].includes(H.mimeType)){e.next=30;break}return e.next=24,Object(ye.prepareFilesFromZIP)(H.buffer);case 24:return u=e.sent,e.next=27,sn({name:m,description:k,tags:T,address:o,files:u,cover:J,thumbnail:Y,generateDisplayUri:pn,file:H});case 27:l=e.sent,e.next=33;break;case 30:return e.next=32,cn({name:m,description:k,tags:T,address:o,buffer:H.buffer,mimeType:H.mimeType,cover:J,thumbnail:Y,generateDisplayUri:pn});case 32:l=e.sent;case 33:t(o,L,l.path,U);case 34:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),ae=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(K(t),0!==t.mimeType.indexOf("image")){e.next=8;break}return ne(!1),e.next=6,le(t);case 6:e.next=9;break;case 8:ne(!0);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ce=function(){var e=Object(b.a)(h.a.mark((function e(t,n){var r,a,c,s;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,se(t.file,n);case 2:return r=e.sent,a=r.type,e.next=6,r.arrayBuffer();case 6:return c=e.sent,e.next=9,ie(r);case 9:return s=e.sent,e.abrupt("return",{mimeType:a,buffer:c,reader:s});case 11:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),se=function(e,t){return new Promise(function(){var n=Object(b.a)(h.a.mark((function n(r,a){return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:new Et.a(e,Object(v.a)(Object(v.a)({},t),{},{success:function(e){r(e)},error:function(e){a(e)}}));case 1:case"end":return n.stop()}}),n)})));return function(e,t){return n.apply(this,arguments)}}())},ie=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",new Promise((function(e,n){var r=new FileReader;r.onerror=n,r.onload=function(t){return e(r.result)},r.readAsDataURL(t)})));case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe=function(){var e=Object(b.a)(h.a.mark((function e(t){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,le(t);case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),le=function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.mimeType!==f.i.GIF){e.next=4;break}return W(t),$(t),e.abrupt("return");case 4:return e.next=6,ce(t,hn);case 6:return n=e.sent,W(n),e.next=10,ce(t,bn);case 10:r=e.sent,$(r);case 12:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ue=function(){var e=Object(b.a)(h.a.mark((function e(t,n,r){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:""===t.value&&(t.value=""),t.value=Math.round(Math.max(Math.min(t.value,r),n));case 2:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();return Object(_.jsxs)(A.c,{title:"mint",large:!0,children:[0===j&&Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)(Ht.a,{type:"text",onChange:function(e){return g(e.target.value)},placeholder:"title",label:"title",value:m}),Object(_.jsx)(Ht.b,{type:"text",style:{whiteSpace:"pre"},onChange:function(e){return S(e.target.value)},placeholder:"description (max 5000 characters)",label:"description",value:k}),Object(_.jsx)(Ht.a,{type:"text",onChange:function(e){return z(e.target.value)},placeholder:"tags (comma separated. example: illustration, digital)",label:"tags",value:T}),Object(_.jsx)(Ht.a,{type:"number",min:1,max:f.g,onChange:function(e){return I(e.target.value)},onBlur:function(e){ue(e.target,1,f.g),I(e.target.value)},placeholder:"editions (no. editions, 1-".concat(f.g,")"),label:"editions",value:L}),Object(_.jsx)(Ht.a,{type:"number",min:f.k,max:f.h,onChange:function(e){return V(e.target.value)},onBlur:function(e){ue(e.target,f.k,f.h),V(e.target.value)},placeholder:"royalties after each sale (between ".concat(f.k,"-").concat(f.h,"%)"),label:"royalties",value:U})]})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Kt.a,{label:"Upload OBJKT",allowedTypesLabel:f.c,onChange:ae})})}),H&&te&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Kt.a,{label:"Upload cover image",allowedTypes:f.b,allowedTypesLabel:f.a,onChange:oe})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(F.a,{onClick:function(){p(1)},fit:!0,disabled:L<=0||L>f.g||U<f.k||U>f.h||!H||!J||!Y,children:Object(_.jsx)(F.b,{children:"Preview"})})})})]}),1===j&&Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("div",{style:{display:"flex"},children:Object(_.jsx)(F.a,{onClick:function(){return p(0)},fit:!0,children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"back"})})})})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)($t,{mimeType:H.mimeType,previewUri:H.reader,title:m,description:k,tags:T})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(F.a,{onClick:re,fit:!0,children:Object(_.jsx)(F.d,{children:"mint OBJKT"})})})}),Object(_.jsx)(A.a,{children:Object(_.jsxs)(A.b,{children:[Object(_.jsx)("p",{children:"this operation costs 0.08~ tez"}),Object(_.jsxs)("p",{children:["Your royalties upon each sale are ",U,"%"]})]})})]})]})}},{exact:!1,path:"/collaborate",component:function(){var e=Object(r.useState)(0),t=Object(o.a)(e,2),n=t[0],a=t[1],c=sr[n].component,s=Object(r.useContext)(u.a),i=s.proxyAddress,l=s.originatedContract;return Object(r.useEffect)((function(){l&&a(1)}),[i,l]),Object(_.jsxs)(A.c,{title:"proxy",children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(On,{children:sr.map((function(e,t){return Object(_.jsx)(F.a,{onClick:function(){return a(t)},children:Object(_.jsx)(F.c,{selected:n===t,children:e.title})},e.title)}))})})}),Object(_.jsx)(c,{})]})}},{exact:!1,path:"/objkt/:id",component:function(){var e,t=Object(l.h)().id,n=Object(r.useContext)(u.a),a=Object(r.useState)(!0),c=Object(o.a)(a,2),s=c[0],i=c[1],d=Object(r.useState)(0),j=Object(o.a)(d,2),p=j[0],x=j[1],O=Object(r.useState)(),m=Object(o.a)(O,2),g=m[0],y=m[1],w=Object(r.useState)(!1),k=Object(o.a)(w,2),S=k[0],C=(k[1],Object(r.useState)(!1)),N=Object(o.a)(C,2),T=N[0],z=N[1],B=Object(r.useState)([]),P=Object(o.a)(B,2),L=(P[0],P[1],null===(e=n.acc)||void 0===e?void 0:e.address),I=n.getProxy(),M=function(){var e=Object(b.a)(h.a.mark((function e(){return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,An.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json").then((function(e){return e.data}));case 2:return e.abrupt("return",e.sent);case 3:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();Object(r.useEffect)(Object(b.a)(h.a.mark((function e(){var r;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Bn(t);case 2:return r=e.sent,e.next=5,n.setAccount();case 5:if(!Object(f.o)().includes(r.creator.address)){e.next=11;break}z(!0),r.restricted=!0,y(r),e.next=16;break;case 11:return e.next=13,M();case 13:r.ban=e.sent,r.restricted=!1,y(r);case 16:i(!1);case 17:case"end":return e.stop()}}),e)}))),[]);var q=Fn[p].component;return Object(_.jsxs)(A.c,{title:null===g||void 0===g?void 0:g.title,children:[s&&Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(D.a,{})})}),S&&Object(_.jsxs)(A.a,{children:[Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:S})}),Object(_.jsx)(A.b,{children:Object(_.jsx)(F.a,{href:"https://github.com/hicetnunc2000/hicetnunc/issues",children:Object(_.jsx)(F.c,{children:Object(_.jsx)("strong",{children:"Report"})})})})]}),!s&&(n.progress?Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsxs)("div",{children:[Object(_.jsx)("p",{style:{position:"absolute",left:"46%",top:"45%"},children:n.message}),n.progress&&Object(_.jsx)(D.a,{})]})})}):Object(_.jsxs)(_.Fragment,{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:T&&Object(_.jsx)("div",{style:{color:"white",background:"black",textAlign:"center"},children:"restricted OBJKT"})})}),Object(_.jsxs)("div",{style:{position:"relative",display:"block",width:"100%"},className:"objkt-display",children:[Object(_.jsx)("div",{className:"application/x-directory"==g.mime||"image/svg+xml"==g.mime?"objktview-zipembed objktview "+Tn.a.objktview:["video/mp4"==g.mime||"video/ogv"==g.mime||"video/quicktime"==g.mime||"video/webm"==g.mime||"application/pdf"==g.mime?"no-fullscreen":"objktview "+Tn.a.objktview],children:Ke({mimeType:g.mime,artifactUri:g.artifact_uri,displayUri:g.display_uri,creator:g.creator,objkt:g.id,interactive:!0,displayView:!1})}),Object(_.jsxs)("div",{children:[Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Nt,Object(v.a)(Object(v.a)({},g),{},{isDetailView:!0}))})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)(On,{children:Fn.map((function(e,t){if((null===g||void 0===g?void 0:g.restricted)&&e.restricted)return null;if((null===g||void 0===g?void 0:g.token_holders)&&e.private&&(!1===g.token_holders.map((function(e){return e.holder_id})).includes(L)&&g.creator.address!==L&&g.creator.address!==I))return null;return Object(_.jsx)(F.a,{onClick:function(){return x(t)},children:Object(_.jsx)(F.c,{selected:p===t,children:e.title})},e.title)}))})})}),Object(_.jsx)(q,Object(v.a)(Object(v.a)({},g),{},{address:L}))]})]})]})),Object(_.jsx)("div",{style:{height:"40px"}})]})}},{exact:!1,path:"/galleries",component:function(){var e=Object(r.useState)([]),t=Object(o.a)(e,2),n=t[0],a=t[1];return Object(r.useEffect)((function(){return fetch("/galleries/galleries.json").then((function(e){return e.json()})).then(function(){var e=Object(b.a)(h.a.mark((function e(t){var n,r,c;return h.a.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log(t),e.next=3,ur(t.map((function(e){return e.id})));case 3:n=e.sent,r=lr.merge(lr.keyBy(t,"id"),lr.merge(lr.keyBy(n,"id"))),c=lr.values(r),a(c.reverse());case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()),function(){document.body.style={}}}),[]),Object(_.jsx)(A.c,{title:"Galleries",children:Object(_.jsx)(A.a,{xlarge:!0,children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Ge.a,{children:n.map((function(e){e.token_info;return console.log(e),Object(_.jsx)(F.a,{to:"".concat(f.l.GALLERY,"/").concat(e.uid),children:Object(_.jsxs)("div",{className:or.a.item,children:[Ke({mimeType:e.mime,artifactUri:e.artifact_uri,displayUri:e.display_uri,creator:"",objkt:e.id,interactive:!1,displayView:!0}),Object(_.jsx)(F.a,{children:Object(_.jsx)(F.c,{children:Object(_.jsx)("div",{className:or.a.number,children:e.name})})})]})},e.uid)}))})})})})}},{exact:!1,path:"/gallery/:id",component:function(){var e=Object(r.useContext)(u.a),t=Object(l.h)().id,n=Object(r.useState)(!1),a=Object(o.a)(n,2),c=a[0],s=a[1],i=Object(r.useState)([]),d=Object(o.a)(i,2),j=d[0],p=d[1],f=Object(r.useState)(),x=Object(o.a)(f,2),O=x[0],m=x[1],v=Object(r.useState)(!0),y=Object(o.a)(v,2),w=y[0],k=y[1],S=Object(r.useState)([]),C=Object(o.a)(S,2),N=C[0],T=C[1],z=Object(r.useState)([]),B=Object(o.a)(z,2),P=B[0],L=B[1],I=Object(r.useState)(0),M=Object(o.a)(I,2),q=M[0],U=M[1],V=function(e){m(e),e?document.body.style.overflow="hidden":document.body.style={}};Object(r.useEffect)((function(){return fetch("/galleries/galleries.json").then((function(e){return e.json()})).then((function(n){var r=n.find((function(e){return e.uid===t}));r?fetch(r.endpoint).then((function(e){return e.json()})).then(function(){var n=Object(b.a)(h.a.mark((function n(r){var a;return h.a.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(a=[],"thefen"!=t){n.next=12;break}return n.next=4,qn.a.get("https://raw.githubusercontent.com/joanielemercier/The_fen/main/thefen.json").then((function(e){return e.data.data.map((function(e){return e.objkt}))}));case 4:return a=(a=n.sent).reduce((function(e,t){return[].concat(Object(yt.a)(e),Object(yt.a)(t))}),[]),n.next=8,Sr(a);case 8:a=(a=n.sent).filter((function(e){return![34413,35798,41628].includes(e.id)})),n.next=15;break;case 12:return n.next=14,Sr(r.data[0].objkt);case 14:a=n.sent;case 15:T(a),p(r),e.feed=a.slice(0,15),s(!0);case 19:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}()):alert("gallery ".concat(t," not found"))})),function(){document.body.style={}}}),[t]);return Object(_.jsx)(A.c,{title:null===j||void 0===j?void 0:j.title,children:c?Object(_.jsxs)("div",{className:wr.a.container,children:[!1,Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("strong",{children:j.title})})}),Object(_.jsx)(A.a,{children:Object(_.jsx)(A.b,{children:Object(_.jsx)("p",{children:j.description})})}),Object(_.jsx)(A.a,{xlarge:!0,children:Object(_.jsx)(A.b,{children:Object(_.jsx)(Je.a,{dataLength:e.feed.length,next:function(){L([].concat(Object(yt.a)(P),Object(yt.a)(N.slice(q,q+15)))),e.feed=kr.uniqBy([].concat(Object(yt.a)(e.feed),Object(yt.a)(N.slice(q,q+15))),"id"),U(q+15),P.length==N.lenght&&k(!1)},hasMore:w,loader:void 0,endMessage:void 0,children:Object(_.jsx)(Ge.a,{children:e.feed.map((function(e){return Object(_.jsx)(F.a,{to:"/objkt/".concat(e.id),children:Object(_.jsx)("div",{className:wr.a.item,children:Ke({mimeType:e.mime,artifactUri:e.artifact_uri,displayUri:e.display_uri,creator:"",objkt:e.id,interactive:!1,displayView:!0})})},e.id)}))})})})}),Object(_.jsx)(g.a,{children:O&&Object(_.jsxs)("div",{className:wr.a.modal,children:[Object(_.jsx)("div",{className:wr.a.background,onClick:function(){return V(!1)}}),Object(_.jsx)(yr,{info:O}),Object(_.jsx)("div",{className:wr.a.close,onClick:function(){return V(!1)},children:"CLOSE X"})]})})]}):Object(_.jsx)(A.a,{})})}},{exact:!1,path:"/config",component:Ar.a},{exact:!1,path:"/search",component:ua},{exact:!1,path:"/tags/:id",component:function(){var e=Object(l.h)().id,t=Object(r.useState)(!1),n=Object(o.a)(t,2),a=(n[0],n[1],Object(r.useState)([])),c=Object(o.a)(a,2),s=(c[0],c[1],Object(r.useState)([])),i=Object(o.a)(s,2),u=i[0],d=i[1],j=Object(r.useState)(0),p=Object(o.a)(j,2),x=p[0],O=p[1],m=Object(r.useState)(!0),v=Object(o.a)(m,2),g=v[0],y=(v[1],Object(r.useState)([])),w=Object(o.a)(y,2),k=w[0],S=w[1],C=Object(r.useState)(0),N=Object(o.a)(C,2),T=N[0],z=N[1],B=function(){var t=Object(b.a)(h.a.mark((function t(){var n;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return z(T+35),t.next=3,xa(e,T+35);case 3:n=t.sent,d(ba.uniqBy([].concat(Object(yt.a)(u),Object(yt.a)(n)).filter((function(e){return!k.includes(e.creator_id)})),"creator_id")),O(x+15);case 6:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}();return Object(r.useEffect)(Object(b.a)(h.a.mark((function t(){var n,r;return h.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,xa(e,T);case 2:return n=t.sent,t.next=5,ma();case 5:r=t.sent,S(r),console.log(n),d(ba.uniqBy(n.filter((function(e){return!r.includes(e.creator_id)})),"creator_id"));case 9:case"end":return t.stop()}}),t)}))),[]),Object(_.jsx)(A.c,{title:"Tag ".concat(e),children:Object(_.jsx)("div",{className:"tag-view",children:Object(_.jsx)(Je.a,{dataLength:u.length,next:B,hasMore:g,loader:void 0,children:Object(_.jsx)("div",{className:ja.a.container,children:Object(_.jsx)(A.a,{xlarge:!0,children:Object(_.jsx)(Ge.a,{children:u.map((function(e,t){return Object(_.jsx)(F.a,{to:"".concat(f.l.OBJKT,"/").concat(e.id),children:Object(_.jsx)("div",{className:ja.a.container,children:Ke({mimeType:e.mime,artifactUri:e.artifact_uri,displayUri:e.display_uri})})},"".concat(e.id,"-").concat(t))}))})})})})})})}},{exact:!1,path:"/:id/:collection?",component:gt}],ga=function(){var e=Object(r.useState)(!0),t=Object(o.a)(e,2),n=t[0],a=t[1];return Object(r.useEffect)((function(){(function(){var e=Object(p.a)("language")||Object(p.b)("language","en");return Promise.all([x.get("/languages/".concat(e,".json")),x.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/o.json"),x.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/w.json"),x.get("https://raw.githubusercontent.com/hicetnunc2000/hicetnunc-reports/main/filters/b.json")]).then((function(e){return Object(f.q)(e[0].data),Object(f.r)(e[1].data),Object(f.s)(e[2].data),Object(f.p)(e[3].data),!0}))})().then((function(){a(!1)}))}),[]),n?Object(_.jsx)(D.a,{}):Object(_.jsxs)(u.b,{children:[Object(_.jsx)(V,{}),Object(_.jsx)(K,{}),Object(_.jsx)(l.d,{children:va.map((function(e){var t=e.exact,n=e.path,r=e.component;return Object(_.jsx)(l.b,{path:n,exact:t,component:r},n)}))})]})};Boolean("localhost"===window.location.hostname||"[::1]"===window.location.hostname||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));n(957);s.a.render(Object(_.jsx)(i.a,{children:Object(_.jsx)(ga,{})}),document.getElementById("root")),"serviceWorker"in navigator&&navigator.serviceWorker.ready.then((function(e){e.unregister()})).catch((function(e){console.error(e.message)}))}},[[958,1,2]]]);
//# sourceMappingURL=main.7b1dd184.chunk.js.map