import{j as e,a as s,u as t,b as a,P as n,f as r,N as i,Q as l,a0 as c,a1 as o,a2 as d,a3 as m,a4 as u,a5 as p,a6 as h,a7 as x,a8 as f,a9 as j,aa as y,ab as g,ac as v,ad as b}from"./ui-vendor-BxIDIFnU.js";import{r as _,i as N}from"./react-vendor-0XwOhuTY.js";import{b as k,f as w,s as C,S,P as M,u as T,v as R,w as O,G as A,x as F,y as P,B,z as I,J as E,K as D,W as $,U,N as L,O as H,Q as z,R as Y,T as q,V,X as G,Y as W,c as J,d as Q,_ as K,$ as X,L as Z,I as ee,a0 as se,a1 as te,a2 as ae,a3 as ne,a4 as re,a5 as ie,a6 as le,a7 as ce,a8 as oe,e as de,a9 as me,aa as ue,ab as pe,ac as he,ad as xe,ae as fe,af as je,ag as ye,ah as ge,ai as ve,aj as be,ak as _e,al as Ne,am as ke,an as we,ao as Ce,n as Se,D as Me,ap as Te,M as Re,aq as Oe,ar as Ae,A as Fe,o as Pe,p as Be,q as Ie,as as Ee,at as De,au as $e,av as Ue,H as Le,a as He,F as ze,aw as Ye,ax as qe}from"./index-CK9GMtDj.js";import{S as Ve}from"./slider-AQe2EKXK.js";import{R as Ge,B as We,X as Je,Y as Qe,T as Ke,a as Xe,b as Ze}from"./chart-vendor-H_zCtd_i.js";import{P as es}from"./progress-N-DvNICX.js";const ss=[{id:"manufacturing",name:"Manufacturing",icon:C,description:"Quality control, predictive maintenance, production optimization"},{id:"retail",name:"Retail & E-commerce",icon:S,description:"Personalization, inventory, demand forecasting"},{id:"logistics",name:"Warehousing & Logistics",icon:M,description:"Yard management, route optimization, tracking"},{id:"insurance",name:"Insurance & Government",icon:T,description:"Claims, fraud detection, compliance, document processing"},{id:"finance",name:"Financial Services",icon:R,description:"Risk analytics, fraud detection, process automation"},{id:"healthcare",name:"Healthcare",icon:O,description:"Patient analytics, operational efficiency, compliance"},{id:"education",name:"Education",icon:A,description:"Learning analytics, administrative automation"},{id:"other",name:"Other Industries",icon:F,description:"General business operations and analytics"}],ts=({selected:s,onSelect:t})=>e.jsx("div",{className:"space-y-6",children:e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-2xl font-bold mb-2",children:"Select Your Industry"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Choose the industry that best describes your organization"}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",role:"radiogroup","aria-label":"Industry selection",children:ss.map(a=>{const n=a.icon,r=s===a.id;return e.jsx(k,{className:"cursor-pointer transition-all hover:border-data-teal/50 hover:shadow-md "+(r?"border-data-teal bg-data-teal/5":"border-outline/20"),onClick:()=>{return e=a.id,void t(e);var e},children:e.jsx(w,{className:"p-6",children:e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg "+(r?"bg-data-teal/20":"bg-muted"),children:e.jsx(n,{className:"h-6 w-6 "+(r?"text-data-teal":"text-muted-foreground")})}),e.jsxs("div",{className:"flex-1",children:[e.jsx("h3",{className:"font-semibold mb-1",children:a.name}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a.description})]})]})})},a.id)})})]})}),as=[{id:"analytics",name:"Data Analytics & BI",icon:I,category:"analytics",industries:["all"]},{id:"process_automation",name:"Process Automation & RPA",icon:E,category:"automation",industries:["all"]},{id:"cv_surveillance",name:"CV – Surveillance & Security",icon:D,category:"cv",industries:["insurance","logistics","manufacturing","retail","other"]},{id:"cv_quality",name:"CV – Quality Control",icon:D,category:"cv",industries:["manufacturing","logistics","other"]},{id:"predictive_maintenance",name:"Predictive Maintenance & IoT",icon:$,category:"operations",industries:["manufacturing","logistics","other"]},{id:"cx_personalization",name:"Customer Experience & Personalization",icon:U,category:"customer",industries:["retail","finance","healthcare","education","other"]},{id:"fraud_detection",name:"Fraud Detection & Risk",icon:T,category:"risk",industries:["finance","insurance","other"]},{id:"supply_chain",name:"Supply Chain & Logistics",icon:M,category:"operations",industries:["manufacturing","logistics","retail","other"]},{id:"nlp_doc_intelligence",name:"NLP & Document Intelligence",icon:L,category:"document",industries:["all"]},{id:"hr_analytics",name:"HR Analytics",icon:H,category:"analytics",industries:["all"]},{id:"financial_analytics",name:"Financial Analytics",icon:z,category:"analytics",industries:["all"]},{id:"cybersecurity",name:"Cybersecurity & Threat Intel",icon:Y,category:"security",industries:["all"]}],ns=({industry:s,selected:t,onUpdate:a,onNext:n,onBack:r})=>{const[i,l]=_.useState(t),c=as.filter(e=>e.industries.includes("all")||e.industries.includes(s||""));return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-2xl font-bold mb-2",children:"Select Use Cases"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Choose up to 3 use cases relevant to your organization"}),e.jsxs(P,{variant:"outline",className:"text-sm",children:[i.length," of 3 selected"]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",role:"group","aria-label":"Use case selection",children:c.map(s=>{const t=s.icon,a=i.includes(s.id),n=!a&&i.length>=3;return e.jsx(k,{className:`cursor-pointer transition-all ${n?"opacity-50 cursor-not-allowed":"hover:border-data-teal/50 hover:shadow-md"} ${a?"border-data-teal bg-data-teal/5":"border-outline/20"}`,onClick:()=>{return!n&&(e=s.id,void l(s=>s.includes(e)?s.filter(s=>s!==e):s.length>=3?s:[...s,e]));var e},children:e.jsx(w,{className:"p-6",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"p-3 rounded-lg "+(a?"bg-data-teal/20":"bg-muted"),children:e.jsx(t,{className:"h-6 w-6 "+(a?"text-data-teal":"text-muted-foreground")})}),e.jsx("div",{className:"flex-1",children:e.jsx("h3",{className:"font-semibold",children:s.name})})]})})},s.id)})})]}),e.jsxs("div",{className:"flex gap-4 pt-6",children:[e.jsx(B,{variant:"outline",onClick:r,children:"Back"}),e.jsx(B,{onClick:()=>{0!==i.length&&(a(i),n())},disabled:0===i.length,className:"bg-gradient-to-r from-data-orange to-data-teal",children:"Continue"})]})]})};var rs="Switch",[is,ls]=s(rs),[cs,os]=is(rs),ds=_.forwardRef((s,i)=>{const{__scopeSwitch:l,name:c,checked:o,defaultChecked:d,required:m,disabled:u,value:p="on",onCheckedChange:h,form:x,...f}=s,[j,y]=_.useState(null),g=t(i,e=>y(e)),v=_.useRef(!1),b=!j||(x||!!j.closest("form")),[N,k]=a({prop:o,defaultProp:d??!1,onChange:h,caller:rs});return e.jsxs(cs,{scope:l,checked:N,disabled:u,children:[e.jsx(n.button,{type:"button",role:"switch","aria-checked":N,"aria-required":m,"data-state":hs(N),"data-disabled":u?"":void 0,disabled:u,value:p,...f,ref:g,onClick:r(s.onClick,e=>{k(e=>!e),b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})}),b&&e.jsx(ps,{control:j,bubbles:!v.current,name:c,value:p,checked:N,required:m,disabled:u,form:x,style:{transform:"translateX(-100%)"}})]})});ds.displayName=rs;var ms="SwitchThumb",us=_.forwardRef((s,t)=>{const{__scopeSwitch:a,...r}=s,i=os(ms,a);return e.jsx(n.span,{"data-state":hs(i.checked),"data-disabled":i.disabled?"":void 0,...r,ref:t})});us.displayName=ms;var ps=_.forwardRef(({__scopeSwitch:s,control:a,checked:n,bubbles:r=!0,...c},o)=>{const d=_.useRef(null),m=t(d,o),u=i(n),p=l(a);return _.useEffect(()=>{const e=d.current;if(!e)return;const s=window.HTMLInputElement.prototype,t=Object.getOwnPropertyDescriptor(s,"checked").set;if(u!==n&&t){const s=new Event("click",{bubbles:r});t.call(e,n),e.dispatchEvent(s)}},[u,n,r]),e.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...c,tabIndex:-1,ref:m,style:{...c.style,...p,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});function hs(e){return e?"checked":"unchecked"}ps.displayName="SwitchBubbleInput";var xs=ds,fs=us;const js=_.forwardRef(({className:s,...t},a)=>e.jsx(xs,{className:q("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors data-[state=checked]:bg-primary data-[state=unchecked]:bg-input focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",s),...t,ref:a,children:e.jsx(fs,{className:q("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));js.displayName=xs.displayName;const ys=v,gs=b,vs=_.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(c,{ref:n,className:q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",s),...a,children:[t,e.jsx(o,{asChild:!0,children:e.jsx(V,{className:"h-4 w-4 opacity-50"})})]}));vs.displayName=c.displayName;const bs=_.forwardRef(({className:s,...t},a)=>e.jsx(d,{ref:a,className:q("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(G,{className:"h-4 w-4"})}));bs.displayName=d.displayName;const _s=_.forwardRef(({className:s,...t},a)=>e.jsx(m,{ref:a,className:q("flex cursor-default items-center justify-center py-1",s),...t,children:e.jsx(V,{className:"h-4 w-4"})}));_s.displayName=m.displayName;const Ns=_.forwardRef(({className:s,children:t,position:a="popper",...n},r)=>e.jsx(u,{children:e.jsxs(p,{ref:r,className:q("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover 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","popper"===a&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",s),position:a,...n,children:[e.jsx(bs,{}),e.jsx(h,{className:q("p-1","popper"===a&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),e.jsx(_s,{})]})}));Ns.displayName=p.displayName;_.forwardRef(({className:s,...t},a)=>e.jsx(x,{ref:a,className:q("py-1.5 pl-8 pr-2 text-sm font-semibold",s),...t})).displayName=x.displayName;const ks=_.forwardRef(({className:s,children:t,...a},n)=>e.jsxs(f,{ref:n,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 focus:bg-accent focus:text-accent-foreground",s),...a,children:[e.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:e.jsx(j,{children:e.jsx(W,{className:"h-4 w-4"})})}),e.jsx(y,{children:t})]}));ks.displayName=f.displayName;_.forwardRef(({className:s,...t},a)=>e.jsx(g,{ref:a,className:q("-mx-1 my-1 h-px bg-muted",s),...t})).displayName=g.displayName;const ws={retail:.25,manufacturing:.35,healthcare:.4,financial:.55,technology:.7,logistics:.15,energy:.2,government:.08},Cs=[1.2,1.1,1,.85,.75],Ss=[.6,.7,.8,.9,1],Ms={conservative:.7,expected:1,aggressive:1.3},Ts=[1,.7,.5],Rs={cv_security:{agentic_ai:.08,cybersecurity:.05},cv_quality:{process_automation:.06,analytics:.05},analytics:{financial_analytics:.07,supply_chain:.06},agentic_ai:{cv_security:.08,nlp_docs:.05},process_automation:{cv_quality:.06,hr_analytics:.05},nlp_docs:{agentic_ai:.05,hr_analytics:.04},financial_analytics:{analytics:.07,supply_chain:.05},supply_chain:{analytics:.06,financial_analytics:.05},cybersecurity:{cv_security:.05,agentic_ai:.04},hr_analytics:{nlp_docs:.04,process_automation:.05}},Os={manufacturing:{defect_rate:{min:2,max:8,source:"internal fleet, 2024-25; n=18"},false_positive_rate:{min:15,max:35,source:"internal fleet, 2024-25; n=12"}},retail:{baseline_conversion_rate:{min:1.5,max:4.5,source:"internal fleet, 2024-25; n=22"},churn_rate:{min:20,max:40,source:"internal fleet, 2024-25; n=15"}},financial:{fraud_loss_reduction:{min:.15,max:.4,source:"internal fleet, 2024-25; n=10"},current_detection_rate:{min:60,max:85,source:"internal fleet, 2024-25; n=8"}},healthcare:{error_rate:{min:3,max:10,source:"internal fleet, 2024-25; n=14"}},technology:{manual_report_hours_mo:{min:80,max:240,source:"internal fleet, 2024-25; n=20"}}},As=[{id:"analytics",name:"Data Analytics & BI",category:"Analytics",pools:{AnalystHours:1},effectsExpected:{report_time_reduction:[.4,.7],license_consolidation:[.2,.5],decision_speed:[.3,.6]},costDefaults:{oneTime:12e4,recurringMo:6e3},inputs:[{key:"analysts_count",label:"Analysts producing reports",type:"int",min:1,unit:"people",placeholder:"5-15 typical",helpText:"FTEs dedicated to report generation"},{key:"manual_report_hours_mo",label:"Manual report hours/month",type:"int",min:0,unit:"hours",placeholder:"120-240",helpText:"Total team hours on manual reporting"},{key:"pct_fully_manual",label:"% reports fully manual",type:"pct",min:0,max:100,placeholder:"40-70%",helpText:"Reports requiring full manual data prep"},{key:"legacy_bi_cost_yr",label:"Legacy BI license cost/year",type:"currency",min:0,placeholder:"$50,000-$200,000",helpText:"Total annual licensing costs"},{key:"decision_delay_hours",label:"Decision delay hours per cycle",type:"float",min:0,optional:!0,unit:"hours",placeholder:"24-72",helpText:"Time from data need to decision"},{key:"decision_cycles_mo",label:"Decision cycles/month",type:"int",min:0,optional:!0,placeholder:"20-50",helpText:"Critical decisions requiring data"}],benefitFormula:(e,s,t)=>{const a=e.manual_report_hours_mo*(e.pct_fully_manual/100)*t.rates.analyst*12*s.report_time_reduction,n=e.legacy_bi_cost_yr*s.license_consolidation;let r=0;return e.decision_delay_hours&&e.decision_cycles_mo&&(r=e.decision_delay_hours*e.decision_cycles_mo*t.rates.analyst*12*s.decision_speed),{labor:a+r,license:n}}},{id:"process_automation",name:"Process Automation & RPA",category:"Automation",pools:{BackOfficeHours:1},effectsExpected:{task_time_reduction:[.4,.7],error_reduction:[.2,.5],compliance_improvement:[.3,.6]},costDefaults:{oneTime:1e5,recurringMo:5e3},inputs:[{key:"tasks_per_month",label:"Eligible tasks/month",type:"int",min:0,unit:"tasks",placeholder:"500-5,000",helpText:"Rule-based, repetitive tasks"},{key:"avg_minutes_per_task",label:"Average minutes/task",type:"float",min:0,unit:"min",placeholder:"15-45",helpText:"Current manual processing time"},{key:"baseline_error_rate",label:"Baseline error rate",type:"pct",min:0,max:100,placeholder:"3-8%",helpText:"Human error rate in current process"},{key:"avg_cost_per_error",label:"Average cost/error",type:"currency",min:0,placeholder:"$50-$500",helpText:"Rework + downstream impact"},{key:"compliance_incidents_mo",label:"Compliance incidents/month",type:"int",min:0,optional:!0,placeholder:"1-5",helpText:"Process deviation incidents"},{key:"avg_compliance_cost",label:"Average compliance cost",type:"currency",min:0,optional:!0,placeholder:"$5,000-$50,000",helpText:"Audit + remediation costs"}],benefitFormula:(e,s,t)=>{const a=e.tasks_per_month*e.avg_minutes_per_task/60*s.task_time_reduction*t.rates.backOffice*12,n=e.tasks_per_month*(e.baseline_error_rate/100)*e.avg_cost_per_error*12*s.error_reduction;let r=0;return e.compliance_incidents_mo&&e.avg_compliance_cost&&(r=e.compliance_incidents_mo*e.avg_compliance_cost*12*s.compliance_improvement),{labor:a,error_reduction:n,compliance:r}}},{id:"cv_security",name:"CV — Surveillance & Security",category:"Computer Vision",pools:{ReviewerHours:.7,InfraCompute:.2,Storage:.1},effectsExpected:{review_time_reduction:[.4,.7],false_positive_reduction:[.2,.4],infra_saving:[.15,.35],storage_saving:[.2,.4]},costDefaults:{oneTime:15e4,recurringMo:8e3},inputs:[{key:"streams_monitored",label:"Streams/cameras monitored",type:"int",min:1,unit:"cameras",placeholder:"50-500",helpText:"Active surveillance feeds"},{key:"incidents_per_month",label:"True incidents/month",type:"int",min:0,placeholder:"10-100",helpText:"Actual security events requiring response"},{key:"false_positive_rate",label:"False positive rate",type:"pct",min:0,max:100,placeholder:"15-35%",helpText:"Industry benchmark: 20-30%"},{key:"reviewer_minutes_per_event",label:"Reviewer minutes/event",type:"float",min:0,unit:"min",placeholder:"10-30",helpText:"Time to triage + document"},{key:"gpu_hours_mo",label:"GPU hours/month (or cloud CV cost)",type:"float",min:0,unit:"hours",placeholder:"500-5,000",helpText:"Processing infrastructure costs"},{key:"storage_tb_mo",label:"Storage TB/month",type:"float",min:0,optional:!0,unit:"TB",placeholder:"10-100",helpText:"Video retention requirements"}],benefitFormula:(e,s,t)=>{const a=e.incidents_per_month/(1-e.false_positive_rate/100),n=a*e.reviewer_minutes_per_event/60*s.review_time_reduction*t.rates.reviewer*12,r=a*(e.false_positive_rate/100)*s.false_positive_reduction*(e.reviewer_minutes_per_event/60)*t.rates.reviewer*12,i=3.5*e.gpu_hours_mo*12*s.infra_saving;let l=0;return e.storage_tb_mo&&(l=25*e.storage_tb_mo*12*s.storage_saving),{labor:n+r,infra:i,storage:l}}},{id:"cv_quality",name:"CV — Quality Control",category:"Computer Vision",pools:{ReviewerHours:.2,BackOfficeHours:.1,InfraCompute:.2,RevenueDemand:.3},effectsExpected:{scrap_reduction:[.1,.25],inspection_time_reduction:[.3,.6],false_reject_reduction:[.1,.3],downtime_reduction:[.2,.5]},costDefaults:{oneTime:18e4,recurringMo:7e3},requiresPlatform:!0,inputs:[{key:"units_per_month",label:"Units inspected/month",type:"int",min:0,unit:"units",placeholder:"10,000-500,000",helpText:"Total production volume"},{key:"defect_rate",label:"Defect rate",type:"pct",min:0,max:100,placeholder:"2-8%",helpText:"Industry benchmark: 3-5%"},{key:"scrap_cost_per_unit",label:"Scrap/rework cost per unit",type:"currency",min:0,placeholder:"$5-$200",helpText:"Material + labor to fix/scrap"},{key:"inspection_minutes_per_unit",label:"Inspection minutes per unit",type:"float",min:0,unit:"min",placeholder:"0.5-5",helpText:"Current manual inspection time"},{key:"false_reject_rate",label:"False reject rate",type:"pct",min:0,max:100,placeholder:"1-5%",helpText:"Good units incorrectly rejected"},{key:"downtime_cost_per_min",label:"Downtime cost/minute",type:"currency",min:0,optional:!0,placeholder:"$100-$1,000",helpText:"Line stoppage costs"}],benefitFormula:(e,s,t)=>{const a=e.units_per_month*(e.defect_rate/100),n=a*e.scrap_cost_per_unit*12*s.scrap_reduction,r=e.units_per_month*e.inspection_minutes_per_unit/60*s.inspection_time_reduction*t.rates.reviewer*12,i=e.units_per_month*(e.false_reject_rate/100)*e.scrap_cost_per_unit*12*s.false_reject_reduction;let l=0;if(e.downtime_cost_per_min){l=15*a*e.downtime_cost_per_min*12*s.downtime_reduction}return{scrap:n+i,labor:r,downtime:l}}},{id:"predictive_maintenance",name:"Predictive Maintenance & IoT",category:"IoT & Operations",pools:{FieldOpsHours:.6,BackOfficeHours:.2},effectsExpected:{downtime_reduction:[.2,.5],spares_reduction:[.05,.15],labor_efficiency:[.15,.35]},costDefaults:{oneTime:2e5,recurringMo:9e3},requiresPlatform:!0,inputs:[{key:"critical_assets",label:"Critical assets",type:"int",min:1,unit:"assets",placeholder:"20-200",helpText:"High-value equipment requiring monitoring"},{key:"unplanned_downtime_hrs_asset_yr",label:"Unplanned downtime hours/asset/year",type:"float",min:0,unit:"hrs",placeholder:"24-120",helpText:"Average annual unscheduled downtime"},{key:"cost_per_downtime_hour",label:"Cost per downtime hour",type:"currency",min:0,placeholder:"$500-$10,000",helpText:"Lost production + labor costs"},{key:"maintenance_labor_hrs_mo",label:"Maintenance labor hours/month",type:"float",min:0,unit:"hrs",placeholder:"200-2,000",helpText:"Total maintenance team hours"},{key:"spare_parts_spend_yr",label:"Spare parts spend/year",type:"currency",min:0,placeholder:"$50,000-$500,000",helpText:"Annual inventory + emergency parts"}],benefitFormula:(e,s,t)=>({downtime:e.critical_assets*e.unplanned_downtime_hrs_asset_yr*e.cost_per_downtime_hour*s.downtime_reduction,spares:e.spare_parts_spend_yr*s.spares_reduction,labor:e.maintenance_labor_hrs_mo*t.rates.fieldTech*12*s.labor_efficiency})},{id:"personalization",name:"Customer Experience & Personalization",category:"Customer Experience",pools:{RevenueDemand:1},effectsExpected:{conversion_uplift:[.02,.08],churn_reduction:[.02,.06]},costDefaults:{oneTime:9e4,recurringMo:5500},inputs:[{key:"monthly_sessions",label:"Monthly sessions/orders",type:"int",min:0,unit:"sessions",placeholder:"10,000-1,000,000",helpText:"Total monthly traffic/transactions"},{key:"baseline_conversion_rate",label:"Baseline conversion rate",type:"pct",min:0,max:100,placeholder:"1.5-4.5%",helpText:"Industry benchmark: 2-3%"},{key:"avg_order_value",label:"Average order value",type:"currency",min:0,placeholder:"$50-$500",helpText:"Mean transaction size"},{key:"churn_rate",label:"Churn rate %",type:"pct",min:0,max:100,optional:!0,placeholder:"20-40%",helpText:"Annual customer attrition"},{key:"active_customers",label:"Active customers",type:"int",min:0,optional:!0,placeholder:"5,000-100,000",helpText:"Active customer base"}],benefitFormula:(e,s,t)=>{const a=Math.min(s.conversion_uplift,(100-e.baseline_conversion_rate)/100),n=e.monthly_sessions*a*12,r=t.grossMargin||.3,i=n*e.avg_order_value*r;let l=0;if(e.churn_rate&&e.active_customers){const t=Math.min(s.churn_reduction,e.churn_rate/100);l=e.active_customers*t*(3*e.avg_order_value*r)}return{revenue_uplift:i,churn:l}}},{id:"fraud_detection",name:"Fraud Detection & Risk",category:"Security & Risk",pools:{BackOfficeHours:.4,AnalystHours:.2},effectsExpected:{fraud_loss_reduction:[.15,.4],false_positive_reduction:[.2,.4]},costDefaults:{oneTime:14e4,recurringMo:7500},inputs:[{key:"annual_fraud_loss",label:"Annual fraud loss",type:"currency",min:0,placeholder:"$100,000-$5,000,000",helpText:"Total annual fraud losses"},{key:"current_detection_rate",label:"Current detection rate",type:"pct",min:0,max:100,placeholder:"60-85%",helpText:"Industry benchmark: 70-80%"},{key:"false_positive_cost_mo",label:"False positive cost/month",type:"currency",min:0,helpText:"Review + chargeback fees",placeholder:"$10,000-$100,000"}],benefitFormula:(e,s,t)=>({fraud_reduction:e.annual_fraud_loss*s.fraud_loss_reduction,false_positive:12*e.false_positive_cost_mo*s.false_positive_reduction})},{id:"supply_chain",name:"Supply Chain & Logistics",category:"Operations",pools:{AnalystHours:.3,BackOfficeHours:.3,FieldOpsHours:.2},effectsExpected:{carrying_cost_reduction:[.05,.15],stockout_reduction:[.1,.3],route_optimization:[.05,.12]},costDefaults:{oneTime:16e4,recurringMo:8500},requiresPlatform:!0,inputs:[{key:"inventory_value",label:"Inventory value",type:"currency",min:0,placeholder:"$1M-$50M",helpText:"Total inventory carrying value"},{key:"carrying_cost_pct",label:"Carrying cost % (annual)",type:"pct",min:0,max:100,placeholder:"20-35%",helpText:"Industry benchmark: 25-30%"},{key:"stockouts_per_month",label:"Stockouts/month",type:"int",min:0,placeholder:"10-50",helpText:"Out-of-stock incidents"},{key:"avg_lost_sale",label:"Average lost sale value",type:"currency",min:0,placeholder:"$500-$5,000",helpText:"Revenue lost per stockout"},{key:"route_miles_mo",label:"Route miles/month",type:"int",min:0,optional:!0,placeholder:"50,000-500,000",helpText:"Total delivery/logistics miles"},{key:"cost_per_mile",label:"Cost/mile",type:"currency",min:0,optional:!0,placeholder:"$1.50-$3.00",helpText:"Fuel + maintenance + labor"}],benefitFormula:(e,s,t)=>{const a=e.inventory_value*(e.carrying_cost_pct/100)*s.carrying_cost_reduction,n=t.grossMargin||.25,r=e.stockouts_per_month*e.avg_lost_sale*n*12*s.stockout_reduction;let i=0;return e.route_miles_mo&&e.cost_per_mile&&(i=e.route_miles_mo*e.cost_per_mile*12*s.route_optimization),{carrying:a,stockout:r,logistics:i}}},{id:"nlp_docs",name:"NLP & Document Intelligence",category:"AI & Automation",pools:{BackOfficeHours:.8,AnalystHours:.2},effectsExpected:{processing_time_reduction:[.5,.8],error_reduction:[.3,.6]},costDefaults:{oneTime:11e4,recurringMo:6500},requiresPlatform:!0,inputs:[{key:"documents_per_month",label:"Eligible documents/month",type:"int",min:0,unit:"docs",placeholder:"500-10,000",helpText:"Invoices, contracts, reports for extraction"},{key:"minutes_per_doc",label:"Minutes/document (current)",type:"float",min:0,unit:"min",placeholder:"5-20",helpText:"Manual review + data entry time"},{key:"error_rate",label:"Error rate",type:"pct",min:0,max:100,optional:!0,placeholder:"3-10%",helpText:"Manual transcription errors"},{key:"cost_per_error",label:"Cost/error",type:"currency",min:0,optional:!0,placeholder:"$50-$300",helpText:"Rework + downstream impact"}],benefitFormula:(e,s,t)=>{const a=e.documents_per_month*e.minutes_per_doc/60*s.processing_time_reduction*t.rates.backOffice*12;let n=0;if(e.error_rate&&e.cost_per_error){n=e.documents_per_month*(e.error_rate/100)*e.cost_per_error*12*s.error_reduction}return{labor:a,error_reduction:n}}},{id:"hr_analytics",name:"HR Analytics & Talent",category:"HR & Talent",pools:{BackOfficeHours:.5,AnalystHours:.3},effectsExpected:{time_to_hire_reduction:[.2,.4],turnover_reduction:[.05,.12]},costDefaults:{oneTime:95e3,recurringMo:5e3},inputs:[{key:"hires_per_year",label:"Hires/year",type:"int",min:0,unit:"hires",placeholder:"50-500",helpText:"Annual new hires + backfills"},{key:"time_to_hire_days",label:"Time-to-hire (days)",type:"int",min:0,unit:"days",placeholder:"30-60",helpText:"Average days from req to offer"},{key:"turnover_rate",label:"Turnover rate %",type:"pct",min:0,max:100,placeholder:"15-25%",helpText:"Annual voluntary + involuntary"},{key:"employee_count",label:"Total employees",type:"int",min:0,placeholder:"100-10,000",helpText:"Current headcount"},{key:"avg_salary",label:"Average fully-loaded salary",type:"currency",min:0,placeholder:"$80,000-$150,000",helpText:"Salary + benefits + overhead"},{key:"replacement_cost_pct",label:"Replacement cost % of salary",type:"pct",min:30,max:150,placeholder:"50-100%",helpText:"Industry benchmark: 50-150%"}],benefitFormula:(e,s,t)=>{const a=e.time_to_hire_days*s.time_to_hire_reduction,n=e.hires_per_year*a*(e.avg_salary/365),r=e.turnover_rate/100*s.turnover_reduction;return{time_to_hire:n,turnover:e.employee_count*r*e.avg_salary*(e.replacement_cost_pct/100)}}},{id:"financial_analytics",name:"Financial Analytics & Forecasting",category:"Finance",pools:{AnalystHours:.8,BackOfficeHours:.2},effectsExpected:{forecast_error_reduction:[.1,.3],planning_cycle_reduction:[.3,.5],license_consolidation:[.15,.4]},costDefaults:{oneTime:13e4,recurringMo:7e3},inputs:[{key:"forecast_error_pct",label:"Forecast error % (MAPE)",type:"pct",min:0,max:100,placeholder:"5-15%",helpText:"Mean absolute percentage error"},{key:"annual_revenue",label:"Annual revenue",type:"currency",min:0,placeholder:"$50M-$1B",helpText:"Total company revenue"},{key:"planning_cycle_hrs_mo",label:"Planning cycle hours/month (FP&A)",type:"float",min:0,unit:"hrs",placeholder:"200-800",helpText:"FP&A team time on forecasting"},{key:"legacy_epm_cost_yr",label:"Legacy EPM license cost/year",type:"currency",min:0,optional:!0,placeholder:"$100,000-$500,000",helpText:"Anaplan, Adaptive, Hyperion"}],benefitFormula:(e,s,t)=>{const a=t.grossMargin||.4,n=e.forecast_error_pct/100*s.forecast_error_reduction,r=e.annual_revenue*a*n*.05,i=e.planning_cycle_hrs_mo*s.planning_cycle_reduction*t.rates.analyst*12;let l=0;return e.legacy_epm_cost_yr&&(l=e.legacy_epm_cost_yr*s.license_consolidation),{forecast_improvement:r,labor:i,license:l}}},{id:"cybersecurity",name:"Cybersecurity & Threat Intel",category:"Security",pools:{AnalystHours:.6,BackOfficeHours:.3},effectsExpected:{incident_reduction:[.1,.3],mttd_reduction:[.3,.6],mttr_reduction:[.3,.6]},costDefaults:{oneTime:17e4,recurringMo:9500},inputs:[{key:"security_incidents_yr",label:"Security incidents/year",type:"int",min:0,placeholder:"20-200",helpText:"Confirmed security events"},{key:"avg_cost_per_incident",label:"Average cost/incident",type:"currency",min:0,placeholder:"$10,000-$500,000",helpText:"Investigation + remediation + downtime"},{key:"mean_time_to_detect_hrs",label:"Mean-time-to-detect (hours)",type:"float",min:0,unit:"hrs",placeholder:"24-200",helpText:"Industry benchmark: 100-200 hrs"},{key:"mean_time_to_respond_hrs",label:"Mean-time-to-respond (hours)",type:"float",min:0,unit:"hrs",placeholder:"8-72",helpText:"Time to containment"}],benefitFormula:(e,s,t)=>{const a=e.security_incidents_yr*e.avg_cost_per_incident*s.incident_reduction,n=(e.mean_time_to_detect_hrs*s.mttd_reduction+e.mean_time_to_respond_hrs*s.mttr_reduction)/(e.mean_time_to_detect_hrs+e.mean_time_to_respond_hrs);return{incident_reduction:a,response_improvement:e.security_incidents_yr*e.avg_cost_per_incident*n*.3}}}],Fs=["Ad-hoc","Emerging","Defined","Managed","Optimized"],Ps=["Just starting with data & AI initiatives","Some projects, but ad-hoc processes","Documented processes, repeatable projects","Measured outcomes, continuous improvement","Fully optimized, AI-driven operations"],Bs=({industry:s,useCases:t,maturityLevel:a,riskProfile:n,inputs:r,onUpdate:i,onNext:l,onBack:c})=>{const[o,d]=_.useState(r),[m,u]=_.useState(a),[p,h]=_.useState(n),[x,f]=_.useState(!1),j=(e,s)=>{"number"==typeof s&&("overhead_rate"!==e&&"tax_rate"!==e||(s=Math.max(0,Math.min(100,s))),!isNaN(s)&&isFinite(s)||(s=0)),"string"==typeof s&&(s=s.trim().substring(0,20)),d(t=>({...t,[e]:s}))},y=t.map(e=>As.find(s=>s.id===e)).filter(Boolean);return e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Current State Assessment"}),e.jsx("p",{className:"text-muted-foreground",children:"Help us understand your organization's current capabilities and constraints"})]}),e.jsxs("div",{className:"space-y-6",children:[e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"AI/Data Maturity Level"})}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm",children:[e.jsxs("span",{children:["Level ",m]}),e.jsx("span",{className:"font-medium text-data-teal",children:Fs[m-1]})]}),e.jsx(Ve,{value:[m],onValueChange:([e])=>u(e),min:1,max:5,step:1,className:"w-full"}),e.jsxs("div",{className:"flex justify-between text-xs text-muted-foreground pt-1",children:[e.jsx("span",{children:"Basic"}),e.jsx("span",{children:"Optimized"})]})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:Ps[m-1]})]})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Projection Scenario"})}),e.jsx(w,{children:e.jsxs(K,{value:p,onValueChange:e=>h(e),children:[e.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[e.jsx(X,{value:"conservative",id:"conservative"}),e.jsxs(Z,{htmlFor:"conservative",className:"cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:"Conservative"}),e.jsx("span",{className:"text-sm text-muted-foreground ml-2",children:"(0.7× benchmark)"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2 mb-3",children:[e.jsx(X,{value:"expected",id:"expected"}),e.jsxs(Z,{htmlFor:"expected",className:"cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:"Expected"}),e.jsx("span",{className:"text-sm text-muted-foreground ml-2",children:"(1.0× benchmark)"})]})]}),e.jsxs("div",{className:"flex items-center space-x-2",children:[e.jsx(X,{value:"aggressive",id:"aggressive"}),e.jsxs(Z,{htmlFor:"aggressive",className:"cursor-pointer",children:[e.jsx("span",{className:"font-medium",children:"Aggressive"}),e.jsx("span",{className:"text-sm text-muted-foreground ml-2",children:"(1.3× benchmark)"})]})]})]})})]}),e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-lg font-semibold mb-4",children:"Organization Financials"}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Used to calculate labor savings and revenue impacts"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"annual_revenue",children:"Annual Revenue ($)"}),e.jsx(ee,{id:"annual_revenue",type:"number",placeholder:"50000000",min:"0",value:o.annual_revenue||"",onChange:e=>j("annual_revenue",parseFloat(e.target.value)||0)})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"gross_margin",children:"Gross Margin (%)"}),e.jsx(ee,{id:"gross_margin",type:"number",placeholder:"35",min:"5",max:"90",value:o.gross_margin||"",onChange:e=>j("gross_margin",parseFloat(e.target.value)||0)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Default based on industry"})]})]}),e.jsx(se,{}),e.jsxs("div",{children:[e.jsx(Z,{className:"mb-3 block",children:"Fully-loaded Hourly Rates ($)"}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"rate_analyst",className:"text-sm font-normal",children:"Analyst"}),e.jsx(ee,{id:"rate_analyst",type:"number",placeholder:"85",min:"20",max:"300",value:o.rate_analyst||"",onChange:e=>j("rate_analyst",parseFloat(e.target.value)||0)})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"rate_back_office",className:"text-sm font-normal",children:"Back-office"}),e.jsx(ee,{id:"rate_back_office",type:"number",placeholder:"45",min:"20",max:"300",value:o.rate_back_office||"",onChange:e=>j("rate_back_office",parseFloat(e.target.value)||0)})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"rate_reviewer",className:"text-sm font-normal",children:"Reviewer/Inspector"}),e.jsx(ee,{id:"rate_reviewer",type:"number",placeholder:"55",min:"20",max:"300",value:o.rate_reviewer||"",onChange:e=>j("rate_reviewer",parseFloat(e.target.value)||0)})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"rate_field_tech",className:"text-sm font-normal",children:"Field Tech"}),e.jsx(ee,{id:"rate_field_tech",type:"number",placeholder:"65",min:"20",max:"300",value:o.rate_field_tech||"",onChange:e=>j("rate_field_tech",parseFloat(e.target.value)||0)})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"rate_engineer",className:"text-sm font-normal",children:"Engineer"}),e.jsx(ee,{id:"rate_engineer",type:"number",placeholder:"95",min:"20",max:"300",value:o.rate_engineer||"",onChange:e=>j("rate_engineer",parseFloat(e.target.value)||0)})]})]})]}),e.jsx(se,{}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"infra_spend_mo",children:"Monthly Infrastructure Spend ($)"}),e.jsx(ee,{id:"infra_spend_mo",type:"number",placeholder:"50000",min:"0",value:o.infra_spend_mo||"",onChange:e=>j("infra_spend_mo",parseFloat(e.target.value)||0)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Compute + storage costs"})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"discount_rate",children:"Discount Rate for NPV (%)"}),e.jsx(ee,{id:"discount_rate",type:"number",placeholder:"10",min:"0",max:"20",value:o.discount_rate||"",onChange:e=>j("discount_rate",parseFloat(e.target.value)||0)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Default 10%"})]})]})]})]}),y.map(t=>e.jsxs("fieldset",{children:[e.jsx("legend",{className:"text-lg font-semibold mb-2",children:t.name}),e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Current state baseline for this use case"}),e.jsx("div",{className:"space-y-4",children:e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:t.inputs.map(a=>{const n=`${t.id}_${a.key}`,r=a.optional,i=o[n],l=((e,t)=>{if(!s||!t)return{isOutlier:!1};const a=Os[s];if(!a)return{isOutlier:!1};const n=a[e.includes("_")?e.split("_").slice(1).join("_"):e];if(!n)return{isOutlier:!1};const r=(n.min+n.max)/2,i=(n.max-n.min)/4;return Math.abs((t-r)/i)>2?{isOutlier:!0,suggestedRange:`${n.min}-${n.max}`,source:n.source}:{isOutlier:!1}})(n,i);return e.jsxs("div",{className:"text"===a.type?"md:col-span-2":"",children:[e.jsxs(Z,{htmlFor:n,className:"flex items-center gap-2",children:[a.label,r&&e.jsx("span",{className:"text-xs text-muted-foreground",children:"(optional)"}),l.isOutlier&&e.jsx(te,{children:e.jsxs(ae,{children:[e.jsx(ne,{children:e.jsx(re,{className:"h-4 w-4 text-amber-500"})}),e.jsxs(ie,{className:"max-w-xs",children:[e.jsx("p",{className:"font-medium",children:"Outlier detected"}),e.jsxs("p",{className:"text-sm mt-1",children:["Typical range: ",l.suggestedRange]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Source: ",l.source]})]})]})})]}),e.jsx(ee,{id:n,type:"pct"===a.type||"float"===a.type||"int"===a.type||"currency"===a.type?"number":"text",placeholder:a.placeholder||"",min:a.min,max:a.max,step:"float"===a.type?"0.1":"pct"===a.type?"0.01":"1",value:o[n]??"",onChange:e=>j(n,parseFloat(e.target.value)||0),className:l.isOutlier?"border-amber-500":""}),a.helpText&&e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:a.helpText})]},n)})})})]},t.id))]}),e.jsxs(le,{open:x,onOpenChange:f,children:[e.jsx(ce,{asChild:!0,children:e.jsxs(B,{variant:"outline",className:"w-full flex items-center justify-between",children:[e.jsx("span",{className:"font-semibold",children:"⚙️ Advanced Settings"}),e.jsx(V,{className:"h-4 w-4 transition-transform "+(x?"rotate-180":"")})]})}),e.jsxs(oe,{className:"mt-4 space-y-4",children:[e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Monte Carlo Simulation"}),e.jsx(de,{children:"Run 1,000 simulations for probabilistic outcomes (5th, 50th, 95th percentile)"})]}),e.jsx(w,{children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"enable_monte_carlo",children:"Enable Monte Carlo"}),e.jsx(js,{id:"enable_monte_carlo",checked:o.enable_monte_carlo||!1,onCheckedChange:e=>j("enable_monte_carlo",e)})]})})]}),e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Adoption Curve"}),e.jsx(de,{children:"Model how your organization will adopt the solution over time"})]}),e.jsx(w,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"adoption_curve",children:"Curve Type"}),e.jsxs(ys,{value:o.adoption_curve||"linear",onValueChange:e=>j("adoption_curve",e),children:[e.jsx(vs,{id:"adoption_curve",children:e.jsx(gs,{placeholder:"Select curve"})}),e.jsxs(Ns,{children:[e.jsx(ks,{value:"linear",children:"Linear (steady growth)"}),e.jsx(ks,{value:"s-curve",children:"S-Curve (slow start, fast middle, plateau)"})]})]})]})})]}),e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Seasonality"}),e.jsx(de,{children:"Account for seasonal business cycles (retail, public sector budgets)"})]}),e.jsxs(w,{children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx(Z,{htmlFor:"enable_seasonality",children:"Apply Seasonality Factor"}),e.jsx(js,{id:"enable_seasonality",checked:o.enable_seasonality||!1,onCheckedChange:e=>j("enable_seasonality",e)})]}),o.enable_seasonality&&e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Applies 5% conservative reduction for seasonal variance"})]})]}),e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Deployment Posture"}),e.jsx(de,{children:"Cloud (OpEx) vs On-Premises (CapEx) cost structure"})]}),e.jsx(w,{children:e.jsxs("div",{className:"space-y-2",children:[e.jsx(Z,{htmlFor:"deployment_posture",children:"Infrastructure Model"}),e.jsxs(ys,{value:o.deployment_posture||"cloud",onValueChange:e=>j("deployment_posture",e),children:[e.jsx(vs,{id:"deployment_posture",children:e.jsx(gs,{placeholder:"Select model"})}),e.jsxs(Ns,{children:[e.jsx(ks,{value:"cloud",children:"Cloud (OpEx: lower upfront, higher recurring)"}),e.jsx(ks,{value:"on-prem",children:"On-Premises (CapEx: higher upfront, lower recurring)"})]})]})]})})]}),e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Financial Adjustments"}),e.jsx(de,{children:"Tax rates and labor overhead for conservative modeling"})]}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"overhead_rate",children:"Labor Overhead Rate (%)"}),e.jsx(ee,{id:"overhead_rate",type:"number",placeholder:"20",min:"0",max:"100",value:o.overhead_rate||"",onChange:e=>j("overhead_rate",parseFloat(e.target.value)||0)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Benefits, taxes, facilities (typically 15-25%)"})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"tax_rate",children:"Effective Tax Rate (%)"}),e.jsx(ee,{id:"tax_rate",type:"number",placeholder:"25",min:"0",max:"50",value:o.tax_rate||"",onChange:e=>j("tax_rate",parseFloat(e.target.value)||0)}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Corporate tax rate for after-tax ROI (optional)"})]})]})]}),e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Currency & Locale"}),e.jsx(de,{children:"Display preferences for international teams"})]}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"currency",children:"Currency"}),e.jsxs(ys,{value:o.currency||"USD",onValueChange:e=>j("currency",e),children:[e.jsx(vs,{id:"currency",children:e.jsx(gs,{placeholder:"Select currency"})}),e.jsxs(Ns,{children:[e.jsx(ks,{value:"USD",children:"USD ($)"}),e.jsx(ks,{value:"EUR",children:"EUR (€)"}),e.jsx(ks,{value:"GBP",children:"GBP (£)"}),e.jsx(ks,{value:"INR",children:"INR (₹)"}),e.jsx(ks,{value:"JPY",children:"JPY (¥)"})]})]})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"locale",children:"Locale"}),e.jsxs(ys,{value:o.locale||"en-US",onValueChange:e=>j("locale",e),children:[e.jsx(vs,{id:"locale",children:e.jsx(gs,{placeholder:"Select locale"})}),e.jsxs(Ns,{children:[e.jsx(ks,{value:"en-US",children:"English (US)"}),e.jsx(ks,{value:"en-GB",children:"English (UK)"}),e.jsx(ks,{value:"de-DE",children:"German"}),e.jsx(ks,{value:"fr-FR",children:"French"}),e.jsx(ks,{value:"ja-JP",children:"Japanese"}),e.jsx(ks,{value:"zh-CN",children:"Chinese (Simplified)"})]})]})]})]})]})]})]}),e.jsxs("div",{className:"flex gap-4 pt-6",children:[e.jsx(B,{variant:"outline",onClick:c,children:"Back"}),e.jsx(B,{onClick:()=>{const e=["annual_revenue","gross_margin"].filter(e=>!o[e]||0===o[e]);y.forEach(s=>{s.inputs.forEach(t=>{if(!t.optional){const a=`${s.id}_${t.key}`;o[a]&&0!==o[a]||e.push(t.label)}})}),e.length>0?alert(`Please fill in all required fields:\n- ${e.join("\n- ")}`):(i({maturityLevel:m,riskProfile:p,inputs:o}),l())},className:"bg-gradient-to-r from-data-orange to-data-teal",children:"See Results"})]})]})};me().min(0).max(1e12),me().min(0).max(100),me().int().min(0),me().min(0);const Is=ue(["conservative","expected","aggressive"]),Es=me().int().min(1).max(5),Ds=ue(["retail","manufacturing","healthcare","financial","technology","logistics","energy","government"]),$s=ue(["analytics","process_automation","cv_security","cv_quality","predictive_maintenance","personalization","fraud_detection","supply_chain","nlp_docs","agentic_ai","financial_analytics","cybersecurity","hr_analytics"]);ue(["linear","s-curve"]).default("linear"),ue(["cloud","on-prem"]).default("cloud"),ue(["USD","EUR","GBP","JPY","AUD"]).default("USD"),ue(["en-US","en-GB","de-DE","fr-FR","ja-JP","es-ES"]).default("en-US");const Us=pe(he().max(100),xe([me().finite(),fe(),he().max(50)])).refine(e=>Object.keys(e).every(e=>/^[a-z_]+$/.test(e)||/^[a-z_]+_[a-z_]+$/.test(e)),{message:"Invalid input key format. Use snake_case only."}),Ls=je({industry:Ds.optional(),useCases:ye($s).min(1,"At least one use case required").max(10,"Maximum 10 use cases allowed"),maturityLevel:Es,riskProfile:Is,inputs:Us}).strict();function Hs(e,s){const t={};return Object.keys(e).forEach(a=>{const n=a,r=e[n];if(0===r.length)return void(t[n]={baseline:0,intended:0,adjusted:0,capped:!1});const i=function(e){return e.map((e,s)=>e*Ts[Math.min(s,Ts.length-1)])}(r),l=r.reduce((e,s)=>e+s,0),c=i.reduce((e,s)=>e+s,0),o=s[n],{capped:d,wasCapped:m}=function(e,s){const t=.8*s;return e>t&&s>0?{capped:Math.min(e,t),wasCapped:!0}:{capped:e,wasCapped:!1}}(c,o);t[n]={baseline:o,intended:l,adjusted:d,capped:m}}),t}function zs(e,s){const t=function(e){const s=Ls.safeParse(e);return s.success?{success:!0,data:s.data}:{success:!1,errors:s.error}}(e);t.success;const{industry:a,useCases:n,maturityLevel:r,riskProfile:i,inputs:l}=e,c=l.enable_monte_carlo||!1,o=l.adoption_curve||"linear",d=l.enable_seasonality||!1,m=l.deployment_posture||"cloud",u=l.tax_rate?l.tax_rate/100:0,p=l.overhead_rate?l.overhead_rate/100:0,h=l.currency||"USD";l.locale;const x=r-1,f=Cs[x],j=Ss[x],y=Ms[i],g=1+p,v={rates:{analyst:(l.rate_analyst||85)*g,backOffice:(l.rate_back_office||45)*g,reviewer:(l.rate_reviewer||55)*g,fieldTech:(l.rate_field_tech||65)*g,engineer:(l.rate_engineer||95)*g},grossMargin:l.gross_margin?l.gross_margin/100:ws[a||"technology"]||.35,annualRevenue:l.annual_revenue||0,infraSpendMo:l.infra_spend_mo||0,discountRate:l.discount_rate?l.discount_rate/100:.1,deploymentPosture:m,taxRate:u},b={},_={},N={BackOfficeHours:[],AnalystHours:[],ReviewerHours:[],FieldOpsHours:[],InfraCompute:[],Storage:[],RevenueDemand:[]},k={BackOfficeHours:0,AnalystHours:0,ReviewerHours:0,FieldOpsHours:0,InfraCompute:0,Storage:0,RevenueDemand:0},w=new Map;n.forEach(e=>{const s=As.find(s=>s.id===e);if(!s)return;const t=function(e,s){const t=`${e}_`,a={};return Object.entries(s).forEach(([e,s])=>{if(e.startsWith(t)){const n=e.substring(t.length);a[n]="number"==typeof s?s:parseFloat(s)||0}}),a}(e,l),a=function(e,s){const t={};return e.inputs.forEach(e=>{const a=s[e.key];let n="number"==typeof a&&isFinite(a)?a:0;"pct"===e.type&&(n=Math.max(0,Math.min(100,n))),"number"==typeof e.min&&(n=Math.max(e.min,n)),"number"==typeof e.max&&(n=Math.min(e.max,n)),t[e.key]=n}),t}(s,t);w.set(e,a);const n=function(e,s,t){const a={};if(e.pools.BackOfficeHours){const n=function(e,s,t){switch(e){case"process_automation":return s.tasks_per_month*s.avg_minutes_per_task/60*t.rates.backOffice*12;case"nlp_docs":return s.documents_per_month*s.minutes_per_doc/60*t.rates.backOffice*12;case"hr_analytics":return 160*t.rates.backOffice*12;default:return 0}}(e.id,s,t);a.BackOfficeHours=n*e.pools.BackOfficeHours}if(e.pools.AnalystHours){const n=function(e,s,t){switch(e){case"analytics":return s.manual_report_hours_mo*t.rates.analyst*12;case"supply_chain":return 120*t.rates.analyst*12;case"financial_analytics":return s.planning_cycle_hrs_mo*t.rates.analyst*12;case"cybersecurity":return 140*t.rates.analyst*12;default:return 0}}(e.id,s,t);a.AnalystHours=n*e.pools.AnalystHours}if(e.pools.ReviewerHours){const n=function(e,s,t){switch(e){case"cv_security":return s.incidents_per_month/(1-s.false_positive_rate/100)*s.reviewer_minutes_per_event/60*t.rates.reviewer*12;case"cv_quality":return s.units_per_month*s.inspection_minutes_per_unit/60*t.rates.reviewer*12;default:return 0}}(e.id,s,t);a.ReviewerHours=n*e.pools.ReviewerHours}return e.pools.InfraCompute&&(a.InfraCompute=12*t.infraSpendMo*e.pools.InfraCompute),e.pools.Storage&&(a.Storage=12*t.infraSpendMo*.3*e.pools.Storage),e.pools.RevenueDemand&&(a.RevenueDemand=t.annualRevenue*t.grossMargin*e.pools.RevenueDemand),a}(s,a,v);Object.entries(n).forEach(([e,s])=>{k[e]+=s})}),n.forEach(e=>{const s=As.find(s=>s.id===e);if(!s)return;const t=w.get(e)||{},a={};Object.entries(s.effectsExpected).forEach(([e,[s,t]])=>{const n=(s+t)/2;a[e]=n*f*y});try{const n=s.benefitFormula(t,a,v);b[e]=n,Object.entries(n).forEach(([e,t])=>{Object.entries(s.pools).forEach(([e,s])=>{N[e].push(t*s)})})}catch(i){b[e]={}}const{oneTime:n,recurring:r}=function(e){return"on-prem"===e?{oneTime:1.3,recurring:.6}:{oneTime:1,recurring:1}}(m);_[e]={oneTime:s.costDefaults.oneTime*n,recurring:12*s.costDefaults.recurringMo*r}});const C=function(e,s,t){const a=e.filter(e=>{const t=s.get(e);return t?.requiresPlatform});if(a.length<=1)return{savings:0,updatedCosts:{...t}};const n=.6*a.reduce((e,s)=>e+t[s].oneTime,0),r=n/a.length,i={...t};return a.forEach(e=>{i[e]={...i[e],oneTime:i[e].oneTime-r}}),{savings:n-r,updatedCosts:i}}(n,new Map(As.map(e=>[e.id,e])),_),S=C.savings;Object.assign(_,C.updatedCosts);const M=Hs(N,k),T=Object.values(N).flat().reduce((e,s)=>e+s,0),R=(O=M,Object.values(O).reduce((e,s)=>e+s.adjusted,0));var O;const A=function(e,s,t){if(e.length<=1)return 0;let a=0;return e.forEach(t=>{e.forEach(e=>{if(t!==e&&Rs[t]?.[e]){const n=Rs[t][e],r=Object.values(s[t]||{}).reduce((e,s)=>e+s,0),i=Object.values(s[e]||{}).reduce((e,s)=>e+s,0);a+=Math.min(r,i)*n}})}),a/=2,Math.min(a,.15*t)}(n,b,R),F=function(e,s){return"s-curve"===e?.7*s:s}(o,j);const P=(R+A)*F*(d?.95:1),B=Object.values(_).reduce((e,s)=>e+s.oneTime,0),I=Object.values(_).reduce((e,s)=>e+s.recurring,0),E=B+I,D=P-E,$=E>0?D/E*100:0,U=(P-I)/12,L=U>0?B/U:999,H=R,z=v.discountRate,Y=(H*(.8*j)-E)/Math.pow(1+z,1)+(1*H-I)/Math.pow(1+z,2)+(1*H-I)/Math.pow(1+z,3),q=function(e){let s=0,t=0,a=0,n=0;return Object.values(e).forEach(e=>{Object.entries(e).forEach(([e,r])=>{e.includes("labor")?s+=r:e.includes("infra")||e.includes("storage")||e.includes("license")?t+=r:e.includes("revenue")||e.includes("churn")||e.includes("conversion")?a+=r:n+=r})}),{laborSavings:s,infraSavings:t,revenueSavings:a,otherSavings:n}}(b),V=function(e){let s=50;const t=["annual_revenue","rate_analyst","rate_back_office"],a=t.filter(s=>e.inputs[s]&&e.inputs[s]>0).length;s+=a/t.length*30;const n=Object.keys(e.inputs).filter(e=>e.includes("_")),r=n.filter(s=>e.inputs[s]&&e.inputs[s]>0).length;n.length>0&&(s+=r/n.length*20);return Math.min(100,Math.round(s))}(e),G=s?.skipExtras?[]:function(e,s){const t=[];return[{key:"annual_revenue",label:"Annual Revenue",delta:.2},{key:"gross_margin",label:"Gross Margin",delta:.2},{key:"rate_analyst",label:"Analyst Rate",delta:.2},{key:"rate_back_office",label:"Back-office Rate",delta:.2},{key:"infra_spend_mo",label:"Infra Spend",delta:.2}].forEach(({key:a,label:n,delta:r})=>{const i=e.inputs[a];if(!i||0===i)return;const l=zs({...e,inputs:{...e.inputs,[a]:i*(1-r)}},{skipExtras:!0}),c=zs({...e,inputs:{...e.inputs,[a]:i*(1+r)}},{skipExtras:!0});t.push({input:a,label:n,low:l.roi,base:s,high:c.roi})}),t.sort((e,s)=>Math.abs(s.high-s.low)-Math.abs(e.high-e.low)).slice(0,5)}(e,$),W=s?.skipExtras?{optimistic:{roi:1.2*$,payback:.8*L,npv:1.2*Y},expected:{roi:$,payback:L,npv:Y},pessimistic:{roi:.8*$,payback:1.2*L,npv:.8*Y}}:function(e,s){const t={...e,inputs:{...e.inputs,enable_monte_carlo:!1}},a={...t},n={...t.inputs};Object.keys(n).forEach(e=>{"number"==typeof n[e]&&n[e]>0&&!e.startsWith("enable_")&&!e.startsWith("adoption_")&&"currency"!==e&&"locale"!==e&&(n[e]*=1.1)}),a.inputs=n;const r=zs(a,{skipExtras:!0}),i={...t},l={...t.inputs};Object.keys(l).forEach(e=>{"number"==typeof l[e]&&l[e]>0&&!e.startsWith("enable_")&&!e.startsWith("adoption_")&&"currency"!==e&&"locale"!==e&&(l[e]*=.9)}),i.inputs=l;const c=zs(i,{skipExtras:!0});return{optimistic:{roi:r.roi,payback:r.paybackMonths,npv:r.npv3Year},expected:{roi:s.roi,payback:s.paybackMonths,npv:s.npv3Year},pessimistic:{roi:c.roi,payback:c.paybackMonths,npv:c.npv3Year}}}(e,{roi:$,paybackMonths:L,npv3Year:Y});let J;return c&&!s?.skipExtras&&(J=function(e,s){const t=[],a=[],n=[],r=JSON.stringify(e.inputs),i=Math.abs(r.split("").reduce((e,s)=>(e<<5)-e+s.charCodeAt(0),0)%1e6),l=function(e){let s=e;return()=>(s=(1664525*s+1013904223)%4294967296,s/4294967296)}(i),c={...e,inputs:{...e.inputs,enable_monte_carlo:!1}};for(let o=0;o<s;o++){const e={...c.inputs};Object.keys(e).forEach(s=>{if("number"==typeof e[s]&&e[s]>0&&!s.startsWith("enable_")&&!s.startsWith("adoption_")&&"currency"!==s&&"locale"!==s){const t=l(),a=l(),n=1+Math.sqrt(-2*Math.log(t))*Math.cos(2*Math.PI*a)*.2;e[s]*=Math.max(.5,Math.min(1.5,n))}});const s=zs({...c,inputs:e},{skipExtras:!0});t.push(s.roi),a.push(s.paybackMonths),n.push(s.npv3Year)}return{roi:Gs(t),payback:Gs(a),npv:Gs(n),seed:i}}(e,1e3)),{year1Benefits:P,year1Costs:E,year1NetBenefit:D,roi:$,paybackMonths:L,npv3Year:Y,benefitsByUseCase:b,costsByUseCase:_,poolAdjustments:M,totalBenefitsBeforeAdjustment:T,roiDrivers:q,confidenceScore:V,sensitivity:G,assumptions:{maturityLevel:r,riskProfile:i,effectMultiplier:f,adoptionMultiplier:j,scenarioMultiplier:y,adoptionCurve:o,seasonality:d,deploymentPosture:m,taxRate:u,overheadRate:p,currency:h},synergyUplift:A,platformCostSavings:S,scenarios:W,monteCarlo:J,version:"v1.3.0",timestamp:(new Date).toISOString()}}function Ys(e,s="USD",t="en-US"){return new Intl.NumberFormat(t,{style:"currency",currency:s,minimumFractionDigits:0,maximumFractionDigits:0}).format(e)}function qs(e){return`${Math.round(e)}%`}function Vs(e,s="en-US"){return new Intl.NumberFormat(s,{minimumFractionDigits:0,maximumFractionDigits:1}).format(e)}function Gs(e){const s=[...e].sort((e,s)=>e-s),t=Math.floor(.05*s.length),a=Math.floor(.5*s.length),n=Math.floor(.95*s.length),r=s.reduce((e,s)=>e+s,0)/s.length,i=s.reduce((e,s)=>e+Math.pow(s-r,2),0)/s.length,l=Math.sqrt(i);return{p5:s[t],p50:s[a],p95:s[n],mean:r,stdDev:l}}const Ws=({sensitivity:s})=>{const t=s.map(e=>({label:e.label,low:e.low-e.base,high:e.high-e.base,base:e.base}));return e.jsxs(k,{children:[e.jsxs(J,{children:[e.jsx(Q,{children:"Sensitivity Analysis"}),e.jsx(de,{children:"Impact of ±20% change in key inputs on ROI"})]}),e.jsxs(w,{children:[e.jsx(Ge,{width:"100%",height:300,children:e.jsxs(We,{data:t,layout:"vertical",margin:{top:5,right:30,left:120,bottom:5},children:[e.jsx(Je,{type:"number",tickFormatter:e=>`${e>0?"+":""}${e.toFixed(0)}%`}),e.jsx(Qe,{type:"category",dataKey:"label"}),e.jsx(Ke,{formatter:e=>`${e>0?"+":""}${e.toFixed(1)}%`,labelFormatter:e=>`${e}`}),e.jsx(Xe,{x:0,stroke:"hsl(var(--border))",strokeWidth:2}),e.jsx(Ze,{dataKey:"low",stackId:"a",fill:"hsl(var(--destructive))"}),e.jsx(Ze,{dataKey:"high",stackId:"a",fill:"hsl(var(--chart-2))"})]})}),e.jsxs("div",{className:"flex justify-center gap-6 mt-4 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 bg-destructive rounded"}),e.jsx("span",{children:"-20% Impact"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-4 h-4 bg-chart-2 rounded"}),e.jsx("span",{children:"+20% Impact"})]})]})]})]})},Js=je({name:he().trim().min(2,"Name must be at least 2 characters").max(100),email:he().trim().email("Invalid email address").max(255),company:he().trim().min(2,"Company name is required").max(200),phone:he().trim().max(20).optional(),acceptTerms:fe().refine(e=>!0===e,{message:"You must accept the terms to continue"}),acceptMethodology:fe().refine(e=>!0===e,{message:"You must acknowledge the methodology to continue"})});function Qs({useCases:s,industry:t,maturityLevel:a,riskProfile:n,resultsData:r,onSuccess:i}){const[l,c]=_.useState(!1),[o,d]=_.useState(!1),{register:m,handleSubmit:u,formState:{errors:p},setValue:h,watch:x}=ge({resolver:ve(Js)}),f=x("acceptTerms"),j=x("acceptMethodology");return e.jsxs("div",{className:"bg-card border-2 border-primary/20 rounded-lg p-8 shadow-xl",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-6",children:[e.jsx(Y,{className:"h-6 w-6 text-primary"}),e.jsx("h3",{className:"text-2xl font-bold",children:"Unlock Your Full Report"})]}),e.jsxs("p",{className:"text-muted-foreground mb-6",children:["Get instant access to your complete ROI analysis for ",e.jsx("strong",{children:t})," including detailed breakdowns, sensitivity analysis, and actionable recommendations."]}),e.jsxs("form",{onSubmit:u(async e=>{c(!0);try{const{data:l,error:c}=await Ne.functions.invoke("send-roi-report",{body:{email:e.email,name:e.name,company:e.company,phone:e.phone,useCases:s,industry:t,maturityLevel:a,riskProfile:n,resultsData:r}});if(c)throw c;if(!l?.success)throw new Error(l?.error||"Failed to send report");ke.success("Report sent!",{description:`Check ${e.email} for your personalized ROI analysis.`}),i()}catch(l){ke.error("Failed to send report",{description:l.message||"Please try again or contact support."})}finally{c(!1)}}),className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"name",children:"Full Name *"}),e.jsx(ee,{id:"name",...m("name"),placeholder:"John Smith",disabled:l}),p.name&&e.jsx("p",{className:"text-sm text-destructive mt-1",children:p.name.message})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"email",children:"Business Email *"}),e.jsx(ee,{id:"email",type:"email",...m("email"),placeholder:"[email protected]",disabled:l}),p.email&&e.jsx("p",{className:"text-sm text-destructive mt-1",children:p.email.message})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"company",children:"Company Name *"}),e.jsx(ee,{id:"company",...m("company"),placeholder:"Acme Corporation",disabled:l}),p.company&&e.jsx("p",{className:"text-sm text-destructive mt-1",children:p.company.message})]}),e.jsxs("div",{children:[e.jsx(Z,{htmlFor:"phone",children:"Phone Number (Optional)"}),e.jsx(ee,{id:"phone",...m("phone"),placeholder:"+1 (555) 123-4567",disabled:l})]}),e.jsxs("div",{className:"pt-4 space-y-4",children:[e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(be,{id:"acceptMethodology",checked:j,onCheckedChange:e=>h("acceptMethodology",e),disabled:l}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(Z,{htmlFor:"acceptMethodology",className:"text-sm font-normal cursor-pointer",children:"I acknowledge the calculation methodology and disclaimer *"}),e.jsxs(le,{open:o,onOpenChange:d,children:[e.jsxs(ce,{className:"flex items-center gap-2 text-xs text-primary hover:underline",children:["Read methodology & disclaimer",e.jsx(V,{className:"h-3 w-3 transition-transform "+(o?"rotate-180":"")})]}),e.jsxs(oe,{className:"mt-2 p-4 bg-muted/50 rounded-md text-xs space-y-2",children:[e.jsxs("p",{children:[e.jsx("strong",{children:"Methodology:"})," This ROI analysis uses Allerin's proprietary calculation engine based on industry benchmarks, historical data, and your specific inputs. Calculations consider use case synergies, resource pool constraints, and maturity-level impacts."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Disclaimer:"})," Results are estimates based on data provided by ",t," and industry averages. Actual outcomes may vary based on implementation quality, organizational readiness, and market conditions. This report is for informational purposes and should not be considered a guarantee of specific financial results."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Recommendation:"})," For accurate projections tailored to your specific situation, please consult with Allerin's experts."]}),e.jsxs("p",{children:[e.jsx("strong",{children:"Data Privacy:"})," Your information is confidential and used solely for this analysis."]})]})]}),p.acceptMethodology&&e.jsx("p",{className:"text-sm text-destructive",children:p.acceptMethodology.message})]})]}),e.jsxs("div",{className:"flex items-start space-x-3",children:[e.jsx(be,{id:"acceptTerms",checked:f,onCheckedChange:e=>h("acceptTerms",e),disabled:l}),e.jsx(Z,{htmlFor:"acceptTerms",className:"text-sm font-normal cursor-pointer",children:"I agree to receive my ROI report and may be contacted by Allerin about my results *"})]}),p.acceptTerms&&e.jsx("p",{className:"text-sm text-destructive",children:p.acceptTerms.message})]}),e.jsx(B,{type:"submit",className:"w-full",size:"lg",disabled:l,children:l?e.jsxs(e.Fragment,{children:[e.jsx(_e,{className:"mr-2 h-4 w-4 animate-spin"}),"Generating Report..."]}):"Download Full Report"})]}),e.jsx("p",{className:"text-xs text-muted-foreground text-center mt-4",children:"Report will be sent to your email instantly"})]})}const Ks=({data:s,onBack:t,onRestart:a})=>{const[n,r]=_.useState(null),[i,l]=_.useState(!1),[c,o]=_.useState(!1);_.useEffect(()=>{try{const e=zs(s);r(e),we({roi_pct:Math.round(100*e.roi)/100,payback_months:Math.round(e.paybackMonths),npv_3yr:Math.round(e.npv3Year),confidence:String(e.confidenceScore)})}catch(e){ke.error("Failed to calculate results. Please check your inputs and try again.")}},[s]);const d=()=>{if(!n)return;$e({roi_pct:Math.round(100*n.roi)/100,payback_months:Math.round(n.paybackMonths)});const e=document.createElement("style");e.innerHTML="\n @media print {\n @page { margin: 1.5cm; }\n .no-print { display: none !important; }\n .print-section { page-break-inside: avoid; }\n .print-page-break { page-break-before: always; }\n body { font-size: 11pt; }\n h1 { font-size: 20pt; page-break-after: avoid; }\n h2 { font-size: 16pt; page-break-after: avoid; }\n h3 { font-size: 14pt; }\n }\n ",document.head.appendChild(e),window.print(),setTimeout(()=>{document.head.removeChild(e)},100)},m=()=>{if(!n)return;const e=encodeURIComponent("Outcome Discovery Results"),t=encodeURIComponent(`My Outcome Discovery Results:\n\nROI: ${qs(n.roi)}\nPayback: ${Vs(n.paybackMonths)} months\nYear-1 Net Benefit: ${Ys(n.year1NetBenefit)}\n3-Year NPV: ${Ys(n.npv3Year)}\n\nIndustry: ${s.industry}\nUse Cases: ${s.useCases.join(", ")}\nMaturity Level: ${s.maturityLevel}\nRisk Profile: ${s.riskProfile}\n\nView full results: ${window.location.href}\n`);window.location.href=`mailto:[email protected]?subject=${e}&body=${t}`},u=()=>{n&&(Ue({roi_pct:Math.round(100*n.roi)/100,payback_months:Math.round(n.paybackMonths)}),window.location.href=`mailto:[email protected]?subject=Book%2030-min%20Consult&body=I'd%20like%20to%20discuss%20my%20Outcome%20Discovery%20results.%0A%0AResults%20URL:%20${encodeURIComponent(window.location.href)}`)},p=()=>{if(!n)return;const e={version:n.version,timestamp:n.timestamp,inputs:s,results:{year1Benefits:n.year1Benefits,year1Costs:n.year1Costs,year1NetBenefit:n.year1NetBenefit,roi:n.roi,paybackMonths:n.paybackMonths,npv3Year:n.npv3Year,roiDrivers:n.roiDrivers,confidenceScore:n.confidenceScore},benefitsByUseCase:n.benefitsByUseCase,costsByUseCase:n.costsByUseCase,poolAdjustments:n.poolAdjustments,assumptions:n.assumptions,sensitivity:n.sensitivity,scenarios:n.scenarios,monteCarlo:n.monteCarlo,synergyUplift:n.synergyUplift,platformCostSavings:n.platformCostSavings},t=new Blob([JSON.stringify(e,null,2)],{type:"application/json"}),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=`outcome-audit-${(new Date).toISOString().split("T")[0]}.json`,r.click(),URL.revokeObjectURL(a),ke.success("Audit JSON exported successfully")};if(!n)return e.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[400px] space-y-4",children:[e.jsx("div",{className:"animate-spin rounded-full h-12 w-12 border-b-2 border-data-teal"}),e.jsx("p",{className:"text-muted-foreground",children:"Calculating your strategic ROI plan..."})]});const h=150,x=18,f=.15,j=n.roiDrivers,y=n.year1Benefits,g={labor:j.laborSavings/y*100,infra:j.infraSavings/y*100,revenue:j.revenueSavings/y*100,other:j.otherSavings/y*100},v=Object.entries(g).reduce((e,[s,t])=>t>e.val?{key:s,val:t}:e,{key:"labor",val:0}),b="labor"===v.key?"Labor Savings":"infra"===v.key?"Infrastructure Savings":"revenue"===v.key?"Revenue Growth":"Other";return e.jsx(te,{children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-start justify-between",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-2xl font-bold mb-2",children:"Your Strategic ROI Plan"}),e.jsxs("p",{className:"text-muted-foreground",children:["Based on ",s.useCases.length," use case",s.useCases.length>1?"s":"",", ",s.riskProfile," scenario, maturity level ",s.maturityLevel]}),e.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Engine version: ",n.version," • Generated: ",new Date(n.timestamp).toLocaleString()]})]}),e.jsxs(P,{variant:n.confidenceScore>=60?"default":"destructive",className:"text-lg px-4 py-2",children:[n.confidenceScore,"% Confidence"]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[e.jsx(k,{children:e.jsxs(w,{className:"pt-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Ce,{className:"h-5 w-5 text-data-teal"}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Year-1 ROI"})]}),e.jsx("p",{className:"text-3xl font-bold",children:qs(n.roi)}),e.jsxs("div",{className:"mt-4 space-y-1 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Optimistic:"}),e.jsx("span",{className:"font-medium text-chart-1",children:qs(n.scenarios.optimistic.roi)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Expected:"}),e.jsx("span",{className:"font-medium",children:qs(n.scenarios.expected.roi)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Pessimistic:"}),e.jsx("span",{className:"font-medium text-chart-5",children:qs(n.scenarios.pessimistic.roi)})]})]})]})}),e.jsx(k,{children:e.jsxs(w,{className:"pt-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(Se,{className:"h-5 w-5 text-data-teal"}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Payback"})]}),e.jsxs("p",{className:"text-3xl font-bold",children:[Vs(n.paybackMonths)," mo"]}),e.jsxs("div",{className:"mt-4 space-y-1 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Optimistic:"}),e.jsxs("span",{className:"font-medium text-chart-1",children:[Math.round(n.scenarios.optimistic.payback)," mo"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Expected:"}),e.jsxs("span",{className:"font-medium",children:[Math.round(n.scenarios.expected.payback)," mo"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Pessimistic:"}),e.jsxs("span",{className:"font-medium text-chart-5",children:[Math.round(n.scenarios.pessimistic.payback)," mo"]})]})]})]})}),e.jsx(k,{children:e.jsxs(w,{className:"pt-6",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(z,{className:"h-5 w-5 text-data-teal"}),e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"3-Year NPV"})]}),e.jsx("p",{className:"text-3xl font-bold",children:Ys(n.npv3Year)}),e.jsxs("div",{className:"mt-4 space-y-1 text-xs",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Optimistic:"}),e.jsx("span",{className:"font-medium text-chart-1",children:Ys(n.scenarios.optimistic.npv)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Expected:"}),e.jsx("span",{className:"font-medium",children:Ys(n.scenarios.expected.npv)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Pessimistic:"}),e.jsx("span",{className:"font-medium text-chart-5",children:Ys(n.scenarios.pessimistic.npv)})]})]})]})})]}),e.jsx("div",{className:"flex flex-wrap gap-3",children:e.jsxs(B,{onClick:u,variant:"default",size:"lg",className:"bg-gradient-to-r from-data-orange to-data-teal",children:[e.jsx(Se,{className:"mr-2 h-4 w-4"}),"Book Consult"]})}),!i&&e.jsx(k,{className:"border-2 border-primary bg-gradient-to-br from-primary/5 via-background to-background",children:e.jsx(w,{className:"pt-6",children:e.jsxs("div",{className:"text-center space-y-4 py-8",children:[e.jsx("div",{className:"flex justify-center",children:e.jsx("div",{className:"bg-primary/10 p-4 rounded-full",children:e.jsx(Y,{className:"h-12 w-12 text-primary"})})}),e.jsx("h3",{className:"text-2xl font-bold",children:"Unlock Your Complete ROI Analysis"}),e.jsxs("p",{className:"text-muted-foreground max-w-2xl mx-auto",children:["Access detailed breakdowns, sensitivity analysis, Monte Carlo simulations, and strategic recommendations tailored to your ",s.industry," organization."]}),e.jsx("div",{className:"pt-4",children:e.jsxs(B,{size:"lg",onClick:()=>o(!0),className:"text-lg px-8",children:[e.jsx(Me,{className:"mr-2 h-5 w-5"}),"Download Full Report"]})})]})})}),c&&!i&&e.jsx(Qs,{useCases:s.useCases,industry:s.industry,maturityLevel:String(s.maturityLevel),riskProfile:s.riskProfile,resultsData:{totalBenefit:n.year1Benefits,totalCost:n.year1Costs,netBenefit:n.year1NetBenefit,roi:n.roi,paybackMonths:n.paybackMonths,npv3Year:n.npv3Year},onSuccess:()=>{l(!0),o(!1)}}),!i&&e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"pointer-events-none select-none blur-sm opacity-40",children:[e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"What Drives Your ROI"})}),e.jsx(w,{children:e.jsx("div",{className:"h-32 bg-muted/50 rounded"})})]}),e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"Financial Breakdown"})}),e.jsx(w,{children:e.jsx("div",{className:"h-48 bg-muted/50 rounded"})})]}),e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"Key Insights"})}),e.jsx(w,{children:e.jsx("div",{className:"h-24 bg-muted/50 rounded"})})]}),e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"Resource Pool Analysis"})}),e.jsx(w,{children:e.jsx("div",{className:"h-40 bg-muted/50 rounded"})})]}),e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"Sensitivity Analysis"})}),e.jsx(w,{children:e.jsx("div",{className:"h-64 bg-muted/50 rounded"})})]}),e.jsxs(k,{className:"mb-6",children:[e.jsx(J,{children:e.jsx(Q,{children:"Benefits by Use Case"})}),e.jsx(w,{children:e.jsx("div",{className:"h-56 bg-muted/50 rounded"})})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Recommended Approach"})}),e.jsx(w,{children:e.jsx("div",{className:"h-32 bg-muted/50 rounded"})})]})]}),e.jsx("div",{className:"absolute inset-0 flex items-center justify-center pointer-events-none",children:e.jsxs("div",{className:"bg-background/95 backdrop-blur-sm border-2 border-primary rounded-lg p-8 text-center shadow-2xl max-w-md pointer-events-auto",children:[e.jsx(Y,{className:"h-16 w-16 text-primary mx-auto mb-4"}),e.jsx("h4",{className:"text-xl font-bold mb-2",children:"Complete Analysis Locked"}),e.jsx("p",{className:"text-muted-foreground mb-4",children:"Download the full report to unlock all sections"}),e.jsxs(B,{size:"lg",onClick:()=>o(!0),className:"w-full",children:[e.jsx(Me,{className:"mr-2 h-4 w-4"}),"Unlock Report"]})]})})]}),i&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsxs(B,{onClick:d,disabled:n.confidenceScore<60,size:"lg",children:[e.jsx(Me,{className:"mr-2 h-4 w-4"}),"Download Plan"]}),e.jsxs(B,{onClick:()=>{if(!n)return;const e=[["Use Case","Component","Annual Benefit","One-Time Cost","Recurring Cost"]];Object.entries(n.benefitsByUseCase).forEach(([s,t])=>{const a=As.find(e=>e.id===s),r=n.costsByUseCase[s];Object.entries(t).forEach(([t,n],i)=>{e.push([0===i?a?.name||s:"",t,n.toFixed(2),0===i?r.oneTime.toFixed(2):"",0===i?r.recurring.toFixed(2):""])})});const s=e.map(e=>e.map(e=>`"${e}"`).join(",")).join("\n"),t=new Blob([s],{type:"text/csv"}),a=URL.createObjectURL(t),r=document.createElement("a");r.href=a,r.download=`outcomes-breakdown-${(new Date).toISOString().split("T")[0]}.csv`,r.click(),URL.revokeObjectURL(a),ke.success("CSV exported successfully")},variant:"outline",size:"lg",children:[e.jsx(Te,{className:"mr-2 h-4 w-4"}),"Export CSV"]}),e.jsxs(B,{onClick:p,variant:"outline",size:"lg",children:[e.jsx(L,{className:"mr-2 h-4 w-4"}),"Audit JSON"]}),e.jsxs(B,{onClick:m,variant:"outline",size:"lg",children:[e.jsx(Re,{className:"mr-2 h-4 w-4"}),"Email Results"]})]}),n.platformCostSavings>0&&e.jsxs(k,{className:"print-section border-green-500/30 bg-green-500/5",children:[e.jsxs(J,{children:[e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(Ce,{className:"h-5 w-5 text-green-600"}),"Platform Economics Advantage"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Shared platform costs deliver ",qs(n.platformCostSavings/n.year1Costs*100)," savings"]})]}),e.jsxs(w,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 bg-green-500/10 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Platform Cost Savings"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Amortized across ",s.useCases.length," use cases"]})]}),e.jsx(P,{className:"text-lg px-4 py-1 bg-green-600 text-white",children:Ys(n.platformCostSavings)})]}),e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsx("p",{className:"font-medium",children:"Why This Matters:"}),e.jsxs("ul",{className:"space-y-1 ml-4 text-muted-foreground",children:[e.jsx("li",{children:"• Infrastructure, ML platforms, and tooling costs are shared"}),e.jsxs("li",{children:["• Each additional use case improves unit economics by ~",qs(1/s.useCases.length*100)]}),e.jsxs("li",{children:["• Reduces effective cost per use case from $",Vs((n.year1Costs+n.platformCostSavings)/s.useCases.length)," to $",Vs(n.year1Costs/s.useCases.length)]})]})]})]})]}),s.useCases.length>1&&n.synergyUplift>0&&e.jsxs(k,{className:"print-section border-blue-500/30 bg-blue-500/5",children:[e.jsxs(J,{children:[e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(Oe,{className:"h-5 w-5 text-blue-600"}),"Use Case Synergies"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Combined benefits exceed sum of individual use cases by ",Ys(n.synergyUplift)]})]}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center justify-between p-3 bg-blue-500/10 rounded-lg",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Positive Synergy Uplift"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"From shared data, processes & skills"})]}),e.jsxs(P,{className:"text-lg px-4 py-1 bg-blue-600 text-white",children:["+",qs(n.synergyUplift/n.year1Benefits*100)]})]}),e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-xs border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"p-2 text-left font-medium",children:"Use Case Pair"}),e.jsx("th",{className:"p-2 text-center font-medium",children:"Overlap Type"}),e.jsx("th",{className:"p-2 text-right font-medium",children:"Benefit"})]})}),e.jsx("tbody",{children:(()=>{const t=s.useCases.map(e=>As.find(s=>s.id===e)).filter(Boolean),a=[];for(let e=0;e<t.length;e++)for(let s=e+1;s<t.length;s++){const n=t[e],r=t[s],i=Object.keys(n.pools),l=Object.keys(r.pools),c=i.filter(e=>l.includes(e));c.length>0&&a.push({pair:`${n.name} + ${r.name}`,type:`Shared ${c[0]} resources`,benefit:"High"}),n.category===r.category&&a.push({pair:`${n.name} + ${r.name}`,type:"Common data pipelines",benefit:"Medium"})}return a.slice(0,5).map((s,t)=>e.jsxs("tr",{className:"border-b hover:bg-muted/30",children:[e.jsx("td",{className:"p-2 text-muted-foreground",children:s.pair}),e.jsx("td",{className:"p-2 text-center",children:e.jsx(P,{variant:"outline",className:"text-xs",children:s.type})}),e.jsx("td",{className:"p-2 text-right",children:e.jsx(P,{variant:"High"===s.benefit?"default":"secondary",className:"text-xs",children:s.benefit})})]},t))})()})]})}),e.jsx("div",{className:"mt-3 p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(Ae,{className:"h-4 w-4 text-blue-600 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-xs text-blue-900 dark:text-blue-100",children:[e.jsx("p",{className:"font-medium mb-1",children:"Synergy Calculation"}),e.jsxs("p",{children:["When use cases share resource pools or data pipelines, we apply a ",qs(n.synergyUplift/n.year1Benefits*100)," uplift to account for compound benefits like shared infrastructure, cross-functional skills, and reusable models."]})]})]})})]})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"What Drives Your ROI"})}),e.jsx(w,{className:"space-y-4",children:(()=>{const s=n.year1Benefits,t=n.roiDrivers.laborSavings/s*100,a=n.roiDrivers.infraSavings/s*100,r=n.roiDrivers.revenueSavings/s*100,i=n.roiDrivers.otherSavings/s*100;return e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-sm text-muted-foreground mb-4",children:"Breakdown of your total benefits by category"}),e.jsxs("div",{className:"space-y-3",children:[t>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsx("span",{children:"Labor Savings"}),e.jsxs("span",{className:"font-medium",children:[t.toFixed(0),"%"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-data-teal",style:{width:`${t}%`}})})]}),a>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsx("span",{children:"Infrastructure & License Savings"}),e.jsxs("span",{className:"font-medium",children:[a.toFixed(0),"%"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-data-orange",style:{width:`${a}%`}})})]}),r>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsx("span",{children:"Revenue & Growth Impact"}),e.jsxs("span",{className:"font-medium",children:[r.toFixed(0),"%"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-chart-2",style:{width:`${r}%`}})})]}),i>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"flex justify-between text-sm mb-1",children:[e.jsx("span",{children:"Other Savings"}),e.jsxs("span",{className:"font-medium",children:[i.toFixed(0),"%"]})]}),e.jsx("div",{className:"h-2 bg-muted rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full bg-muted-foreground",style:{width:`${i}%`}})})]})]})]})})()})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Financial Breakdown"})}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-medium",children:"Total Annual Benefits"}),e.jsx(P,{variant:"outline",className:"text-lg px-4 py-1 bg-green-500/10 text-green-700 border-green-500/30",children:Ys(n.year1Benefits)})]}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-medium",children:"Total Costs (Year 1)"}),e.jsx(P,{variant:"outline",className:"text-lg px-4 py-1 bg-red-500/10 text-red-700 border-red-500/30",children:Ys(n.year1Costs)})]}),e.jsx(se,{}),e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"font-bold text-lg",children:"Net Benefit"}),e.jsx(P,{className:"text-lg px-4 py-1 bg-data-teal text-white",children:Ys(n.year1NetBenefit)})]})]})]}),e.jsxs(k,{className:"print-section",children:[e.jsx(J,{children:e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Key Insights"]})}),e.jsxs(w,{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/50 rounded-lg",children:[e.jsx(Ce,{className:"h-5 w-5 text-data-teal mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:"Dominant Value Driver"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[Math.round(v.val),"% of benefits come from ",b]})]})]}),e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/50 rounded-lg",children:[e.jsx(T,{className:"h-5 w-5 text-data-orange mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:"Industry Benchmark"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Your ROI (",qs(n.roi),") is ",n.roi>h?"above":"below"," the ",s.industry," average of ",qs(h/100)]})]})]}),e.jsxs("div",{className:"flex items-start gap-3 p-3 bg-muted/50 rounded-lg",children:[e.jsx(Se,{className:"h-5 w-5 text-chart-2 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-sm",children:"Time to Value"}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:[n.paybackMonths<x?"Faster than":"Aligned with"," industry standard of ",x," months"]})]})]})]})]}),e.jsxs(k,{className:"print-section",children:[e.jsxs(J,{children:[e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(Oe,{className:"h-5 w-5"}),"Resource Pool Analysis"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Showing how savings are adjusted across shared resource pools"})]}),e.jsxs(w,{children:[e.jsx("div",{className:"space-y-4",children:Object.entries(n.poolAdjustments).map(([s,t])=>{const a=t.baseline||0,n=t.intended||0,r=t.adjusted||0,i=t.capped?.7*a:a;if(0===n)return null;const l=a>0?(n-r)/n*100:0;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:s}),e.jsxs(ae,{children:[e.jsx(ne,{children:e.jsx(Ae,{className:"h-4 w-4 text-muted-foreground"})}),e.jsx(ie,{className:"max-w-xs",children:e.jsxs("p",{className:"text-xs",children:["BackOffice"===s&&"Administrative and support staff time savings","Analyst"===s&&"Data analyst and business analyst time savings","Reviewer"===s&&"Quality review and approval time savings","DataEng"===s&&"Data engineering and pipeline savings","ML"===s&&"Machine learning infrastructure and compute"]})})]})]}),e.jsx(P,{variant:t.capped?"destructive":"outline",children:t.capped?"Capped":"No Cap"})]}),e.jsxs("div",{className:"grid grid-cols-4 gap-2 text-xs",children:[e.jsxs("div",{className:"text-center p-2 bg-muted/30 rounded",children:[e.jsx("p",{className:"text-muted-foreground",children:"Baseline"}),e.jsx("p",{className:"font-medium",children:Ys(a)})]}),e.jsxs("div",{className:"text-center p-2 bg-blue-500/10 rounded",children:[e.jsx("p",{className:"text-muted-foreground",children:"Intended"}),e.jsx("p",{className:"font-medium text-blue-700",children:Ys(n)})]}),e.jsxs("div",{className:"text-center p-2 bg-green-500/10 rounded",children:[e.jsx("p",{className:"text-muted-foreground",children:"Adjusted"}),e.jsx("p",{className:"font-medium text-green-700",children:Ys(r)})]}),e.jsxs("div",{className:"text-center p-2 bg-orange-500/10 rounded",children:[e.jsx("p",{className:"text-muted-foreground",children:"Reduction"}),e.jsx("p",{className:"font-medium text-orange-700",children:l>0?`-${l.toFixed(0)}%`:"0%"})]})]}),e.jsxs("div",{className:"relative h-2 bg-muted rounded-full overflow-hidden",children:[e.jsx("div",{className:"absolute h-full bg-blue-500/30",style:{width:`${Math.min(n/i*100,100)}%`}}),e.jsx("div",{className:"absolute h-full bg-green-600",style:{width:`${Math.min(r/i*100,100)}%`}})]})]},s)})}),e.jsx("div",{className:"mt-4 p-3 bg-amber-500/10 border border-amber-500/30 rounded-lg",children:e.jsxs("div",{className:"flex gap-2",children:[e.jsx(re,{className:"h-4 w-4 text-amber-600 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-xs text-amber-900 dark:text-amber-100",children:[e.jsx("p",{className:"font-medium mb-1",children:"Pool Adjustment Logic"}),e.jsx("p",{children:"Savings are adjusted to prevent over-allocation of shared resources. Diminishing returns and 70% caps ensure realistic projections."})]})]})})]})]}),e.jsx("div",{className:"print-section",children:e.jsx(Ws,{sensitivity:n.sensitivity})}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Benefits by Use Case"})}),e.jsx(w,{children:e.jsx(Fe,{type:"single",collapsible:!0,className:"w-full",children:s.useCases.map(s=>{const t=As.find(e=>e.id===s),a=n.benefitsByUseCase[s]||{},r=n.costsByUseCase[s]||{oneTime:0,recurring:0},i=Object.values(a).reduce((e,s)=>e+s,0),l=r.oneTime+r.recurring;return e.jsxs(Pe,{value:s,children:[e.jsx(Be,{children:e.jsxs("div",{className:"flex justify-between w-full pr-4",children:[e.jsx("span",{className:"font-medium",children:t?.name||s}),e.jsx("span",{className:"text-data-teal",children:Ys(i-l)})]})}),e.jsx(Ie,{children:e.jsxs("div",{className:"space-y-3 pt-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Benefit Components:"}),Object.entries(a).map(([s,t])=>e.jsxs("div",{className:"flex justify-between text-sm pl-4",children:[e.jsx("span",{className:"text-muted-foreground",children:s.replace(/_/g," ")}),e.jsx("span",{className:"font-medium text-green-700",children:Ys(t)})]},s)),e.jsxs("div",{className:"flex justify-between text-sm font-medium pt-1 border-t",children:[e.jsx("span",{children:"Total Benefits"}),e.jsx("span",{className:"text-green-700",children:Ys(i)})]})]}),e.jsx(se,{}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Costs:"}),e.jsxs("div",{className:"flex justify-between text-sm pl-4",children:[e.jsx("span",{className:"text-muted-foreground",children:"One-time"}),e.jsx("span",{className:"font-medium text-red-700",children:Ys(r.oneTime)})]}),e.jsxs("div",{className:"flex justify-between text-sm pl-4",children:[e.jsx("span",{className:"text-muted-foreground",children:"Recurring (annual)"}),e.jsx("span",{className:"font-medium text-red-700",children:Ys(r.recurring)})]}),e.jsxs("div",{className:"flex justify-between text-sm font-medium pt-1 border-t",children:[e.jsx("span",{children:"Total Costs"}),e.jsx("span",{className:"text-red-700",children:Ys(l)})]})]})]})})]},s)})})})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Methodology & Adjustments"})}),e.jsx(w,{children:e.jsxs(Fe,{type:"single",collapsible:!0,className:"w-full",children:[e.jsxs(Pe,{value:"assumptions",children:[e.jsx(Be,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{className:"h-4 w-4"}),e.jsx("span",{children:"Model Assumptions"})]})}),e.jsx(Ie,{children:e.jsxs("div",{className:"space-y-2 text-sm",children:[e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Maturity Level:"}),e.jsx("span",{className:"font-medium",children:n.assumptions.maturityLevel})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Risk Profile:"}),e.jsx("span",{className:"font-medium capitalize",children:n.assumptions.riskProfile})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Effect Multiplier:"}),e.jsxs("span",{className:"font-medium",children:[n.assumptions.effectMultiplier.toFixed(2),"×"]})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Adoption Multiplier (Year 1):"}),e.jsx("span",{className:"font-medium",children:qs(100*n.assumptions.adoptionMultiplier)})]}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Scenario Multiplier:"}),e.jsxs("span",{className:"font-medium",children:[n.assumptions.scenarioMultiplier.toFixed(2),"×"]})]}),n.assumptions.adoptionCurve&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Adoption Curve:"}),e.jsx("span",{className:"font-medium capitalize",children:n.assumptions.adoptionCurve})]}),n.assumptions.seasonality&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Seasonality Applied:"}),e.jsx("span",{className:"font-medium",children:"Yes (5% reduction)"})]}),n.assumptions.deploymentPosture&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Deployment:"}),e.jsx("span",{className:"font-medium capitalize",children:n.assumptions.deploymentPosture})]}),n.assumptions.overheadRate&&n.assumptions.overheadRate>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Labor Overhead:"}),e.jsx("span",{className:"font-medium",children:qs(100*n.assumptions.overheadRate)})]}),n.assumptions.taxRate&&n.assumptions.taxRate>0&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Tax Rate:"}),e.jsx("span",{className:"font-medium",children:qs(100*n.assumptions.taxRate)})]}),e.jsxs("div",{className:"flex justify-between border-t pt-2 mt-2",children:[e.jsx("span",{className:"text-muted-foreground font-medium",children:"Pool Capacity Cap:"}),e.jsx("span",{className:"font-medium",children:"80%"})]}),n.monteCarlo&&e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-muted-foreground",children:"Monte Carlo Seed:"}),e.jsx("span",{className:"font-mono text-xs",children:n.monteCarlo.seed})]})]})})]}),e.jsxs(Pe,{value:"pools",children:[e.jsx(Be,{children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{className:"h-4 w-4"}),e.jsx("span",{children:"Resource Pool Adjustments"})]})}),e.jsx(Ie,{children:e.jsxs("div",{className:"space-y-3 text-sm",children:[e.jsx("p",{className:"text-muted-foreground",children:"When multiple use cases target the same resource pool, we apply diminishing returns and caps to prevent over-counting:"}),Object.entries(n.poolAdjustments).map(([s,t])=>{if(0===t.intended)return null;const a=t.baseline>0?t.adjusted/t.baseline*100:0;return e.jsxs("div",{className:"border-l-2 border-data-teal pl-3 space-y-1",children:[e.jsx("p",{className:"font-medium",children:s.replace(/([A-Z])/g," $1").trim()}),e.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Baseline:"}),e.jsx("p",{className:"font-medium",children:Ys(t.baseline)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Intended:"}),e.jsx("p",{className:"font-medium",children:Ys(t.intended)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Adjusted:"}),e.jsx("p",{className:"font-medium text-data-teal",children:Ys(t.adjusted)})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"% of Pool:"}),e.jsxs("p",{className:"font-medium",children:[a.toFixed(1),"%"]})]})]}),t.capped&&e.jsxs("div",{className:"flex items-center gap-1 text-xs text-amber-600 mt-1",children:[e.jsx(re,{className:"h-3 w-3"}),e.jsx("span",{children:"Capped at 80% of baseline pool"})]})]},s)}),e.jsx(se,{className:"my-3"}),e.jsxs("div",{className:"flex justify-between text-xs",children:[e.jsx("span",{className:"text-muted-foreground",children:"Total before adjustments:"}),e.jsx("span",{className:"font-medium",children:Ys(n.totalBenefitsBeforeAdjustment)})]})]})})]})]})})]}),e.jsxs(k,{children:[e.jsx(J,{children:e.jsx(Q,{children:"Recommended Approach"})}),e.jsxs(w,{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsxs("h4",{className:"font-semibold mb-2 flex items-center gap-2",children:[e.jsx(P,{children:"Quick Win"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"60-90 days"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Focus on highest-value use case to reach ~80% of projected benefits rapidly"}),e.jsxs("ul",{className:"text-sm space-y-1 ml-4",children:[e.jsx("li",{className:"text-muted-foreground",children:"• Pilot with 1-2 use cases"}),e.jsx("li",{className:"text-muted-foreground",children:"• Proof of value in 8-12 weeks"}),e.jsxs("li",{className:"text-muted-foreground",children:["• ~",Ys(.8*n.year1NetBenefit)," estimated impact"]})]})]}),e.jsx(se,{}),e.jsxs("div",{children:[e.jsxs("h4",{className:"font-semibold mb-2 flex items-center gap-2",children:[e.jsx(P,{variant:"outline",children:"Comprehensive"}),e.jsx("span",{className:"text-sm text-muted-foreground",children:"2-3 quarters"})]}),e.jsx("p",{className:"text-sm text-muted-foreground mb-2",children:"Full program across all selected use cases with governance and scaling"}),e.jsxs("ul",{className:"text-sm space-y-1 ml-4",children:[e.jsxs("li",{className:"text-muted-foreground",children:["• All ",s.useCases.length," use cases"]}),e.jsx("li",{className:"text-muted-foreground",children:"• Enterprise governance & MLOps"}),e.jsxs("li",{className:"text-muted-foreground",children:["• ",Ys(n.year1NetBenefit)," full program value"]})]})]})]})]}),e.jsxs(k,{className:"print-page-break print-section",children:[e.jsxs(J,{children:[e.jsxs(Q,{className:"flex items-center gap-2",children:[e.jsx(Ee,{className:"h-5 w-5"}),"Industry Benchmarks & Priors"]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["How your projections compare to ",s.industry," industry standards"]})]}),e.jsxs(w,{children:[e.jsx("div",{className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"text-left p-2",children:"Metric"}),e.jsx("th",{className:"text-right p-2",children:"Your Plan"}),e.jsx("th",{className:"text-right p-2",children:"Industry Avg"}),e.jsx("th",{className:"text-right p-2",children:"Delta"}),e.jsx("th",{className:"text-left p-2",children:"Recommendation"})]})}),e.jsxs("tbody",{children:[e.jsxs("tr",{className:"border-b",children:[e.jsx("td",{className:"p-2 font-medium",children:"Year-1 ROI"}),e.jsx("td",{className:"text-right p-2",children:qs(n.roi)}),e.jsx("td",{className:"text-right p-2",children:qs(h/100)}),e.jsxs("td",{className:"text-right p-2 font-medium "+(n.roi>h/100?"text-green-600":"text-amber-600"),children:[n.roi>h/100?"+":"",qs(n.roi-h/100)]}),e.jsx("td",{className:"p-2 text-xs text-muted-foreground",children:n.roi>h/100?"Strong business case - proceed with confidence":"Consider focusing on high-impact use cases first"})]}),e.jsxs("tr",{className:"border-b",children:[e.jsx("td",{className:"p-2 font-medium",children:"Payback Period"}),e.jsxs("td",{className:"text-right p-2",children:[Vs(n.paybackMonths)," mo"]}),e.jsxs("td",{className:"text-right p-2",children:[x," mo"]}),e.jsxs("td",{className:"text-right p-2 font-medium "+(n.paybackMonths<x?"text-green-600":"text-amber-600"),children:[n.paybackMonths<x?"":"+",Vs(n.paybackMonths-x)," mo"]}),e.jsx("td",{className:"p-2 text-xs text-muted-foreground",children:n.paybackMonths<x?"Fast time-to-value - excellent for stakeholder buy-in":"Consider phased rollout to show quick wins"})]}),e.jsxs("tr",{className:"border-b",children:[e.jsx("td",{className:"p-2 font-medium",children:"Confidence Score"}),e.jsxs("td",{className:"text-right p-2",children:[n.confidenceScore,"%"]}),e.jsx("td",{className:"text-right p-2",children:"75%"}),e.jsxs("td",{className:"text-right p-2 font-medium "+(n.confidenceScore>=75?"text-green-600":"text-amber-600"),children:[n.confidenceScore>=75?"+":"",n.confidenceScore-75,"%"]}),e.jsx("td",{className:"p-2 text-xs text-muted-foreground",children:n.confidenceScore>=75?"High confidence - inputs are well-defined":"Refine inputs for more accurate projections"})]}),e.jsxs("tr",{children:[e.jsx("td",{className:"p-2 font-medium",children:"Maturity Advantage"}),e.jsxs("td",{className:"text-right p-2",children:["Level ",s.maturityLevel]}),e.jsxs("td",{className:"text-right p-2",children:["+",qs(f)]}),e.jsx("td",{className:"text-right p-2 font-medium text-blue-600",children:s.maturityLevel>=3?"Applied":"Available"}),e.jsx("td",{className:"p-2 text-xs text-muted-foreground",children:s.maturityLevel>=3?"Mature orgs see faster adoption and higher ROI":"Building maturity unlocks additional value"})]})]})]})}),e.jsxs("div",{className:"mt-4 grid grid-cols-1 md:grid-cols-2 gap-3",children:[e.jsx("div",{className:"p-3 bg-blue-500/10 border border-blue-500/30 rounded-lg",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ae,{className:"h-4 w-4 text-blue-600 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-medium text-blue-900 dark:text-blue-100 mb-1",children:"Quick Win Strategy"}),e.jsx("p",{className:"text-blue-800 dark:text-blue-200",children:"Start with 1-2 high-ROI use cases. Build momentum, then expand to comprehensive portfolio."})]})]})}),e.jsx("div",{className:"p-3 bg-green-500/10 border border-green-500/30 rounded-lg",children:e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(Ce,{className:"h-4 w-4 text-green-600 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"text-xs",children:[e.jsx("p",{className:"font-medium text-green-900 dark:text-green-100 mb-1",children:"Scale Advantage"}),e.jsx("p",{className:"text-green-800 dark:text-green-200",children:"Platform costs amortize across use cases. Each additional use case improves unit economics."})]})]})})]})]})]}),e.jsxs("div",{className:"flex flex-wrap gap-4 no-print",children:[e.jsxs(B,{onClick:d,variant:"outline",disabled:n.confidenceScore<60,title:n.confidenceScore<60?"Complete more inputs to increase confidence score":"",children:[e.jsx(Me,{className:"mr-2 h-4 w-4"}),"Download Plan",n.confidenceScore<60&&e.jsx("span",{className:"ml-2 text-xs",children:"(60% min)"})]}),e.jsxs(B,{onClick:p,variant:"outline",children:[e.jsx(De,{className:"mr-2 h-4 w-4"}),"Export Audit JSON"]}),e.jsxs(B,{onClick:m,variant:"outline",children:[e.jsx(Re,{className:"mr-2 h-4 w-4"}),"Email This"]}),e.jsxs(B,{onClick:u,className:"bg-gradient-to-r from-data-orange to-data-teal",children:[e.jsx(Se,{className:"mr-2 h-4 w-4"}),"Book 30-min Consult"]})]}),n.confidenceScore<60&&e.jsx(k,{className:"border-amber-500/50 bg-amber-50/50 dark:bg-amber-950/20",children:e.jsx(w,{className:"pt-6",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(re,{className:"h-5 w-5 text-amber-600 mt-0.5"}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium text-amber-900 dark:text-amber-100",children:"Low Confidence Score"}),e.jsxs("p",{className:"text-sm text-amber-700 dark:text-amber-300 mt-1",children:["Please fill in more required fields to increase confidence and unlock the full plan download. Current score: ",n.confidenceScore,"% (minimum 60% required)"]})]})]})})})]}),e.jsx(se,{}),e.jsxs("div",{className:"flex gap-4 no-print",children:[e.jsx(B,{variant:"outline",onClick:t,children:"Back"}),e.jsx(B,{variant:"ghost",onClick:a,children:"Start Over"})]}),e.jsxs("div",{className:"print-section mt-8 pt-4 border-t text-xs text-muted-foreground space-y-1",children:[e.jsxs("p",{children:["Generated by Allerin Outcome Discovery Engine v",n.version," • ",(new Date).toLocaleDateString()]}),e.jsx("p",{children:"Methodology: Pool-based resource analysis with diminishing returns, synergy calculations, and sensitivity analysis."}),e.jsxs("p",{children:["Pool capacity cap: 80% (conservative limit reflecting practical constraints)",n.monteCarlo?` • Monte Carlo seed: ${n.monteCarlo.seed} (reproducible)`:""]})]})]})})},Xs=()=>{const[s,t]=N(),[a,n]=_.useState(1),[r,i]=_.useState({industry:s.get("industry")||void 0,useCases:s.get("usecases")?.split(",").filter(Boolean)||[],maturityLevel:parseInt(s.get("maturity")||"3"),riskProfile:s.get("risk")||"expected",inputs:{}});_.useEffect(()=>{},[]),_.useEffect(()=>{const e=new URLSearchParams;r.industry&&e.set("industry",r.industry),r.useCases.length&&e.set("usecases",r.useCases.join(",")),3!==r.maturityLevel&&e.set("maturity",r.maturityLevel.toString()),"expected"!==r.riskProfile&&e.set("risk",r.riskProfile);e.toString()!==s.toString()&&t(e,{replace:!0})},[r]);const l=e=>{i(s=>{const t={...s,...e};return e.industry&&e.industry!==s.industry&&Ye(e.industry),e.useCases&&e.useCases.length>0&&JSON.stringify(e.useCases)!==JSON.stringify(s.useCases)&&qe(e.useCases),t})},c=()=>{n(e=>Math.min(4,e+1)),window.scrollTo({top:0,behavior:"smooth"})},o=()=>{n(e=>Math.max(1,e-1)),window.scrollTo({top:0,behavior:"smooth"})},d=a/4*100;return e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsxs(Le,{children:[e.jsx("title",{children:"Outcome Discovery Engine - Intelligent ROI Planning | Allerin"}),e.jsx("meta",{name:"description",content:"Multi-use-case ROI planning with maturity assessment, benchmarked projections, and strategic recommendations for your AI transformation."}),e.jsx("link",{rel:"canonical",href:"https://allerin.com/outcomes"}),e.jsx("meta",{property:"og:title",content:"Outcome Discovery Engine - Strategic ROI Planning"}),e.jsx("meta",{property:"og:description",content:"Multi-use-case ROI planning with maturity assessment and strategic recommendations."}),e.jsx("meta",{property:"og:url",content:"https://allerin.com/outcomes"}),e.jsx("meta",{name:"twitter:card",content:"summary_large_image"})]}),e.jsx(He,{}),e.jsxs("main",{className:"container mx-auto px-6 py-12",children:[e.jsxs("div",{className:"max-w-4xl mx-auto mb-12",children:[e.jsxs("div",{className:"mb-6",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold mb-2",children:"Outcome Discovery Engine"}),e.jsx("p",{className:"text-muted-foreground",children:"Strategic ROI planning with multi-use-case analysis and benchmarked projections"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between text-sm font-medium",children:[e.jsx("span",{className:a>=1?"text-data-teal":"text-muted-foreground",children:"1. Industry"}),e.jsx("span",{className:a>=2?"text-data-teal":"text-muted-foreground",children:"2. Use Cases"}),e.jsx("span",{className:a>=3?"text-data-teal":"text-muted-foreground",children:"3. Current State"}),e.jsx("span",{className:a>=4?"text-data-teal":"text-muted-foreground",children:"4. Results"})]}),e.jsx(es,{value:d,className:"h-2"}),e.jsxs("p",{className:"text-xs text-muted-foreground text-right",role:"status","aria-live":"polite",children:["Step ",a," of 4"]})]})]}),e.jsxs("div",{className:"max-w-4xl mx-auto",children:[1===a&&e.jsx(ts,{selected:r.industry,onSelect:e=>{l({industry:e}),c()}}),2===a&&e.jsx(ns,{industry:r.industry,selected:r.useCases,onUpdate:e=>l({useCases:e}),onNext:c,onBack:o}),3===a&&e.jsx(Bs,{industry:r.industry,useCases:r.useCases,maturityLevel:r.maturityLevel,riskProfile:r.riskProfile,inputs:r.inputs,onUpdate:l,onNext:c,onBack:o}),4===a&&e.jsx(Ks,{data:r,onBack:o,onRestart:()=>{n(1),i({industry:void 0,useCases:[],maturityLevel:3,riskProfile:"expected",inputs:{}})}})]})]}),e.jsx(ze,{})]})};export{Xs as default};