1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/overview-metrics-B194Z2rG.js","assets/app-D2hV7Ye0.js","assets/app-Br9z28gQ.css","assets/utils-DBwg5IJ2.js","assets/users-Cf_zLrqN.js","assets/createLucideIcon-Bv9QJfkE.js","assets/user-check-D5wLTc8B.js","assets/shopping-cart-2DKm1EbR.js","assets/dollar-sign-C-jufJuK.js","assets/trending-up-BZr2_fiN.js","assets/credit-card-Y_gCd4Cr.js","assets/arrow-up-D9BUGVMx.js","assets/arrow-down-gQ1lY708.js","assets/conversion-funnel-C6zRYjQs.js","assets/chart-CkqJh2Ps.js","assets/BarChart-BAA6HPEO.js","assets/user-acquisition-lnzkSMgK.js","assets/tabs-BMLGENVs.js","assets/index-BmFr46Vn.js","assets/index-BL0FjItE.js","assets/index-Ddn_zVuy.js","assets/index-Bo7Wje6-.js","assets/index-B5tBDOjF.js","assets/index-BZ_b4_7V.js","assets/index-BNFNzlHy.js","assets/index-WoiXmNGs.js","assets/index-D30mCbpv.js","assets/email-performance-BkC-V8hQ.js","assets/table-_kEihfAa.js","assets/Line-DqJbOwoG.js","assets/growth-trends-BBM9I6Ss.js","assets/recent-activity-DrkL0pXj.js","assets/badge-CeBeQaC0.js","assets/index-DhXnAMyA.js","assets/index-BdQq_4o_.js","assets/user-ChfoAVkm.js","assets/circle-check-big-CzCy-7aT.js","assets/circle-x-70zR1Ujc.js"])))=>i.map(i=>d[i]); 2import{r as s,j as e,H as j,a as n,_ as r}from"./app-D2hV7Ye0.js";import{B as _}from"./button-CADYElwY.js";import{S as m,a as d,b as c,c as p,d as u}from"./select-4pNd00RO.js";import{A as b}from"./app-layout-D2f1dsX8.js";import{c as w}from"./utils-DBwg5IJ2.js";import N from"./refresh-cw-BsAJdFkI.js";import y from"./calendar-CSLLpkrQ.js";import k from"./clock-D5EvXQLD.js";/* empty css */import"./index-B5tBDOjF.js";import"./index-DhXnAMyA.js";import"./index-BNFNzlHy.js";import"./index-BdQq_4o_.js";import"./index-BmFr46Vn.js";import"./index-BL0FjItE.js";import"./index-Bo7Wje6-.js";import"./index-BtE-9Gto.js";import"./index-WoiXmNGs.js";import"./index-BZ_b4_7V.js";import"./index-BIFLPTiR.js";import"./index-DkL_iLkf.js";import"./index-B8rN2q8u.js";import"./index-BBkYbNbj.js";import"./chevron-down-BiqcCRgP.js";import"./createLucideIcon-Bv9QJfkE.js";import"./check-CmArdozu.js";import"./chevron-up-B3sU-l2r.js";import"./sheet-B5YOymPN.js";import"./index-rVV9JOQW.js";import"./index-D30mCbpv.js";import"./x-DD1_wgzb.js";import"./tooltip-CkyB6ZnR.js";import"./panel-left-BX2wtn9w.js";import"./badge-CeBeQaC0.js";import"./dropdown-menu-D0UV6X53.js";import"./index-Ddn_zVuy.js";import"./avatar-CYbiF85C.js";import"./index-DgHe019N.js";import"./settings-B7BungA5.js";import"./log-out-BOObid9c.js";import"./chevrons-up-down-DX9tupaT.js";import"./layout-grid-BeQFo9A2.js";import"./key-round-7RkQVkw2.js";import"./phone-3gHy0XOn.js";import"./chart-column-Cy9_PFMf.js";import"./users-Cf_zLrqN.js";import"./download-BLgS1fdI.js";import"./message-square-2kw0divL.js";import"./bell-Dzqk8Ux9.js";import"./scroll-text-DFZ_1Jtt.js";import"./tags-C619LZUS.js";import"./ban-C4g-VR9e.js";import"./quote-dRZ0L3NB.js";import"./file-pen-Bi1d3eUo.js";import"./send-DO0iLTFi.js";import"./mail-u4qC4z4C.js";import"./book-open-D7n8lTu-.js";import"./dollar-sign-C-jufJuK.js";import"./chevron-right-Dfkx-Flj.js";const E=s.lazy(()=>r(()=>import("./overview-metrics-B194Z2rG.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12]))),S=s.lazy(()=>r(()=>import("./conversion-funnel-C6zRYjQs.js"),__vite__mapDeps([13,1,2,14,3,15]))),T=s.lazy(()=>r(()=>import("./user-acquisition-lnzkSMgK.js"),__vite__mapDeps([16,1,2,14,3,17,18,19,20,21,22,23,24,25,26,15]))),A=s.lazy(()=>r(()=>import("./email-performance-BkC-V8hQ.js"),__vite__mapDeps([27,1,2,14,3,28,17,18,19,20,21,22,23,24,25,26,29]))),P=s.lazy(()=>r(()=>import("./growth-trends-BBM9I6Ss.js"),__vite__mapDeps([30,1,2,14,3,17,18,19,20,21,22,23,24,25,26,29]))),R=s.lazy(()=>r(()=>import("./recent-activity-DrkL0pXj.js"),__vite__mapDeps([31,1,2,32,22,33,3,24,26,19,25,21,34,18,17,20,23,35,5,36,37,8]))),L=[{title:"Dashboard",href:"/dashboard"},{title:"Analytics",href:"/admin/dashboard"}],x=[{value:"today",label:"Today"},{value:"yesterday",label:"Yesterday"},{value:"this_week",label:"This Week"},{value:"last_week",label:"Last Week"},{value:"this_month",label:"This Month"},{value:"last_month",label:"Last Month"},{value:"this_year",label:"This Year"},{value:"last_30_days",label:"Last 30 Days"},{value:"last_60_days",label:"Last 60 Days"},{value:"last_90_days",label:"Last 90 Days"}];function ze({dashboardData:l,selectedPeriods:h}){const[o,t]=s.useState(!1),i=h??{overview:"today",trends:"this_month"},v=()=>{t(!0),n.post("/admin/dashboard/refresh",{},{onSuccess:()=>{setTimeout(()=>{n.reload({onFinish:()=>t(!1),onError:()=>t(!1)})},200)},onError:()=>t(!1)})},f=a=>{n.get("/admin/dashboard",{overview_period:a,trends_period:i.trends})},g=a=>{n.get("/admin/dashboard",{overview_period:i.overview,trends_period:a})};return e.jsxs(b,{breadcrumbs:L,children:[e.jsx(j,{title:"Analytics Dashboard"}),e.jsx("div",{className:"flex h-full max-w-full flex-1 flex-col gap-6 rounded-xl p-4",children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex flex-col gap-4 lg:flex-row lg:items-center lg:justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-3xl font-bold tracking-tight",children:"Analytics Dashboard"}),e.jsx("p",{className:"text-muted-foreground",children:"Comprehensive insights into user acquisition, engagement, and revenue."})]}),e.jsxs(_,{disabled:o,onClick:v,size:"sm",variant:"outline",children:[e.jsx(N,{className:w("h-4 w-4",o&&"animate-spin")}),e.jsx("span",{className:"hidden sm:inline",children:"Refresh Data"})]})]}),e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-16 w-full animate-pulse rounded-lg bg-slate-100 dar
2k:bg-slate-800"}),children:e.jsxs("div",{className:"flex flex-col gap-4 sm:flex-row sm:items-center sm:justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(y,{className:"text-muted-foreground h-4 w-4"}),e.jsx("span",{className:"text-muted-foreground text-sm font-medium",children:"Overview Period:"}),e.jsxs(m,{onValueChange:f,value:i.overview,children:[e.jsx(d,{className:"w-[140px]",children:e.jsx(c,{})}),e.jsx(p,{children:x.map(a=>e.jsx(u,{value:a.value,children:a.label},a.value))})]})]}),e.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[e.jsx("span",{className:"text-muted-foreground font-medium",children:"Total Earned:"}),e.jsx("span",{className:"font-bold text-green-600 dark:text-green-400",children:new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:0,maximumFractionDigits:0}).format(l.overview.total_revenue)})]})]})}),e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-24 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(E,{data:l.overview})}),e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-12 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{className:"text-muted-foreground h-4 w-4"}),e.jsx("span",{className:"text-muted-foreground text-sm font-medium",children:"Trends Period:"}),e.jsxs(m,{onValueChange:g,value:i.trends,children:[e.jsx(d,{className:"w-[140px]",children:e.jsx(c,{})}),e.jsx(p,{children:x.map(a=>e.jsx(u,{value:a.value,children:a.label},a.value))})]})]})}),e.jsx("div",{className:"w-full",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-80 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(P,{data:l.growth_trends})})}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-4",children:[e.jsx("div",{className:"min-w-0 lg:col-span-2",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-80 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(S,{data:l.conversion_funnel})})}),e.jsx("div",{className:"min-w-0 lg:col-span-2",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-80 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(T,{data:l.user_acquisition})})}),e.jsx("div",{className:"min-w-0 lg:col-span-2",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-80 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(A,{data:l.email_performance})})}),e.jsx("div",{className:"min-w-0 lg:col-span-2",children:e.jsx(s.Suspense,{fallback:e.jsx("div",{className:"h-80 w-full animate-pulse rounded-lg bg-slate-100 dark:bg-slate-800"}),children:e.jsx(R,{data:l.recent_activity})})})]})]})})]})}export{ze as default};
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.