1import{j as e}from"./index-iAVlVxvB.js";import{A as x,P as h,L as m,E as p,a as l,S as n,C as u,b as f}from"./primitives-B-PYiOq8.js";import{C as g}from"./CandidatePicker-D8_1LnRX.js";import{S as o,H as j,T as b}from"./charts-BwJyLGxm.js";import{u as y}from"./usePhaseZero-DYXhC0Em.js";import"./Sidebar-BstMbomz.js";function v(){const t=y(),s=t.detail?t.detail.simulation.next_best_diligence_actions?.length?t.detail.simulation.next_best_diligence_actions.map(i=>({action:i.action,assumption:i.assumption,impact:i.expected_impact??"medium",effort:i.effort,couldChange:i.could_change_recommendation??"maybe"})):N(t.detail.simulation.tornado):[];return e.jsxs(x,{title:"Decision Stress Test",loading:t.candidatesLoading||t.detailLoading,children:[e.jsx(h,{eyebrow:"Decision Stress Test",title:"Decision Stress Test",subtitle:"This is not an approval prediction. It is a stress test of the diligence thesis under uncertainty."}),e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-3 gap-4 mb-6",children:[e.jsx(d,{label:"What You Are Looking At",text:"Downside, base, and upside diligence-priority outcomes from the existing Monte Carlo stress test."}),e.jsx(d,{label:"Why It Matters",text:"The goal is to identify which assumptions could change the diligence recommendation."}),e.jsx(d,{label:"What To Do Next",text:"Use sensitivity drivers to choose the next evidence check with the highest value of information."})]}),t.candidatesLoading&&e.jsx(m,{label:"Loading candidates"}),t.candidatesError&&!t.candidatesLoading&&e.jsx(p,{}),t.candidates&&e.jsxs(e.Fragment,{children:[e.jsx(g,{candidates:t.candidates,selectedId:t.selectedId,onSelect:t.setSelectedId}),t.detailLoading&&e.jsx(m,{label:"Running Monte Carlo"}),t.detailError&&!t.detailLoading&&e.jsx(p,{}),t.detail&&e.jsxs("div",{className:"mt-6 grid grid-cols-1 lg:grid-cols-2 gap-5",children:[e.jsxs(l,{children:[e.jsxs(n,{children:["Downside / Base / Upside · ",t.detail.simulation.n.toLocaleString()," runs"]}),e.jsxs("div",{className:"mt-4 grid grid-cols-4 gap-2",children:[e.jsx(o,{label:"Downside",value:t.detail.simulation.p10}),e.jsx(o,{label:"Base",value:t.detail.simulation.p50,accent:!0}),e.jsx(o,{label:"Upside",value:t.detail.simulation.p90}),e.jsx(o,{label:"Clears Threshold",value:`${t.detail.simulation.p_threshold}%`})]}),e.jsxs("p",{className:"mt-4 text-[12.5px] leading-relaxed text-pz-soft font-light",children:[z(t.detail.name,t.detail.simulation.p_threshold,Object.keys(t.detail.simulation.tornado))," ","Uncertainty band: ",t.detail.simulation.uncertainty_band??Math.round((t.detail.simulation.p90-t.detail.simulation.p10)*10)/10," points."]}),e.jsx(j,{counts:t.detail.simulation.histogram.counts}),e.jsxs("div",{className:"mt-2 flex justify-between font-mono-pz text-[9px] text-pz-muted",children:[e.jsx("span",{children:t.detail.simulation.histogram.min}),e.jsx("span",{children:"uncertainty band around diligence priority"}),e.jsx("span",{children:t.detail.simulation.histogram.max})]}),e.jsxs("div",{className:"mt-5",children:[e.jsx(n,{children:"Top Sensitivity Drivers"}),e.jsx(b,{data:t.detail.simulation.tornado})]})]}),e.jsxs(l,{children:[e.jsx(n,{children:"Development-State Inference"}),e.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 font-mono-pz text-[11px] tracking-[0.14em] uppercase",children:[e.jsx("span",{className:"text-pz-text",children:t.detail.hmm.current_state}),e.jsx("span",{className:"text-pz-muted",children:"â"}),e.jsx("span",{className:"text-pz-accent",children:t.detail.hmm.next_state}),t.detail.hmm.regime_shift&&e.jsx(u,{label:"Regime Warning",color:"#D6B25A"})]}),e.jsx("p",{className:"mt-3 text-[12px] leading-relaxed text-pz-soft font-light",children:"State inference synthesizes evidence momentum, readiness, and risk signals to show where the opportunity appears to be moving next."}),e.jsx("div",{className:"mt-4 flex flex-col gap-2.5",children:Object.entries(t.detail.hmm.state_probs).map(([i,a])=>e.jsx(f,{label:i,value:a*100},i))}),e.jsx("p",{className:"mt-4 text-[12px] leading-relaxed text-pz-soft font-light",children:t.detail.hmm.explanation})]}),e.jsxs(l,{className:"lg:col-span-2",children:[e.jsx(n,{children:"Next Best Diligence Actions"}),e.jsx("p",{className:"mt-3 text-[12.5px] leading-relaxed text-pz-soft font-light max-w-3xl",children:"Value of information is ranked as sensitivity x uncertainty x decision relevance divided by effort. These are review prompts for the BD team, not automated decisions."}),e.jsx("div",{className:"mt-4 overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[760px] border-collapse text-[12px]",children:[e.jsx("thead",{children:e.jsx("tr",{children:["Action","Assumption Affected","Impact","Effort","Could Change Recommendation?"].map(i=>e.jsx("th",{className:"border-b pz-border py-2 pr-4 text-left font-mono-pz text-[9px] tracking-[0.16em] uppercase text-pz-muted font-normal",children:i},i))})}),e.jsx("tbody",{children:s.map(i=>e.jsxs("tr",{children:[e.jsx("td",{className:"border-b pz-border py-3 pr-4 text-pz-text",children:i.action}),e.jsx("td",{className:"border-b pz-border py-3 pr-4 text-pz-soft font-light",children:i.assumption}),e.jsx("td",{className:"border-b pz-border py-3 pr-4 text-pz-accent",children:i.impact}),e.jsx("td",{className:"border-b pz-border py-3 pr-4 text-pz-soft font-light",children:i.effort}),e.jsx("td",{className:"border-b pz-border py-3 pr-4 text-pz-soft font-light",children:i.couldChange})]},i.action))})]})})]})]})]})]})}function z(t,s,i){const a=i.slice(0,2).join(" and ")||"the top diligence assumptions";return s>=60?`${t} clears the diligence threshold in ${s}% of simulated scenarios. The result is most sensitive to ${a}, so the next diligence step should focus there.`:s>=35?`${t} sits near the diligence threshold, clearing in ${s}% of simulated scenarios. Movement in ${a} could change the recommendation.`:`${t} does not clear the diligence threshold under most current assumptions. The result is most sensitive to ${a}, so revisit only if those evidence gaps improve.`}function d({label:t,text:s}){return e.jsxs(l,{className:"p-5",children:[e.jsx(n,{children:t}),e.jsx("p",{className:"mt-3 text-[12.5px] leading-snug text-pz-soft font-light",children:s})]})}function N(t){const s=[{action:"Validate subgroup-specific target expression",assumption:"Biomarker and target-expression strength",effort:"medium",couldChange:"Yes, if expression is not enriched in the intended subgroup"},{action:"Benchmark toxicity and dose-modification risk against adjacent ADC labels",assumption:"Therapeutic index and tolerability",effort:"medium",couldChange:"Yes, if dose intensity limits clinical differentiation"},{action:"Stress-test comparator evolution and expected clinical delta",assumption:"Commercial alpha and clinical differentiation",effort:"low",couldChange:"Yes, if the comparator bar moves faster than expected"},{action:"Confirm biomarker cutoff / assay feasibility",assumption:"Patient selection and CDx readiness",effort:"high",couldChange:"Yes, if assay feasibility delays or narrows the opportunity"},{action:"Monitor competitor trial starts and endpoint strategy",assumption:"Crowding, timing, and endpoint differentiation",effort:"low",couldChange:"Potentially, if consensus attention compresses the window"}],i=Object.entries(t).sort((a,r)=>r[1]-a[1]);return s.map((a,r)=>
1{const c=i[r]?.[1]??0;return{...a,impact:c>=8?"high":c>=4?"medium":"low"}})}const L=v;export{L as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.