1;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="374f57d8-2022-3abb-1aa3-20af44c50be6")}catch(e){}}(); 2(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,975558,e=>{"use strict";let t=(0,e.i(475254).default)("arrow-up",[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]]);e.s(["ArrowUp",()=>t],975558)},387951,e=>{"use strict";let t=(0,e.i(475254).default)("mic",[["path",{d:"M12 19v3",key:"npa21l"}],["path",{d:"M19 10v2a7 7 0 0 1-14 0v-2",key:"1vc78b"}],["rect",{x:"9",y:"2",width:"6",height:"13",rx:"3",key:"s6n7sd"}]]);e.s(["Mic",()=>t],387951)},284614,e=>{"use strict";let t=(0,e.i(475254).default)("user",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);e.s(["User",()=>t],284614)},318207,302747,794771,e=>{"use strict";var t=e.i(843476),i=e.i(475254);let n=(0,i.default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);var s=e.i(284614),r=e.i(239616),l=e.i(283086),a=e.i(292270),o=e.i(463059),c=e.i(519455),d=e.i(387951),h=e.i(975558),p=e.i(37727),x=e.i(271645);function g(){let[e,i]=(0,x.useState)(""),n=(0,x.useRef)(null);return(0,t.jsx)("div",{ref:n,className:"relative flex-1 max-w-2xl mx-auto",children:(0,t.jsxs)("div",{className:"relative flex items-center",children:[(0,t.jsx)("input",{type:"text",value:e,onChange:e=>{i(e.target.value)},placeholder:"Ask anything, explore topics, upload videos...",className:"flex h-12 w-full rounded-full border border-zinc-200 bg-white px-4 pr-32 text-sm shadow-sm transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none disabled:cursor-not-allowed disabled:opacity-50"}),(0,t.jsxs)("div",{className:"absolute right-2 flex items-center gap-1",children:[e&&(0,t.jsx)(c.Button,{onClick:()=>{i("")},size:"icon",variant:"ghost",className:"h-8 w-8 text-zinc-400 hover:text-zinc-600",children:(0,t.jsx)(p.X,{className:"h-4 w-4"})}),(0,t.jsx)(c.Button,{size:"icon",variant:"ghost",className:"h-8 w-8 text-muted-foreground hover:text-foreground",children:(0,t.jsx)(d.Mic,{className:"h-4 w-4"})}),(0,t.jsx)(c.Button,{size:"icon",className:"h-8 w-8 rounded-full bg-zinc-400 hover:bg-zinc-500 text-white",children:(0,t.jsx)(h.ArrowUp,{className:"h-4 w-4"})})]})]})})}var u=e.i(618566),f=e.i(793479),m=e.i(975157),y=e.i(337822);function b({className:e,...i}){return(0,t.jsx)("div",{className:(0,m.cn)("animate-pulse rounded-md bg-zinc-200",e),...i})}e.s(["Skeleton",()=>b],302747);var j=e.i(755146),v=e.i(344803),w=e.i(269398),k=e.i(447245),S=e.i(720594),F=e.i(624205),C=e.i(664284);let N=(0,i.default)("check-check",[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]]);e.s(["CheckCheck",()=>N],794771);var _=e.i(246614);function z(){let e=(0,u.useRouter)(),[i,s]=(0,x.useState)(!1),r=(0,_.useNotificationStore)(e=>e.notifications),l=(0,_.useNotificationStore)(e=>e.unreadCount),a=(0,_.useNotificationStore)(e=>e.fetch),o=(0,_.useNotificationStore)(e=>e.markRead),c=(0,_.useNotificationStore)(e=>e.markAllRead);return(0,x.useEffect)(()=>{a()},[a]),(0,t.jsxs)(y.Popover,{open:i,onOpenChange:e=>{s(e),e&&c()},children:[(0,t.jsx)(y.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("button",{"aria-label":"Notifications",className:"relative flex h-9 w-9 items-center justify-center rounded-full transition-colors hover:bg-zinc-100",children:[(0,t.jsx)(n,{className:"h-[18px] w-[18px] text-zinc-600",strokeWidth:1.9}),l>0&&(0,t.jsx)("span",{className:"absolute -right-0.5 -top-0.5 flex h-4 min-w-[16px] items-center justify-center rounded-full bg-indigo-600 px-1 text-[10px] font-semibold leading-none text-white ring-2 ring-white",children:l>9?"9+":l})]})}),(0,t.jsx)(y.PopoverContent,{align:"end",className:"w-auto border-none bg-transparent p-0 shadow-none",style:{zIndex:60},children:(0,t.jsxs)("div",{style:{width:360,background:"white",boxShadow:"0 8px 30px rgba(0,0,0,0.10), 0 2px 8px rgba(0,0,0,0.04)",borderRadius:14,border:"1px solid rgba(0,0,0,0.06)",overflow:"hidden"},children:[(0,t.jsxs)("div",{className:"flex items-center justify-between border-b border-zinc-100 px-4 py-3",children:[(0,t.jsx)("span",{className:"text-sm font-semibold text-zinc-900",children:"Notifications"}),l>0&&(0,t.jsxs)("button",{onClick:()=>c(),className:"flex items-center gap-1 text-[12px] font-medium text-zinc-500 transition-colors hover:text-zinc-800",children:[(0,t.jsx)(N,{className:"h-3.5 w-3.5"})," Mark all read"]})]}),0===r.length?(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center gap-2 px-6 py-12 text-center",children:[(0,t.jsx)(n,{className:"h-7 w-7 text-zinc-300",strokeWidth:1.5}),(0,t.jsx)("p",{className:"text-[13px] text-zinc-400",children:"No notifications yet"})]}):(0,t.jsx)("div",{className:"max-h-[380px] overflow-y-auto overscroll-contain",children:(0,t.jsx)("div",{className:"flex flex-col",children:r.map(i=>(0,t.jsxs)("button",{onClick:()=>{o(i.id),s(!1),i.link_url&&i.link_url.startsWith("/")&&e.push(i.link_url)},className:(0,m.cn)("flex items-start gap-3 border-b border-zinc-50 px-4 py-3 text-left transition-colors last:border-b-0 hover:bg-zinc-50",!i.is_read&&"bg-indigo-50/40"),children:[(0,t.jsx)("span",{className:(0,m.cn)("mt-1.5 h-2 w-2 shrink-0 rounded-full",i.is_read?"bg-transparent":"bg-indigo-500")}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-col gap-0.5",children:[(0,t.jsx)("span",{className:(0,m.cn)("line-clamp-2 text-[13px] leading-snug text-zinc-900",!i.is_read&&"font-semibold"),children:i.title}),i.body&&(0,t.jsx)("span",{className:"line-clamp-2 text-[12px] leading-snug text-zinc-500",children:i.body}),(0,t.jsx)("span",{className:"mt-0.5 text-[11px] text-zinc-400",children:function(e){let t=new Date(e).getTime();if(Number.isNaN(t))return"";let i=Math.floor((Date.now()-t)/6e4);if(i<1)return"just now";if(i<60)return`${i}m ago`;let n=Math.floor(i/60);if(n<24)return`${n}h ago`;let s=Math.floor(n/24);return s<7?`${s}d ago`:new Date(t).toLocaleDateString()}(i.created_at)})]})]},i.id))})})]})})]})}var A=e.i(572638),W=e.i(846932),M=e.i(88653),R=e.i(595468);function I({showSearch:i,title:c,badge:d,icon:h,onTitleChange:p,onOpenSettings:N,pageTitle:_,pageIcon:I,pageSubtitle:L,hideCreditsOnMobile:E=!1,trailingActions:H}){let T,B,D,U;(0,u.useRouter)();let[P,O]=(0,x.useState)(null),[V,$]=(0,x.useState)(!1),[q,K]=(0,x.useState)(c||""),X=(0,x.useRef)(null),G=(0,x.useRef)(null),[J,Q]=(0,x.useState)(200),{activeUploads:Y}=(0,v.useLibraryStore)(),{user:Z}=(0,w.useUserStore)(),ee=(0,k.useUpgradeModalStore)(e=>e.openModal),et=(0,S.useUIStore)(e=>e.openAuthModal),ei=(0,C.useBillingStore)(e=>e.subscription),en=(0,C.useBillingStore)(e=>
2e.fetchSubscription),es=(0,C.useBillingStore)(e=>e.clearSubscription),er=(0,S.useUIStore)(e=>e.openImports),el=(0,S.useUIStore)(e=>e.toggleMobileSidebar),[ea,eo]=(0,x.useState)(!1),[ec,ed]=(0,x.useState)(!1),[eh,ep]=(0,x.useState)(new Set),ex=Z?.available_plans?.find(e=>e.code===(({FREE:"FRE",PRO:"PRO",STANDARD:"STD",PREMIUM:"PRM",MAX:"MAX"})[Z?.subscription_tier?.toUpperCase()||"FREE"]||"FRE")),eg={monthly_credits:ex?.monthly_credits??0,reward_credits:Z?.usage_limits?.reward_credits??0},eu=()=>{let e=Z?.display_name?.trim();if(e&&"none"!==e.toLowerCase()){let t=e.split(/\s+/).filter(Boolean);return t.length>=2?`${t[0][0]}${t[1][0]}`.toUpperCase():e[0].toUpperCase()}return Z?.email?Z.email[0].toUpperCase():Z?.avatar_initial?Z.avatar_initial.toUpperCase():"U"},ef=Y.filter(e=>["PENDING","PROCESSING"].includes(e.status||"")),em=Y.filter(e=>["COMPLETED","FAILED"].includes(e.status||"")&&!eh.has(e.id)),ey=ef.length>0||em.length>0;(0,x.useEffect)(()=>{O(document.cookie.split(";").some(e=>e.trim().startsWith("vd_logged_in=")))},[]),(0,x.useEffect)(()=>{K(c||"")},[c]),(0,x.useEffect)(()=>{if(V&&X.current){X.current.focus();let e=X.current.value.length;X.current.setSelectionRange(e,e)}},[V]),(0,x.useEffect)(()=>{G.current&&Q(Math.min(Math.max(G.current.scrollWidth+16,100),600))},[q]),(0,x.useEffect)(()=>{Z?.id&&"FREE"!==(Z.subscription_tier||"FREE").toUpperCase()?en():es()},[Z?.id,Z?.subscription_tier,en,es]);let eb=async()=>{q.trim()&&q!==c?await p?.(q):K(c||""),$(!1)},ej=async()=>{F.useFeatureStore.getState().clearFeatures(),w.useUserStore.getState().clearUser();try{let{api:t}=await e.A(764486);await t.post("/api/v1/auth/jwt/logout",{refresh_token:""})}catch{}document.cookie="vd_logged_in=; path=/; max-age=0",document.cookie="vd_logged_in=; path=/; max-age=0; domain=.veridive.com",window.location.href="/"};return(0,t.jsx)(t.Fragment,{children:(0,t.jsxs)("div",{className:`flex items-center justify-between gap-2 md:gap-3 ${_?"pt-2 pb-4":"pt-2 pb-1"}`,children:[(0,t.jsx)("button",{onClick:el,"aria-label":"Open menu",className:"flex md:hidden items-center justify-center shrink-0 hover:bg-zinc-100 transition-colors rounded-lg",style:{width:36,height:36},children:(0,t.jsx)("img",{src:"/images/veridive-mark.svg",alt:"Veridive",draggable:!1,style:{width:32,height:32,objectFit:"contain"}})}),_&&!c&&(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10},children:[I&&(T=({Artifacts:{initial:{y:-20,opacity:0},animate:{y:[null,2,-3,1,0],opacity:1},transition:{duration:.7,ease:[.22,1,.36,1],delay:.05}},Library:{initial:{rotate:-15,opacity:0},animate:{rotate:[null,3,0],opacity:1},transition:{duration:.6,ease:[.22,1,.36,1],delay:.05}},Chats:{initial:{scale:.3,opacity:0}
2,animate:{scale:[null,1.08,1],opacity:1},transition:{duration:.5,ease:[.22,1,.36,1],delay:.05}},Discover:{initial:{rotate:-540,opacity:0},animate:{rotate:0,opacity:1},transition:{duration:1.4,ease:[.16,1,.3,1],delay:.05}}})[_]||{initial:{opacity:0},animate:{opacity:1},transition:{duration:.3}},(0,t.jsx)(W.motion.div,{initial:T.initial,animate:T.animate,transition:T.transition,style:{display:"flex",alignItems:"center",justifyContent:"center"},children:(0,t.jsx)(I,{style:{width:20,height:20,color:"#1B1F2A"},strokeWidth:2.5})})),(0,t.jsx)(W.motion.h1,{initial:{opacity:0,x:-8},animate:{opacity:1,x:0},transition:{duration:.4,ease:[.25,.46,.45,.94],delay:.2},style:{fontSize:20,fontWeight:500,color:"#18181B",letterSpacing:"0.04em",lineHeight:"28px",margin:0},children:_})]}),L&&(0,t.jsx)(W.motion.p,{initial:{opacity:0,y:-4},animate:{opacity:1,y:0},transition:{duration:.4,delay:.35},style:{fontSize:12,fontWeight:400,color:"#8C8FA3",letterSpacing:"0.01em",lineHeight:"16px",margin:0,paddingLeft:30},children:L})]}),(c&&p||d)&&(0,t.jsxs)("div",{className:"flex items-center gap-2 min-w-0 max-w-xl",children:[h&&(0,t.jsx)(h,{className:"h-5 w-5 text-zinc-400 flex-shrink-0"}),(0,t.jsx)("span",{ref:G,className:"invisible absolute whitespace-pre text-lg font-semibold tracking-tight","aria-hidden":"true",children:q||" "}),p&&V?(0,t.jsx)(f.Input,{ref:X,value:q,onChange:e=>K(e.target.value),onBlur:eb,onKeyDown:e=>{"Enter"===e.key?eb():"Escape"===e.key&&(K(c||""),$(!1))},style:{width:J},className:"!text-base md:!text-lg font-semibold px-0 py-0 border-none shadow-none focus-visible:ring-0 bg-transparent text-zinc-900 tracking-tight placeholder:text-zinc-300 h-auto p-0"}):c&&(0,t.jsx)("h1",{onClick:()=>p&&$(!0),className:(0,m.cn)("font-semibold text-base md:text-lg text-zinc-900 tracking-tight truncate",p&&"cursor-text hover:opacity-70 transition-opacity"),children:c}),d]}),i&&(0,t.jsx)("div",{className:"hidden md:flex flex-1 max-w-3xl mr-4",children:(0,t.jsx)(g,{})}),(0,t.jsxs)("div",{className:"flex items-center gap-2 md:gap-3 pl-2 md:pl-4 ml-auto",children:[H,(0,t.jsx)(M.AnimatePresence,{children:ey&&Z&&(0,t.jsx)(W.motion.div,{initial:{opacity:0,scale:.5},animate:{opacity:1,scale:1},exit:{opacity:0,scale:0},transition:{type:"spring",damping:20,stiffness:300},children:(0,t.jsx)("div",{onClick:()=>er(),className:"relative flex h-9 w-9 items-center justify-center rounded-full cursor-pointer transition-colors hover:bg-zinc-100",title:ef.length>0?`Processing ${ef.length}`:`${em.length} done`,children:ef.length>0?(0,t.jsxs)("div",{className:"relative flex h-3 w-3 items-center justify-center",children:[(0,t.jsx)("span",{className:"absolute inline-flex h-full w-full animate-ping rounded-full bg-zinc-400 opacity-75"}),(0,t.jsx)("div",{className:"relative inline-flex rounded-full h-2 w-2 bg-zinc-700"})]}):(0,t.jsx)("div",{className:"relative flex items-center justify-center",children:(0,t.jsx)(R.CheckCircle2,{className:"h-4 w-4 text-emerald-500"})})})})}),null===P?null:P?Z?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(z,{}),(0,t.jsxs)(y.Popover,{open:ec,onOpenChange:ed,children:[(0,t.jsx)(y.PopoverTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:(0,m.cn)("flex items-center gap-1.5 bg-white border border-zinc-200 rounded-full px-3 py-1.5 shadow-sm cursor-pointer hover:bg-zinc-50 transition-colors",E&&"hidden md:flex"),children:[(0,t.jsx)(l.Sparkles,{className:"h-3.5 w-3.5 text-zinc-700"}),(0,t.jsx)("span",{className:"text-sm font-semibold text-zinc-700",children:Z?.usage_limits?.credits?.toLocaleString()||"0"})]})}),(0,t.jsx)(y.PopoverContent,{align:"end",className:"p-0 border-none shadow-none bg-transparent w-auto",style:{zIndex:60},children:(0,t.jsx)("div",{style:{width:296,background:"white",boxShadow:"0 8px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04)",borderRadius:14,border:"1px solid rgba(0, 0, 0, 0.06)",overflow:"hidden"},children:(0,t.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:14},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8},children:(0,t.jsxs)("span",{style:{color:"#18181B",fontSize:15,fontWeight:600,lineHeight:"22px",letterSpacing:"-0.01em",textTransform:"capitalize"},children:[Z?.subscription_tier&&"none"!==Z.subscription_tier.toLowerCase()?Z.subscription_tier:"Free"," Plan"]})}),Z?.subscription_tier?.toLowerCase()!=="max"&&(0,t.jsx)("button",{onClick:()=>{ed(!1),ee()},className:"credit-popover-upgrade-btn",style:{height:26,paddingLeft:10,paddingRight:10,background:"#18181B",borderRadius:7,border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"#FAFAFC",fontSize:11,fontWeight:500,lineHeight:"16px",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#3F3F46"},onMouseLeave:e=>{e.currentTarget.style.background="#18181B"},children:"Upgrade"})]}),(0,t.jsx)("div",{style:{height:1,background:"#F0F0F3"}}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:6},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7},children:[(0,t.jsx)(l.Sparkles,{style:{width:15,height:15,color:"#18181B"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#18181B",fontSize:14,fontWeight:600,lineHeight:"20px"},children:"Credits"})]}),(0,t.jsx)("span",{style:{color:"#18181B",fontSize:16,fontWeight:700,lineHeight:"22px",letterSpacing:"-0.02em",fontVariantNumeric:"tabular-nums"}
2,children:Z?.usage_limits?.credits?.toLocaleString()||"0"})]}),(B=eg?.monthly_credits||0,D=Z?.usage_limits?.credits||0,U=B>0?Math.min(D/B*100,100):0,(0,t.jsx)("div",{style:{height:5,background:"#F0F0F3",borderRadius:100,overflow:"hidden"},children:(0,t.jsx)("div",{style:{height:"100%",width:`${U}%`,background:"linear-gradient(90deg, #2F3442, #52576A)",borderRadius:100,transition:"width 0.6s ease"}})})),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,paddingLeft:1},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"17px"},children:"Monthly credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"17px",fontVariantNumeric:"tabular-nums"},children:eg?.monthly_credits?.toLocaleString()||"0"})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"17px"},children:"Rewarded credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"17px",fontVariantNumeric:"tabular-nums"},children:eg?.reward_credits?.toLocaleString()||"0"})]}),(Z?.usage_limits?.carryover_credits??0)>0&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"17px"},children:"Carryover credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"17px",fontVariantNumeric:"tabular-nums"},children:Z?.usage_limits?.carryover_credits?.toLocaleString()})]})]})]}),(0,t.jsx)("div",{style:{height:1,background:"#F0F0F3"}}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7},children:[(0,t.jsx)(n,{style:{width:14,height:14,color:"#52576A"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#18181B",fontSize:13,fontWeight:600,lineHeight:"18px"},children:"Daily bonus"})]}),(0,t.jsxs)("span",{style:{color:"#18181B",fontSize:14,fontWeight:700,lineHeight:"20px",fontVariantNumeric:"tabular-nums"},children:[(Z?.usage_limits?.daily_bonus_remaining??Z?.usage_limits?.daily_bonus_amount??50).toLocaleString(),"/",Z?.usage_limits?.daily_bonus_amount?.toLocaleString()||"50",(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:11,fontWeight:500,marginLeft:4},children:"remaining"})]})]}),(0,t.jsxs)("span",{style:{color:"#8C8FA3",fontSize:11,fontWeight:400,lineHeight:"16px",paddingLeft:22},children:[Z?.usage_limits?.daily_bonus_amount?.toLocaleString()||"50"," credits daily, expires at midnight"]})]}),(0,t.jsx)("div",{style:{height:1,background:"#F0F0F3"}}),(0,t.jsxs)("button",{onClick:()=>{ed(!1),N?.("usage")},style:{width:"100%",height:32,background:"#FAFAFA",border:"1px solid #F0F0F3",borderRadius:8,cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",gap:6,transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#F0F0F3",e.currentTarget.style.borderColor="#E0E0E6"},onMouseLeave:e=>{e.currentTarget.style.background="#FAFAFA",e.currentTarget.style.borderColor="#F0F0F3"},children:[(0,t.jsx)("span",{style:{color:"#3F3F46",fontSize:12,fontWeight:500,lineHeight:"16px"},children:"View usage"}),(0,t.jsx)(o.ChevronRight,{style:{width:12,height:12,color:"#3F3F46"},strokeWidth:2})]})]})})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsxs)(j.DropdownMenu,{open:ea,onOpenChange:eo,children:[(0,t.jsx)(j.DropdownMenuTrigger,{asChild:!0,children:(0,t.jsxs)("div",{className:"relative cursor-pointer group",children:[(0,t.jsx)("div",{className:"h-9 w-9 rounded-full bg-zinc-100 overflow-hidden border border-zinc-200 shadow-sm transition-transform group-hover:scale-105",children:Z?.profile_image_url?(0,t.jsx)("img",{src:Z.profile_image_url,alt:"User",className:"h-full w-full object-cover"}):(0,t.jsx)("div",{className:"h-full w-full flex items-center justify-center bg-gradient-to-br from-sky-4
200 to-indigo-500 text-white text-sm font-semibold",children:eu()})}),Z?.subscription_tier&&(0,t.jsx)("div",{className:"absolute -bottom-1 -right-1 bg-zinc-900 text-white text-[9px] font-bold px-1 py-0.5 rounded-sm shadow-sm border-[1.5px] border-white leading-none",children:(Z?.subscription_tier||"Free").toUpperCase()})]})}),(0,t.jsx)(j.DropdownMenuContent,{align:"end",className:"p-0 rounded-xl border-none",style:{width:300,padding:0,background:"white",boxShadow:"0 8px 30px rgba(0, 0, 0, 0.1), 0 2px 8px rgba(0, 0, 0, 0.04)",borderRadius:14,border:"1px solid rgba(0, 0, 0, 0.06)",display:"flex",flexDirection:"column",overflow:"hidden"},children:(0,t.jsxs)("div",{style:{padding:"14px 16px",display:"flex",flexDirection:"column",gap:14},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,t.jsx)("div",{style:{width:44,height:44,borderRadius:9999,overflow:"hidden",flexShrink:0,boxShadow:"0 1px 3px rgba(0,0,0,0.08)"},children:Z?.profile_image_url?(0,t.jsx)("img",{src:Z.profile_image_url,alt:"User",style:{width:"100%",height:"100%",objectFit:"cover"}}):(0,t.jsx)("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",background:"linear-gradient(135deg, #38bdf8, #6366f1)",color:"white",fontSize:16,fontWeight:600},children:eu()})}),(0,t.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[Z?.display_name&&"none"!==Z.display_name.toLowerCase()&&(0,t.jsx)("span",{style:{color:"#18181B",fontSize:14,fontWeight:600,lineHeight:"20px"},children:Z.display_name}),(0,t.jsx)("span",{style:{fontSize:10,fontWeight:600,color:"#fff",background:"#2F3442",padding:"2px 6px",borderRadius:4,letterSpacing:"0.03em",textTransform:"uppercase",flexShrink:0},children:Z?.subscription_tier&&"none"!==Z.subscription_tier.toLowerCase()?Z.subscription_tier.toUpperCase():"FREE"})]}),(0,t.jsx)("div",{style:{color:"#8C8FA3",fontSize:13,fontWeight:400,lineHeight:"18px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",marginTop:2},children:Z?.email||""})]})]}),(0,t.jsx)("div",{style:{height:1,background:"#F0F0F3"}}),(0,t.jsxs)("div",{style:{padding:"10px 12px",background:"#FAFAFA",borderRadius:10,border:"1px solid #F0F0F3",display:"flex",flexDirection:"column",gap:8},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("div",{style:{display:"flex",alignItems:"center",gap:7},children:(0,t.jsxs)("span",{style:{color:"#18181B",fontSize:14,fontWeight:600,lineHeight:"20px",textTransform:"capitalize"},children:[Z?.subscription_tier&&"none"!==Z.subscription_tier.toLowerCase()?Z.subscription_tier:"Free"," Plan"]})}),Z?.subscription_tier&&"none"!==Z.subscription_tier.toLowerCase()&&"max"!==Z.subscription_tier.toLowerCase()?(0,t.jsx)("button",{onClick:()=>{eo(!1),ee()},style:{height:24,paddingLeft:8,paddingRight:8,background:"#18181B",borderRadius:6,border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",color:"#FAFAFC",fontSize:11,fontWeight:500,lineHeight:"16px",transition:"all 0.2s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#3F3F46"},onMouseLeave:e=>{e.currentTarget.style.background="#18181B"},children:"Upgrade"}):null]}),ei?.has_scheduled_change&&(0,t.jsx)("div",{style:{paddingBottom:2},children:(0,t.jsx)(A.ScheduledPlanNotice,{compact:!0,currentPlanCode:ei.plan_code,scheduledPlanCode:ei.scheduled_plan_code,effectiveAt:ei.scheduled_change_effective_at})}),(0,t.jsx)("div",{style:{height:1,background:"#E8E8ED",margin:"0 -2px"}}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",borderRadius:6,padding:"4px 2px",transition:"background 0.15s",margin:"0 -2px"},onMouseEnter:e=>{e.currentTarget.style.background="#F0F0F3"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},onClick:()=>{eo(!1),setTimeout(()=>ed(!0),150)},children:[(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7},children:[(0,t.jsx)(l.Sparkles,{style:{width:15,height:15,color:"#18181B"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#18181B",fontSize:13,fontWeight:600,lineHeight:"18px"},children:"Credits"})]}),(0,t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:4},children:[(0,t.jsx)("span",{style:{color:"#18181B",fontSize:14,fontWeight:700,lineHeight:"18px",fontVariantNumeric:"tabular-nums"}
2,children:Z?.usage_limits?.credits?.toLocaleString()||"0"}),(0,t.jsx)(o.ChevronRight,{style:{width:12,height:12,color:"#8C8FA3"},strokeWidth:2})]})]}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:3,paddingLeft:1},children:[(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"16px"},children:"Monthly credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"16px",fontVariantNumeric:"tabular-nums"},children:eg?.monthly_credits?.toLocaleString()||"0"})]}),(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"16px"},children:"Rewarded credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"16px",fontVariantNumeric:"tabular-nums"},children:eg?.reward_credits?.toLocaleString()||"0"})]}),(Z?.usage_limits?.carryover_credits??0)>0&&(0,t.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center"},children:[(0,t.jsx)("span",{style:{color:"#8C8FA3",fontSize:12,fontWeight:400,lineHeight:"16px"},children:"Carryover credits"}),(0,t.jsx)("span",{style:{color:"#52576A",fontSize:12,fontWeight:500,lineHeight:"16px",fontVariantNumeric:"tabular-nums"},children:Z?.usage_limits?.carryover_credits?.toLocaleString()})]})]})]}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:2},children:[(0,t.jsxs)("button",{onClick:()=>{eo(!1),N?.("account")},style:{width:"100%",background:"transparent",border:"none",cursor:"pointer",padding:"8px 10px",borderRadius:8,display:"flex",alignItems:"center",gap:10,transition:"all 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#F5F5F7"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[(0,t.jsx)(s.User,{style:{width:16,height:16,color:"#8C8FA3"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#3F3F46",fontSize:14,fontWeight:450,lineHeight:"20px"},children:"Account"})]}),(0,t.jsxs)("button",{onClick:()=>{eo(!1),N?.("settings")},style:{width:"100%",background:"transparent",border:"none",cursor:"pointer",padding:"8px 10px",borderRadius:8,display:"flex",alignItems:"center",gap:10,transition:"all 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#F5F5F7"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[(0,t.jsx)(r.Settings,{style:{width:16,height:16,color:"#8C8FA3"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#3F3F46",fontSize:14,fontWeight:450,lineHeight:"20px"},children:"Settings"})]}),(0,t.jsx)("div",{style:{height:1,background:"#F0F0F3",margin:"4px 0"}}),(0,t.jsxs)("button",{onClick:()=>{eo(!1),ej()},style:{width:"100%",background:"transparent",border:"none",cursor:"pointer",padding:"8px 10px",borderRadius:8,display:"flex",alignItems:"center",gap:10,transition:"all 0.15s ease"},onMouseEnter:e=>{e.currentTarget.style.background="#F5F5F7"},onMouseLeave:e=>{e.currentTarget.style.background="transparent"},children:[(0,t.jsx)(a.LogOut,{style:{width:16,height:16,color:"#8C8FA3"},strokeWidth:1.75}),(0,t.jsx)("span",{style:{color:"#3F3F46",fontSize:14,fontWeight:450,lineHeight:"20px"},children:"Sign Out"})]})]})]})})]})})]}):(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)(b,{className:"h-8 w-[72px] rounded-full"}),(0,t.jsx)(b,{className:"h-9 w-9 rounded-full"})]}):(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)("button",{onClick:()=>et("/"),className:"h-9 px-4 rounded-full text-[13px] font-medium text-zinc-600 hover:text-zinc-900 hover:bg-zinc-100 transition-colors max-md:hidden",children:"Sign In"}),(0,t.jsxs)("button",{onClick:()=>et("/"),className:"h-9 px-4 rounded-full text-[13px] font-semibold text-white bg-zinc-900 hover:bg-zinc-700 transition-colors shadow-sm max-md:shadow-none whitespace-nowrap shrink-0 max-md:rounded-md max-md:h-8 max-md:px-3 max-md:text-[12.5px]",children:[(0,t.jsx)("span",{className:"max-md:hidden",children:"Sign Up"}),(0,t.jsx)("span",{className:"hidden max-md:inline",children:"Sign In"})]})]})]})]})})}e.s(["DashboardHeader",()=>I],318207)}]); 3
4//# debugId=374f57d8-2022-3abb-1aa3-20af44c50be6
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.