1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7177],{1406:(e,t,s)=>{"use strict";s.d(t,{r:()=>C});var a=s(95155),r=s(73508),l=s(3998),n=s(73602),i=s(49308);function o(){var e;let{connectWallet:t,user:s,ready:o,authenticated:c,login:d}=(0,n.F)(),{loggedIn:h,logout:x,lensHandle:m,userData:p}=(0,r.w)(),u=m?"@".concat(m):(null==p?void 0:p.email)?p.email.split("@")[0]:(null==s||null==(e=s.wallet)?void 0:e.address)?"".concat(s.wallet.address.slice(0,6),"...").concat(s.wallet.address.slice(-4)):"Login";return(0,a.jsx)(l.$,{variant:"outline",onClick:()=>{(0,i.v)({loggedIn:h,user:s,ready:o,authenticated:c},{connectWallet:t,login:d,logout:x})},children:h?u:"Login"})}var c=s(59007),d=s(98428),h=s(85897),x=s(12115),m=s(37805),p=s(63263),u=s(72251),f=s(75797),g=s(56618);let j=m.bL,v=m.l9;m.YJ,m.ZL,m.Pb,m.z6,x.forwardRef((e,t)=>{let{className:s,inset:r,children:l,...n}=e;return(0,a.jsxs)(m.ZP,{ref:t,className:(0,g.cn)("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",r&&"pl-8",s),...n,children:[l,(0,a.jsx)(p.A,{className:"ml-auto"})]})}).displayName=m.ZP.displayName,x.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(m.G5,{ref:t,className:(0,g.cn)("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",s),...r})}).displayName=m.G5.displayName;let b=x.forwardRef((e,t)=>{let{className:s,sideOffset:r=4,...l}=e;return(0,a.jsx)(m.ZL,{children:(0,a.jsx)(m.UC,{ref:t,sideOffset:r,className:(0,g.cn)("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md","data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",s),...l})})});b.displayName=m.UC.displayName;let N=x.forwardRef((e,t)=>{let{className:s,inset:r,...l}=e;return(0,a.jsx)(m.q7,{ref:t,className:(0,g.cn)("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&>svg]:size-4 [&>svg]:shrink-0",r&&"pl-8",s),...l})});N.displayName=m.q7.displayName,x.forwardRef((e,t)=>{let{className:s,children:r,checked:l,...n}=e;return(0,a.jsxs)(m.H_,{ref:t,className:(0,g.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),checked:l,...n,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(m.VF,{children:(0,a.jsx)(u.A,{className:"h-4 w-4"})})}),r]})}).displayName=m.H_.displayName,x.forwardRef((e,t)=>{let{className:s,children:r,...l}=e;return(0,a.jsxs)(m.hN,{ref:t,className:(0,g.cn)("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",s),...l,children:[(0,a.jsx)("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:(0,a.jsx)(m.VF,{children:(0,a.jsx)(f.A,{className:"h-2 w-2 fill-current"})})}),r]})}).displayName=m.hN.displayName;let w=x.forwardRef((e,t)=>
1{let{className:s,inset:r,...l}=e;return(0,a.jsx)(m.JU,{ref:t,className:(0,g.cn)("px-2 py-1.5 text-sm font-semibold",r&&"pl-8",s),...l})});w.displayName=m.JU.displayName;let y=x.forwardRef((e,t)=>{let{className:s,...r}=e;return(0,a.jsx)(m.wv,{ref:t,className:(0,g.cn)("-mx-1 my-1 h-px bg-muted",s),...r})});y.displayName=m.wv.displayName;var A=s(14124);let k=e=>{let{userData:t,userLabel:s,handleLogout:r}=e;return(0,a.jsxs)(j,{children:[(0,a.jsx)(v,{asChild:!0,children:(0,a.jsxs)(l.$,{variant:"outline",className:"gap-1 lg:gap-2 px-1 lg:px-2 h-9 lg:h-10 bg-slate-900/50 border-slate-800 shadow-xl text-slate-200 hover:bg-slate-900/70 hover:text-slate-400 transition-colors",children:[t.pfpUrl?(0,a.jsx)(h.eu,{className:"h-6 w-6 lg:h-7 lg:w-7",children:(0,a.jsx)(h.BK,{src:t.pfpUrl,className:"object-cover"})}):(0,a.jsx)(A.L,{address:t.address,className:"h-6 w-6 lg:h-7 lg:w-7"}),(0,a.jsx)("div",{className:"hidden sm:block text-xs",children:s}),(0,a.jsx)(c.A,{className:"ml-1 size-3"})]})}),(0,a.jsxs)(b,{className:"w-56 rounded-lg bg-slate-900/90 border-slate-800 shadow-xl text-slate-200",sideOffset:4,children:[(0,a.jsx)(w,{className:"p-0 font-normal",children:(0,a.jsxs)("div",{className:"flex items-center gap-2 px-1 py-1.5 text-left text-sm",children:[t.pfpUrl?(0,a.jsx)(h.eu,{className:"h-9 w-9 lg:h-10 lg:w-10",children:(0,a.jsx)(h.BK,{src:t.pfpUrl,className:"object-cover"})}):(0,a.jsx)(A.L,{address:t.address,className:"h-9 w-9 lg:h-10 lg:w-10"}),(0,a.jsxs)("div",{className:"grid flex-1 text-left text-sm leading-tight",children:[(0,a.jsx)("span",{className:"truncate font-semibold",children:t.name}),(0,a.jsx)("span",{className:"truncate text-xs text-muted-foreground",children:t.username})]})]})}),(0,a.jsx)(y,{}),(0,a.jsxs)(N,{className:"text-red-700 cursor-pointer",onClick:r,children:[(0,a.jsx)(d.A,{className:"size-4 me-2"}),"Log out"]})]})]})},C=()=>{let{userData:e,logout:t,lensHandle:s}=(0,r.w)(),{ready:i}=(0,n.F)();if(!i)return(0,a.jsx)(l.$,{variant:"outline",className:"w-16",disabled:!0,children:"Login"});if(e){let r=s?"@".concat(s):e.username||"";return(0,a.jsx)(k,{userData:e,userLabel:r,handleLogout:t})}return(0,a.jsx)(o,{})}},5703:(e,t,s)=>{"use strict";s.d(t,{L:()=>a,u:()=>r});let a=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,s=await fetch("/api/scheduled-reports/active?page=".concat(e,"&limit=").concat(t));if(!s.ok)throw Error("Failed to fetch active scheduled reports");return s.json()},r=async function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,s=arguments.length>2?arguments[2]:void 0,a={"Content-Type":"application/json"};s&&(a.Authorization="Bearer ".concat(s));let r=await fetch("/api/scheduled-reports?page=".concat(e,"&limit=").concat(t),{method:"GET",headers:a});if(!r.ok)throw Error("Failed to fetch user scheduled reports");return r.json()}},13673:()=>{},14124:(e,t,s)=>{"use strict";s.d(t,{L:()=>o});var a=s(95155),r=s(85897),l=s(15817),n=s.n(l),i=s(12115);function o(e){let{size:t=32,className:s,address:l}=e,o=(0,i.useRef)(null),c=(0,i.useMemo)(()=>{if(!l)return null;if(l.includes("@")){let e=5381;for(let t=0;t<l.length;t++)e=(e<<5)+e+l.charCodeAt(t);return Math.abs(e>>>0)}if(l.startsWith("0x")&&42===l.length)return parseInt(l.slice(2,10),16);let e=0;for(let t=0;t<l.length;t++)e=(e<<5)-e+l.charCodeAt(t),e&=e;return Math.abs(e)},[l]);return((0,i.useEffect)(()=>{if(!o.current||!c)return;o.current.innerHTML="";let e=n()(t,c);e.style.width="100%",e.style.height="100%",e.style.display="flex",e.style.alignItems="center",e.style.justifyContent="center";let s=e.querySelector("svg");return s&&(s.style.width="100%",s.style.height="100%"),o.current.appendChild(e),()=>{o.current&&(o.current.innerHTML="")}},[c,t]),l)?(0,a.jsx)(r.eu,{className:s,children:(0,a.jsx)("div",{className:"relative h-full w-full rounded-full overflow-hidden",children:(0,a.jsx)("div",{ref:o,className:"absolute inset-0 flex items-center justify-center"})})}):(0,a.jsx)(r.eu,{className:s,children:(0,a.jsx)(r.q5,{className:"bg-primary text-primary-foreground",children:"0x"})})}},14900:(e,t,s)=>{"use strict";s.d(t,{Layout:()=>q});var a=s(95155),r=s(12115),l=s(52619),n=s.n(l);function i(){return(0,a.jsx)("footer",{className:"w-full border-t border-slate-800/50 bg-slate-900/50 backdrop-blur-sm",children:(0,a.jsx)("div",{className:"mx-auto px-4 sm:px-6 lg:px-8 py-4",children:(0,a.jsxs)("div",{className:"flex flex-col items-center justify-center space-y-2 md:flex-row md:justify-between md:space-y-0",children:[(0,a.jsx)("div",{className:"text-center md:text-left",children:(0,a.jsx)("p",{className:"text-xs text-slate-400",children:"\xa9 2025 Pond3r. All rights reserved."})}),(0,a.jsxs)("div",{className:"flex items-center space-x-4",children:[(0,a.jsx)(n(),{href:"/privacy",className:"text-xs text-slate-400 hover:text-slate-200 transition-colors duration-200",children:"Privacy Policy"}),(0,a.jsx)(n(),{href:"/terms",className:"text-xs text-slate-400 hover:text-slate-200 transition-colors duration-200",children:"Terms"}),(0,a.jsx)("a",{href:"https://pond3r.xyz",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-slate-400 hover:text-slate-200 transition-colors duration-200",children:"Website"})]})]})})})}var o=s(1406),c=s(20063),d=s(1551),h=s(73508),x=s(56618);let m=e=>{let{size:t=20,className:s=""}=e;return(0,a.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"
1currentColor",className:s,xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M19.27 5.33C17.94 4.71 16.5 4.26 15 4a.09.09 0 0 0-.07.03c-.18.33-.39.76-.53 1.09a16.09 16.09 0 0 0-4.8 0c-.14-.34-.35-.76-.54-1.09c-.01-.02-.04-.03-.07-.03c-1.5.26-2.93.71-4.27 1.33c-.01 0-.02.01-.03.02c-2.72 4.07-3.47 8.03-3.1 11.95c0 .02.01.04.03.05c1.8 1.32 3.53 2.12 5.24 2.65c.03.01.06 0 .07-.02c.4-.55.76-1.13 1.07-1.74c.02-.04 0-.08-.04-.09c-.57-.22-1.11-.48-1.64-.78c-.04-.02-.04-.08-.01-.11c.11-.08.22-.17.33-.25c.02-.02.05-.02.07-.01c3.44 1.57 7.15 1.57 10.55 0c.02-.01.05-.01.07.01c.11.09.22.17.33.26c.04.03.04.09-.01.11c-.52.31-1.07.56-1.64.78c-.04.01-.05.06-.04.09c.32.61.68 1.19 1.07 1.74c.03.01.06.02.09.01c1.72-.53 3.45-1.33 5.25-2.65c.02-.01.03-.03.03-.05c.44-4.53-.73-8.46-3.1-11.95c-.01-.01-.02-.02-.04-.02zM8.52 14.91c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.84 2.12-1.89 2.12zm6.97 0c-1.03 0-1.89-.95-1.89-2.12s.84-2.12 1.89-2.12c1.06 0 1.9.96 1.89 2.12c0 1.17-.83 2.12-1.89 2.12z"})})},p=e=>{let{size:t=18,className:s=""}=e;return(0,a.jsx)("svg",{width:t,height:t,viewBox:"0 0 24 24",fill:"currentColor",className:s,xmlns:"http://www.w3.org/2000/svg",children:(0,a.jsx)("path",{d:"M18.244 2.25h3.308l-7.227 8.26 8.502 11.24H16.17l-5.214-6.817L4.99 21.75H1.68l7.73-8.835L1.254 2.25H8.08l4.713 6.231zm-1.161 17.52h1.833L7.084 4.126H5.117z"})})},u=e=>{let{isSidebarCollapsed:t=!1}=e,s=(0,d.d)("xs"),r=(0,d.d)("md"),l=(0,d.d)("lg"),{loggedIn:i}=(0,h.w)();return(0,c.usePathname)(),(0,a.jsx)("div",{className:"w-full h-16 py-2 sm:py-3 sm:mb-0",style:{backgroundColor:"#0a0f1a"},children:(0,a.jsxs)("div",{className:(0,x.cn)("w-full flex justify-between items-center gap-3 h-full",!i&&"px-4 sm:px-6 lg:px-8",i&&!l&&"px-4 sm:px-6"),style:i&&l?{marginLeft:t?"calc(4rem + 3rem)":"calc(16rem + 2rem)",paddingRight:"2rem",maxWidth:t?"calc(100vw - 7rem - 4rem)":"calc(100vw - 18rem - 4rem)"}:void 0,children:[(0,a.jsx)("div",{className:"flex items-center gap-4",children:!i&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"text-xl font-bold text-white",children:(0,a.jsx)("span",{style:{background:"linear-gradient(to right, #2dd4bf, #ec4899)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"Pond3r"})}),s&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{href:"https://docs.pond3r.xyz",target:"_blank",rel:"noopener noreferrer",className:"text-slate-200 hover:text-slate-400 transition-colors flex items-center text-sm sm:text-base","aria-label":"Documentation",children:"Docs"}),(0,a.jsx)(n(),{href:"/api-keys",className:"text-slate-200 hover:text-slate-400 transition-colors flex items-center text-sm sm:text-base",children:"API Keys"})]})]})}),(0,a.jsxs)("div",{className:"flex items-center gap-2 sm:gap-4",children:[r&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{href:"https://x.com/pond3rxyz",target:"_blank",rel:"noopener noreferrer",className:"text-slate-200 hover:text-slate-400 transition-colors","aria-label":"Follow us on X (formerly Twitter)",children:(0,a.jsx)(p,{size:18})}),(0,a.jsx)(n(),{href:"https://discord.gg/pond3r",target:"_blank",rel:"noopener noreferrer",className:"text-slate-200 hover:text-slate-400 transition-colors","aria-label":"Join our Discord",children:(0,a.jsx)(m,{size:20})})]}),(0,a.jsx)(o.r,{})]})]})})};var f=s(18720),g=s(15239),j=s(44622),v=s(63263),b=s(51190),N=s(5225),w=s(27500),y=s(92925),A=s(3998);let k=r.forwardRef((e,t)=>{let{className:s,children:r,...l}=e;return(0,a.jsx)("div",{ref:t,className:(0,x.cn)("relative overflow-auto",s),style:{scrollbarWidth:"thin",scrollbarColor:"rgb(71 85 105) rgb(30 41 59)"},...l,children:r})});k.displayName="ScrollArea";var C=s(86259),z=s(85897),L=s(46767),R=s(14124),E=s(59007);function F(e){let{title:t,icon:s,isCollapsed:l,children:n,defaultExpanded:i=!0,className:o}=e,[c,d]=(0,r.useState)(i),h=(0,a.jsxs)("div",{onClick:()=>{l||d(!c)},className:(0,x.cn)("flex items-center gap-2 px-3 py-2 text-slate-300 hover:text-white cursor-pointer transition-colors",o),children:[!l&&(0,a.jsx)("div",{className:"w-4",children:c?(0,a.jsx)(E.A,{className:"h-4 w-4"}):(0,a.jsx)(v.A,{className:"h-4 w-4"})}),(0,a.jsx)("div",{className:"flex-shrink-0",children:s}),!l&&(0,a.jsx)("span",{className:"text-xs font-semibold uppercase tracking-wider",children:t})]});return(0,a.jsxs)("div",{className:"mb-4",children:[l?(0,a.jsx)(L.Bc,{delayDuration:0,
1children:(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:h}),(0,a.jsx)(L.ZI,{side:"right",className:"bg-slate-800 text-slate-200",children:(0,a.jsx)("p",{children:t})})]})}):h,!l&&c||l?(0,a.jsx)("div",{className:(0,x.cn)("space-y-1",l&&"mt-2"),children:n}):null]})}var U=s(92033),S=s(18527),I=s(11647),P=s(13630);function D(e){let{icon:t,label:s,sublabel:l,isCollapsed:n,isActive:i=!1,onClick:o,onDelete:c,className:d,children:h}=e,[m,p]=(0,r.useState)(!1),u=(0,a.jsxs)("div",{onClick:o,onMouseEnter:()=>p(!0),onMouseLeave:()=>p(!1),className:(0,x.cn)("flex items-center gap-3 px-3 py-2 rounded-lg transition-colors cursor-pointer group relative","hover:bg-slate-800/60 text-slate-200 hover:text-white",i&&"bg-slate-800/80 text-blue-400",d),children:[t&&(0,a.jsx)("div",{className:"flex-shrink-0",children:t}),!n&&(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,a.jsx)("div",{className:"text-sm font-medium truncate",children:s}),l&&(0,a.jsx)("div",{className:"text-xs text-slate-400 truncate",children:l}),h]}),c&&m&&(0,a.jsx)("button",{onClick:e=>{e.stopPropagation(),c&&c()},className:"flex-shrink-0 p-1 rounded hover:bg-red-500/20 text-slate-400 hover:text-red-400 transition-colors","aria-label":"Delete report",children:(0,a.jsx)(P.A,{className:"h-4 w-4"})})]})]});return n&&s?(0,a.jsx)(L.Bc,{delayDuration:0,children:(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:u}),(0,a.jsxs)(L.ZI,{side:"right",className:"bg-slate-800 text-slate-200",children:[(0,a.jsx)("p",{children:s}),l&&(0,a.jsx)("p",{className:"text-xs text-slate-400",children:l})]})]})}):u}var M=s(73602),_=s(60406),T=s(26615);function B(e){let{isOpen:t,onClose:s,onConfirm:r,reportName:l}=e;return t?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("div",{className:"fixed inset-0 bg-black/60 z-50 backdrop-blur-sm",onClick:s}),(0,a.jsx)("div",{className:"fixed left-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2 z-50 w-full max-w-md",children:(0,a.jsxs)("div",{className:"bg-slate-800 border border-slate-700 rounded-lg shadow-2xl",children:[(0,a.jsxs)("div",{className:"flex items-center justify-between p-4 border-b border-slate-700",children:[(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)("div",{className:"p-2 bg-red-500/10 rounded-lg",children:(0,a.jsx)(_.A,{className:"h-5 w-5 text-red-400"})}),(0,a.jsx)("h2",{className:"text-lg font-semibold text-white",children:"Delete Report"})]}),(0,a.jsx)("button",{onClick:s,className:"text-slate-400 hover:text-white transition-colors p-1 hover:bg-slate-700 rounded",children:(0,a.jsx)(T.A,{className:"h-5 w-5"})})]}),(0,a.jsxs)("div",{className:"p-6 space-y-4",children:[(0,a.jsxs)("p",{className:"text-slate-300",children:["Are you sure you want to delete"," ",(0,a.jsx)("span",{className:"font-semibold text-white",children:l}),"?"]}),(0,a.jsx)("p",{className:"text-sm text-slate-400",children:"This action can not be undone."})]}),(0,a.jsxs)("div",{className:"flex gap-3 p-4 border-t border-slate-700",children:[(0,a.jsx)(A.$,{onClick:s,variant:"outline",className:"flex-1 border-slate-500 bg-transparent text-slate-100 hover:bg-slate-700/50 hover:text-white hover:border-slate-400",children:"Cancel"}),(0,a.jsx)(A.$,{onClick:()=>{r(),s()},className:"flex-1 bg-red-600 hover:bg-red-700 text-white",children:"Delete"})]})]})})]}):null}function H(e){let{reports:t,creatingReports:s,isCollapsed:l,isLoading:n,onReportDeleted:i}=e,o=(0,c.useRouter)(),{getAccessToken:d}=(0,M.F)(),[h,x]=(0,r.useState)({isOpen:!1,reportId:"",reportName:""}),m=async e=>{try{let t=await fetch("/api/scheduled-reports/".concat(e,"/status"));if(t.ok){let s=await t.json();"completed"===s.status?o.push("/scheduled-report/".concat(e)):o.push("/report-status/".concat(e))}else o.push("/scheduled-report/".concat(e))}catch(t){console.error("Failed to check report status:",t),o.push("/scheduled-report/".concat(e))}},p=(e,t)=>{x({isOpen:!0,reportId:e,reportName:t})},u=async()=>{let{reportId:e}=h;try{let t=await d(),s={"Content-Type":"application/json"};t&&(s.Authorization="Bearer ".concat(t));let a=await fetch("/api/scheduled-reports/".concat(e),{method:"DELETE",headers:s});if(a.ok)i&&i();else{let e=await a.json();alert("Failed to delete report: ".concat(e.error||"Unknown error"))}}catch(e){console.error("Failed to delete report:",e),alert("Failed to delete report. Please try again.")}};return n?(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)(U.A,{className:"h-4 w-4 animate-spin text-slate-400"})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)("div",{className:"space-y-1",children:[s.map(e=>(0,a.jsx)(D,{icon:(0,a.jsx)(U.A,{className:"h-4 w-4 animate-spin text-yellow-400"}),label:e.datasetName,sublabel:"Creating...",isCollapsed:l,onClick:()=>{var t;return t=e.id,void o.push("/report-status/".concat(t))},onDelete:()=>p(e.reportId,e.datasetName),children:!l&&(0,a.jsx)(I.E,{variant:"outline",className:"mt-1 text-yellow-400 border-yellow-400/30",children:"Creating"})},e.id)),t.map(e=>{var t;return(0,a.jsx)(D,{icon:(0,a.jsx)(S.A,{className:"h-4 w-4 text-green-400"}),label:e.deliverySubject||(null==(t=e.dataset)?void 0:t.name)||"Untitled Report",sublabel:new Date(e.createdAt).toLocaleDateString("en-US",{month:"short",day:"numeric",year:"numeric"}),isCollapsed:l,onClick:()=>m(e.id),onDelete:()=>{var t;return p(e.id,e.deliverySubject||(null==(t=e.dataset)?void 0:t.name)||"Untitled Report")},children:!l&&(0,a.jsx)(I.E,{variant:"outline",className:"mt-1 text-green-400 border-green-400/30",children:"Completed"})},e.id)}),0===t.length&&0===s.length&&(0,a.jsx)("div",{className:"px-3 py-2 text-sm text-slate-400",children:"No reports yet"})]}),(0,a.jsx)(B,{isOpen:h.isOpen,onClose:()=>{x({isOpen:!1,reportId:"",reportName:""})},onConfirm:u,reportName:h.reportName})]})}var W=s(62593);function $(e){let{chatHistory:t,isCollapsed:s,isLoading:r}
1=e,l=(0,c.useRouter)();return r?(0,a.jsx)("div",{className:"px-3 py-2",children:(0,a.jsx)(W.A,{className:"h-4 w-4 animate-pulse text-slate-400"})}):(0,a.jsxs)("div",{className:"space-y-1",children:[t.map(e=>(0,a.jsx)(D,{icon:(0,a.jsx)(w.A,{className:"h-4 w-4 ".concat(e.unread?"text-blue-400":"text-slate-400")}),label:e.title,sublabel:e.preview||(e=>{let t=new Date(e),s=Math.floor((new Date().getTime()-t.getTime())/6e4),a=Math.floor(s/60),r=Math.floor(a/24);return s<1?"Just now":s<60?"".concat(s,"m ago"):a<24?"".concat(a,"h ago"):r<7?"".concat(r,"d ago"):t.toLocaleDateString("en-US",{month:"short",day:"numeric"})})(e.lastMessageAt),isCollapsed:s,onClick:()=>{var t;return t=e.id,void l.push("/?mode=chat&thread=".concat(t))}},e.id)),0===t.length&&(0,a.jsx)("div",{className:"px-3 py-2 text-sm text-slate-400",children:"No chat history"})]})}var Z=s(5703);async function O(e){try{let t={"Content-Type":"application/json"};e&&(t.Authorization="Bearer ".concat(e));let s=await fetch("/api/chat/conversations",{method:"GET",headers:t});if(!s.ok)throw Error("Failed to fetch conversations");let a=await s.json();if(!a.success)throw Error(a.error||"Failed to fetch conversations");return{conversations:a.conversations||[],success:!0}}catch(e){return console.error("Error fetching user conversations:",e),{conversations:[],success:!1,error:e instanceof Error?e.message:"Unknown error"}}}let K={src:"/_next/static/media/pond3r-avatar.387dcc20.png",height:1072,width:1024,blurDataURL:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAICAMAAADz0U65AAAAS1BMVEUdYG4kZXIKTFcRUl8cW2oKSVcPTFlMaXEQT14SVGI8fIghYW4ANz4WV2QGRFMZWmcAAAACOkoqbHgXV2UcX2wZVWMrb3wZW2gMTVtzA96ZAAAAFnRSTlP99zxbdtEsAIL6/eEUw73zAWDFplB+0/QQGAAAAAlwSFlzAAALEwAACxMBAJqcGAAAAEBJREFUeJwFwQkSgCAMBMERgQ2Ht5X4/5fazXrYsIdKdneiv8zhC3FPlL1HuSqqS3wlnSgFsArloDUTstL2zfQDY4YCixi0aygAAAAASUVORK5CYII=",blurWidth:8,blurHeight:8};function G(e){let{isCollapsed:t,onCollapseChange:s,className:l}=e,i=(0,c.useRouter)(),{userData:o}=(0,h.w)(),{getAccessToken:d}=(0,M.F)(),[m,p]=(0,r.useState)(()=>{if(void 0!==t)return t;{let e=localStorage.getItem("sidebar-collapsed");return window.innerWidth<1024&&null===e||"true"===e}}),[u,f]=(0,r.useState)(!1),[E,U]=(0,r.useState)({reports:[],creatingReports:[],chatHistory:[],loading:!0,error:null});(0,r.useEffect)(()=>{void 0!==t&&p(t)},[t]);let S=async()=>{try{let e=await d(),[t,s]=await Promise.all([(0,Z.u)(1,20,e||void 0),O(e||void 0)]),a=t.data||[],r=[],l=new Set;a.length>0&&(await Promise.allSettled(a.map(async e=>{try{let t=await fetch("/api/scheduled-reports/".concat(e.id,"/status"));if(!t.ok)return null;let s=await t.json();return{reportId:e.id,status:s.status,report:e}}catch(t){return console.error("Failed to check status for report ".concat(e.id,":"),t),null}}))).forEach(e=>{if("fulfilled"===e.status&&e.value){let{reportId:s,status:a,report:n}=e.value;if("pending"===a||"processing"===a){var t;r.push({id:s,reportId:s,datasetName:(null==(t=n.dataset)?void 0:t.name)||"Unknown Dataset",status:"creating",createdAt:n.createdAt}),l.add(s)}}});let n=a.filter(e=>!l.has(e.id));U({reports:n,creatingReports:r,chatHistory:s.conversations||[],loading:!1,error:null})}catch(e){console.error("Sidebar: Failed to fetch data:",e),U(e=>({...e,loading:!1,error:"Failed to load data"}))}};(0,r.useEffect)(()=>{S();let e=setInterval(()=>{S()},E.creatingReports.length>0?1e4:3e4);return()=>{clearInterval(e)}},[E.creatingReports.length]);let I=()=>o?o.username||P(o.address):"User",P=e=>e?"".concat(e.slice(0,6),"...").concat(e.slice(-4)):"";return(0,a.jsxs)(a.Fragment,{children:[u&&(0,a.jsx)("div",{className:"fixed inset-0 bg-black/60 z-40 lg:hidden",onClick:()=>f(!1)}),(0,a.jsx)(A.$,{variant:"ghost",size:"icon",onClick:()=>f(!u),className:"fixed top-20 left-4 z-30 lg:hidden bg-slate-800 border border-slate-700 text-white hover:bg-slate-700",children:(0,a.jsx)(j.A,{className:"h-5 w-5"})}),(0,a.jsx)("aside",{className:(0,x.cn)("fixed left-0 top-0 h-screen bg-slate-900 border-r border-slate-800 transition-all duration-300 z-20","hidden lg:block",m?"w-16":"w-64",l),children:(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-800",children:(0,a.jsxs)("div",{className:"flex items-center gap-3 cursor-pointer hover:opacity-80 transition-opacity",onClick:()=>
1i.push("/"),children:[(0,a.jsx)(g.default,{src:K,alt:"Pond3r Logo",className:"h-8 w-8 object-contain flex-shrink-0"}),!m&&(0,a.jsx)("span",{className:"text-2xl font-bold",style:{background:"linear-gradient(to right, #2dd4bf, #ec4899)",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"Pond3r"})]})}),(0,a.jsx)("div",{className:"p-4 border-b border-slate-800",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsxs)("div",{className:(0,x.cn)("flex items-center gap-3",m&&"justify-center"),children:[(null==o?void 0:o.pfpUrl)?(0,a.jsx)(z.eu,{className:"h-8 w-8",children:(0,a.jsx)(z.BK,{src:o.pfpUrl,className:"object-cover"})}):(0,a.jsx)(R.L,{address:(null==o?void 0:o.address)||"",className:"h-8 w-8"}),!m&&(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("div",{className:"text-sm font-medium text-white truncate",children:I()})})]}),(0,a.jsx)(L.Bc,{delayDuration:0,children:(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:(0,a.jsx)(A.$,{variant:"ghost",size:"icon",onClick:()=>{let e=!m;p(e),localStorage.setItem("sidebar-collapsed",String(e)),null==s||s(e)},className:"text-slate-300 hover:text-white hover:bg-slate-800/50 h-8 w-8",children:m?(0,a.jsx)(v.A,{className:"h-4 w-4"}):(0,a.jsx)(b.A,{className:"h-4 w-4"})})}),(0,a.jsx)(L.ZI,{side:"right",className:"bg-slate-800 text-slate-200",children:(0,a.jsx)("p",{children:m?"Expand sidebar":"Collapse sidebar"})})]})})]})}),(0,a.jsxs)(k,{className:"flex-1 px-2 py-4",children:[(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F,{title:"My Reports",icon:(0,a.jsx)(N.A,{className:"h-4 w-4"}),isCollapsed:m,defaultExpanded:!0,children:(0,a.jsx)(H,{reports:E.reports,creatingReports:E.creatingReports,isCollapsed:m,isLoading:E.loading,onReportDeleted:S})}),(0,a.jsx)(C.w,{className:"my-2 bg-slate-700/50"})]}),(0,a.jsx)(F,{title:"Chat History",icon:(0,a.jsx)(w.A,{className:"h-4 w-4"}),isCollapsed:m,defaultExpanded:!0,children:(0,a.jsx)($,{chatHistory:E.chatHistory,isCollapsed:m,isLoading:E.loading})})]}),(0,a.jsx)("div",{className:"p-4 border-t border-slate-700/50 space-y-2",children:m?(0,a.jsx)(L.Bc,{delayDuration:0,children:(0,a.jsxs)("div",{className:"space-y-2",children:[(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:(0,a.jsx)(n(),{href:"https://docs.pond3r.xyz",target:"_blank",rel:"noopener noreferrer",className:"flex",children:(0,a.jsx)(A.$,{variant:"ghost",size:"icon",className:"w-full text-slate-300 hover:text-white hover:bg-slate-800/50",children:(0,a.jsx)(y.A,{className:"h-4 w-4"})})})}),(0,a.jsx)(L.ZI,{side:"right",className:"bg-slate-800 text-slate-200",children:(0,a.jsx)("p",{children:"Documentation"})})]}),(0,a.jsxs)(L.m_,{children:[(0,a.jsx)(L.k$,{asChild:!0,children:(0,a.jsx)(A.$,{variant:"ghost",size:"icon",className:"w-full text-slate-300 hover:text-white hover:bg-slate-800/50",onClick:()=>i.push("/api-keys"),children:(0,a.jsx)(N.A,{className:"h-4 w-4"})})}),(0,a.jsx)(L.ZI,{side:"right",className:"bg-slate-800 text-slate-200",children:(0,a.jsx)("p",{children:"API Keys"})})]})]})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n(),{href:"https://docs.pond3r.xyz",target:"_blank",rel:"noopener noreferrer",className:"flex",children:(0,a.jsxs)(A.$,{variant:"ghost",size:"sm",className:"w-full justify-start text-slate-300 hover:text-white hover:bg-slate-800/50",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 mr-2"}),"Docs"]})}),(0,a.jsxs)(A.$,{variant:"ghost",size:"sm",className:"w-full justify-start text-slate-300 hover:text-white hover:bg-slate-800/50",onClick:()=>i.push("/api-keys"),children:[(0,a.jsx)(N.A,{className:"h-4 w-4 mr-2"}),"API Keys"]})]})})]})}),(0,a.jsx)("div",{className:(0,x.cn)("fixed left-0 top-0 h-screen bg-slate-900 border-r border-slate-800 transition-transform duration-300 z-50","lg:hidden","w-72",u?"translate-x-0":"-translate-x-full"),children:(0,a.jsxs)("div",{className:"flex flex-col h-full",children:[(0,a.jsx)("div",{className:"p-4 border-b border-slate-800",children:(0,a.jsxs)("div",{className:"flex items-center justify-between",children:[(0,a.jsx)(n(),{href:"/",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(0,a.jsx)(g.default,{src:K,alt:"Pond3r Logo",className:"h-8 w-8 object-contain"}),(0,a.jsx)("span",{className:"text-2xl font-bold",style:{background:"linear-gradient(to right, #2dd4bf, #ec4899)",WebkitBackgroun
1dClip:"text",WebkitTextFillColor:"transparent",backgroundClip:"text"},children:"Pond3r"})]})}),(0,a.jsx)(A.$,{variant:"ghost",size:"icon",onClick:()=>f(!1),className:"text-slate-300 hover:text-white hover:bg-slate-800/50 h-8 w-8",children:(0,a.jsx)(b.A,{className:"h-4 w-4"})})]})}),(0,a.jsx)("div",{className:"p-4 border-b border-slate-800",children:(0,a.jsxs)("div",{className:"flex items-center gap-3",children:[(null==o?void 0:o.pfpUrl)?(0,a.jsx)(z.eu,{className:"h-8 w-8",children:(0,a.jsx)(z.BK,{src:o.pfpUrl,className:"object-cover"})}):(0,a.jsx)(R.L,{address:(null==o?void 0:o.address)||"",className:"h-8 w-8"}),(0,a.jsx)("div",{className:"flex-1 min-w-0",children:(0,a.jsx)("div",{className:"text-sm font-medium text-white truncate",children:I()})})]})}),(0,a.jsxs)(k,{className:"flex-1 px-2 py-4",children:[(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(F,{title:"My Reports",icon:(0,a.jsx)(N.A,{className:"h-4 w-4"}),isCollapsed:!1,defaultExpanded:!0,children:(0,a.jsx)(H,{reports:E.reports,creatingReports:E.creatingReports,isCollapsed:!1,isLoading:E.loading,onReportDeleted:S})}),(0,a.jsx)(C.w,{className:"my-2 bg-slate-700/50"})]}),(0,a.jsx)(F,{title:"Chat History",icon:(0,a.jsx)(w.A,{className:"h-4 w-4"}),isCollapsed:!1,defaultExpanded:!0,children:(0,a.jsx)($,{chatHistory:E.chatHistory,isCollapsed:!1,isLoading:E.loading})})]}),(0,a.jsxs)("div",{className:"p-4 border-t border-slate-700/50 space-y-2",children:[(0,a.jsx)(n(),{href:"https://docs.pond3r.xyz",target:"_blank",rel:"noopener noreferrer",className:"flex",children:(0,a.jsxs)(A.$,{variant:"ghost",size:"sm",className:"w-full justify-start text-slate-300 hover:text-white hover:bg-slate-800/50",children:[(0,a.jsx)(y.A,{className:"h-4 w-4 mr-2"}),"Docs"]})}),(0,a.jsxs)(A.$,{variant:"ghost",size:"sm",className:"w-full justify-start text-slate-300 hover:text-white hover:bg-slate-800/50",onClick:()=>i.push("/api-keys"),children:[(0,a.jsx)(N.A,{className:"h-4 w-4 mr-2"}),"API Keys"]})]})]})})]})}function q(e){let{children:t}=e,[s,l]=(0,r.useState)(!1),{loggedIn:n}=(0,h.w)(),o=(0,d.d)("lg");return(0,a.jsxs)("main",{className:"relative min-h-screen w-full",children:[n&&(0,a.jsx)(G,{isCollapsed:s,onCollapseChange:l}),(0,a.jsxs)("div",{className:"min-h-screen flex flex-col transition-all duration-300",children:[(0,a.jsxs)("div",{className:"relative z-10 flex flex-col flex-1",children:[(0,a.jsx)(u,{isSidebarCollapsed:s}),(0,a.jsx)("div",{className:"w-full flex-1",children:(0,a.jsx)("div",{className:(0,x.cn)("py-6 w-full",!n&&"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",n&&!o&&"px-4 sm:px-6"),style:n&&o?{marginLeft:s?"calc(4rem + 3rem)":"calc(16rem + 2rem)",paddingRight:"2rem",maxWidth:s?"calc(100vw - 7rem - 4rem)":"calc(100vw - 18rem - 4rem)"}:void 0,children:t})})]}),(0,a.jsx)(i,{}),(0,a.jsx)(f.Toaster,{position:"top-right",theme:"dark",toastOptions:{style:{background:"rgb(30 41 59)",border:"1px solid rgb(51 65 85)",color:"rgb(226 232 240)"}}})]})]})}},46555:(e,t,s)=>{"use strict";s.d(t,{Providers:()=>D});var a=s(95155),r=s(73508),l=s(62112),n=s(63036),i=s(82050),o=s(74852),c=s(99776),d=s(12673),h=s(88848),x=s(2091),m=s(33791),p=s(196),u=s(25034),f=s(9729),g=s(33869),j=s(26549),v=s(73602),b=s(72604),N=s(52051),w=s(78845),y=s(82099),A=s(26569),k=s(18350);let C=(0,k.UGq)("\n fragment Username on Username {\n localName\n value\n }\n"),z=(0,k.UGq)("\n fragment AccountMetadata on AccountMetadata {\n name\n bio\n picture\n }\n"),L=(0,k.UGq)("\n fragment Account on Account {\n address\n username {\n ...Username\n }\n metadata {\n ...AccountMetadata\n }\n }\n ",[C,z]),R=window.localStorage,E=y.rA.create({environment:A.rC,fragments:[L],storage:R}),F=[(0,n.b)(),(0,f.m)({appName:"Pond3r",chainId:d.n.id}),(0,g.u)({projectId:j.eI})],U=(0,b.Z)({chains:[h.E,x.R,m.r,p.e,u.k],transports:{[h.E.id]:(0,i.L)(),[x.R.id]:(0,i.L)(),[m.r.id]:(0,i.L)(),[p.e.id]:(0,i.L)(),[u.k.id]:(0,i.L)()},connectors:F}),S={loginMethods:["email","google","wallet"],embeddedWallets:{createOnLogin:"users-without-wallets"},appearance:{walletList:["metamask","coinbase_wallet","rainbow","wallet_connect"]},defaultChain:d.n,supportedChains:[d.n,h.E,x.R,m.r,p.e,u.k]},I=new o.E;function P(e){let{children:t}=e;return(0,a.jsx)(v.y,{appId:j.Tv,config:S,children:(0,a.jsx)(c.Ht,{client:I,children:(0,a.jsx)(N.x,{config:U,children:(0,a.jsx)(w.chC,{client:E,children:t})})})})}function D(e){let{children:t}=e;return(0,a.jsx)(P,{children:(0,a.jsx)(l.YO,{children:(0,a.jsx)(r.C,{children:t})})})}},46767:(e,t,s)=>{"use strict";s.d(t,{Bc:()=>i,ZI:()=>d,k$:()=>c,m_:()=>o});var a=s(95155),r=s(12115),l=s(67427),n=s(56618);let i=l.Kq,o=l.bL,c=l.l9,d=r.forwardRef((e,t)=>
1{let{className:s,sideOffset:r=4,...i}=e;return(0,a.jsx)(l.ZL,{children:(0,a.jsx)(l.UC,{ref:t,sideOffset:r,className:(0,n.cn)("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-tooltip-content-transform-origin]",s),...i})})});d.displayName=l.UC.displayName},49308:(e,t,s)=>{"use strict";function a(e,t){let{loggedIn:s,user:a,ready:r,authenticated:l}=e,{connectWallet:n,login:i,logout:o}=t;try{!s&&a&&r&&l?n():s||a||!r||l?o():i()}catch(e){console.error("Error in handleAuthAction:",e)}}function r(e,t){let{loggedIn:s,user:a,ready:r,authenticated:l}=e,{connectWallet:n,login:i}=t;if(!s)try{a&&r&&l?n():a||!r||l||i()}catch(e){console.error("Error in triggerLogin:",e)}}s.d(t,{A:()=>r,v:()=>a})},86259:(e,t,s)=>{"use strict";s.d(t,{w:()=>i});var a=s(95155),r=s(12115),l=s(47321),n=s(56618);let i=r.forwardRef((e,t)=>{let{className:s,orientation:r="horizontal",decorative:i=!0,...o}=e;return(0,a.jsx)(l.b,{ref:t,decorative:i,orientation:r,className:(0,n.cn)("shrink-0 bg-border","horizontal"===r?"h-[1px] w-full":"h-full w-[1px]",s),...o})});i.displayName=l.b.displayName},99280:(e,t,s)=>{Promise.resolve().then(s.bind(s,37025)),Promise.resolve().then(s.t.bind(s,41402,23)),Promise.resolve().then(s.t.bind(s,67928,23)),Promise.resolve().then(s.t.bind(s,67525,23)),Promise.resolve().then(s.bind(s,18720)),Promise.resolve().then(s.t.bind(s,13673,23)),Promise.resolve().then(s.bind(s,46555)),Promise.resolve().then(s.bind(s,14900))}},e=>{e.O(0,[6531,2978,9184,2545,2970,6432,6465,8720,5305,2257,3960,9073,8054,5646,8548,8441,1255,7358],()=>e(e.s=99280)),_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.