PageSourceSearch

https://app.memberstack.com/assets/Analytics-B_UjNLuQ.js

js memberstack.com collected 2026-09-24 17:16:17 UTC 22,377 bytes, 7 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/index-e6cRLylW.js","assets/vendor-CSdFbWfl.js","assets/chartSetup-Ce1ED2p4.js","assets/index-BynWLX9U.js","assets/index-DTml69BY.css","assets/Select-tnTVfiMN.js","assets/react-select.esm-DP0yNhqo.js","assets/objectWithoutPropertiesLoose-ECer6yPr.js","assets/calendar-CjjD9Htf.js"])))=>i.map(i=>d[i]);
2import{c as we,T as _e,a as Ce,I as ke,C as Se,g as Ae,b,B as De,A as Te,S as i,F as Ee,u as Fe,d as Me,e as Re,l as Ie,f as ge,h as E,_ as Ve,n as Be}from"./index-BynWLX9U.js";import{j as e,aA as Le,r as v}from"./vendor-CSdFbWfl.js";import{C as j}from"./CardEmptyState-DzfjVs41.js";import{S as C}from"./Select-tnTVfiMN.js";import"./chartSetup-Ce1ED2p4.js";import{f as $e}from"./formatDate-3wesRGkk.js";import{L as Pe}from"./lightbulb-D0bRfDFi.js";import{S as Ue,r as We}from"./resolveRecoveryEmailsEnabled-AsuIbfWv.js";import{D as Oe}from"./DashboardDateToolbar-CIwdwnaK.js";import{C as ze}from"./chart-column-CQplKj26.js";import{F as qe}from"./file-text-BVQc3j8i.js";import{G as Ge}from"./globe-BGYOiOdT.js";import"./react-select.esm-DP0yNhqo.js";import"./objectWithoutPropertiesLoose-ECer6yPr.js";import"./calendar-CjjD9Htf.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{};n.SENTRY_RELEASE={id:"5fdab7154cbea903e2531547e54739370b469773"};var r=new n.Error().stack;r&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[r]="e4d6852a-7a09-4e17-99cf-71f7fa938cf0",n._sentryDebugIdIdentifier="sentry-dbid-e4d6852a-7a09-4e17-99cf-71f7fa938cf0")}catch{}})();/**
3 * @license lucide-react v0.511.0 - ISC
4 *
5 * This source code is licensed under the ISC license.
6 * See the LICENSE file in the root directory of this source tree.
7 */const He=[["path",{d:"M18 8V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v7a2 2 0 0 0 2 2h8",key:"10dyio"}],["path",{d:"M10 19v-3.96 3.15",key:"1irgej"}],["path",{d:"M7 19h5",key:"qswx4l"}],["rect",{width:"6",height:"10",x:"16",y:"12",rx:"2",key:"1egngj"}]],Qe=we("monitor-smartphone",He),Ye=({label:n})=>e.jsxs(_e,{children:[e.jsx(Ce,{asChild:!0,children:e.jsx("span",{role:"img","aria-label":n,onClick:r=>{r.preventDefault(),r.stopPropagation()},className:"inline-flex shrink-0 cursor-help text-muted-foreground",children:e.jsx(ke,{className:"size-3.5"})})}),e.jsx(Se,{placement:"top",showArrow:!0,children:e.jsx("div",{className:"max-w-xs text-center",children:n})})]}),Je="dd LLL, yyyy",Ke=n=>`${n.slice(0,10)}T00:00:00`,k=({label:n,value:r})=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx("span",{className:"text-utility-tag-md font-semibold text-muted-foreground",children:n}),e.jsx("span",{className:"text-xl font-bold leading-none text-foreground",children:r})]}),Xe=({data:n,isLoading:r,recoveryEmailsEnabled:p})=>{const x=(n==null?void 0:n.abandoned_count)??0,N=(n==null?void 0:n.recovered_count)??0,g=(n==null?void 0:n.recovery_rate)??0,S=(n==null?void 0:n.tracking_since)??null,d=S?$e(Ke(S),Je):null,u=((n==null?void 0:n.revenue_by_currency)??[]).filter(h=>!!h),a=u.length?u.reduce((h,y)=>(y.recoverable_revenue??0)>(h.recoverable_revenue??0)?y:h):null,A=(a==null?void 0:a.recovered_revenue)??0,D=Math.max(((a==null?void 0:a.recoverable_revenue)??0)-A,0),w=h=>a!=null&&a.currency?e.jsx(Ee,{value:h/100,style:"currency",currency:a.currency}):"—",s=Ae(typeof navigator<"u"?navigator.language:void 0),m=!r&&x===0,_=p===!1&&!r&&x>0;return e.jsxs(b,{className:"p-4",children:[e.jsxs("div",{className:"mb-4 flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Abandoned Cart Recovery"}),e.jsx(Ye,{label:"Carts abandoned in this period, counted as recovered whenever the member came back — even after the period ends. Recovery lags abandonment, so recent numbers may still climb."})]}),d&&!m?e.jsxs("span",{className:"shrink-0 text-sm text-muted-foreground",children:["Tracking since ",d]}):null]}),_?e.jsx(De,{type:"warning",className:"mb-4 gap-3 [&>div:first-child]:items-center",leftPlugin:e.jsx(Pe,{"aria-hidden":"true",className:"shrink-0"}),text:e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"mr-2 rounded bg-warning-tagtext/15 px-1.5 py-0.5 text-utility-tag-md uppercase tracking-wide",children:"Recommended"}),"Win back these abandoned checkouts"]}),description:"Recovery emails send members back to the checkout they left. Until they're on, Won back and Recovery rate stay at 0.",rightPlugin:e.jsx(Te,{to:"../../emails/transactional/abandoned-cart",className:"mt-3 shrink-0 md:mt-0",children:"Turn on recovery emails"})}):null,r?e.jsx("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",children:Array.from({length:5}).map((h,y)=>e.jsxs("div",{className:"flex flex-col gap-1",children:[e.jsx(i,{height:12,width:90}),e.jsx(i,{height:20,width:64})]},`acr-skeleton-${y}`))}):m?e.jsx(j,{icon:Ue,message:d?"No abandoned checkouts in this period":"No abandoned checkouts tracked yet",hint:d?`Tracking started ${d}.`:"They'll appear here as members start and leave checkout."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-2 gap-4 sm:grid-cols-3 lg:grid-cols-5",children:[e.jsx(k,{label:"Checkouts abandoned",value:x.toLocaleStr
7ing(s)}),e.jsx(k,{label:"Won back",value:N.toLocaleString(s)}),e.jsx(k,{label:"Recovery rate",value:`${g.toFixed(1)}%`}),e.jsx(k,{label:"Revenue recovered",value:w(A)}),e.jsx(k,{label:"Revenue outstanding",value:w(D)})]}),u.length>1&&(a!=null&&a.currency)?e.jsxs("p",{className:"mt-3 text-xs text-muted-foreground",children:["Revenue shown in ",a.currency.toUpperCase(),";"," ",u.length-1," other"," ",u.length-1===1?"currency":"currencies"," not shown."]}):null]})]})},fe=Ie(()=>Ve(()=>import("./index-e6cRLylW.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8])).then(n=>Be(n,"Line"))),be={responsive:!0,maintainAspectRatio:!1,plugins:{legend:{display:!1},tooltip:{backgroundColor:"#ffffff",titleColor:"#0A0A0A",bodyColor:"#5C5C5C",borderColor:"#EBEBEB",borderWidth:1,cornerRadius:8,displayColors:!1}},scales:{x:{display:!0,grid:{display:!1},border:{display:!1},ticks:{color:"#A4A4A4",font:{size:12},maxTicksLimit:6}},y:{display:!1,grid:{display:!1}}},interaction:{intersect:!1,mode:"index"}},ht=()=>{var F,M,R,I,V,B,L,$,P,U,W,O,z,q,G,H,Q,Y,J,K,X,Z,ee,te,se,ne,re,le,oe,ae,ie,ce,de,ue,me,xe,he,pe;const{dateRange:n}=Le(),[r,p]=v.useState({utmSource:"",utmMedium:"",utmCampaign:"",utmTerm:"",utmContent:""}),[x,N]=v.useState("screenSize"),[g,S]=v.useState({}),d=t=>S(l=>({...l,[t]:!l[t]})),u=(t,l)=>g[t]?Number.POSITIVE_INFINITY:l,{data:a,loading:A,error:D,refetch:w}=Fe({variables:{utmParams:{utm_source:r.utmSource||void 0,utm_medium:r.utmMedium||void 0,utm_campaign:r.utmCampaign||void 0,utm_term:r.utmTerm||void 0,utm_content:r.utmContent||void 0},startDate:((F=n==null?void 0:n.from)==null?void 0:F.toISOString())||void 0,endDate:((M=n==null?void 0:n.to)==null?void 0:M.toISOString())||void 0},notifyOnNetworkStatusChange:!0}),s=a==null?void 0:a.getConversionTrackingStats,m=A&&!a,{currentUser:_}=Me(),h=((R=_==null?void 0:_.session)==null?void 0:R.role)!=="MEMBERS_READ",{data:y,error:je}=Re({skip:!h,errorPolicy:"all"}),ye=We(y,je),T=x==="screenSize"?(I=s==null?void 0:s.sessionCounts)==null?void 0:I.screenSize:x==="browser"?(V=s==null?void 0:s.sessionCounts)==null?void 0:V.browser:(B=s==null?void 0:s.sessionCounts)==null?void 0:B.os;v.useEffect(()=>{var t,l;w({utmParams:{utm_source:r.utmSource||void 0,utm_medium:r.utmMedium||void 0,utm_campaign:r.utmCampaign||void 0,utm_term:r.utmTerm||void 0,utm_content:r.utmContent||void 0},startDate:((t=n==null?void 0:n.from)==null?void 0:t.toISOString())||void 0,endDate:((l=n==null?void 0:n.to)==null?void 0:l.toISOString())||void 0})},[r,n,w]);const ve={labels:((L=s==null?void 0:s.activeDailyMembers)==null?void 0:L.map(t=>new Date((t==null?void 0:t.day)||"").toLocaleDateString("en-US",{month:"short",day:"numeric"})))||[],datasets:[{data:(($=s==null?void 0:s.activeDailyMembers)==null?void 0:$.map(t=>(t==null?void 0:t.daily_active_users)||0))||[],borderColor:"#2962FF",backgroundColor:"rgba(41, 98, 255, 0.1)",borderWidth:2,fill:!0,tension:.4,pointRadius:0,pointHoverRadius:4,pointBackgroun
7dColor:"#2962FF",pointBorderColor:"#ffffff",pointBorderWidth:2}]},Ne={labels:((P=s==null?void 0:s.activeWeeklyMembers)==null?void 0:P.map(t=>`Week of ${new Date((t==null?void 0:t.week)||"").toLocaleDateString("en-US",{month:"short",day:"numeric"})}`))||[],datasets:[{data:((U=s==null?void 0:s.activeWeeklyMembers)==null?void 0:U.map(t=>(t==null?void 0:t.weekly_active_users)||0))||[],borderColor:"#2962FF",backgroundColor:"rgba(41, 98, 255, 0.1)",borderWidth:2,fill:!0,tension:.4,pointRadius:0,pointHoverRadius:4,pointBackgroundColor:"#2962FF",pointBorderColor:"#ffffff",pointBorderWidth:2}]};return D?e.jsx("div",{className:"flex items-center justify-center h-64",children:e.jsxs("div",{className:"text-red-500",children:["Error loading analytics: ",D.message]})}):e.jsxs("div",{className:"space-y-4",children:[e.jsx(Oe,{}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs(b,{className:"p-4 flex-1",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Daily Active Members"}),e.jsx("div",{className:"text-sm text-muted-foreground mb-4",children:"Shows the number of unique members that use your app everyday"}),e.jsx("div",{className:"h-32 relative",children:m?e.jsx(i,{height:"100%",width:"100%"}):(W=s==null?void 0:s.activeDailyMembers)!=null&&W.length?e.jsx(v.Suspense,{fallback:null,children:e.jsx(fe,{data:ve,options:be})}):e.jsx(j,{icon:ge,message:"No daily activity yet",className:"h-full"})}),e.jsxs("div",{className:"flex justify-between items-center mt-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:"16 Nov 2024"}),e.jsx("span",{children:"Today"})]})]}),e.jsxs(b,{className:"p-4 flex-1",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Weekly Active Members"}),e.jsx("div",{className:"text-sm text-muted-foreground mb-4",children:"Shows the number of unique members that use your app every week"}),e.jsx("div",{className:"h-32 relative",children:m?e.jsx(i,{height:"100%",width:"100%"}):(O=s==null?void 0:s.activeWeeklyMembers)!=null&&O.length?e.jsx(v.Suspense,{fallback:null,children:e.jsx(fe,{data:Ne,options:be})}):e.jsx(j,{icon:ge,message:"No weekly activity yet",className:"h-full"})}),e.jsxs("div",{className:"flex justify-between items-center mt-4 text-sm text-muted-foreground",children:[e.jsx("span",{children:"16 Nov 2024"}),e.jsx("span",{children:"Today"})]})]})]}),e.jsx(Xe,{data:s==null?void 0:s.abandonedCart,isLoading:m,recoveryEmailsEnabled:ye}),e.jsxs("div",{className:"flex gap-4 items-center",children:[e.jsx(C,{value:[{label:"All Sources",value:""},...((q=(z=s==null?void 0:s.utmValues)==null?void 0:z.utm_source)==null?void 0:q.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]].find(t=>t.value===r.utmSource),options:[{label:"All Sources",value:""},...((H=(G=s==null?void 0:s.utmValues)==null?void 0:G.utm_source)==null?void 0:H.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]],placeholder:"All Sources",onChange:t=>p({...r,utmSource:t==null?void 0:t.value})}),e.jsx(C,{value:[{label:"All Mediums",value:""},...((Y=(Q=s==null?void 0:s.utmValues)==null?void 0:Q.utm_medium)==null?void 0:Y.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]].find(t=>t.value===r.utmMedium),options:[{label:"All Mediums",value:""},...((K=(J=s==null?void 0:s.utmValues)==null?void 0:J.utm_medium)==null?void 0:K.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]],placeholder:"All Mediums",onChange:t=>p({...r,utmMedium:t==null?void 0:t.value})}),e.jsx(C,{value:[{label:"All Campaigns",value:""},...((Z=(X=s==null?void 0:s.utmValues)==null?void 0:X.utm_campaign)==null?void 0:Z.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]].find(t=>t.value===r.utmCampaign),options:[{label:"All Campaigns",value:""},...((te=(ee=s==null?void 0:s.utmValues)==null?void 0:ee.utm_campaign)==null?void 0:te.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]],placeholder:"All Campaigns",onChange:t=>p({...r,utmCampaign:t==null?void 0:t.value})}),e.jsx(C,{value:[{label:"All Terms",value:""},...((ne=(se=s==null?void 0:s.utmValues)==null?void 0:se.utm_term)==null?void 0:ne.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]].find(t=>t.value===r.utmTerm),options:[{label:"All Terms",value:""},...((le=(re=s==null?void 0:s.utmValues)==null?void 0:re.utm_term)==null?void 0:le.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]],placeholder:"All Terms",onChange:t=>p({...r,utmTerm:t==null?void 0:t.value})}),e.jsx(C,{value:[{label:"All Contents",value:""},...((ae=(oe=s==null?void 0:s.utmValues)==null?void 0:oe.utm_content)==null?void 0:ae.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]].find(t=>t.value===r.utmContent),options:[{label:"All Contents",value:""},...((ce=(ie=s==null?void 0:s.utmValues)==null?void 0:ie.utm_content)==null?void 0:ce.filter(t=>t!==null).map(t=>({label:t||"Direct",value:t||""})))||[]],placeholder:"All Contents",onChange:t=>p({...r,utmContent:t==null?void 0:t.value})})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs(b,{className:"p-4 flex-1 min-h-72",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Signup Form Performance by UTM"}),(((de=s==null?void 0:s.formConversionRatesByUtm)==null?void 0:de.length)??0)>4&&e.jsx("button",{type:"button",onClick:()=>d("utm"),className:"text-app-blue400 text-sm hover:underline",children:g.utm?"Show less":"View all"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Source"}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Conv."}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Views"}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Signups"}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"ID"})]})}),e.jsx("tbody",{children:m?[...Array(4)].map((t,l)=>e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:80})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:40})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:50})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:50})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-muted-foreground",children:e.jsx(i,{height:16,width:100})})]},`skeleton-utm-${l}`)):(ue=s==null?void 0:s.formConversionRatesByUtm)!=null&&ue.length?s.formConversionRatesByUtm.slice(0,u("utm",4)).map((t,l)=>e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.utm_source)||"Direct"}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:t!=null&&t.conversion_rate_to_signup?`${t.conversion_rate_to_signup.toFixed(1)}%`:"0%"}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.total_form_views)||0}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.successful_signups)||0}),e.jsx("td",{className:"py-3 pr-6 text-sm text-muted-foreground",children:(t==null?void 0:t.form_id)||""})]},(t==null?void 0:t.form_id)||`utm-${l}`)):e.jsx("tr",{children:e.jsx("td",{colSpan:5,children:e.jsx(j,{icon:ze,message:"No UTM signups tracked yet",hint:"Add UTM tags to your signup links to see which sources convert."})})})})]})})]}),e.jsxs(b,{className:"p-4 flex-1 min-h-72",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Overall Signup Form Performance"}),(((me=s==null?void 0:s.signupFormRates)==null?void 0:me.length)??0)>4&&e.jsx("button",{type:"button",onClick:()=>d("forms"),className:"text-app-blue400 text-sm hover:underline",children:g.forms?"Show less":"View all"})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"min-w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Form"}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Conv."}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Views"}),e.jsx("th",{className:"text-left text-sm font-medium text-muted-foreground py-2 pr-6 whitespace-nowrap",children:"Signups"})]})}),e.jsx("tbody",{children:m?[...Array(4)].map((t,l)=>e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:100})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:40})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:50})}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:e.jsx(i,{height:16,width:50})})]},`skeleton-form-${l}`)):(xe=s==null?void 0:s.signupFormRates)!=null&&xe.length?s.signupFormRates.slice(0,u("forms",4)).map((t,l)=>e.jsxs("tr",{className:"border-b border-border",children:[e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.form_id)||"Unknown"}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:t!=null&&t.conversion_rate_to_signup?`${t.conversion_rate_to_signup.toFixed(1)}%`:"0%"}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.total_form_views)||0}),e.jsx("td",{className:"py-3 pr-6 text-sm text-foreground",children:(t==null?void 0:t.successful_signups)||0})]},(t==null?void 0:t.form_id)||`form-${l}`)):e.jsx("tr",{children:e.jsx("td",{colSpan:4,children:e.jsx(j,{icon:qe,message:"No form activity yet",hint:"Performance shows up once visitors load your signup forms."})})})})]})})]})]}),e.jsxs("div",{className:"flex gap-4",children:[e.jsxs(b,{className:"p-4 flex-1 min-h-72",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Countries"}),(((pe=(he=s==null?void 0:s.sessionCounts)==null?void 0:he.country)==null?void 0:pe.length)??0)>5&&e.jsx("button",{type:"button",onClick:()=>d("countries"),className:"text-app-blue400 text-sm hover:underline",children:g.countries?"Show less":"View all"})]}),e.jsx("div",{className:"space-y-3",children:(()=>{var c;if(m)return[...Array(5)].map((o,f)=>e.jsxs("div",{className:"flex justify-between items-center py-2",children:[e.jsx("span",{className:"text-sm text-foreground",children:e.jsx(i,{height:16,width:80})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:e.jsx(i,{height:16,width:40})})]},`skeleton-country-${f}`));const t=(c=s==null?void 0:s.sessionCounts)==null?void 0:c.country;if(!t||t.length===0)return e.jsx(j,{icon:Ge,message:"No location data yet"});const l=t.reduce((o,f)=>o+((f==null?void 0:f.unique_sessions)||0),0)||1;return t.slice(0,u("countries",5)).map((o,f)=>e.jsxs("div",{className:"flex justify-between items-center py-2",children:[e.jsx("span",{className:"text-sm text-foreground",children:(o==null?void 0:o.name)||"Unknown"}),e.jsxs("span",{className:"text-sm font-medium text-foreground",children:[(((o==null?void 0:o.unique_sessions)||0)/l*100).toFixed(0),"%"]})]},(o==null?void 0:o.name)||`country-${f}`))})()})]}),e.jsxs(b,{className:"p-4 flex-1 min-h-72",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("div",{className:"text-base font-semibold text-foreground",children:"Devices"}),((T==null?void 0:T.length)??0)>5&&e.jsx("button",{type:"button",onClick:()=>d("devices"),className:"text-app-blue400 text-sm hover:underline",children:g.devices?"Show less":"View all"})]}),e.jsxs("div",{className:"flex border-b border-border mb-4",children:[e.jsx("button",{type:"button",onClick:()=>N("screenSize"),className:E("px-4 py-2 text-sm",x==="screenSize"?"font-medium text-foreground border-b-2 border-app-blue400":"text-muted-foreground"),children:"Devices"}),e.jsx("button",{type:"button",onClick:()=>N("browser"),className:E("px-4 py-2 text-sm",x==="browser"?"font-medium text-foreground border-b-2 border-app-blue400":"text-muted-foreground"),children:"Browsers"}),e.jsx("button",{type:"button",onClick:()=>N("os"),className:E("px-4 py-2 text-sm",x==="os"?"font-medium text-foreground border-b-2 border-app-blue400":"text-muted-foreground"),children:"OS"})]}),e.jsx("div",{className:"space-y-3",children:(()=>
7{if(m)return[...Array(5)].map((c,o)=>e.jsxs("div",{className:"flex justify-between items-center py-2",children:[e.jsx("span",{className:"text-sm text-foreground",children:e.jsx(i,{height:16,width:80})}),e.jsx("span",{className:"text-sm font-medium text-foreground",children:e.jsx(i,{height:16,width:40})})]},`skeleton-device-${o}`));const t=T;if(!t||t.length===0)return e.jsx(j,{icon:Qe,message:"No device data yet"});const l=t.reduce((c,o)=>c+((o==null?void 0:o.unique_sessions)||0),0)||1;return t.slice(0,u("devices",5)).map((c,o)=>e.jsxs("div",{className:"flex justify-between items-center py-2",children:[e.jsx("span",{className:"text-sm text-foreground",children:(c==null?void 0:c.name)||"Unknown"}),e.jsxs("span",{className:"text-sm font-medium text-foreground",children:[(((c==null?void 0:c.unique_sessions)||0)/l*100).toFixed(0),"%"]})]},(c==null?void 0:c.name)||`device-${o}`))})()})]})]})]})};export{ht 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.