PageSourceSearch

https://app.psychedelicsanonymous.com/_next/static/chunks/pages/rarity-gallery-9d8a6dce63944dfe.js

js psychedelicsanonymous.com collected 2026-10-04 14:03:26 UTC 44,264 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4959],{16549:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/rarity-gallery",function(){return r(37991)}])},24067:function(e,t,r){"use strict";var n=r(85893);r(67294);var i=r(9008),o=r.n(i);t.Z=e=>{let{title:t,description:r,link:i}=e;return(0,n.jsxs)(o(),{children:[(0,n.jsx)("title",{children:t},"title"),(0,n.jsx)("meta",{name:"title",content:t},"meta-title"),(0,n.jsx)("meta",{name:"description",content:r},"description"),(0,n.jsx)("meta",{name:"robots",content:"index, follow"},"robots"),(0,n.jsx)("meta",{property:"og:type",content:"article"},"og:type"),(0,n.jsx)("meta",{property:"og:title",content:t},"og:title"),(0,n.jsx)("meta",{property:"og:description",content:r},"og:description"),(0,n.jsx)("meta",{property:"og:image",content:"".concat("https://psychedelicsanonymous.com","/social-preview.png")},"og:image"),(0,n.jsx)("meta",{property:"og:image:alt",content:"Psychedelics Anonymous Banner"},"og:image:alt"),(0,n.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,n.jsx)("meta",{name:"twitter:site",content:"@psychanon"}),(0,n.jsx)("meta",{name:"twitter:title",content:t},"twitter:title"),(0,n.jsx)("meta",{name:"twitter:description",content:r},"twitter:description"),(0,n.jsx)("meta",{name:"twitter:image",content:"".concat("https://psychedelicsanonymous.com","/social-preview.png")},"twitter:image"),(0,n.jsx)("meta",{name:"twitter:image:alt",content:"Psychedelics Anonymous Banner"},"twitter:image:alt"),(0,n.jsx)("meta",{name:"twitter:card",content:"summary"}),(0,n.jsx)("meta",{property:"og:url",content:i},"og:url"),(0,n.jsx)("meta",{property:"og:site_name",content:"Psychedelics Anonymous | A Web3 brand."},"og:site_name"),(0,n.jsx)("link",{rel:"shortcut icon",href:"/favicon.png",type:"image/x-icon"}),(0,n.jsx)("link",{rel:"icon",href:"".concat("https://psychedelicsanonymous.com","/favicon.png"),type:"image/x-icon"}),(0,n.jsx)("link",{rel:"canonical",href:"".concat("https://psychedelicsanonymous.com").concat(i)})]})}},37991:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return eK}});var n=r(85893),i=r(67294),o=r(24067);let a={mobile:768,tablet:1024,desktop:1280};function l(){let[e,t]=(0,i.useState)({isMobile:!1,isTablet:!1,isDesktop:!1,isLargeDesktop:!1,width:0,height:0});return(0,i.useEffect)(()=>{let e=()=>{let e=window.innerWidth,r=window.innerHeight;t({isMobile:e<a.mobile,isTablet:e>=a.mobile&&e<a.tablet,isDesktop:e>=a.tablet&&e<a.desktop,isLargeDesktop:e>=a.desktop,width:e,height:r})};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)},[]),e}let s=["BACKGROUND","ELEMENT","MASK","HEAD","NECK","SWEATSHIRT","HOOD","RAISED HOOD","EYELETS","DRAWSTRING","ZIPPER","JACKET","LAPELS","SHIRT","TIE","VEST","BUTTON","PIN","PARKA","PARKA HOOD","CLOAK","CLOAK HOOD","ADORNMENT"];function d(e){return e.sort((e,t)=>{let r=s.indexOf(e.toUpperCase()),n=s.indexOf(t.toUpperCase());return -1!==r&&-1!==n?r-n:0})}var c=r(41179),p=r(86744);let g=(0,p.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}}),m=(0,p.F4)({"0%, 100%":{opacity:.6},"50%":{opacity:1}}),u=c.Z.styled("section",{backgroundColor:"#000000",minHeight:"100vh",padding:"6rem $rg 4rem",width:"100%","@bp2":{padding:"8rem $lg 4rem"}}),h=c.Z.styled("div",{maxWidth:"1400px",margin:"0 auto",color:"$paIce"}),f=c.Z.styled("h1",{fontFamily:"$sawton",fontSize:"2.5rem",textTransform:"uppercase",textAlign:"center",color:"$paIce",marginBottom:"$sm","@bp2":{fontSize:"3rem"}}),y=c.Z.styled("p",{fontFamily:"$inter",fontSize:"0.85rem",fontWeight:400,letterSpacing:"3px",textTransform:"uppercase",textAlign:"center",color:"rgba(255, 255, 255, 0.4)",marginBottom:"$lg"}),x=c.Z.styled("div",{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",minHeight:"40vh",gap:"$rg",color:"$paLightGrey",fontFamily:"$inter",fontSize:"0.9rem"}),b=c.Z.styled("div",{width:"3rem",height:"3rem",borderRadius:"50%",borderTop:"2px solid white",borderBottom:"2px solid white",borderLeft:"2px solid transparent",borderRight:"2px solid transparent",animation:"".concat(g," 1s linear infinite")}),v=c.Z.styled("div",{width:"1.5rem",height:"1.5rem",borderRadius:"50%",borderTop:"2px solid white",borderBottom:"2px s
1olid white",borderLeft:"2px solid transparent",borderRight:"2px solid transparent",animation:"".concat(g," 1s linear infinite")}),k=c.Z.styled("div",{display:"flex"}),w=c.Z.styled("div",{flex:1,variants:{withSidebar:{true:{"@bp2":{marginLeft:"$lg"}}}}}),j=c.Z.styled("div",{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:"$lg"}),C=c.Z.styled("div",{display:"grid",gap:"$rg",gridTemplateColumns:"repeat(2, 1fr)","@bp2":{gridTemplateColumns:"repeat(3, 1fr)"},"@bp3":{gridTemplateColumns:"repeat(4, 1fr)"},"@bp5":{gridTemplateColumns:"repeat(5, 1fr)"}}),F=c.Z.styled("div",{borderRadius:"0.5rem",overflow:"hidden",cursor:"pointer",position:"relative"}),S=c.Z.styled("div",{position:"relative",paddingBottom:"100%",borderRadius:"0.5rem",overflow:"hidden"}),Z=c.Z.styled("div",{position:"absolute",inset:0,transform:"translateZ(0)"}),I=c.Z.styled("div",{position:"absolute",inset:0,background:"linear-gradient(to bottom, transparent, rgba(0,0,0,0.1))",transition:"all 300ms",zIndex:1,variants:{isNewDawn:{true:{background:"transparent"}}}}),T=c.Z.styled("div",{position:"absolute",top:"0.5rem",right:"0.5rem",zIndex:10}),$=c.Z.styled("div",{padding:"0.5rem",background:"transparent"}),R=c.Z.styled("h3",{fontSize:"0.875rem",fontWeight:600,fontFamily:"$inter",color:"$paIce",textAlign:"center",transition:"color 300ms"}),z=c.Z.styled("div",{borderRadius:"0.5rem",overflow:"hidden",cursor:"pointer"}),E=c.Z.styled("div",{paddingBottom:"100%",backgroundColor:"rgba(0,0,0,0.2)",borderRadius:"0.5rem",animation:"".concat(m," 2s ease-in-out infinite")}),L=c.Z.styled("div",{padding:"0.5rem","& > div":{height:"1rem",backgroundColor:"rgba(0,0,0,0.2)",borderRadius:"0.25rem",width:"75%",margin:"0 auto"}}),A=c.Z.styled("div",{borderRadius:"0.375rem",backdropFilter:"blur(4px)",boxShadow:"0 10px 15px -3px rgba(0,0,0,0.1)",letterSpacing:"0.05em",display:"inline-block",variants:{size:{sm:{padding:"0.125rem 0.375rem",fontSize:"0.75rem",fontWeight:600},md:{padding:"0.25rem 0.5rem",fontSize:"0.75rem",fontWeight:700},lg:{padding:"0.375rem 0.75rem",fontSize:"0.875rem",fontWeight:800}}},defaultVariants:{size:"md"}});c.Z.styled("div",{display:"inline-flex",alignItems:"center",backgroundColor:"rgba(17,24,39,0.8)",backdropFilter:"blur(4px)",border:"1px solid $paLunar",borderRadius:"0.5rem",variants:{size:{sm:{padding:"0.25rem 0.5rem",fontSize:"0.75rem",gap:"0.25rem"},md:{padding:"0.5rem 0.75rem",fontSize:"0.875rem",gap:"0.5rem"},lg:{padding:"0.75rem 1rem",fontSize:"1rem",gap:"0.75rem"}}},defaultVariants:{size:"md"}}),c.Z.styled("span",{color:"$paIce",fontWeight:700,variants:{size:{sm:{fontSize:"0.875rem"},md:{fontSize:"1.125rem"},lg:{fontSize:"1.25rem"}}}}),c.Z.styled("span",{color:"$paGrey",fontWeight:500}),c.Z.styled("div",{display:"flex",alignItems:"center",justifyContent:"center",padding:"0.25rem 0.5rem",backgroundColor:"rgba(70,105,251,0.2)",border:"1px solid rgba(70,105,251,0.3)",borderRadius:"0.375rem",color:"#93BBFD",fontWeight:500}),c.Z.styled("div",{display:"flex",alignItems:"center",gap:"0.5rem",padding:"0.25rem 0.75rem",borderRadius:"0.375rem",fontWeight:500}),c.Z.styled("div",{borderRadius:"50%",variants:{size:{sm:{width:"0.5rem",height:"0.5rem"},md:{width:"0.75rem",height:"0.75rem"}
1,lg:{width:"1rem",height:"1rem"}}},defaultVariants:{size:"md"}});let W=c.Z.styled("div",{display:"flex",gap:"0.5rem"}),B=c.Z.styled("button",{padding:"0.5rem 1rem",fontSize:"1.125rem",fontWeight:700,fontFamily:"$bBigerOver",textTransform:"uppercase",borderRadius:"0.5rem",border:"none",cursor:"pointer",transition:"all 200ms ease",position:"relative",color:"$paGrey",backgroundColor:"transparent","&:hover":{color:"$paIce"},"@bp2":{padding:"0.5rem 1.5rem",fontSize:"1.5rem"},variants:{active:{true:{color:"$paIce",boxShadow:"0 0 20px 4px rgba(168,85,247,0.35), 0 0 60px 8px rgba(168,85,247,0.15)",backgroundColor:"rgba(168,85,247,0.1)"}},tab:{genesis:{"&[data-active='true']":{boxShadow:"0 0 20px 4px rgba(168,85,247,0.35), 0 0 60px 8px rgba(168,85,247,0.15)",backgroundColor:"rgba(168,85,247,0.1)"}},traits:{"&[data-active='true']":{boxShadow:"0 0 20px 4px rgba(236,72,153,0.35), 0 0 60px 8px rgba(236,72,153,0.15)",backgroundColor:"rgba(236,72,153,0.1)"}}}}}),D=c.Z.styled("div",{position:"relative",zIndex:30,display:"inline-flex",alignItems:"center"}),M=c.Z.styled("button",{padding:"0.5rem",borderRadius:"0.5rem",transition:"background-color 200ms",color:"$paIce",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"rgba(255,255,255,0.1)"}});c.Z.styled("div",{position:"absolute",top:"100%",right:0,marginTop:"0.5rem",display:"flex",alignItems:"center",gap:"0.5rem",backgroundColor:"#000000",padding:"0.5rem",borderRadius:"0.375rem",zIndex:40});let O=c.Z.styled("div",{height:"100%",overflowY:"auto",position:"relative",backgroundColor:"#000000",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),N=c.Z.styled("div",{display:"none","@bp2":{display:"block",width:"20rem",backgroundColor:"#000000",paddingRight:"$lg",position:"sticky",top:0,alignSelf:"flex-start",height:"calc(100vh - 100px)",overflowY:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}}),G=c.Z.styled("button",{width:"2rem",height:"2rem",display:"flex",alignItems:"center",justifyContent:"center",color:"$paIce",backgroundColor:"transparent",border:"none",cursor:"pointer","&:hover":{backgroundColor:"rgba(255,255,255,0.1)"}}),P=c.Z.styled("button",{width:"100%",display:"flex",justifyContent:"space-between",alignItems:"center",padding:"0.5rem",paddingRight:"1rem",color:"$paIce",backgroundColor:"transparent",border:"none",cursor:"pointer",fontFamily:"$inter","&:focus":{outline:"none"},variants:{active:{true:{color:"transparent",backgroundClip:"text",backgroundImage:"linear-gradient(to right, #A78BFA, #EC4899, #EF4444)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}}}}),H=c.Z.styled("span",{textTransform:"uppercase",fontWeight:700,fontSize:"0.875rem",display:"flex",alignItems:"center",gap:"0.75rem"}),U=c.Z.styled("button",{backgroundColor:"rgba(63,63,70,1)",height:"1.5rem",width:"1.5rem",borderRadius:"0.375rem",fontSize:"0.75rem",marginLeft:"0.5rem",color:"$paIce",display:"flex",alignItems:"center",justifyContent:"center",border:"none",cursor:"pointer",transition:"background-color 200ms","&:hover":{backgroundColor:"rgba(82,82,91,1)"}}),_=c.Z.styled("div",{marginTop:"0.5rem",backgroundColor:"#000000"}),V=c.Z.styled("div",{maxHeight:"240px",overflowY:"auto",padding:"0 1rem"}),K=c.Z.styled("div",{display:"flex",alignItems:"center",width:"100%",padding:"0.25rem 0"}
1),Y=c.Z.styled("div",{width:"1rem",height:"1rem",borderRadius:"0.125rem",border:"2px solid $paLunar",backgroundColor:"transparent",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0,transition:"all 200ms",variants:{checked:{true:{backgroundImage:"linear-gradient(to right, #A78BFA, #EC4899, #EF4444)",borderColor:"transparent"}}}}),J=c.Z.styled("label",{flex:1,fontSize:"0.625rem",color:"$paIce",textTransform:"uppercase",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",marginLeft:"0.5rem",fontFamily:"$inter"}),X=c.Z.styled("span",{color:"$paGrey",fontSize:"0.625rem"}),q=c.Z.styled("div",{position:"relative",marginBottom:"1rem"}),Q=c.Z.styled("input",{width:"100%",backgroundColor:"transparent",color:"$paIce",border:"none",outline:"none",padding:"0.5rem 1rem 0.5rem 2.875rem",fontSize:"0.875rem",fontFamily:"$inter","&::placeholder":{color:"$paGrey"}}),ee=c.Z.styled("div",{position:"absolute",inset:"0 auto 0 0.75rem",display:"flex",alignItems:"center",pointerEvents:"none",color:"$paGrey"}),et=c.Z.styled("div",{position:"relative",height:"2rem",marginBottom:"1rem"}),er=c.Z.styled("div",{position:"absolute",left:0,right:0,display:"flex",alignItems:"center",height:"100%"}),en=c.Z.styled("div",{flexShrink:0,display:"flex",alignItems:"center",gap:"0.5rem",backgroundColor:"#000000",paddingRight:"0.5rem",zIndex:20}),ei=c.Z.styled("span",{fontSize:"0.75rem",color:"$paGrey",fontWeight:700,fontFamily:"$inter"}),eo=c.Z.styled("button",{height:"1.25rem",width:"1.25rem",backgroundColor:"rgba(39,39,42,1)",color:"$paIce",fontSize:"0.75rem",display:"flex",alignItems:"center",justifyContent:"center",borderRadius:"0.25rem",border:"none",cursor:"pointer",transition:"background-color 200ms","&:hover":{backgroundColor:"rgba(63,63,70,1)"}}),ea=c.Z.styled("div",{flex:1,overflow:"hidden",position:"relative"}),el=c.Z.styled("div",{overflowX:"auto",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"}}),es=c.Z.styled("div",{display:"flex",gap:"0.25rem",padding:"0 0.5rem"}),ed=c.Z.styled("button",{flexShrink:0,padding:"0.25rem 0.5rem",backgroundColor:"#000000",color:"$paIce",borderRadius:"9999px",fontSize:"0.75rem",fontWeight:500,fontFamily:"$inter",whiteSpace:"nowrap",display:"flex",alignItems:"center",border:"1px solid $paLunar",cursor:"pointer",transition:"background-color 200ms","&:hover":{backgroundColor:"rgba(39,39,42,1)"}}),ec=c.Z.styled("div",{position:"absolute",left:0,top:0,bottom:0,width:"1rem",background:"linear-gradient(to right, #000000, transparent)",pointerEvents:"none",zIndex:10}),ep=c.Z.styled("div",{position:"absolute",right:0,top:0,bottom:0,width:"1rem",background:"linear-gradient(to left, #000000, transparent)",pointerEvents:"none",zIndex:10});c.Z.styled("button",{display:"flex",alignItems:"center",justifyContent:"space-between",width:"100%",padding:"0.75rem 1rem",backdropFilter:"blur(4px)",borderRadius:"0.5rem",transition:"all 200ms",border:"1px solid",cursor:"pointer",fontFamily:"$inter","&:hover":{opacity:.9},"&:disabled":{opacity:.5,cursor:"not-allowed"}}),c.Z.styled("div",{position:"absolute",top:"100%",left:0,right:0,marginTop:"0.5rem",zIndex:50,backgroundColor:"rgba(17,24,39,0.95)",backdropFilter:"blur(4px)",border:"1px solid $paLunar",borderRadius:"0.5rem",boxShadow:"0 25px 50px -12px rgba(0,0,0,0.5)",overflow:"hidden"}),c.Z.styled("button",{width:"100%",padding:"0.75rem 1rem",textAlign:"left",transition:"all 150ms",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:"transparent",border:"none",cursor:"pointer",fontFamily:"$inter","&:hover":{backgroundColor:"rgba(31,41,55,0.8)"},variants:{selected:{true:{borderLeft:"4px solid"}}}}),c.Z.styled("div",{padding:"0.75rem 1rem",backgroundColor:"rgba(31,41,55,0.5)",borderTop:"1px solid $paLunar",display:"flex",justifyContent:"space-between",alignItems:"center",fontSize:"0.875rem"});let eg=c.Z.styled("div",{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.5)",zIndex:50}),em=c.Z.styled("div",{position:"absolute",right:0,top:0,bottom:0,width:"20rem",backgroundColor:"rgba(17,24,39,1)"}),eu=c.Z.styled("button",{padding:"0.5rem",borderRadius:"0.5rem",transition:"background-color 200ms",color:"$paIce",backgroundColor:"transparent",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center","&:hover":{backgroundColor:"rgba(255,255,255,0.1)"}}),eh=c.Z.styled("div",{textAlign:"center",padding:"2.5rem 0"}),ef=c.Z.styled("p",{fontSize:"1.25rem",color:"$paGrey",fontFamily:"$inter"}),ey=c.Z.styled("div",{display:"flex",justifyContent:"center",margin:"1.5rem 0"}),ex=c.Z.styled("input",{width:"100%",backgroundColor:"transparent",color:"$paIce",border:"none",outline:"none",padding:"0.25rem 0.5rem",fontSize:"0.75rem",fontFamily:"$inter",height:"1.75rem",marginLeft:"0.625rem","&::placeholder":{color:"$paGrey"}});c.Z.styled("div",{position:"fixed",inset:0,backgroundColor:"rgba(0,0,0,0.75)",display:"flex",alignItems:"flex-end",justifyContent:"center",zIndex:50,"@bp2":{alignItems:"center"}}),c.Z.styled("div",{position:"relative",width:"100%",height:"85vh",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem",marginTop:"auto",overflow:"hidden","@bp2":{width:"100%",maxWidth:"80rem",he
1ight:"auto",aspectRatio:"2/1",borderRadius:"0.5rem",display:"flex",margin:0}}),c.Z.styled("div",{position:"relative",backgroundColor:"transparent",width:"100%",aspectRatio:"1/1",borderTopLeftRadius:"0.5rem",borderTopRightRadius:"0.5rem","@bp2":{width:"50%",aspectRatio:"auto",borderRadius:0}}),c.Z.styled("div",{position:"absolute",inset:0}),c.Z.styled("div",{padding:"$lg",display:"flex",flexDirection:"column",minHeight:"100%","@bp2":{width:"50%",height:"100%",overflowY:"auto"}}),c.Z.styled("h2",{fontFamily:"$sawton",fontWeight:700,fontSize:"1.5rem","@bp2":{fontSize:"2rem"}}),c.Z.styled("p",{fontFamily:"$inter",fontSize:"1rem",marginTop:"0.25rem"}),c.Z.styled("div",{display:"grid",gridTemplateColumns:"repeat(2, 1fr)",gap:"0.75rem"}),c.Z.styled("div",{backgroundColor:"rgba(100,116,139,0.15)",backdropFilter:"blur(1px)",padding:"0.625rem",borderRadius:"0.5rem",transition:"all 200ms",cursor:"pointer",display:"flex",alignItems:"center",height:"50px","&:hover":{backgroundColor:"rgba(100,116,139,0.2)"},"&:active":{backgroundColor:"rgba(100,116,139,0.25)"}}),c.Z.styled("div",{display:"flex",alignItems:"center",gap:"0.75rem",width:"100%"}),c.Z.styled("div",{display:"flex",alignItems:"center",justifyContent:"center",width:"1.25rem",marginLeft:"0.5rem"}),c.Z.styled("span",{fontSize:"9px",fontWeight:300,fontFamily:"$inter",textTransform:"uppercase",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",opacity:.6,letterSpacing:"0.1em"}),c.Z.styled("span",{fontSize:"11px",fontWeight:700,fontFamily:"$inter",textTransform:"uppercase",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}),c.Z.styled("div",{display:"flex",flexDirection:"column",minWidth:0}),c.Z.styled("div",{marginTop:"auto",paddingTop:"$rg",borderTop:"1px solid rgba(255,255,255,0.1)"}),c.Z.styled("button",{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"0.5rem 0",backgroundColor:"transparent",border:"none",cursor:"pointer",fontFamily:"$inter",fontSize:"0.875rem","&:disabled":{opacity:.5,cursor:"not-allowed"}}),c.Z.styled("div",{display:"flex",alignItems:"center",gap:"0.75rem"}),c.Z.styled("div",{borderTop:"1px solid rgba(255,255,255,0.1)"}),c.Z.styled("div",{width:"3rem",height:"3rem",borderRadius:"50%",borderTop:"2px solid",borderBottom:"2px solid",borderLeft:"2px solid transparent",borderRight:"2px solid transparent",animation:"".concat((0,p.F4)({"0%":{transform:"rotate(0deg)"},"100%":{transform:"rotate(360deg)"}})," 1s linear infinite")}),c.Z.styled("div",{backgroundColor:"rgba(17,24,39,0.8)",backdropFilter:"blur(4px)",border:"1px solid $paLunar",borderRadius:"0.5rem"}),c.Z.styled("button",{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"$rg",backgroundColor:"transparent",border:"none",cursor:"pointer",borderRadius:"0.5rem",transition:"background-color 200ms","&:hover":{backgroundColor:"rgba(31,41,55,0.5)"}}),c.Z.styled("div",{display:"flex",alignItems:"center",gap:"0.75rem"}),c.Z.styled("span",{fontSize:"0.75rem",backgroundColor:"$paLunar",color:"$paLightGrey",padding:"0.25rem 0.5rem",borderRadius:"9999px",fontFamily:"$inter"}),c.Z.styled("div",{display:"flex",gap:"0.75rem"}),c.Z.styled("div",{flexShrink:0,width:"2rem",height:"2rem",borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",border:"1px solid"}),c.Z.styled("div",{flex:1,minWidth:0}),c.Z.styled("div",{display:"flex",alignItems:"center",justifyContent:"space-between"}),c.Z.styled("span",{fontSize:"0.75rem",fontWeight:500,fontFamily:"$inter",color:"$paLightGrey"}),c.Z.styled("span",{fontSize:"0.75rem",fontFamily:"$inter",color:"$paGrey"}),c.Z.styled("p",{fontSize:"0.875rem",fontFamily:"$inter",color:"$paGrey",marginTop:"0.25rem"}),c.Z.styled("div",{fontSize:"0.75rem",fontFamily:"$inter",backgroundColor:"rgba(31,41,55,0.5)",borderRadius:"0.25rem",padding:"0.25rem 0.5rem",display:"inline-block",marginRight:"0.5rem"}),c.Z.styled("div",{marginTop:"0.5rem",fontSize:"0.75rem",fontFamily:"$inter",padding:"0.25rem 0.5rem",borderRadius:"0.25rem",display:"inline-block",variants:{positive:{true:{backgroundColor:"rgba(134,239,172,0.1)",color:"#86EFAC"},false:{backgroundColor:"rgba(248,113,113,0.1)",color:"#F87171"}}}}),c.Z.styled("div",{display:"flex",flexDirection:"column",alignItems:"center"}),c.Z.styled("div",{position:"relative",aspectRatio:"1/1",cursor:"pointer",width:"100%"}),c.Z.styled("div",{position:"relative",width:"100%",height:"100%",borderRadius:"0.5rem",overflow:"hidden",variants:{bg:{dark:{backgroundColor:"rgba(39,39,42,1)"},white:{backgroundColor:"white"},transparent:{backgroundColor:"transparent"}}},defaultVariants:{bg:"white"}}),c.Z.styled("div",{position:"absolute",inset:0,display:"flex",alignItems:"center",justifyContent:"center"}),c.Z.styled("div",{position:"absolute",top:"0.5rem",right:"0.5rem",padding:"0.125rem 0.5rem",borderRadius:"0.375rem",fontSize:"0.75rem",fontWeight:800,fontFamily:"$inter",letterSpacing:"0.05em",zIndex:10,color:"$paIce",textShadow:"0px 1px 2px rgba(0,0,0,0.5)",backdropFilter:"blur(1px)",background:"linear-gradient(45deg, rgba(200,70,70,0.8) 0%, rgba(200,150,70,0.8) 17%, rgba(200,200,100,0.8) 33%, rgba(70,200,120,0.8) 50%, rgba(70,180,200,0.8) 67%, rgba(150,70,200,0.8) 83%, rgba(200,70,70,0.8) 100%)"}),c.Z.styled("p",{marginTop:"0.5rem",fontSize:"0.875rem",fontFamily:"$inter",textAlign:"center",color:"$paIce",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",maxWidth:"100%"}),c.Z.styled("div",{display:"grid",gap:"$rg",gridTemplateColumns:"repeat(2, 1fr)","@bp2":{gridTemplateColumns:"repeat(3, 1fr)"},"@bp3":{gridTemplateColumns:"repeat(4, 1fr)"},"@bp5":{gridTemplateColumns:"repeat(5, 1fr)"}}),c.Z.styled("div",{gridColumn:"1 / -1",textAlign:"center",padding:"2.5rem 0",color:"$paGrey",fontFamily:"$inter"}),c.Z.styled("div",{display:"flex",flexDirection:"column",gap:"0.5rem",position:"relative","@bp2":{flexDirection:"row",alignItems:"center"}}),c.Z.styled("div",{flex:1,display:"grid",gridTemplateColumns:"1fr",gap:"0.5rem","@bp2":{gridTemplateColumns:"repeat(2, 1fr)"},"@bp3":{gridTemplateColumns:"repeat(4, 1fr)"}}),c.Z.styled("input",{width:"100%",backgroundColor:"transparent",color:"$paIce",border:"none",outline:"none",padding:"0.5rem 1rem 0.5rem 2.25rem",fontSize:"0.875rem",fontFamily:"$inter","&::placeholder":{color:"$paGrey"}}),c.Z.styled("button",{width:"100%",backgroundColor:"transparent",color:"$paIce",border:"none",padding:"0.5rem 1rem",fontFamily:"$inter",fontSize:"0.875rem",cursor:"pointer",display:"flex",alignItems:"center",gap:"0.5rem","&:focus":{outline:"none"}}),c.Z.styled("div",{position:"absolute",top:"100%",left:0,right:0,zIndex:50,backgroundColor:"$paDark",color:"$paIce",border:"1px solid $paLunar",borderRadius:"0.375rem",maxHeight:"300px",overflowY:"auto",marginTop:"0.25rem"}),c.Z.styled("button",{width:"100%",padding:"0.5rem 1rem",backgroundColor:"transparent",border:"none",color:"$paIce",fontFamily:"$inter",fontSize:"0.875rem",cursor:"pointer",display:"flex",alignItems:"center",gap:"0.5rem",textAlign:"left","&:hover":{backgroundColor:"rgba(255,255,255,0.05)"}}),c.Z.styled("div",{display:"flex",alignItems:"center",gap:"$rg",position:"absolute",top:"-65px",right:0,zIndex:10,"@bp2":{marginRight:"0.5rem"}}),c.Z.styled("button",{padding:"0.5rem",borderRadius:"0.375rem",backgroundColor:"transparent",border:"none",cursor:"pointer",color:"$paIce",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 200ms","&:hover":{backgroundColor:"rgba(255,255,255,0.1)"},variants:{active:{true:{color:"$paIce",backgroundColor:"rgba(255,255,255,0.15)"},false:{color:"$paGrey"}}}});let eb=()=>(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M18 6 6 18"}),(0,n.jsx)("path",{d:"m6 6 12 12"})]}),ev=()=>(0,n.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("circle",{cx:"11",cy:"11",r:"8"}),(0,n.jsx)("path",{d:"m21 21-4.3-4.3"})]}),ek=()=>(0,n.jsx)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M5 12h14"})}),ew=()=>(0,n.jsxs)("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M5 12h14"}),(0,n.jsx)("path",{d:"M12 5v14"})]}),ej=()=>(0,n.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"white",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("path",{d:"M20 6 9 17l-5-5"})});function eC(e){let{onFilterChange:t,selectedFilters:r,traitData:o,isOpen:a,onSearch:s,searchTerm:c,onClose:p}=e,g=(0,i.useRef)(null),{isMobile:m}=l(),{expandedCategories:u,traitSearchTerms:h,isHoveringCount:f,setIsHoveringCount:y,toggleCategory:x,handleFilterChange:b,clearCategoryFilters:v,handleTraitSearch:k,filterTraits:w,getSelectedTraitCount:j}=function(e){let{selectedFilters:t,onFilterChange:r}=e,[n,o]=(0,i.useState)([]),[a,l]=(0,i.useState)({}),[s,c]=(0,i.useState)(null),p=(0,i.useCallback)(e=>{o(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},[]),g=(0,i.useCallback)((e,n,i)=>{let o="".concat(e,":").concat(n);r(i?[...t,o]:t.filter(e=>e!==o))},[t,r]),m=(0,i.useCallback)((e,n)=>{n.stopPropagation(),r(t.filter(t=>!t.startsWith("".concat(e,":"))))},[t,r]);return{expandedCategories:n,traitSearchTerms:a,isHoveringCount:s,setIsHoveringCount:c,toggleCategory:p,handleFilterChange:g,clearCategoryFilters:m,handleTraitSearch:(0,i.useCallback)((e,t)=>{l(r=>({...r,[e]:t}))},[]),filterTraits:(0,i.useCallback)((e,t)=>{let r=e;return t&&(r=e.filter(e=>t.toLowerCase().split(" ").every(t=>e.name.toLowerCase().split(" ").some(e=>e.startsWith(t))))),r.sort((e,t)=>
1t.supply-e.supply)},[]),getSelectedTraitCount:(0,i.useCallback)(e=>t.filter(t=>t.startsWith("".concat(e,":"))).length,[t]),sortCategories:d}}({selectedFilters:r,onFilterChange:t});(0,i.useEffect)(()=>{if(!m||!a||!p)return;let e=e=>{g.current&&!g.current.contains(e.target)&&p()};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[m,a,p]);let C=d(Object.keys(o));return(0,n.jsxs)(O,{ref:g,children:[p&&(0,n.jsx)("div",{style:{display:"flex",justifyContent:"flex-end",padding:"0.5rem"},children:(0,n.jsx)(G,{onClick:p,children:(0,n.jsx)(eb,{})})}),(0,n.jsxs)(q,{children:[(0,n.jsx)(ee,{children:(0,n.jsx)(ev,{})}),(0,n.jsx)(Q,{type:"text",placeholder:"Search ID...",value:c,onChange:e=>s(e.target.value)})]}),(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"1rem"},children:C.map(e=>{let t=o[e],i=j(e),a=i>0,l=u.includes(e);return(0,n.jsxs)("div",{style:{backgroundColor:"#000000"},children:[(0,n.jsxs)(P,{active:a,onClick:()=>x(e),children:[(0,n.jsxs)(H,{children:[(0,n.jsx)("span",{style:a?{background:"linear-gradient(to right, #A78BFA, #EC4899, #EF4444)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent"}:void 0,children:e}),i>0&&(0,n.jsx)(U,{onClick:t=>v(e,t),onMouseEnter:()=>y(e),onMouseLeave:()=>y(null),children:f===e?(0,n.jsx)(eb,{}):i})]}),(0,n.jsx)("span",{style:{color:a?"#F3F5F7":void 0},children:l?(0,n.jsx)(ek,{}):(0,n.jsx)(ew,{})})]}),l&&(0,n.jsxs)(_,{children:[!m&&(0,n.jsx)("div",{style:{padding:"0 1rem",marginBottom:"0.5rem"},children:(0,n.jsx)(ex,{type:"text",placeholder:"Search ...",value:h[e]||"",onChange:t=>k(e,t.target.value)})}),(0,n.jsx)(V,{children:(0,n.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:"0.25rem"},children:w(t,h[e]||"").map(t=>{let i=r.includes("".concat(e,":").concat(t.name));return(0,n.jsxs)(K,{children:[(0,n.jsx)(Y,{checked:i,onClick:()=>b(e,t.name,!i),children:i&&(0,n.jsx)(ej,{})}),(0,n.jsxs)(J,{onClick:()=>b(e,t.name,!i),children:[(0,n.jsx)("span",{style:{color:"#F3F5F7"},children:t.name.toUpperCase()}),(0,n.jsxs)(X,{children:["(",t.supply,")"]})]})]},"".concat(e,"-").concat(t.name))})})})]})]},e)})})]})}let eF=e=>{let{size:t=12}=e;return(0,n.jsxs)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{marginLeft:"0.25rem",color:"#4A555B",flexShrink:0},children:[(0,n.jsx)("path",{d:"M18 6 6 18"}),(0,n.jsx)("path",{d:"m6 6 12 12"})]})};function eS(e){let{selectedFilters:t,handleClearFilters:r,handleRemoveFilter:o,onFilterChange:a}=e,l=(0,i.useRef)(null),[s,d]=(0,i.useState)(!1);(0,i.useEffect)(()=>{let e=l.current;e&&(e.scrollLeft=e.scrollWidth)},[t]);let c=e=>{o(e);let r=t.filter(t=>t!==e);a&&a(r)};return(0,n.jsx)(et,{children:(0,n.jsxs)(er,{children:[(0,n.jsxs)(en,{children:[(0,n.jsx)(ei,{children:"FILTERS"}),t.length>0&&(0,n.jsx)(eo,{onClick:()=>{r(),a&&a([])},onMouseEnter:()=>d(!0),onMouseLeave:()=>d(!1),children:s?(0,n.jsx)(eF,{size:12}):t.length})]}),t.length>0&&(0,n.jsxs)(ea,{children:[(0,n.jsx)(el,{ref:l,children:(0,n.jsx)(es,{children:t.map(e=>{let[t,r]=e.split(":");return(0,n.jsxs)(ed,{onClick:()=>c(e),children:[(0,n.jsx)("span",{children:"".concat(t.toUpperCase(),":").concat(r.toUpperCase())}),(0,n.jsx)(eF,{})]},e)})})}),(0,n.jsx)(ec,{}),(0,n.jsx)(ep,{})]})]})})}function eZ(e){let{activeTab:t,setActiveTab:r}=e;return(0,n.jsxs)(W,{children:[(0,n.jsx)(B,{active:"genesis"===t,tab:"genesis","data-active":"genesis"===t,onClick:()=>r("genesis"),children:"GENESIS"}),(0,n.jsx)(B,{active:"traits"===t,tab:"traits","data-active":"traits"===t,onClick:()=>r("traits"),children:"TRAITS"})]})}var eI=r(89755),eT=r.n(eI),e$=r(43495);let eR="nft-trait-cache";function ez(){try{let e=localStorage.getItem(eR);return e?JSON.parse(e):{}}catch(e){return{}}}function eE(){let[e,t]=(0,i.useState)(ez),r=(0,i.useRef)(new Set),n=(0,i.useCallback)(e=>{try{t(e),localStorage.setItem(eR,JSON.stringify(e))}catch(e){console.error("Failed to save cache:",e)}},[]),o=(0,i.useCallback)(async e=>{let t=e.map(e=>fetch("https://api.newdawn.xyz/v1/collections/1/mt/".concat(e)).then(e=>
1e.ok?e.json():null).catch(()=>null));return(await Promise.all(t)).filter(e=>null!==e)},[]),a=(0,i.useCallback)(async t=>{if(!(null==t?void 0:t.length))return;let i=Date.now(),a=t.filter(t=>{if(r.current.has(t))return!1;let n=e[t];return!n||i-n.lastUpdated>864e5});if(0===a.length)return;let l=a.slice(0,20);l.forEach(e=>r.current.add(e));try{let t=(await o(l)).reduce((e,t)=>{if(!t)return e;let r=(t.attributes||[]).reduce((e,t)=>{var r;let n=null!==(r=t.traitType)&&void 0!==r?r:t.trait_type;return n&&(e[n]||(e[n]=[]),e[n].push(t.value)),e},{});return e[t.id]={traits:r,image:t.image,name:t.name,lastUpdated:i},e},{});n({...e,...t})}finally{l.forEach(e=>r.current.delete(e))}},[e,o,n]),l=(0,i.useCallback)(t=>{let r=e[t];if(!r||Date.now()-r.lastUpdated>864e5)return null;let n=Object.entries(r.traits).flatMap(e=>{let[t,r]=e;return r.map(e=>({traitType:t,value:e}))});return{id:t,name:r.name,image:r.image,attributes:n}},[e]);return{fetchAndCacheNFTs:a,traitCache:e,getNFTData:l}}async function eL(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e3,n=null;for(let i=0;i<t;i++)try{let t=await fetch(e,{method:"GET",headers:{"Content-Type":"application/json"}});if(!t.ok)throw Error("HTTP error! status: ".concat(t.status));return await t.json()}catch(e){n=e instanceof Error?e:Error("Unknown error occurred"),i<t-1&&await new Promise(e=>setTimeout(e,r))}throw n||Error("Failed to fetch after multiple attempts")}let eA={getAllRanks:async()=>eL("/.netlify/functions/get-all-nft-ranks"),getAllTraits:async()=>eL("/.netlify/functions/get-all-traits"),getTokenTraits:async()=>eL("/.netlify/functions/get-token-traits"),async getNFTType(e){let t=await eL("/.netlify/functions/get-nft-type?tokenId=".concat(e));return t.success&&t.data?t.data.type:null}},eW=new Map,eB={"1/1":{type:"1/1",color:"#FFD700",gradient:"linear-gradient(45deg, #FFD700 0%, #FFA500 100%)",textColor:"#000000",description:"One-of-a-kind unique NFT"},Handmade:{type:"Handmade",color:"#8B4513",gradient:"linear-gradient(45deg, #D2691E 0%, #8B4513 100%)",textColor:"#FFFFFF",description:"Handcrafted with care"},Deconstructed:{type:"Deconstructed",color:"#FF6B35",gradient:"linear-gradient(45deg, #FF6B35 0%, #E74C3C 100%)",textColor:"#FFFFFF",description:"Broken down and rebuilt"},Untouched:{type:"Untouched",color:"#27AE60",gradient:"linear-gradient(45deg, #2ECC71 0%, #27AE60 100%)",textColor:"#FFFFFF",description:"In pristine original form"},"The Light":{type:"The Light",color:"#F39C12",gradient:"linear-gradient(45deg, #F1C40F 0%, #F39C12 100%)",textColor:"#000000",description:"Illuminated collection"},OG:{type:"OG",color:"rainbow",gradient:"linear-gradient(45deg, rgba(200,70,70,0.8) 0%, rgba(200,150,70,0.8) 16.66%, rgba(200,200,100,0.8) 33.33%, rgba(70,200,120,0.8) 50%, rgba(70,180,200,0.8) 66.66%, rgba(150,70,200,0.8) 83.33%, rgba(200,70,70,0.8) 100%)",textColor:"#F3F5F7",description:"Original Genesis collection"},"The Night":{type:"The Night",color:"#6B73FF",gradient:"linear-gradient(45deg, #9B59B6 0%, #6B73FF 100%)",textColor:"#FFFFFF",description:"Darkened collection"}};function eD(e){let{type:t,size:r="md",faded:i=!1}=e,o=eB[t];return(0,n.jsx)(A,{size:r,css:{background:o.gradient,color:o.textColor,textShadow:"#FFFFFF"===o.textColor?"0px 1px 2px rgba(0, 0, 0, 0.5)":"0px 1px 2px rgba(255, 255, 255, 0.3)",border:"OG"===o.type?"1px solid rgba(255, 255, 255, 0.3)":"none",opacity:i?.9:1},title:o.description,children:t})}function eM(e){let{tokenId:t,onClick:r,rank:o}=e,[a,l]=(0,i.useState)(null),[s,d]=(0,i.useState)(!0),[c,p]=(0,i.useState)(!1),{traitCache:g,getNFTData:m}=eE(),{type:u,isLoading:h,fallbackUsed:f}=function(e){let[t,r]=(0,i.useState)(null),[n,o]=(0,i.useState)(!1),[a,l]=(0,i.useState)(null),[s,d]=(0,i.useState)(!1),c=(0,i.useCallback)(async()=>{o(!0),l(null);try{let t=eW.get(e);if(t&&Date.now()-t.timestamp<3e5){r(t.type),d(t.fallbackUsed),o(!1);return}let n=await eA.getNFTType(e);n&&(r(n),d(!1),eW.set(e,{type:n,timestamp:Date.now(),fallbackUsed:!1}))}catch(e){l(e instanceof Error?e.message:"Unknown error occurred"),console.error("Error fetching NFT type:",e)}finally{o(!1)}},[e]);return(0,i.useEffect)(()=>{e>0&&c()},[e,c]),{type:t,isLoading:n,error:a,fallbackUsed:s,refetch:c}}(t);if((0,i.useEffect)(()=>{(async function(){d(!0);let e=m(t);if(e){let r=e.attributes.some(e=>"New Dawn"===e.traitType);l({id:t,name:e.name||"PA #".concat(t),image:r?"/placeholder.svg":e.image||"",rank:o||0,traits:e.attributes.map(e=>({type:e.traitType,name:e.value,rarity:"Unknown",origin:"Genesis",supply:0,collection:"Psychedelics Anonymous",class:"",image:""}))}),d(!1);return}if(g[t]){let e=g[t];
1l({id:t,name:e.name||"PA #".concat(t),image:e.image||"https://api.newdawn.xyz/v1/collections/1/mt/".concat(t),rank:o||0,traits:Object.entries(e.traits).flatMap(e=>{let[t,r]=e;return r.map(e=>({type:t,name:e,rarity:"Unknown",origin:"Genesis",supply:0,collection:"Psychedelics Anonymous",class:"Default",image:""}))})}),d(!1);return}try{let e=await fetch("https://api.newdawn.xyz/v1/collections/1/mt/".concat(t));if(!e.ok)throw Error("Failed to fetch NFT data");let r=await e.json(),n=r.attributes.some(e=>{var t;return(null!==(t=e.traitType)&&void 0!==t?t:e.trait_type)==="New Dawn"});l({id:t,name:r.name||"PA #".concat(t),image:n?"/placeholder.svg":r.image,rank:o||0,traits:r.attributes.map(e=>{var t,r;return{type:null!==(r=null!==(t=e.traitType)&&void 0!==t?t:e.trait_type)&&void 0!==r?r:"",name:e.value,rarity:"Unknown",origin:"Genesis",supply:0,collection:"Psychedelics Anonymous",class:"",image:""}})})}catch(e){l({id:t,name:"PA #".concat(t),image:"/placeholder.svg?height=300&width=300",rank:o||0,traits:[{type:"Origin",name:"New Dawn",rarity:"Unknown",origin:"Genesis",supply:0,collection:"Psychedelics Anonymous",class:"",image:""}]})}finally{d(!1)}})()},[t,o,g,m]),s)return(0,n.jsxs)(z,{children:[(0,n.jsx)(E,{}),(0,n.jsx)(L,{children:(0,n.jsx)("div",{})})]});if(!a)return null;let y=a.traits.some(e=>"New Dawn"===e.type);return(0,n.jsx)(e$.E.div,{whileHover:{scale:1.05},transition:{type:"spring",stiffness:300},onClick:()=>r(a),children:(0,n.jsxs)(F,{children:[(0,n.jsxs)(S,{children:[(0,n.jsx)(I,{isNewDawn:y}),u&&!h&&(0,n.jsx)(T,{children:(0,n.jsx)(eD,{type:u,size:"sm",faded:f})}),(0,n.jsx)(Z,{children:(0,n.jsx)(eT(),{src:function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:600;return e.startsWith("/placeholder.svg")||e.includes("placeholder")?e:e.startsWith("http")?"/.netlify/functions/optimize-image?url=".concat(encodeURIComponent(e),"&w=").concat(t,"&q=85"):e}(a.image,600),alt:a.name,layout:"fill",objectFit:"cover",onError:()=>p(!0),loading:y?"eager":"lazy",sizes:"(max-width: 768px) 50vw, (max-width: 1200px) 33vw, 25vw"})})]}),(0,n.jsx)($,{children:(0,n.jsxs)(R,{children:["PA #",a.id]})})]})})}function eO(e){let{displayedTokenIds:t,ranks:r,setSelectedNFT:i}=e;return(0,n.jsx)(C,{children:t.map(e=>(0,n.jsx)(eM,{tokenId:e,onClick:e=>i(e),rank:r[e]},e))})}var eN=r(51526);let eG=()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M3 12a9 9 0 0 0 9 9 9.75 9.75 0 0 0 6.74-2.74L21 16"}),(0,n.jsx)("path",{d:"M21 12a9 9 0 0 0-9-9 9.75 9.75 0 0 0-6.74 2.74L3 8"}),(0,n.jsx)("path",{d:"M3 3v5h5"}),(0,n.jsx)("path",{d:"M21 21v-5h-5"})]}),eP=[{icon:eG,option:"random"},{icon:()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"m5 12 7-7 7 7"}),(0,n.jsx)("path",{d:"M12 19V5"})]}),option:"ascending"},{icon:()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M12 5v14"}),(0,n.jsx)("path",{d:"m19 12-7 7-7-7"})]}),option:"descending"},{icon:()=>(0,n.jsxs)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,n.jsx)("path",{d:"M6 9H4.5a2.5 2.5 0 0 1 0-5H6"}),(0,n.jsx)("path",{d:"M18 9h1.5a2.5 2.5 0 0 0 0-5H18"}),(0,n.jsx)("path",{d:"M4 22h16"}),(0,n.jsx)("path",{d:"M10 14.66V17c0 .55-.47.98-.97 1.21C7.85 18.75 7 20.24 7 22"}),(0,n.jsx)("path",{d:"M14 14.66V17c0 .55.47.98.97 1.21C16.15 18.75 17 20.24 17 22"}),(0,n.jsx)("path",{d:"M18 2H6v7a6 6 0 0 0 12 0V2Z"})]}),option:"rarity"}];var eH=e=>{var t;let{sortOption:r,onSort:i,isSortExpanded:o,onExpandChange:a}=e,l=(null===(t=eP.find(e=>e.option===r))||void 0===t?void 0:t.icon)||eG;return(0,n.jsxs)(D,{children:[(0,n.jsx)(M,{onClick:()=>{"random"===r&&o&&i("random"),a(!o)},children:(0,n.jsx)(l,{})}),(0,n.jsx)(eN.M,{children:o&&(0,n.jsx)(e$.E.div,{initial:{opacity:0,y:-8}
1,animate:{opacity:1,y:0},exit:{opacity:0,y:-8},transition:{duration:.15},style:{position:"absolute",top:"100%",right:0,marginTop:"0.5rem",display:"flex",alignItems:"center",gap:"0.5rem",backgroundColor:"#000000",padding:"0.5rem",borderRadius:"0.375rem",zIndex:40},children:eP.map(e=>{let{icon:t,option:r}=e;return(0,n.jsx)(M,{onClick:()=>{i(r),a(!1)},children:(0,n.jsx)(t,{})},r)})})})]})};function eU(e,t,r){let n=[...e];switch(t){case"ascending":return n.sort((e,t)=>e-t);case"descending":return n.sort((e,t)=>t-e);case"rarity":return n.sort((e,t)=>{var n,i;return(null!==(n=r[e])&&void 0!==n?n:1/0)-(null!==(i=r[t])&&void 0!==i?i:1/0)});case"random":for(let e=n.length-1;e>0;e--){let t=Math.floor(Math.random()*(e+1));[n[e],n[t]]=[n[t],n[e]]}return n;default:return n}}let e_=()=>(0,n.jsx)("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:(0,n.jsx)("polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3"})});function eV(){let{isMobile:e}=l(),[t]=(0,i.useState)(()=>Array.from({length:9595},(e,t)=>t+1)),[r,o]=(0,i.useState)([]),[a,s]=(0,i.useState)([]),[d,c]=(0,i.useState)(!1),[p,g]=(0,i.useState)("genesis"),m=(0,i.useRef)(null),[C,F]=(0,i.useState)(null),[S,Z]=(0,i.useState)({}),[I,T]=(0,i.useState)({}),[$,R]=(0,i.useState)(!0),[z,E]=(0,i.useState)(!1),[L,A]=(0,i.useState)({}),{fetchAndCacheNFTs:W}=eE(),{searchTerm:B,isSearching:D,selectedFilters:M,setSelectedFilters:O,sortOption:G,page:P,setPage:H,handleSearch:U,handleFilterChange:_,handleSort:V}=function(e){let{tokenIds:t,tokenTraitsMap:r,ranks:n,setDisplayedTokenIds:o,setFilteredIds:a}=e,[l,s]=(0,i.useState)(""),[d,c]=(0,i.useState)(!1),[p,g]=(0,i.useState)([]),[m,u]=(0,i.useState)("random"),[h,f]=(0,i.useState)(1),y=(0,i.useCallback)(e=>{if(s(e),c(""!==e),f(1),""!==e){let r=parseInt(e),n=t.filter(e=>e===r);o(n),a(n)}else{let e=eU(t,m,n);a(e),o(e.slice(0,20))}},[t,m,n,o,a]),x=(0,i.useCallback)(e=>{if(g(e),f(1),0===e.length){let e=eU(t,m,n);a(e),o(e.slice(0,20));return}let i=e.map(e=>{let[t,r]=e.split(":");return{category:t.trim(),trait:r.trim()}}),l=eU(t.filter(e=>{let t=r[e]||[];return i.every(e=>{let{trait:r}=e;return t.includes(r)})}),m,n);a(l),o(l.slice(0,20))},[t,r,m,n,a,o]),b=(0,i.useCallback)(e=>{u(e),f(1),a(t=>{let r=eU(t,e,n);return o(r.slice(0,20)),r})},[n,o,a]);return{searchTerm:l,isSearching:d,selectedFilters:p,setSelectedFilters:g,sortOption:m,page:h,setPage:f,handleSearch:y,handleFilterChange:x,handleSort:b}}({tokenIds:t,tokenTraitsMap:L,ranks:S,setDisplayedTokenIds:o,setFilteredIds:s});(0,i.useEffect)(()=>{!async function(){try{let[e,r,n]=await Promise.all([eA.getAllRanks(),eA.getAllTraits(),eA.getTokenTraits()]);Z(e),T(r);let i=n.reduce((e,t)=>(e[t.tokenId]=t.traits,e),{});A(i);let a=eU(t,"random",e);o(a.slice(0,20)),s(a)}catch(e){console.error("Failed to fetch data:",e)}finally{R(!1)}}()},[]);let K=(0,i.useCallback)(async()=>{try{if(D)return;let e=P+1,t=(e-1)*20,r=a.slice(t,t+20);r.length>0&&(W&&await W(r),o(e=>[...e,...r]),H(e))}catch(e){console.error("Error in loadMore:",e)}},[P,a,D,W,H]);return((0,i.useEffect)(()=>{let e=new IntersectionObserver(e=>{e[0].isIntersecting&&K()},{root:null,rootMargin:"20px",threshold:1}),t=m.current;return t&&e.observe(t),()=>{t&&e.unobserve(t)}},[K]),$)?(0,n.jsx)(u,{children:(0,n.jsx)(x,{children:(0,n.jsx)(b,{})})}):(0,n.jsxs)(u,{children:[(0,n.jsxs)(h,{children:[(0,n.jsx)(f,{children:"Rarity Gallery"}),(0,n.jsx)(y,{children:"Explore the full collection"}),(0,n.jsxs)(k,{children:["genesis"===p&&(0,n.jsx)(N,{children:(0,n.jsx)(eC,{selectedFilters:M,traitData:I,isOpen:!0,onSearch:U,searchTerm:B,onFilterChange:_})}),(0,n.jsxs)(w,{withSidebar:"genesis"===p,children:[(0,n.jsxs)(j,{children:[(0,n.jsx)(eZ,{activeTab:p,setActiveTab:g}),"genesis"===p&&(0,n.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:"1rem"},children:[(0,n.jsx)(eH,{sortOption:G,onSort:V,isSortExpanded:z,onExpandChange:E,isMobile:e}),e&&(0,n.jsx)(eu,{onClick:()=>c(!0),children:(0,n.jsx)(e_,{})})]})]}),(0,n.jsx)("div",{style:{position:"relative"},children:"genesis"===p?(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(eS,{selectedFilters:M,handleClearFilters:()=>{O([]),_([])},handleRemoveFilter:e=>{let t=M.filter(t=>t!==e);O(t),_(t)},isMobile:e}),(0,n.jsx)(eO,{displayedTokenIds:r,ranks:S,setSelectedNFT:F}),0===r.length&&(0,n.jsx)(eh,{children:(0,n.jsx)(ef,{children:"No NFTs found matching the current filters."})}),!D&&0===M.length&&(0,n.jsx)(ey,{ref:m,children:(0,n.jsx)(v,{})})]}):(0,n.jsx)(eh,{children:(0,n.jsx)(ef,{children:"Traits browser coming in Phase 5."})})})]})]})]}),e&&d&&(0,n.jsx)(eg,{children:(0,n.jsx)(em,{children:(0,n.jsx)(eC,{selectedFilters:M,traitData:I,isOpen:!0,onSearch:U,searchTerm:B,onClose:()=>c(!1),onFilterChange:_})})})]})}function eK(){return(0,n.jsxs)(n.Fragment,{children:[(0,n.jsx)(o.Z,{title:"Rarity Gallery | Psychedelics Anonymous",description:"Explore 9,595 Psychedelics Anonymous NFTs — filter by traits, browse rarity ranks, and discover the collection.",link:"https://psychedelicsanonymous.com/rarity-gallery"}),(0,n.jsx)(eV,{})]})}}},function(e){e.O(0,[9128,2888,9774,179],function(){return e(e.s=16549)}),_N_E=e.O()}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.