1import{r as d,m as c,y as w,j as e,f as m,h as i,i as j,z as a,D as L,n as N,q as b,G as u}from"./index-C7rVbH4G.js";import{P as E,a as y}from"./ProductCard-D6JnMPZO.js";import{S as T}from"./SellCTA-BE18iW6R.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="0e77490b-7f8f-4d23-a71c-24480cf7f87a",t._sentryDebugIdIdentifier="sentry-dbid-0e77490b-7f8f-4d23-a71c-24480cf7f87a")}catch{}})();function C(t,s){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:2,stroke:"currentColor","aria-hidden":"true",ref:s},t),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 13l-7 7-7-7m14-8l-7 7-7-7"}))}const A=d.forwardRef(C);function r({category:t,gutenberg:s}){const{data:n,isLoading:l}=c.products.all.useQuery({category:t,limit:4},{enabled:!!t}),{data:o,isLoading:v}=c.products.featured.useQuery(void 0,{enabled:!t}),f=l||v,h=t&&n?n.products:o??[];if(!f&&!h.length)return null;let p=s?"Project Gutenberg":w[t?.toUpperCase()??""]??"Explore";return t===a.UNIVERSAL.MAGAZINES&&(p="Magazines"),e.jsxs("div",{className:"mx-auto flex w-full flex-col",children:[!t&&!s?e.jsx("p",{className:"dark:text-theme-body-white flex items-center justify-center text-3xl font-medium text-black md:justify-start",children:"Featured"}):e.jsxs(m,{to:s?i.GUTENBERG:t?i.buildExploreRoute(t.toLowerCase()):"",className:"hover:text-theme-purple dark:hover:text-theme-purple dark:text-theme-body-white flex items-center justify-center self-center text-3xl font-medium text-black transition-colors duration-100 md:justify-start md:self-start dark:hover:brightness-125",children:[p,(t||s)&&e.jsx("div",{className:"dark:text-theme-body-white hover:text-theme-purple dark:hover:text-theme-purple ml-2 block text-black transition-all hover:scale-110 md:hidden dark:hover:brightness-125",children:e.jsx(j,{className:"h-7 w-7"})})]}),e.jsxs("div",{className:"flex-co flex items-center justify-center space-y-4 md:flex-row md:justify-between md:space-y-0",children:[e.jsxs("div",{className:"flex flex-wrap items-center justify-center gap-10 py-5 md:justify-start",children:[f&&new Array(4).fill(null).map((x,I)=>e.jsx(E,{square:t===a.DIGITAL.AUDIOBOOKS||t===a.DIGITAL.MUSIC},I)),h.map(x=>e.jsx(y,{product:x},x._id))]}),(t||s)&&e.jsx(m,{to:s?i.GUTENBERG:t?i.buildExploreRoute(t.toLowerCase()):"",className:"dark:text-theme-body-white hover:text-theme-purple dark:hover:text-theme-purple hidden text-black transition-all hover:scale-110 md:block dark:hover:brightness-125",children:e.jsx(j,{className:"h-7 w-7"})})]})]})}function R(){const{setModal:t}=L(),{data:s,isLoading:n}=c.user.get.useQuery(void 0,{enabled:N()});return e.jsxs("div",{className:"mt-20 flex flex-col overflow-x-hidden text-center sm:mt-0 md:text-left",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"mb-0 flex min-h-screen max-w-screen-xl flex-col items-center justify-center space-y-12 px-6 pt-0 md:mx-auto md:flex-row md:space-x-24 md:space-y-0",children:[e.jsxs("div",{className:"mb-8 flex flex-col items-center space-y-8 sm:mb-0 md:items-start",children:[e.jsxs("h1",{className:"animating-gradient from-theme-purple to-theme-purple bg-gradient-to-r via-indigo-300 bg-clip-text text-5xl font-black leading-none text-transparent sm:whitespace-nowrap md:text-7xl",children:["Buy and sell",e.jsx("br",{}),"on Bitcoin"]}),e.jsx("p",{className:"my-4 text-lg text-black dark:text-gray-300",children:"Publish and purchase books. Swap collectibles. All on Bitcoin."}),e.jsx("div",{className:"h-11",children:e.jsx(b,{show:!n,unmount:!1,className:"flex flex-col items-center transition-opacity duration-500 sm:flex-row sm:space-x-4",enterFrom:"opacity-0",enterTo:"opacity-100",children:s?e.jsx(m,{to:i.COLLECTIBLES,"data-umami-event":u.EVENTS.CLICK_EXPLORE_COLLECTIBLES,className:"btn-primary px-6 py-2",children:"Explore collectibles"}):e.jsxs(e.Fragment,{children:[e.jsx("button",{onClick:()=>t("signup"),"data-umami-event":u.EVENTS.CLICK_GET_STARTED,className:"btn-primary px-6",children:"Get started"}),e.jsx(m,{to:i.COLLECTIBLES,"data-umami-event":u.EVENTS.CLICK_EXPLORE_COLLECTIBLES,className:"btn-link",children:"Explore collectibles"})]})})})]}),e.jsx(g,{})]}),e.jsx("div",{className:"mt-0 hidden justify-center md:-mt-28 md:flex",children:e.jsx("button",{onClick:()=>document.querySelector("#featured")?.scrollIntoView({behavior:"smooth"}),className:"",children:e.jsx(A,{className:"h-6 w-6 animate-bounce"})})})]}),e.jsx("div",{className:"mt-12 pt-20 md:mt-0",id:"featured",children:e.jsxs("div",{className:"mx-auto flex w-full max-w-screen-xl flex-col items-start space-y-24 px-6 pb-24",children:[e.jsx(r,{}),e.jsx(r,{category:a.PHYSICAL.BOOKS}),e.jsx(r,{category:a.DIGITAL.AUDIOBOOKS}),e.jsx(r,{category:a.DIGITAL.PODCASTS}),e.jsx(r,{category:a.DIGITAL.DOCUMENTARIES}),e.jsx(r,{category:a.DIGITAL.EBOOKS}),e.jsx(r,{category:a.DIGITAL.MUSIC}),e.jsx(r,{category:a.UNIVERSAL.MAGAZINES})]})}),e.jsx("div",{className:"mx-3 py-1",children:e.jsx(T,{})})]})}const k=["1NXzLrVVSmnekoV1DqhturDioBwN6H5GsD","112cA7ihGvhHPz54G2MU9EieAiiEGTyN2U","1YV9yExbmJ9mgBXNM81TouJuDtqxH2PpL","1KtYanYx4KfotqsVonWLvrTnuzqYPWXdmu","19EaQMhLndcnUG6DTnyXfXdgiVwKYwZ75f","12jXRdxEAYTubb5qtwmFBRaV5UnrQhcBuW"],S=7e3;function g(){const{data:t}=c.products.all.useQuery({search:`(${k.join("|")})`}
1),[s,n]=d.useState(0);return d.useEffect(()=>{const l=setInterval(()=>{if(t){const o=(s+1)%t.products.length;n(o)}},S);return()=>{clearInterval(l)}},[t,s]),t?e.jsx("div",{className:"relative flex aspect-[1/1.6] h-[28rem] items-center justify-center",children:t.products.map((l,o)=>e.jsx(b,{show:o===s,className:"absolute transition-opacity duration-[3s] ease-out",enterFrom:"opacity-0",enterTo:"opacity-100",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:e.jsx(y,{product:l,featured:!0})},l.address))}):e.jsx(E,{invisible:!0})}export{R as default}; 2//# sourceMappingURL=HomePage-BTbokY3S.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.