PageSourceSearch

https://estimatekit.com/assets/Activation-Bqj8Q_tV.js

js estimatekit.com collected 2026-10-04 03:34:05 UTC 14,016 bytes, 1 lines download raw bytes

1import{r as o,j as e,g as f,o as j,K as N,H as v}from"./index-CbvCveKN.js";import{D as k,P as w}from"./PageContainer-Bx7SVsdy.js";import{P as y}from"./PageHeader-ohyr15TW.js";import{F as _}from"./FilterChips-CYAfenlT.js";import{f as S}from"./concierge-BidFqpW_.js";import{M as P}from"./message-square-text-D6Fv0jYK.js";import{P as D}from"./phone-C9i08TZ5.js";import"./check-Bjw6cCk6.js";import"./index-Jf4OHjGl.js";import"./chevron-right-f4vsMuAf.js";import"./triangle-alert-BJBV5PBt.js";import"./en-US-wdCzBwgh.js";import"./plus-kYCBPFxU.js";import"./file-text-DDhZ7a0t.js";import"./users-BkZzL3s4.js";import"./layout-dashboard-rEexJXnQ.js";import"./ek-mark-light-Y4_w-cFG.js";import"./parseISO-B0WEjCD3.js";import"./plug-BAhKXAxN.js";import"./chevron-down-yKD6BMcU.js";const E=[["setup_shown","Saw the setup popup"],["setup_done","Finished setup"],["firstwin_shown","Opened the walkthrough"],["firstwin_sent","Sent the sample to themselves"],["firstwin_approved","Approved it on their phone"],["firstwin_done","Finished the walkthrough"],["concierge_card_shown","Saw the setup offer"],["concierge_opened","Opened the setup offer"],["concierge_requested","Asked to be set up"],["trial_reward_shown","Sent a real quote (+7 days shown)"],["paywall_shown","Hit the paywall"],["checkout_started","Started checkout"]],q={price_book:"price book",logo:"logo",first_quote:"first quote",customers:"customers"},C=(i,a)=>a?`${Math.round(i/a*100)}%`:"–",p="mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",L=({weeks:i})=>{const[a,l]=o.useState(null),[h,x]=o.useState(null),m=()=>{j.rpc("onboarding_steps",{weeks:i}).then(({data:s,error:t})=>{t?x(t.message):l(s)})};o.useEffect(m,[i]);const d=async(s,t)=>{const{error:c}=await j.rpc("set_concierge_status",{p_id:s,p_status:t});c?N({title:"Couldn't update it",description:c.message,variant:"destructive"}):m()};if(h)return e.jsxs("p",{className:"mb-8 text-[13px] text-foreground-secondary",children:["Onboarding steps unavailable: ",h]});if(!a)return null;const u=new Map(a.steps.map(s=>[s.event,s]));return e.jsxs("div",{className:"mb-8 flex flex-col gap-8","data-onboarding-steps":!0,children:[e.jsxs("section",{children:[e.jsx("h2",{className:p,children:"Setup requests"}),a.requests.length===0?e.jsx("p",{className:"rounded-xl border border-ink/[0.06] bg-card px-4 py-3 text-[13px] text-foreground-secondary",children:'None yet. They show here the moment someone taps "Set it up with me".'}):e.jsx("div",{className:"flex flex-col divide-y divide-ink/[0.06] overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:a.requests.map(s=>e.jsxs("div",{className:"flex flex-wrap items-center gap-3 px-4 py-3",children:[e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"truncate text-[14px] font-medium",children:s.company_name&&s.company_name!=="My HVAC Company"?s.company_name:s.email}),e.jsx("p",{className:"truncate text-[12.5px] text-foreground-tertiary",children:[new Date(s.created_at).toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"}),s.help_with.map(t=>q[t]||t).join(", "),s.best_time&&s.best_time!=="any"?s.best_time:null,s.has_file?"file attached":null,s.texts_ok?"texts OK":null].filter(Boolean).join(" · ")})]}),s.phone&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsxs("a",{href:`sms:${s.phone}`,className:"flex h-9 items-center gap-1.5 rounded-lg border border-ink/[0.1] px-2.5 text-[12.5px] font-medium hover:border-ink/25",children:[e.jsx(P,{className:"h-3.5 w-3.5"})," ",S(s.phone)]}),e.jsx("a",{href:`tel:${s.phone}`,"aria-label":"Call",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-ink/[0.1] hover:border-ink/25",children:e.jsx(D,{className:"h-3.5 w-3.5"})})]}),e.jsx("div",{className:"flex overflow-hidden rounded-lg border border-ink/[0.1]",role:"group","aria-label":"Status",children:["new","contacted","done"].map(t=>e.jsx("button",{type:"button",onClick:()=>void d(s.id,t),className:f("h-9 px-2.5 text-[12px] font-medium capitalize",s.status===t?"bg-ink/[0.1] text-foreground":"text-foreground-tertiary hover:text-foreground"),children:t},t))})]},s.id))})]}),e.jsxs("div",{className:"grid gap-8 lg:grid-cols-[minmax(0,1.4fr)_minmax(0,1fr)]",children:[e.jsxs("section",{children:[e.jsxs("h2",{className:p,children:["Onboarding steps ",e.jsxs("span",{className:"normal-case tracking-normal",children:["(",a.people," signups in range; tracked from Sep 23, 2026)"]})]}),e.jsx("div",{className:"flex flex-col divide-y divide-ink/[0.06] overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:E.map(([s,t])=>{var b;const c=((b=u.get(s))==null?void 0:b.users)??0;return e.jsxs("div",{className:"grid grid-cols-[1fr_auto_auto] items-center gap-4 px-4 py-2.5",children:[e.jsx("span",{className:"text-[13px]",children:t}),e.jsx("div",{className:"h-1.5 w-28 overflow-hidden rounded-full bg-ink/[0.06]",children:e.jsx("div",{className:"h-full rounded-full bg-cta-orange",style:{width:a.people?`${c/a.people*100}%`:0}})}),e.jsxs("span",{className:"w-20 text-right font-mono text-[12.5px]",children:[e.jsx("b",{className:"font-medium",children:c})," ",e.jsx("span",{className:"text-foreground-tertiary",children:C(c,a.people)})]})]},s)})})]}),e.jsxs("section",{className:"flex flex-col gap-8",children:[e.jsxs("div",{children:[e.jsx("h2",{className:p,children:"Walkthrough skipped at"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card text-[13px]",children:a.skipped_at.length===0?e.jsx("p",{className:"px-4 py-3 text-foreground-secondary",children:"No skips yet."}):a.skipped_at.map(s=>e.jsxs("div",{className:"flex justify-between border-b border-ink/[0.06] px-4 py-2.5 last:border-b-0",children:[e.jsx("span",{className:"capitalize",children:s.step??"unknown"}),e.jsx("span",{className:"font-mono",children:s.users})]},s.step??"?"))})]}),e.jsxs("div",{children:[e.jsx("h2",{className:p,children:"What they quote most"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card text-[13px]",children:a.focus.map(s=>e.jsxs("div",{className:"flex justify-between border-b border-ink/[0.06] px-4 py-2.5 last:border-b-0",children:[e.jsx("span",{children:s.focus.replace("_"," ")}),e.jsx("span",{className:"font-mono",children:s.signups})]},s.focus))})]})]})]})]})},g=(i,a)=>a?`${Math.round(i/a*100)}%`:"–",n="px-3 py-2 text-right font-mono text-[12.5px]",r="px-3 py-2 text-left text-[11px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",Z=()=>
1{const[i,a]=o.useState("12"),[l,h]=o.useState(null),[x,m]=o.useState(null);o.useEffect(()=>{let s=!1;return h(null),m(null),j.rpc("activation_funnel",{weeks:Number(i)}).then(({data:t,error:c})=>{s||(c?m(c.message.includes("not allowed")?"This page is for the account owner only.":c.message):h(t))}),()=>{s=!0}},[i]);const d=l==null?void 0:l.totals,u=d?[["Signed up",d.signups],["Built an estimate",d.built],["Finished the walkthrough",d.first_win],["Sent to a real customer",d.sent],["Came back after day 1",d.returned],["Got an approval",d.approved],["Paid",d.paid]]:[];return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(v,{children:e.jsx("title",{children:"Activation | EstimateKit"})}),e.jsx(k,{}),e.jsxs(w,{width:"wide",children:[e.jsx(y,{title:"Activation",description:"What happens to each signup. Real customers only; test accounts excluded.",actions:e.jsx(_,{options:[{value:"8",label:"8 weeks"},{value:"12",label:"12 weeks"},{value:"26",label:"26 weeks"}],value:i,onChange:s=>a(s),ariaLabel:"Range"})}),x&&e.jsx("div",{className:"rounded-xl border border-destructive/30 bg-destructive/10 p-4 text-sm",children:x}),!l&&!x&&e.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading…"}),d&&e.jsxs(e.Fragment,{children:[e.jsx("section",{className:"mb-8 overflow-hidden rounded-xl border border-ink/[0.06] bg-card divide-y divide-ink/[0.06]",children:u.map(([s,t])=>e.jsxs("div",{className:"grid grid-cols-[1fr_auto_auto] items-center gap-4 px-4 py-3",children:[e.jsx("span",{className:"text-sm",children:s}),e.jsx("div",{className:"h-2 w-40 overflow-hidden rounded-full bg-ink/[0.06]",children:e.jsx("div",{className:"h-full rounded-full bg-cta-orange",style:{width:g(t,d.signups)==="–"?0:g(t,d.signups)}})}),e.jsxs("span",{className:"w-24 text-right text-sm tabular-nums",children:[e.jsx("b",{children:t})," ",e.jsx("span",{className:"text-muted-foreground",children:g(t,d.signups)})]})]},s))}),e.jsx(L,{weeks:Number(i)}),e.jsx("h2",{className:"mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",children:"By week"}),e.jsx("div",{className:"mb-8 overflow-x-auto rounded-xl border border-ink/[0.06] bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-ink/[0.06]",children:[e.jsx("th",{className:r,children:"Week of"}),e.jsx("th",{className:r+" text-right",children:"Signups"}),e.jsx("th",{className:r+" text-right",children:"Built"}),e.jsx("th",{className:r+" text-right",children:"Walkthrough"}),e.jsx("th",{className:r+" text-right",children:"Sent"}),e.jsx("th",{className:r+" text-right",children:"Returned"}),e.jsx("th",{className:r+" text-right",children:"Approved"}),e.jsx("th",{className:r+" text-right",children:"Paid"})]})}),e.jsx("tbody",{children:(l.weeks||[]).slice().reverse().map(s=>e.jsxs("tr",{className:"border-b border-ink/[0.06] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2",children:new Date(s.week+"T00:00:00").toLocaleDateString("en-US",{month:"short",day:"numeric"})}),e.jsx("td",{className:n,children:s.signups}),e.jsx("td",{className:n,children:s.built}),e.jsx("td",{className:n,children:s.first_win}),e.jsx("td",{className:n,children:s.sent}),e.jsx("td",{className:n,children:s.returned}),e.jsx("td",{className:n,children:s.approved}),e.jsx("td",{className:n,children:s.paid})]},s.week))})]})}),e.jsxs("div",{className:"grid gap-8 lg:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",children:"By source"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-ink/[0.06]",children:[e.jsx("th",{className:r,children:"Source"}),e.jsx("th",{className:r+" text-right",children:"Signups"}),e.jsx("th",{className:r+" text-right",children:"Sent"}),e.jsx("th",{className:r+" text-right",children:"Paid"})]})}),e.jsx("tbody",{children:(l.sources||[]).map(s=>e.jsxs("tr",{className:"border-b border-ink/[0.06] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2",children:s.source}),e.jsx("td",{className:n,children:s.signups}),e.jsx("td",{className:n,children:s.sent}),e.jsx("td",{className:n,children:s.paid})]},s.source))})]})})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",children:"Landing page"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-ink/[0.06]",children:[e.jsx("th",{className:r,children:"Page"}),e.jsx("th",{className:r+" text-right",children:"Signups"}),e.jsx("th",{className:r+" text-right",children:"Sent"}),e.jsx("th",{className:r+" text-right",children:"Paid"})]})}),e.jsx("tbody",{children:(l.landing_pages||[]).map(s=>e.jsxs("tr",{className:"border-b border-ink/[0.06] last:border-b-0",children:[e.jsx("td",{className:"max-w-[260px] truncate px-3 py-2",children:s.landing_page}),e.jsx("td",{className:n,children:s.signups}),e.jsx("td",{className:n,children:s.sent}),e.jsx("td",{className:n,children:s.paid})]},s.landing_page))})]})}),e.jsx("p",{className:"mt-2 text-xs text-muted-foreground",children:"Attribution is saved for signups from September 5, 2026 onward."})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",children:"Signup answers"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-ink/[0.06]",children:[e.jsx("th",{className:r,children:"Trucks"}),e.jsx("th",{className:r,children:"Quotes with"}),e.jsx("th",{className:r+" text-right",children:"Signups"}),e.jsx("th",{className:r+" text-right",children:"Sent"})]})}),e.jsx("tbody",{children:(l.answers||[]).map((s,t)=>e.jsxs("tr",{className:"border-b border-ink/[0.06] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2",children:s.truck_count||"–"}),e.jsx("td",{className:"px-3 py-2",children:s.current_tool||"–"}),e.jsx("td",{className:n,children:s.signups}),e.jsx("td",{className:n,children:s.sent})]},t))})]})})]}),e.jsxs("div",{children:[e.jsx("h2",{className:"mb-2 text-[12px] font-medium uppercase tracking-[0.06em] text-foreground-tertiary",children:"Lifecycle emails sent"}),e.jsx("div",{className:"overflow-hidden rounded-xl border border-ink/[0.06] bg-card",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-ink/[0.06]",children:[e.jsx("th",{className:r,children:"Message"}),e.jsx("th",{className:r+" text-right",children:"Sent"}),e.jsx("th",{className:r+" text-right",children:"Last"})]})}),e.jsx("tbody",{children:(l.emails||[]).map(s=>e.jsxs("tr",{className:"border-b border-ink/[0.06] last:border-b-0",children:[e.jsx("td",{className:"px-3 py-2",children:s.event.replace(/_/g," ")}),e.jsx("td",{className:n,children:s.sent}),e.jsx("td",{className:n+" text-muted-foreground",children:new Date(s.last_sent).toLocaleDateString("en-US",{month:"short",day:"numeric"})})]},s.event))})]})})]})]})]})]})]})};export{Z 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.