1import{E as Ne,r as N,j as e,P as we,L as q,A as se,Z as ke,H as G,B as U,m as L,f as X,l as H,w as z,_ as Ae,a6 as ae,T as te,Q as Z,F as Ce,ag as Fe,e as Re,h as Ie,k as Pe,X as Se,o as Te}from"./index-D-ZsJRgs.js";import{S as De}from"./SchemaMarkup-BVidwOc7.js";import{F as Me}from"./folder-open-C7g1XDP_.js";import{S as Ee}from"./save-YC7JH2gY.js";import{P as re}from"./printer-9aX7hfdz.js";import{M as ne}from"./map-pin-BCQB5s4h.js";import{S as Be}from"./shield-check-DVQKsOGR.js";const le=[{step:1,title:"Enter Property A Details",icon:G,color:"#b45309",bg:"bg-amber-50",border:"border-amber-200",iconBg:"bg-amber-100",desc:"Fill in the Multi-Unit Residential details: purchase price, number of units, average monthly rent per unit, vacancy rate, and all annual expenses (operating costs, taxes, insurance, maintenance, management fee).",tip:"Not sure about vacancy? Use 5â8% for strong residential markets. Management fee is typically 8â10% of collected rent.",visual:e.jsx("div",{className:"space-y-2",children:[{label:"Purchase Price",val:"$1,200,000",color:"text-amber-700"},{label:"Units",val:"8 units",color:"text-amber-700"},{label:"Avg Rent/Unit",val:"$1,400/mo",color:"text-amber-700"},{label:"Vacancy Rate",val:"7%",color:"text-dark-500"},{label:"Down Payment",val:"25%",color:"text-dark-500"}].map(t=>e.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg px-3 py-1.5 border border-amber-100",children:[e.jsx("span",{className:"text-xs text-dark-500",children:t.label}),e.jsx("span",{className:`text-xs font-bold ${t.color}`,children:t.val})]},t.label))})},{step:2,title:"Enter Property B Details",icon:U,color:"#0369a1",bg:"bg-info-50",border:"border-info-200",iconBg:"bg-info-100",desc:"Fill in the Commercial Building details: purchase price, total rentable square footage, monthly rent per square foot, vacancy rate, and all expenses (operating costs, taxes, insurance, CAM/NNN charges).",tip:"Commercial vacancy is typically higher â budget 10â15%. CAM charges cover common area maintenance and are often passed to tenants in NNN leases.",visual:e.jsx("div",{className:"space-y-2",children:[{label:"Purchase Price",val:"$1,500,000",color:"text-info-700"},{label:"Rentable Sq Ft",val:"8,000 sqft",color:"text-info-700"},{label:"Rent/Sqft",val:"$18/mo",color:"text-info-700"},{label:"Vacancy Rate",val:"10%",color:"text-dark-500"},{label:"CAM Charges",val:"$15,000/yr",color:"text-dark-500"}].map(t=>e.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg px-3 py-1.5 border border-info-100",children:[e.jsx("span",{className:"text-xs text-dark-500",children:t.label}),e.jsx("span",{className:`text-xs font-bold ${t.color}`,children:t.val})]},t.label))})},{step:3,title:"Set Market Context",icon:L,color:"#047857",bg:"bg-emerald-50",border:"border-emerald-200",iconBg:"bg-emerald-100",desc:"Enter your city or market name, select the current market trend, your primary investment goal, how long you plan to hold, and your personal risk tolerance. This shapes the AI's recommendation.",tip:'City matters â the AI uses this to factor in local market dynamics. Be specific: "Atlanta, GA" gives better results than just "Atlanta".',visual:e.jsx("div",{className:"space-y-2",children:[{label:"City / Market",val:"Atlanta, GA",color:"text-emerald-700"},{label:"Market Trend",val:"Hot",color:"text-emerald-700"},{label:"Goal",val:"Cash Flow",color:"text-emerald-700"},{label:"Horizon",val:"3â7 yrs",color:"text-dark-500"},{label:"Risk Tolerance",val:"Moderate",color:"text-dark-500"}].map(t=>e.jsxs("div",{className:"flex items-center justify-between bg-white rounded-lg px-3 py-1.5 border border-emerald-100",children:[e.jsx("span",{className:"text-xs text-dark-500",children:t.label}),e.jsx("span",{className:`text-xs font-bold ${t.color}`,children:t.val})]},t.label))})},{step:4,title:"Review Live Metrics",icon:X,color:"#7c3aed",bg:"bg-info-50",border:"border-info-200",iconBg:"bg-info-100",desc:"As you type, the Live Metrics Dashboard auto-calculates 11 financial metrics for both properties: NOI, Cap Rate, Cash-on-Cash Return, DSCR, Break-Even Occupancy, and more. Green = winner on that metric.",tip:"Use the What-If rent growth slider to model conservative vs aggressive scenarios. Drag it to 1% for a stress test or 5% for a growth market projection â no API call needed.",visual:e.jsx("div",{className:"space-y-1.5",children:[{label:"NOI",a:"$48,200",b:"$52,800",winA:!1},{label:"Cap Rate",a:"4.02%",b:"3.52%",winA:!0},{label:"Cash-on-Cash",a:"6.8%",b:"5.1%",winA:!0},{label:"DSCR",a:"1.18x",b:"1.09x",winA:!0},{label:"Break-Even",a:"78%",b:"84%",winA:!0}].map(t=>e.jsxs("div",{className:"grid grid-cols-3 gap-1 items-center",children:[e.jsx("span",{className:"text-[10px] text-dark-500",children:t.label}),e.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded text-center ${t.winA?"bg-green-100 text-green-700":"bg-red-50 text-red-400"}`,children:t.a}),e.jsx("span",{className:`text-[10px] font-bold px-1.5 py-0.5 rounded text-center ${t.winA?"bg-red-50 text-red-400":"bg-green-100 text-green-700"}`,children:t.b})]},t.label))})},{step:5,title:"Generate AI Report",icon:H,color:"#dc2626",bg:"bg-rose-50",border:"border-rose-200",iconBg:"bg-rose-100",desc:`Click "Generate Investment Report" and the AI analyzes both properties across 9 decision factors. You'll get a Buy/Pass/Hold verdict, SWOT analysis, radar chart, score cards, 3 & 5-year forecasts, and a prioritized action checklist.`,tip:"The report takes about 15â20 seconds. Use the Save Report button after it loads to store it in your browser â you can reload it anytime without calling the AI again.",visual:e.jsx("div",{className:"space-y-2",children:[{label:"Verdict Banner",icon:"ð¢",desc:"Color-coded Buy/Pass/Hold"},{label:"SWOT Cards",icon:"ð",desc:"Strengths, Weaknesses, Opportunities, Risks"},{label:"Radar Chart",icon:"ð¯",desc:"6-axis visual comparison"}
1,{label:"Score Cards",icon:"â",desc:"Risk, Cash Flow, Appreciation"},{label:"Action Items",icon:"â
",desc:"Prioritized next steps"}].map(t=>e.jsxs("div",{className:"flex items-center gap-2 bg-white rounded-lg px-2.5 py-1.5 border border-rose-100",children:[e.jsx("span",{className:"text-sm",children:t.icon}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-bold text-dark-700",children:t.label}),e.jsx("p",{className:"text-[10px] text-dark-400",children:t.desc})]})]},t.label))})}],oe={address:"",purchasePrice:"",units:"",avgRentPerUnit:"",vacancyRate:"7",operatingExpenses:"",propertyTax:"",insurance:"",maintenance:"",managementFee:"8",mortgageRate:"7.25",loanTerm:"30",downPayment:"25"},ie={address:"",purchasePrice:"",sqft:"",avgRentPerSqft:"",vacancyRate:"10",operatingExpenses:"",propertyTax:"",insurance:"",camCharges:"",mortgageRate:"7.5",loanTerm:"25",downPayment:"30"},ce={city:"",trend:"Stable",goal:"Both",horizon:"3â7 yrs",riskTolerance:"Moderate"},ze=[{label:"Suburban 8-Unit vs Strip Mall",a:{address:"1247 Maple Creek Dr, Atlanta, GA 30309",purchasePrice:"1200000",units:"8",avgRentPerUnit:"1400",vacancyRate:"7",operatingExpenses:"48000",propertyTax:"14000",insurance:"6500",maintenance:"12000",managementFee:"8",mortgageRate:"7.25",loanTerm:"30",downPayment:"25"},b:{address:"540 Peachtree Industrial Blvd, Atlanta, GA 30308",purchasePrice:"1500000",sqft:"8000",avgRentPerSqft:"18",vacancyRate:"10",operatingExpenses:"55000",propertyTax:"22000",insurance:"9000",camCharges:"15000",mortgageRate:"7.5",loanTerm:"25",downPayment:"30"},market:{city:"Atlanta, GA",trend:"Hot",goal:"Cash Flow",horizon:"3â7 yrs",riskTolerance:"Moderate"}},{label:"Urban 4-Plex vs Office Building",a:{address:"312 West 5th Street, Austin, TX 78701",purchasePrice:"750000",units:"4",avgRentPerUnit:"2200",vacancyRate:"5",operatingExpenses:"28000",propertyTax:"9000",insurance:"4200",maintenance:"8000",managementFee:"10",mortgageRate:"7.0",loanTerm:"30",downPayment:"20"},b:{address:"900 Congress Ave Suite 100, Austin, TX 78701",purchasePrice:"900000",sqft:"6000",avgRentPerSqft:"22",vacancyRate:"15",operatingExpenses:"38000",propertyTax:"14000",insurance:"6000",camCharges:"18000",mortgageRate:"7.75",loanTerm:"20",downPayment:"35"},market:{city:"Austin, TX",trend:"Cooling",goal:"Appreciation",horizon:"7â10 yrs",riskTolerance:"Conservative"}}],Y="ide_last_session";function pe(t,n,o){if(n===0||o===0)return 0;const x=n/100/12,r=o*12;return t*(x*Math.pow(1+x,r))/(Math.pow(1+x,r)-1)}function _e(t,n=3){const o=parseFloat(t.purchasePrice)||0,x=parseFloat(t.units)||0,r=parseFloat(t.avgRentPerUnit)||0,f=parseFloat(t.vacancyRate)/100,j=parseFloat(t.operatingExpenses)||0,l=parseFloat(t.propertyTax)||0,g=parseFloat(t.insurance)||0,i=parseFloat(t.maintenance)||0,m=parseFloat(t.managementFee)/100,d=parseFloat(t.mortgageRate),p=parseFloat(t.loanTerm),c=parseFloat(t.downPayment)/100,v=x*r*12,k=v*(1-f),R=k*m,M=j+l+g+i+R,A=k-M,w=o*c,I=o*(1-c),P=pe(I,d,p)*12,E=A-P,S=E/12,h=o>0?A/o*100:0,b=w>0?E/w*100:0,T=v>0?o/v:0,D=P>0?A/P:0,O=k>0?(M+P)/v*100:0,V=A*Math.pow(1+n/100,5);return{grossIncome:v,effectiveGrossIncome:k,noi:A,annualDebtService:P,monthlyCashFlow:S,annualCashFlow:E,capR
1ate:h,cashOnCash:b,grm:T,dscr:D,breakEven:O,noi5yr:V,downAmount:w}}function Oe(t,n=3){const o=parseFloat(t.purchasePrice)||0,x=parseFloat(t.sqft)||0,r=parseFloat(t.avgRentPerSqft)||0,f=parseFloat(t.vacancyRate)/100,j=parseFloat(t.operatingExpenses)||0,l=parseFloat(t.propertyTax)||0,g=parseFloat(t.insurance)||0,i=parseFloat(t.camCharges)||0,m=parseFloat(t.mortgageRate),d=parseFloat(t.loanTerm),p=parseFloat(t.downPayment)/100,c=x*r*12,v=c*(1-f),k=j+l+g+i,R=v-k,M=o*p,A=o*(1-p),I=pe(A,m,d)*12,_=R-I,P=_/12,E=o>0?R/o*100:0,S=M>0?_/M*100:0,h=c>0?o/c:0,b=I>0?R/I:0,T=v>0?(k+I)/c*100:0,D=R*Math.pow(1+n/100,5);return{grossIncome:c,effectiveGrossIncome:v,noi:R,annualDebtService:I,monthlyCashFlow:P,annualCashFlow:_,capRate:E,cashOnCash:S,grm:h,dscr:b,breakEven:T,noi5yr:D,downAmount:M}}function u({label:t,value:n,onChange:o,placeholder:x,suffix:r,type:f="number"}){return e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wide mb-1",style:{color:"#222222"},children:t}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:f,value:n,onChange:j=>o(j.target.value),placeholder:x,className:"w-full px-3 py-2.5 bg-white border border-dark-300 rounded-xl text-sm font-medium placeholder-[#888888] focus:outline-none focus:border-[#D4AF37] focus:ring-2 focus:ring-[#D4AF37]/20 transition-colors",style:{color:"#222222"}}),r&&e.jsx("span",{className:"absolute right-3 top-1/2 -trandark-y-1/2 text-xs font-semibold pointer-events-none",style:{color:"#666666"},children:r})]})]})}function W({label:t,value:n,onChange:o,options:x}){return e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wide mb-1",style:{color:"#222222"},children:t}),e.jsxs("div",{className:"relative",children:[e.jsx("select",{value:n,onChange:r=>o(r.target.value),className:"w-full px-3 py-2.5 bg-white border border-dark-300 rounded-xl text-sm font-medium focus:outline-none focus:border-[#D4AF37] focus:ring-2 focus:ring-[#D4AF37]/20 appearance-none transition-colors",style:{color:"#222222"},children:x.map(r=>e.jsx("option",{value:r,children:r},r))}),e.jsx(Te,{size:13,className:"absolute right-3 top-1/2 -trandark-y-1/2 pointer-events-none",style:{color:"#666666"}})]})]})}function F({label:t,a:n,b:o,higherBetter:x=!0,format:r="dollar"}){const f=x?n>o:n<o,j=x?o>n:o<n,l=Math.abs(n-o)<.01;function g(i){return isFinite(i)?r==="dollar"?`$${i.toLocaleString(void 0,{maximumFractionDigits:0})}`:r==="percent"?`${i.toFixed(2)}%`:r==="x"?`${i.toFixed(2)}x`:i.toLocaleString(void 0,{maximumFractionDigits:1}):"â"}return e.jsxs("div",{className:"grid grid-cols-[1fr_auto_auto] gap-2 items-center py-2.5 border-b border-dark-100 last:border-0",children:[e.jsx("span",{className:"text-xs font-medium",style:{color:"#333333"},children:t}),e.jsx("span",{className:`text-xs font-bold px-2.5 py-1 rounded-lg min-w-[92px] text-center transition-colors ${l?"bg-dark-100 text-dark-500":f?"bg-green-100 text-green-800 ring-1 ring-green-400/40":"bg-red-50 text-red-600"}`,children:g(n)}),e.jsx("span",{className:`text-xs font-bold px-2.5 py-1 rounded-lg min-w-[92px] text-center transition-colors ${l?"bg-dark-100 text-dark-500":j?"bg-green-100 text-green-800 ring-1 ring-green-400/40":"bg-red-50 text-red-600"}`,children:g(o)})]})}function de({score:t,color:n,delay:o=0}){const[x,r]=N.useState(0);return N.useEffect(()=>{const f=setTimeout(()=>r(t*10),o);return()=>clearTimeout(f)},[t,o]),e.jsx("div",{className:"h-2 bg-dark-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700 ease-out",style:{width:`${x}%`,backgroundColor:n}})})}function J({title:t,icon:n,iconColor:o,scores:x}){return e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(n,{size:14,style:{color:o}}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide",style:{color:"#222222"},children:t})]}),e.jsx("div",{className:"space-y-4",children:x.map((r,f)=>{const j=r.higherIsBetter?r.scoreA>=r.scoreB:r.scoreA<=r.scoreB,l=r.higherIsBetter?r.scoreB>r.scoreA:r.scoreB<r.scoreA;return e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex justify-between items-center",children:[e.jsx("span",{className:"text-[11px] font-medium",style:{color:"#555555"},children:r.label}),e.jsxs("div",{className:"flex gap-3 text-[11px] font-bold",children:[e.jsxs("span",{style:{color:j?"#D4AF37":"#aaaaaa"},children:["A: ",r.scoreA,"/10"]}),e.jsxs("span",{style:{color:l?"#0284c7":"#aaaaaa"},children:["B: ",r.scoreB,"/10"]})]})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx(de,{score:r.scoreA,color:"#D4AF37",delay:f*100}),e.jsx(de,{score:r.scoreB,color:"#0284c7",delay:f*100+50})]})]},f)})})]})}function $e({dataA:t,dataB:n,labels:o}){const l=o.map((m,d)=>Math.PI*2*d/o.length-Math.PI/2);function g(m,d){const p=m/10*95;return{x:130+p*Math.cos(l[d]),y:130+p*Math.sin(l[d])}}function i(m){return m.map((d,p)=>{const c=g(d,p);return`${c.x},${c.y}`}).join(" ")}return e.jsxs("svg",{width:260,height:260,viewBox:"0 0 260 260",className:"mx-auto",children:[[2,4,6,8,10].map(m=>e.jsx("polygon",{points:o.map((d,p)=>{const c=m/10*95;return`${130+c*Math.cos(l[p])},${130+c*Math.sin(l[p])}`}).join(" "),fill:"none",stroke:"#d1d5db",strokeWidth:"1"},m)),o.map((m,d)=>{const p=g(10,d);return e.jsx("line",{x1:130,y1:130,x2:p.x,y2:p.y,stroke:"#d1d5db",strokeWidth:"1"},d)}),e.jsx("polygon",{points:i(n),fill:"rgba(2,132,199,0.1)",stroke:"#0284c7",strokeWidth:"2.5",strokeLinejoin:"round"}),e.jsx("polygon",{points:i(t),fill:"rgba(212,175,55,0.15)",stroke:"#D4AF37",strokeWidth:"2.5",strokeLinejoin:"round"}),t.map((m,d)=>{const p=g(m,d);return e.jsx("circle",{cx:p.x,cy:p.y,r:"4",fill:"#D4AF37"},d)}),n.map((m,d)=>{const p=g(m,d);return e.jsx("circle",{cx:p.x,cy:p.y,r:"4",fill:"#0284c7"},d)}),o.map((m,d)=>{const c=130+115*Math.cos(l[d]),v=130+115*Math.sin(l[d]),k=c<125?"end":c>135?"start":"middle";return e.jsx("text",{x:c,y:v,textAnchor:k,dominantBaseline:"middle",fill:"#333333",fontSize:"10",fontWeight:"700",fontFamily:"Inter, sans-serif",children:m},d)})]})}function xe({analysis:t,color:n}){const o=n==="gold"?"text-amber-600":"text-info-600";return e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"bg-green-50 border border-green-200 rounded-xl p-3.5",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-green-600 mb-2",children:"Strengths"}),e.jsx("ul",{className:"space-y-1.5",children:t.strengths.map((x,r)=>e.jsxs("li",{className:"flex gap-2 text-xs text-green-800 leading-snug",children:[e.jsx(z,{size:10,
1className:"flex-shrink-0 mt-0.5 text-green-500"}),x]},r))})]}),e.jsxs("div",{className:"bg-red-50 border border-red-200 rounded-xl p-3.5",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-red-500 mb-2",children:"Weaknesses"}),e.jsx("ul",{className:"space-y-1.5",children:t.weaknesses.map((x,r)=>e.jsxs("li",{className:"flex gap-2 text-xs text-red-700 leading-snug",children:[e.jsx(Z,{size:10,className:"flex-shrink-0 mt-0.5 text-red-400"}),x]},r))})]}),e.jsxs("div",{className:"bg-dark-50 border border-dark-200 rounded-xl p-3.5",children:[e.jsx("p",{className:`text-[10px] font-bold uppercase tracking-widest mb-2 ${o}`,children:"Opportunities"}),e.jsx("ul",{className:"space-y-1.5",children:t.opportunities.map((x,r)=>e.jsxs("li",{className:"text-xs text-dark-700 leading-snug flex gap-2",children:[e.jsx("span",{className:`flex-shrink-0 mt-0.5 font-bold ${o}`,children:"+"}),x]},r))})]}),e.jsxs("div",{className:"bg-amber-50 border border-amber-200 rounded-xl p-3.5",children:[e.jsx("p",{className:"text-[10px] font-bold uppercase tracking-widest text-amber-600 mb-2",children:"Risks"}),e.jsx("ul",{className:"space-y-1.5",children:t.risks.map((x,r)=>e.jsxs("li",{className:"text-xs text-amber-800 leading-snug flex gap-2",children:[e.jsx("span",{className:"flex-shrink-0 mt-0.5 font-bold text-amber-500",children:"!"}),x]},r))})]})]})}function me({analysis:t,color:n}){const o=n==="gold"?"text-amber-600 border-amber-200":"text-info-600 border-info-200",x=n==="gold"?"bg-amber-50 border-amber-200":"bg-info-50 border-info-200";return e.jsxs("div",{className:`space-y-3 border rounded-xl p-4 ${x}`,children:[e.jsxs("div",{children:[e.jsx("p",{className:`text-[10px] font-bold uppercase tracking-widest mb-1.5 ${o.split(" ")[0]}`,children:"3-Year Forecast"}),e.jsx("p",{className:"text-xs text-dark-700 leading-relaxed",children:t.forecast_3yr})]}),e.jsxs("div",{className:`border-t pt-3 ${o.split(" ")[1]}`,children:[e.jsx("p",{className:`text-[10px] font-bold uppercase tracking-widest mb-1.5 ${o.split(" ")[0]}`,children:"5-Year Forecast"}),e.jsx("p",{className:"text-xs text-dark-700 leading-relaxed",children:t.forecast_5yr})]})]})}function Ge(){const[t,n]=N.useState(!1),[o,x]=N.useState(0),r=le[o];return e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:()=>n(!0),className:"no-print flex items-center gap-2 px-4 py-2 rounded-xl text-sm font-semibold text-dark-950 metallic-gold shadow-gold hover:brightness-105 transition-all",children:[e.jsx(Pe,{size:14})," How to Use This Tool"]}),t&&e.jsx("div",{className:"fixed inset-0 z-50 flex items-end sm:items-center justify-center p-4 bg-black/60 backdrop-blur-sm",onClick:()=>n(!1),children:e.jsxs("div",{className:"w-full max-w-xl bg-white rounded-2xl shadow-2xl overflow-hidden max-h-[85vh] flex flex-col",onClick:f=>f.stopPropagation(),children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-dark-100",children:[e.jsx("h3",{className:"font-bold text-dark-900",children:"How to Use the AI Decision Engine"}),e.jsx("button",{onClick:()=>n(!1),className:"text-dark-700 hover:text-dark-900",children:e.jsx(Se,{size:18})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto p-6",children:[e.jsx("div",{className:"flex gap-2 mb-4 flex-wrap",children:le.map((f,j)=>e.jsxs("button",{onClick:()=>x(j),className:`px-3 py-1.5 rounded-xl text-[11px] font-bold transition-all border ${o===j?"bg-dark-900 text-gold-400 border-gold-400/30":"bg-dark-50 text-dark-600 border-dark-200 hover:border-dark-300"}`,children:[j+1,". ",f.title]},j))}),e.jsxs("div",{children:[e.jsx("h4",{className:"font-bold text-dark-900 mb-2",children:r.title}),e.jsx("p",{className:"text-dark-600 text-sm leading-relaxed",children:r.desc}),r.tip&&e.jsxs("div",{className:"mt-3 bg-dark-50 rounded-xl p-3 text-xs text-dark-500 leading-relaxed",children:[e.jsx("p",{className:"font-semibold text-dark-700 mb-1",children:"Tip:"}),r.tip]})]},o)]})]})})]})}function Je(){const{user:t,profile:n,isPaid:o,isCore:x,isPro:r,isLifetime:f,loading:j}=Ne(),[l,g]=N.useState(oe),[i,m]=N.useState(ie),[d,p]=N.useState(ce),[c,v]=N.useState(null),[k,R]=N.useState(!1),[M,A]=N.useState(""),[w,I]=N.useState(3),[_,P]=N.useState(!1),E=N.useRef(null),S=o||x||r||f;N.useEffect(()=>{t?(console.group("[IDE] Membership Access Debug"),console.log("Email:",t.email),console.log("User ID:",t.id),console.log("Membership Role:",(n==null?void 0:n.membership_role)??"loading..."),console.log("Subscription Status:",(n==null?void 0:n.subscription_status)??"loading..."),console.log("Stripe Customer ID:",(n==null?void 0:n.stripe_customer_id)??"none"),console.log("Stripe Subscription ID:",(n==null?void 0:n.stripe_subscription_id)??"none"),console.log("isPaid:",o,"| isCore:",x,"| isPro:",r,"| isLifetime:",f),console.log("Access Granted:",S),console.groupEnd()):console.log("[IDE] No user signed in â free access only")},[t,n,o,x,r,f,S]),N.useEffect(()=>{try{localStorage.getItem(Y)&&P(!0)}catch{}},[]);const h=_e(l,w),b=Oe(i,w),T=!!(l.purchasePrice&&l.units&&l.avgRentPerUnit),D=!!(i.purchasePrice&&i.sqft&&i.avgRentPerSqft),O=T&&D&&!!d.city;function V(s){g(s.a),m(s.b),p(s.market),v(null),A("")}function he(){g(oe),m(ie),p(ce),v(null),A(""),I(3)}function be(){if(c)try{localStorage.setItem(Y,JSON.stringify({propA:l,propB:i,market:d,report:c,savedAt:new Date().toLocaleStr
1ing()})),P(!0)}catch{}}function ge(){try{const s=localStorage.getItem(Y);if(!s)return;const a=JSON.parse(s);g(a.propA),m(a.propB),p(a.market),v(a.report),A(""),setTimeout(()=>{var y;return(y=E.current)==null?void 0:y.scrollIntoView({behavior:"smooth",block:"start"})},100)}catch{}}const ue=N.useCallback(async()=>{if(O){R(!0),A(""),v(null);try{const s="https://ydjutzxekvfspuqcdlqh.supabase.co",a="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InlkanV0enhla3Zmc3B1cWNkbHFoIiwicm9sZSI6ImFub24iLCJpYXQiOjE3Nzk5MzQ1NDcsImV4cCI6MjA5NTUxMDU0N30.CazH14U8LIv0eDfOAGT3b4B-nEuHi45YV4Iro5dJ4E0",y=await fetch(`${s}/functions/v1/investment-decision-engine`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`,Apikey:a},body:JSON.stringify({propertyA:{purchasePrice:parseFloat(l.purchasePrice),units:parseFloat(l.units),avgRentPerUnit:parseFloat(l.avgRentPerUnit),vacancyRate:parseFloat(l.vacancyRate),operatingExpenses:parseFloat(l.operatingExpenses)||0,propertyTax:parseFloat(l.propertyTax)||0,insurance:parseFloat(l.insurance)||0,maintenance:parseFloat(l.maintenance)||0,managementFee:parseFloat(l.managementFee),mortgageRate:parseFloat(l.mortgageRate),loanTerm:parseFloat(l.loanTerm),downPayment:parseFloat(l.downPayment)},propertyB:{purchasePrice:parseFloat(i.purchasePrice),sqft:parseFloat(i.sqft),avgRentPerSqft:parseFloat(i.avgRentPerSqft),vacancyRate:parseFloat(i.vacancyRate),operatingExpenses:parseFloat(i.operatingExpenses)||0,propertyTax:parseFloat(i.propertyTax)||0,insurance:parseFloat(i.insurance)||0,camCharges:parseFloat(i.camCharges)||0,mortgageRate:parseFloat(i.mortgageRate),loanTerm:parseFloat(i.loanTerm),downPayment:parseFloat(i.downPayment)},market:d,metrics:{a:{grossIncome:h.grossIncome,effectiveGrossIncome:h.effectiveGrossIncome,noi:h.noi,annualDebtService:h.annualDebtService,monthlyCashFlow:h.monthlyCashFlow,annualCashFlow:h.annualCashFlow,capRate:h.capRate.toFixed(2),cashOnCash:h.cashOnCash.toFixed(2),grm:h.grm.toFixed(1),dscr:h.dscr.toFixed(2),breakEven:h.breakEven.toFixed(1),noi5yr:h.noi5yr.toFixed(0)},b:{grossIncome:b.grossIncome,effectiveGrossIncome:b.effectiveGrossIncome,noi:b.noi,annualDebtService:b.annualDebtService,monthlyCashFlow:b.monthlyCashFlow,annualCashFlow:b.annualCashFlow,capRate:b.capRate.toFixed(2),cashOnCash:b.cashOnCash.toFixed(2),grm:b.grm.toFixed(1),dscr:b.dscr.toFixed(2),breakEven:b.breakEven.toFixed(1),noi5yr:b.noi5yr.toFixed(0)}}})});if(!y.ok){const B=await y.json().catch(()=>({error:`HTTP ${y.status}`}));throw new Error(B.error||`Request failed: ${y.status}`)}const C=await y.json();v(C),setTimeout(()=>{var B;return(B=E.current)==null?void 0:B.scrollIntoView({behavior:"smooth",block:"start"})},150)}catch(s){A(s instanceof Error?s.message:String(s))}finally{R(!1)}}},[O,l,i,d,h,b]),$=c?c.recommended_property==="Neither"?{outer:"bg-red-50 border-red-300",inner:"bg-red-100 border-red-200",icon:e.jsx(Z,{size:28,className:"text-red-500"}),label:"Pass on Both Properties",labelColor:"text-red-600"}:c.recommended_property==="Multi-Unit Residential"?{outer:"bg-green-50 border-green-300",inner:"bg-green-100 border-green-200",icon:e.jsx(G,{size:28,className:"text-green-600"}),label:"Invest in Multi-Unit Residential",labelColor:"text-green-700"}:{outer:"bg-green-50 border-green-300",inner:"bg-green-100 border-green-200",icon:e.jsx(U,{size:28,className:"text-green-600"}),label:"Invest in Commercial Building",labelColor:"text-green-700"}:null,fe={High:"text-green-700 bg-green-100 border-green-300",Medium:"text-amber-700 bg-amber-100 border-amber-300",Low:"text-red-700 bg-red-100 border-red-300"},ye=s=>s==="Tie"?"bg-dark-100 text-dark-500 border border-dark-300":"bg-green-100 text-green-700 border border-green-300";function Q(s){const a=s.itemized_decision_factors.reduce((y,C)=>(y[C.factor]=C.winner,y),{});return[11-s.risk_score_a,s.cash_flow_score_a,s.appreciation_score_a,a["Management Complexity"]==="A"?8:a["Management Complexity"]==="Tie"?5:3,a["Market Conditions"]==="A"?8:a["Market Conditions"]==="Tie"?5:3,a["Financing Terms"]==="A"?8:a["Financing Terms"]==="Tie"?5:3]}function K(s){const a=s.itemized_decision_factors.reduce((y,C)=>(y[C.factor]=C.winner,y),{});return[11-s.risk_score_b,s.cash_flow_score_b,s.appreciation_score_b,a["Management Complexity"]==="B"?8:a["Management Complexity"]==="Tie"?5:3,a["Market Conditions"]==="B"?8:a["Market Conditions"]==="Tie"?5:3,a["Financing Terms"]==="B"?8:a["Financing Terms"]==="Tie"?5:3]}const ee=["Risk Safety","Cash Flow","Appreciation","Mgmt Ease","Market Fit","Financing"],je=h.noi*Math.pow(1+w/100,5),ve=b.noi*Math.pow(1+w/100,5);
1return e.jsxs("div",{className:"min-h-screen bg-dark-50",children:[e.jsx(we,{title:"AI Investment Decision Engine â Multi-Unit vs Commercial Comparison | REI Vault Pro",description:"Compare multi-unit residential vs commercial real estate side-by-side. Auto-calculate 11 key metrics, then get an AI-powered Buy/Pass/Hold verdict with SWOT analysis, radar chart, and 5-year forecasts.",canonical:"/investment-decision-engine",keywords:"AI Investment Decision Engine,real estate investment comparison,buy or pass verdict,cap rate calculator,DSCR calculator,cash on cash return,multi-unit vs commercial,property comparison tool,real estate AI underwriting,investment property analysis",jsonLd:{"@context":"https://schema.org","@graph":[{"@type":"SoftwareApplication",name:"AI Investment Decision Engine",applicationCategory:"BusinessApplication",operatingSystem:"Web",url:"https://www.REIVaultPro.com/investment-decision-engine",description:"Compare any two investment properties side-by-side. Auto-calculate 11 key metrics including Cap Rate, DSCR, Cash-on-Cash Return, and IRR, then get an AI Buy/Pass/Hold verdict with SWOT analysis and 5-year forecasts.",featureList:["11 Auto-Calculated Investment Metrics","AI Buy/Pass/Hold Verdict","SWOT Analysis","Radar Chart Comparison","3 & 5-Year Equity Forecasts","Multi-Property Type Support"],offers:{"@type":"Offer",category:"Pro & Lifetime Membership"},publisher:{"@type":"Organization",name:"REI Vault Pro",url:"https://www.REIVaultPro.com"}},{"@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:"Home",item:"https://www.REIVaultPro.com"},{"@type":"ListItem",position:2,name:"AI Tools",item:"https://www.REIVaultPro.com/ai-tools"},{"@type":"ListItem",position:3,name:"AI Investment Decision Engine",item:"https://www.REIVaultPro.com/investment-decision-engine"}]}]}}),e.jsx(De,{type:"SoftwareApplication",title:"AI Investment Decision Engine",description:"Compare Multi-Unit Residential vs Commercial real estate side-by-side. Auto-calculates 11 financial metrics and delivers an AI-powered Buy/Pass/Hold verdict with SWOT analysis, radar chart, and 5-year forecasts.",url:"/investment-decision-engine",keywords:"real estate investment decision engine, multi-unit vs commercial, buy or pass, cap rate calculator, DSCR, cash on cash return, NOI calculator, investment property comparison"}),e.jsx("style",{children:` 2 @media print { 3 .no-print { display: none !important; } 4 body { background: #fff !important; } 5 } 6 `}),e.jsxs("section",{className:"max-w-5xl mx-auto px-4 sm:px-6 pt-10 pb-4 print:hidden",children:[e.jsxs("div",{className:"text-center mb-10",children:[e.jsx("span",{className:"inline-block text-[11px] font-black uppercase tracking-widest px-3 py-1 rounded-full bg-amber-500/10 text-amber-400 border border-amber-500/25 mb-4",children:"AI-Powered Investment Comparison"}),e.jsx("h1",{className:"text-3xl sm:text-4xl font-black text-white mb-4 leading-tight",children:"Investment Decision Engine â AI Property Comparison & Buy/Pass/Hold Verdict"}),e.jsx("p",{className:"text-dark-300 text-base max-w-2xl mx-auto leading-relaxed",children:"Compare any two investment properties side by side. Auto-calculate 11 key metrics â Cap Rate, DSCR, Cash-on-Cash, GRM, IRR, Equity Multiple â then get an AI-powered Buy, Pass, or Hold verdict with SWOT analysis, radar chart, and 5-year forecasts."})]}),e.jsxs("div",{className:"mb-10",children:[e.jsx("h2",{className:"text-lg font-black text-white mb-6 text-center uppercase tracking-wider",children:"How It Works"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4",children:[{step:"01",title:"Compare Two Properties",body:"Enter details for Property A and Property B â purchase price, loan terms, gross rents, and expenses. Works for multi-unit residential, commercial, or any two investment options."},{step:"02",title:"Auto-Calculate 11 Metrics",body:"The engine instantly calculates Cap Rate, DSCR, Cash-on-Cash Return, GRM, Net Operating Income, Equity Multiple, IRR, and more for both properties simultaneously."},{step:"03",title:"Get the AI Verdict",body:"The AI scores both properties across 9 weighted factors and delivers a clear Buy / Pass / Hold verdict with a full SWOT analysis and radar chart comparison."},{step:"04",title:"Review 5-Year Forecasts",body:"See projected equity growth, cash flow accumulation, and exit value for each property at 3 and 5 years â so you can model the full hold period before committing."}].map(({step:s,title:a,body:y})=>e.jsxs("div",{className:"bg-dark-900 border border-dark-800 rounded-2xl p-5",children:[e.jsx("div",{className:"text-3xl font-black text-amber-400/30 mb-3 leading-none",children:s}),e.jsx("h3",{className:"text-sm font-black text-white mb-2",children:a}),e.jsx("p",{className:"text-xs text-dark-400 leading-relaxed",children:y})]},s))})]}),e.jsxs("div",{className:"bg-dark-900 border border-dark-800 rounded-2xl p-6 mb-10",children:[e.jsx("h2",{className:"text-base font-black text-white mb-5",children:"What Makes This Different"}),e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-5",children:[{label:"11 Auto-Calculated Metrics",desc:"Cap Rate, DSCR, Cash-on-Cash, GRM, NOI, Equity Multiple, IRR, and more â calculated instantly from your inputs, no spreadsheet needed."},{label:"AI Buy/Pass/Hold Verdict",desc:"A data-backed decision rather than a gut feeling. The AI weighs 9 factors including market position, cash flow, leverage risk, and exit viability."},{label:"SWOT Analysis",desc:"Strengths, weaknesses, opportunities, and threats for each property laid out clearly so you can identify what makes or breaks each deal."},{label:"Radar Chart Comparison",desc:"Visual side-by-side scoring across all 9 factors so you can see at a glance where each property wins and where it falls short."},{label:"3 & 5-Year Forecasts",desc:"Equity growth, cumulative cash flow, and projected exit value at 3 and 5 years for both properties â so you know the full story before you buy."},{label:"Multi-Property Type Support",desc:"Compare multi-unit residential against commercial, or evaluate any two investment options regardless of property type or financing structure."}].map(({label:s,desc:a})=>e.jsxs("div",{className:"flex gap-3",children:[e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-amber-400 flex-shrink-0 mt-1.5"}),e.jsxs("div",{children:[e.jsx("div",{className:"text-xs font-black text-white mb-1",children:s}),e.jsx("div",{className:"text-xs text-dark-400 leading-relaxed",children:a})]})]},s))})]}),e.jsxs("div",{className:"text-center mb-2",children:[e.jsx("p",{className:"text-sm text-dark-400 mb-3",children:"Enter your details below to run your analysis."}),e.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",className:"h-5 w-5 text-amber-400 mx-auto animate-bounce",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:e.jsx("polyline",{points:"6 9 12 15 18 9"})})]})]}),e.jsx("div",{className:"no-print bg-white border-b border-dark-200 px-4 sm:px-6 py-12",children:e.jsxs("div",{className:"max-w-6xl mx-auto",children:[e.jsxs("div",{className:"flex flex-col md:flex-row md:items-center md:justify-between gap-6",children:[e.jsxs("div",{children:[e.jsxs(q,{to:"/ai-tools",className:"inline-flex items-center gap-1.5 text-xs hover:text-[#D4AF37] transition-colors mb-4",style:{color:"#666666"},children:[e.jsx(se,{size:11,className:"rotate-180"})," Back to AI Tools"]}),e.jsxs("div",{className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-full bg-amber-50 border border-amber-200 mb-3",children:[e.jsx(ke,{size:11,className:"text-amber-600"}),e.jsx("span",{className:"text-amber-700 text-xs font-semibold tracking-wide",children:"AI-POWERED FORECASTING ENGINE"})]}),e.jsxs("p",{className:"font-display text-3xl sm:text-4xl font-bold mb-2 leading-tight",style:{color:"#222222"},children:["Investment ",e.jsx("span",{style:{color:"#D4AF37"},children:"Decision Engine"})]}),e.jsx("p",{className:"text-sm max-w-xl leading-relaxed font-medium",style:{color:"#333333"},children:"Compare Multi-Unit Residential vs Commercial buildings side-by-side. Auto-calculate 11 key metrics, then get a full AI forecasting report with radar chart, SWOT analysis, and a Buy / Pass / Hold verdict."})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row md:flex-col gap-3 flex-shrink-0",children:[e.jsx(Ge,{}),_&&e.jsxs("button",{onClick:ge,className:"inline-flex items-center gap-2 px-4 py-2 rounded-xl border border-info-200 bg-info-50 hover:bg-info-100 text-info-700 text-xs font-semibold transition-all shadow-sm",children:[e.jsx(Me,{size:13})," Load Last Saved Report"]})]})]}),e.jsx("div",{className:"mt-8 flex items-center gap-0 overflow-x-auto pb-1",children:[{n:1,label:"Property A",icon:G},{n:2,label:"Property B",icon:U},{n:3,label:"Market Context",icon:L},{n:4,label:"Review Metrics",icon:X},{n:5,label:"Generate Report",icon:H}].map((s,a,y)=>{const C=s.icon,B=s.n===1&&T||s.n===2&&D||s.n===3&&!!d.city||s.n===4&&(T||D)||s.n===5&&!!c;return e.jsxs("div",{className:"flex items-center flex-shrink-0",children:[e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-semibold transition-colors ",style:B?{background:"rgba(212,175,55,0.15)",color:"#222222"}:{background:"#f1f5f9",color:"#444444"},children:[e.jsx("div",{className:"w-5 h-5 rounded-full flex items-center justify-center flex-shrink-0 transition-colors",style:B?{background:"#D4AF37",color:"#000000"}:{background:"#cbd5e1",color:"#ffffff"},children:B?e.jsx(z,{size:10}):e.jsx(C,{size:10})}),e.jsx("span",{className:"hidden sm:inline whitespace-nowrap",children:s.label}),e.jsx("span",{className:"sm:hidden",children:s.n})]}),a<y.length-1&&e.jsx(Ae,{size:14,className:"mx-1 flex-shrink-0",style:{color:"#aaaaaa"}})]},s.n)})})]})}),e.jsxs("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 py-10 space-y-8",children:[e.jsxs("div",{className:"no-print flex flex-wrap gap-2 items-center",children:[e.jsx("p",{className:"text-xs font-bold uppercase tracking-wide flex-shrink-0",style:{color:"#555555"},children:"Try a sample:"}),ze.map((s,a)=>e.jsx("button",{onClick:()=>V(s),className:"text-xs px-4 py-2 rounded-xl border bg-white font-semibold transition-all shadow-sm hover:border-[#D4AF37] hover:bg-[#FEFCE8]",style:{borderColor:"#e2e8f0",color:"#333333"},children:s.label},a)),e.jsxs("button",{onClick:he,className:"text-xs px-3 py-2 rounded-xl border bg-white font-medium transition-all flex items-center gap-1.5 shadow-sm hover:border-dark-300",style:{borderColor:"#e2e8f0",color:"#888888"},children:[e.jsx(ae,{size:11})," Reset"]})]}),e.jsxs("div",{className:"no-print grid grid-cols-1 lg:grid-cols-2 gap-6",children:[e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"bg-gradient-to-r from-amber-50 to-white px-5 py-4 border-b border-dark-200 flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-amber-100 border border-amber-200 flex items-center justify-center flex-shrink-0",children:e.jsx(G,{size:15,className:"text-amber-600"})}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold bg-[#D4AF37] text-black px-2 py-0.5 rounded-full",children:"PROPERTY A"}),e.jsx("h2",{className:"text-sm font-bold mt-0.5",style:{color:"#222222"},children:"Multi-Unit Residential"})]}),T&&e.jsxs("span",{className:"ml-auto text-[10px] font-semibold text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full flex items-center gap-1",children:[e.jsx(z,{size:9})," Ready"]})]}),e.jsxs("div",{className:"p-5",children:[e.jsx("div",{className:"mb-3",children:e.jsx(u,{label:"Property Address (optional)",value:l.address,onChange:s=>g(a=>({...a,address:s})),placeholder:"123 Main St, Atlanta, GA 30301",type:"text"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{label:"Purchase Price ($)",value:l.purchasePrice,onChange:s=>g(a=>({...a,purchasePrice:s})),placeholder:"1,200,000"}),e.jsx(u,{label:"Number of Units",value:l.units,onChange:s=>g(a=>({...a,units:s})),placeholder:"8"}),e.jsx(u,{label:"Avg Rent / Unit ($)",value:l.avgRentPerUnit,onChange:s=>g(a=>({...a,avgRentPerUnit:s})),placeholder:"1,400",suffix:"/mo"}),e.jsx(u,{label:"Vacancy Rate",value:l.vacancyRate,onChange:s=>g(a=>({...a,vacancyRate:s})),placeholder:"7",suffix:"%"}),e.jsx(u,{label:"Oper. Expenses ($)",value:l.operatingExpenses,onChange:s=>g(a=>({...a,operatingExpenses:s})),placeholder:"48,000",suffix:"/yr"}),e.jsx(u,{label:"Property Tax ($)",value:l.propertyTax,onChange:s=>g(a=>({...a,propertyTax:s})),placeholder:"14,000",suffix:"/yr"}),e.jsx(u,{label:"Insurance ($)",value:l.insurance,onChange:s=>g(a=>({...a,insurance:s})),placeholder:"6,500",suffix:"/yr"}),e.jsx(u,{label:"Maintenance ($)",value:l.maintenance,onChange:s=>g(a=>({...a,maintenance:s})),placeholder:"12,000",suffix:"/yr"}),e.jsx(u,{label:"Mgmt Fee",value:l.managementFee,onChange:s=>g(a=>({...a,managementFee:s})),placeholder:"8",suffix:"%"}),e.jsx(u,{label:"Mortgage Rate",value:l.mortgageRate,onChange:s=>g(a=>({...a,mortgageRate:s})),placeholder:"7.25",suffix:"%"}),e.jsx(u,{label:"Loan Term",value:l.loanTerm,onChange:s=>g(a=>({...a,loanTerm:s})),placeholder:"30",suffix:"yrs"}),e.jsx(u,{label:"Down Payment",value:l.downPayment,onChange:s=>g(a=>({...a,downPayment:s})),placeholder:"25",suffix:"%"})]})]})]}),e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"bg-gradient-to-r from-info-50 to-white px-5 py-4 border-b border-dark-200 flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-lg bg-info-100 border border-info-200 flex items-center justify-center flex-shrink-0",children:e.jsx(U,{size:15,className:"text-info-600"})}),e.jsxs("div",{children:[e.jsx("span",{className:"text-[10px] font-bold bg-info-500 text-white px-2 py-0.5 rounded-full",children:"PROPERTY B"}),e.jsx("h2",{className:"text-sm font-bold mt-0.5",style:{color:"#222222"},children:"Commercial Building"})]}),D&&e.jsxs("span",{className:"ml-auto text-[10px] font-semibold text-green-600 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full flex items-center gap-1",children:[e.jsx(z,{size:9})," Ready"]})]}),e.jsxs("div",{className:"p-5",children:[e.jsx("div",{className:"mb-3",children:e.jsx(u,{label:"Property Address (optional)",value:i.address,onChange:s=>m(a=>({...a,address:s})),placeholder:"456 Commerce Blvd, Atlanta, GA 30308",type:"text"})}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx(u,{label:"Purchase Price ($)",value:i.purchasePrice,onChange:s=>m(a=>({...a,purchasePrice:s})),placeholder:"1,500,000"}),e.jsx(u,{label:"Rentable Sq Ft",value:i.sqft,onChange:s=>m(a=>({...a,sqft:s}
6)),placeholder:"8,000"}),e.jsx(u,{label:"Rent / Sq Ft ($)",value:i.avgRentPerSqft,onChange:s=>m(a=>({...a,avgRentPerSqft:s})),placeholder:"18",suffix:"/mo"}),e.jsx(u,{label:"Vacancy Rate",value:i.vacancyRate,onChange:s=>m(a=>({...a,vacancyRate:s})),placeholder:"10",suffix:"%"}),e.jsx(u,{label:"Oper. Expenses ($)",value:i.operatingExpenses,onChange:s=>m(a=>({...a,operatingExpenses:s})),placeholder:"55,000",suffix:"/yr"}),e.jsx(u,{label:"Property Tax ($)",value:i.propertyTax,onChange:s=>m(a=>({...a,propertyTax:s})),placeholder:"22,000",suffix:"/yr"}),e.jsx(u,{label:"Insurance ($)",value:i.insurance,onChange:s=>m(a=>({...a,insurance:s})),placeholder:"9,000",suffix:"/yr"}),e.jsx(u,{label:"CAM / NNN ($)",value:i.camCharges,onChange:s=>m(a=>({...a,camCharges:s})),placeholder:"15,000",suffix:"/yr"}),e.jsx(u,{label:"Mortgage Rate",value:i.mortgageRate,onChange:s=>m(a=>({...a,mortgageRate:s})),placeholder:"7.5",suffix:"%"}),e.jsx(u,{label:"Loan Term",value:i.loanTerm,onChange:s=>m(a=>({...a,loanTerm:s})),placeholder:"25",suffix:"yrs"}),e.jsx(u,{label:"Down Payment",value:i.downPayment,onChange:s=>m(a=>({...a,downPayment:s})),placeholder:"30",suffix:"%"})]})]})]})]}),e.jsxs("div",{className:"no-print bg-white border border-dark-200 rounded-2xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(L,{size:15,style:{color:"#D4AF37"}}),e.jsx("h3",{className:"text-sm font-bold",style:{color:"#222222"},children:"Market & Investor Context"}),d.city&&e.jsxs("span",{className:"ml-auto text-[10px] font-semibold text-green-700 bg-green-50 border border-green-200 px-2 py-0.5 rounded-full flex items-center gap-1",children:[e.jsx(z,{size:9})," Set"]})]}),e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-5 gap-4",children:[e.jsxs("div",{className:"col-span-2 sm:col-span-1",children:[e.jsx("label",{className:"block text-[10px] font-bold uppercase tracking-wide mb-1",style:{color:"#222222"},children:"City / Market"}),e.jsx("input",{type:"text",value:d.city,onChange:s=>p(a=>({...a,city:s.target.value})),placeholder:"Atlanta, GA",className:"w-full px-3 py-2.5 bg-white border border-dark-300 rounded-xl text-sm font-medium placeholder-[#888888] focus:outline-none focus:border-[#D4AF37] focus:ring-2 focus:ring-[#D4AF37]/20 transition-colors",style:{color:"#222222"}})]}),e.jsx(W,{label:"Market Trend",value:d.trend,onChange:s=>p(a=>({...a,trend:s})),options:["Hot","Stable","Cooling","Uncertain"]}),e.jsx(W,{label:"Investor Goal",value:d.goal,onChange:s=>p(a=>({...a,goal:s})),options:["Cash Flow","Appreciation","Both"]}),e.jsx(W,{label:"Investment Horizon",value:d.horizon,onChange:s=>p(a=>({...a,horizon:s})),options:["1â3 yrs","3â7 yrs","7â10 yrs","10+ yrs"]}),e.jsx(W,{label:"Risk Tolerance",value:d.riskTolerance,onChange:s=>p(a=>({...a,riskTolerance:s})),options:["Conservative","Moderate","Aggressive"]})]})]}),(T||D)&&e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-dark-100 flex items-center gap-2",children:[e.jsx(X,{size:15,style:{color:"#D4AF37"}}),e.jsx("h3",{className:"text-sm font-bold",style:{color:"#222222"},children:"Live Metrics Dashboard"}),e.jsx("span",{className:"ml-auto text-[10px] font-semibold",style:{color:"#666666"},children:"Auto-calculated · Updates live"})]}),e.jsxs("div",{className:"p-5",children:[e.jsxs("div",{className:"grid grid-cols-[1fr_auto_auto] gap-2 items-center pb-2 mb-1",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide",style:{color:"#666666"},children:"Metric"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide text-center min-w-[92px]",style:{color:"#D4AF37"},children:"A â Multi-Unit"}),e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-wide text-info-600 text-center min-w-[92px]",children:"B â Commercial"})]}),e.jsx(F,{label:"Gross Rental Income",a:h.grossIncome,b:b.grossIncome}),e.jsx(F,{label:"Effective Gross Income (after vacancy)",a:h.effectiveGrossIncome,b:b.effectiveGrossIncome}),e.jsx(F,{label:"Net Operating Income (NOI)",a:h.noi,b:b.noi}),e.jsx(F,{label:"Annual Debt Service",a:h.annualDebtService,b:b.annualDebtService,higherBetter:!1}),e.jsx(F,{label:"Monthly Cash Flow",a:h.monthlyCashFlow,b:b.monthlyCashFlow}),e.jsx(F,{label:"Annual Cash Flow",a:h.annualCashFlow,b:b.annualCashFlow}),e.jsx(F,{label:"Cap Rate",a:h.capRate,b:b.capRate,format:"percent"}),e.jsx(F,{label:"Cash-on-Cash Return",a:h.cashOnCash,b:b.cashOnCash,format:"percent"}),e.jsx(F,{label:"Gross Rent Multiplier (GRM)",a:h.grm,b:b.grm,higherBetter:!1,format:"number"}),e.jsx(F,{label:"Debt Service Coverage Ratio (DSCR)",a:h.dscr,b:b.dscr,format:"x"}),e.jsx(F,{label:"Break-Even Occupancy",a:h.breakEven,b:b.breakEven,higherBetter:!1,format:"percent"}),e.jsx(F,{label:`5-Yr Projected NOI (${w}% rent growth)`,a:h.noi5yr,b:b.noi5yr})]}),e.jsx("div",{className:"no-print px-5 pb-5",children:e.jsxs("div",{className:"border border-dark-200 rounded-xl p-4",style:{background:"#FAFAF8"},children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(te,{size:13,style:{color:"#D4AF37"}}),e.jsx("p",{className:"text-xs font-bold",style:{color:"#222222"},children:"What-If: Annual Rent Growth Rate"}),e.jsx("span",{className:"text-[11px] font-semibold",style:{color:"#666666"},children:"â updates 5-Year NOI live"})]}),e.jsxs("span",{className:"text-sm font-bold",style:{color:"#D4AF37"},children:[w,"%"]})]}),e.jsx("input",{type:"range",min:1,max:6,step:.5,value:w,onChange:s=>I(parseFloat(s.target.value)),className:"w-full cursor-pointer",style:{accentColor:"#D4AF37"}}),e.jsxs("div",{className:"flex justify-between text-[10px] font-medium mt
6-1",style:{color:"#666666"},children:[e.jsx("span",{children:"1% (Conservative)"}),e.jsx("span",{children:"3% (Market Average)"}),e.jsx("span",{children:"6% (Aggressive)"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3 mt-3 pt-3 border-t border-dark-200",children:[e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-[10px] font-semibold mb-0.5",style:{color:"#666666"},children:["A â 5-Yr NOI at ",w,"%"]}),e.jsxs("p",{className:"text-sm font-bold",style:{color:"#D4AF37"},children:["$",je.toLocaleString(void 0,{maximumFractionDigits:0}),"/yr"]})]}),e.jsxs("div",{className:"text-center",children:[e.jsxs("p",{className:"text-[10px] font-semibold mb-0.5",style:{color:"#666666"},children:["B â 5-Yr NOI at ",w,"%"]}),e.jsxs("p",{className:"text-sm font-bold text-info-600",children:["$",ve.toLocaleString(void 0,{maximumFractionDigits:0}),"/yr"]})]})]})]})})]}),e.jsx("div",{className:"no-print",children:j?null:S?e.jsxs("div",{className:"w-full bg-[#EAF7EA] border border-[#22c55e]/30 rounded-2xl px-6 py-5 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)"},children:e.jsx(z,{size:18,className:"text-white"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",style:{color:"#222222"},children:"Included With Your Membership"}),e.jsxs("p",{className:"text-xs mt-0.5",style:{color:"#444444"},children:[(n==null?void 0:n.membership_role)==="lifetime"?"Lifetime Member":(n==null?void 0:n.membership_role)==="pro"?"Pro Investor":"Core Investor"," â full access enabled"]})]})]}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-1.5",children:["Unlimited Investment Reports","Full AI Analysis","Export & Save Reports","Advanced Metrics","Market Intelligence","Portfolio Comparison Tools"].map(s=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(z,{size:11,className:"text-green-600 flex-shrink-0"}),e.jsx("span",{className:"text-[11px] font-semibold",style:{color:"#222222"},children:s})]},s))})]}):e.jsxs("div",{className:"w-full bg-[#1a1a1a] border border-[#D4AF37]/30 rounded-2xl px-6 py-5 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-4",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl flex items-center justify-center flex-shrink-0",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)"},children:e.jsx(H,{size:18,className:"text-black"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-bold",style:{color:"#D4AF37"},children:"Upgrade to Generate AI Reports"}),e.jsx("p",{className:"text-xs text-dark-100 mt-0.5",children:"Free members can enter data and preview live metrics. Core, Pro & Lifetime members get the full AI report."}),e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1 mt-2",children:["Unlimited Reports","SWOT Analysis","Radar Chart","5-Year Forecasts","Export & Print"].map(s=>e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx("div",{className:"w-3 h-3 rounded-full flex items-center justify-center bg-[#D4AF37]/20 flex-shrink-0",children:e.jsx("div",{className:"w-1.5 h-1.5 rounded-full bg-[#D4AF37]"})}),e.jsx("span",{className:"text-[11px] text-white",children:s})]},s))})]})]}),e.jsxs("div",{className:"flex flex-col gap-2 flex-shrink-0",children:[e.jsx(q,{to:"/membership-upgrade",className:"inline-flex items-center justify-center gap-2 px-5 py-2.5 rounded-xl text-sm font-bold text-black whitespace-nowrap transition-all hover:brightness-110 active:scale-95",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)",boxShadow:"0 4px 16px rgba(212,175,55,0.35)"},children:"Upgrade â Start Free Trial"}),e.jsx("p",{className:"text-[10px] text-dark-300 text-center",children:"Core starts at $49/mo · 7-day free trial"})]})]})}),e.jsxs("div",{className:"no-print flex flex-col items-center gap-3",children:[M&&e.jsxs("div",{className:"w-full max-w-xl bg-red-50 border border-red-200 rounded-xl px-4 py-3 flex items-start gap-2",children:[e.jsx(Z,{size:14,className:"text-red-500 flex-shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-red-700",children:M})]}),!O&&S&&e.jsxs("p",{className:"text-xs font-semibold",style:{color:"#444444"},children:[T?D?"Enter a city/market name":"Enter Property B details (price, sqft, rent/sqft)":"Enter Property A details (price, units, rent)"," to generate the report."]}),e.jsx("button",{onClick:ue,disabled:!O||k||!S,className:"px-10 py-4 rounded-2xl text-base font-bold flex items-center gap-3 transition-all hover:scale-[1.02] active:scale-100 disabled:opacity-40 disabled:cursor-not-allowed",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)",color:"#000000",boxShadow:"0 6px 24px rgba(212,175,55,0.4)"},children:k?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"w-5 h-5 border-2 border-black/20 border-t-black rounded-full animate-spin"}),"Generating AI Report..."]}):e.jsxs(e.Fragment,{children:[e.jsx(H,{size:18}),"Generate Investment Report"]})}),k&&e.jsx("p",{className:"text-xs font-medium animate-pulse",style:{color:"#444444"},children:"Analyzing both properties across 9 decision factors and building your forecasting report..."}),!S&&!j&&e.jsxs("p",{className:"text-xs",style:{color:"#666666"},children:[e.jsx(q,{to:"/membership-upgrade",className:"font-semibold underline",style:{color:"#D4AF37"},children:"Upgrade your membership"})," to unlock report generation."]})]}),c&&$&&e.jsxs("div",{ref:E,className:"space-y-6",children:[e.jsxs("div",{className:"hidden print:block mb-6 pb-4 border-b border-dark-200",children:[e.jsx("h2",{className:"text-2xl font-bold text-dark-900",children:"Investment Decision Report"}),e.jsxs("p",{className:"text-sm text-dark-500 mt-1",children:["Market: ",d.city," · Goal: ",d.goal," · Horizon: ",d.horizon," · Risk: ",d.riskTolerance]}),(l.address||i.address)&&e.jsxs("div",{className:"mt-2 flex gap-6 text-xs text-dark-600",children:[l.address&&e.jsxs("span",{children:[e.jsx("strong",{children:"Property A:"})," ",l.address]}),i.address&&e.jsxs("span",{children:[e.jsx("strong",{children:"Property B:"})," ",i.address]})]})]}),e.jsxs("div",{className:"no-print flex justify-end gap-2",children:[e.jsxs("button",{onClick:be,className:"text-xs px-3 py-2 rounded-xl border font-semibold transition-all flex items-center gap-1.5",style:{borderColor:"#D4AF37",background:"rgba(212,175,55,0.08)",color:"#b8962d"},children:[e.jsx(Ee,{size:12})," Save Report"]}),e.jsxs("button",{onClick:()=>window.print(),className:"text-xs px-3 py-2 rounded-xl border border-dark-200 bg-white font-semibold hover:border-dark-300 transition-all flex items-center gap-1.5",style:{color:"#444444"},children:[e.jsx(re,{size:12})," Print Report"]})]}),e.jsx("div",{className:`rounded-2xl border-2 p-6 ${$.outer}`,children:e.jsxs("div",{className:"flex flex-col sm:flex-row items-start sm:items-center gap-5",children:[e.jsx("div",{className:`w-16 h-16 rounded-2xl ${$.inner} border flex items-center justify-center flex-shrink-0`,children:$.icon}),e.jsxs("div",{className:"flex-1",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2 mb-1.5",children:[e.jsx("span",{className:"text-[10px] font-bold uppercase tracking-widest",style:{color:"#555555"},children:"AI Recommendation"}),e.jsxs("span",{className:`text-[10px] font-bold px-2.5 py-0.5 rounded-full border ${fe[c.recommendation_confidence]}`,children:[c.recommendation_confidence," Confidence"]})]}),e.jsx("h2",{className:`text-2xl sm:text-3xl font-display font-bold mb-2 ${$.labelColor}`,children:$.label}),e.jsx("p",{className:"text-sm font-medium leading-relaxed",style:{color:"#333333"},children:c.recommendation_reasoning}),(l.address||i.address)&&e.jsxs("div",{className:"mt-3 flex flex-wrap gap-4 text-xs font-semibold",style:{color:"#444444"},children:[l.address&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ne,{size:11,className:"text-amber-500"}),e.jsx("strong",{style:{color:"#333333"},children:"A:"})," ",l.address]}),i.address&&e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ne,{size:11,className:"text-info-500"}),e.jsx("strong",{style:{color:"#333333"},children:"B:"})," ",i.address]})]})]})]})}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(Ce,{size:14,style:{color:"#D4AF37"}}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#222222"},children:"Executive Summary"})]}),e.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#333333"},children:c.executive_summary})]}),e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(L,{size:14,className:"text-info-600"}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#222222"},children:"Market Analysis"}),d.city&&e.jsx("span",{className:"ml-auto text-[10px] font-semibold bg-dark-100 px-2 py-0.5 rounded-full",style:{color:"#444444"},children:d.city})]}),e.jsx("p",{className:"text-sm leading-relaxed",style:{color:"#333333"},children:c.market_analysis})]})]}),e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-4 border-b border-dark-100 flex items-center gap-2",children:[e.jsx(Fe,{size:14,style:{color:"#D4AF37"}}),e.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#222222"},children:"Itemized Decision Factors"}),e.jsxs("div",{className:"ml-auto flex gap-3 text-[10px] font-semibold",style:{color:"#555555"},children:[e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full inline-block",style:{background:"#D4AF37"}}),"A = Multi-Unit"]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-info-400 inline-block"}),"B = Commercial"]})]})]}),e.jsx("div",{className:"divide-y divide-dark-50",children:c.itemized_decision_factors.map((s,a)=>e.jsxs("div",{className:"px-5 py-3.5 flex items-start gap-4 hover:bg-dark-50 transition-colors",children:[e.jsx("span",{className:"flex-shrink-0 w-32 text-xs font-bold leading-snug",style:{color:"#222222"},children:s.factor}),e.jsx("span",{className:`flex-shrink-0 text-[10px] font-bold px-2.5 py-1 rounded-full min-w-[64px] text-center ${ye(s.winner)}`,children:s.winner==="Tie"?"Tie":`${s.winner} Wins`}),e.jsx("p",{className:"text-xs leading-relaxed flex-1",style:{color:"#555555"},children:s.explanation})]},a))})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[e.jsxs("div",{className:"bg-white border border-amber-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-3.5 bg-amber-50 border-b border-amber-200 flex items-center gap-2",children:[e.jsx(G,{size:13,className:"text-amber-600"}),e.jsx("p",{className:"text-xs font-bold text-amber-700 uppercase tracking-widest",children:"Property A â SWOT Analysis"})]}),e.jsx("div",{className:"p-5",children:e.jsx(xe,{analysis:c.property_a_analysis,color:"gold"})})]}),e.jsxs("div",{className:"bg-white border border-info-200 rounded-2xl overflow-hidden shadow-sm",children:[e.jsxs("div",{className:"px-5 py-3.5 bg-info-50 border-b border-info-200 flex items-center gap-2",children:[e.jsx(U,{size:13,className:"text-info-600"}),e.jsx("p",{className:"text-xs font-bold text-info-700 uppercase tracking-widest",children:"Property B â SWOT Analysis"})]}),e.jsx("div",{className:"p-5",children:e.jsx(xe,{analysis:c.property_b_analysis,color:"sky"})})]})]}),e.jsxs("div",{className:"bg-white border border-dark-200 rounded-2xl p-6 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-5",children:[e.jsx(L,{size:14,style:{color:"#D4AF37"}}),e.jsx("h3",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#222222"},children:"Radar Comparison â 6 Investment Dimensions"}),e.jsxs("div",{className:"ml-auto flex items-center gap-4 text-[10px] font-semibold",style:{color:"#555555"},children:[e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"w-3 h-3 rounded-full inline-block",style:{background:"#D4AF37"}}),"Property A"]}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx("span",{className:"w-3 h-3 rounded-full bg-info-500
6inline-block"}),"Property B"]})]})]}),e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-8",children:[e.jsx("div",{className:"flex-shrink-0",children:e.jsx($e,{dataA:Q(c),dataB:K(c),labels:ee})}),e.jsx("div",{className:"flex-1 w-full space-y-3",children:ee.map((s,a)=>{const y=Q(c)[a],C=K(c)[a];return e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex justify-between text-[11px] font-semibold",children:[e.jsx("span",{style:{color:"#333333"},children:s}),e.jsxs("span",{style:{color:"#666666"},children:[y,"/10 vs ",C,"/10"]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("div",{className:"flex-1 h-1.5 bg-dark-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full transition-all duration-700",style:{width:`${y*10}%`,background:"#D4AF37"}})}),e.jsx("div",{className:"flex-1 h-1.5 bg-dark-200 rounded-full overflow-hidden",children:e.jsx("div",{className:"h-full rounded-full bg-info-500 transition-all duration-700",style:{width:`${C*10}%`}})})]})]},a)})})]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-5",children:[e.jsx(J,{title:"Risk Score",icon:Be,iconColor:"#d97706",scores:[{label:"Risk (lower = safer)",scoreA:c.risk_score_a,scoreB:c.risk_score_b,higherIsBetter:!1}]}),e.jsx(J,{title:"Cash Flow Score",icon:te,iconColor:"#0284c7",scores:[{label:"Cash Flow Quality",scoreA:c.cash_flow_score_a,scoreB:c.cash_flow_score_b,higherIsBetter:!0}]}),e.jsx(J,{title:"Appreciation Score",icon:Re,iconColor:"#16a34a",scores:[{label:"Long-Term Appreciation",scoreA:c.appreciation_score_a,scoreB:c.appreciation_score_b,higherIsBetter:!0}]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-5",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[e.jsx(G,{size:13,className:"text-amber-600"}),e.jsx("p",{className:"text-xs font-bold text-amber-700 uppercase tracking-widest",children:"Property A â Forecasts"})]}),e.jsx(me,{analysis:c.property_a_analysis,color:"gold"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3 px-1",children:[e.jsx(U,{size:13,className:"text-info-600"}),e.jsx("p",{className:"text-xs font-bold text-info-700 uppercase tracking-widest",children:"Property B â Forecasts"})]}),e.jsx(me,{analysis:c.property_b_analysis,color:"sky"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-5 gap-5",children:[e.jsxs("div",{className:"md:col-span-2 rounded-2xl p-6 flex flex-col justify-center",style:{background:"#1a1a1a"},children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx(Ie,{size:14,style:{color:"#D4AF37"}}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#D4AF37"},children:"Final Verdict"})]}),e.jsx("p",{className:"text-base font-semibold text-white leading-relaxed",children:c.final_verdict})]}),e.jsxs("div",{className:"md:col-span-3 bg-white border border-dark-200 rounded-2xl p-5 shadow-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-4",children:[e.jsx(z,{size:14,className:"text-green-600"}),e.jsx("p",{className:"text-xs font-bold uppercase tracking-widest",style:{color:"#222222"},children:"Action Items"})]}),e.jsx("ol",{className:"space-y-2.5",children:c.action_items.map((s,a)=>e.jsxs("li",{className:"flex items-start gap-3",children:[e.jsx("span",{className:"flex-shrink-0 w-5 h-5 rounded-full flex items-center justify-center text-[10px] font-bold text-black border",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)",borderColor:"#D4AF37"},children:a+1}),e.jsx("span",{className:"text-sm leading-relaxed",style:{color:"#333333"},children:s})]},a))})]})]}),e.jsxs("div",{className:"no-print bg-white border border-dark-200 rounded-2xl p-6 shadow-sm flex flex-col sm:flex-row items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"font-bold mb-1",style:{color:"#222222"},children:"Want a full deal report on one specific property?"}),e.jsx("p",{className:"text-sm font-medium",style:{color:"#444444"},children:"Run the AI Deal Analyzer for complete scoring, risk assessment, and offer range."})]}),e.jsxs("div",{className:"flex gap-3 flex-shrink-0 flex-wrap",children:[e.jsxs(q,{to:"/ai-deal-analyzer",className:"text-sm font-bold px-4 py-2.5 rounded-xl flex items-center gap-2 whitespace-nowrap transition-all hover:brightness-110",style:{background:"linear-gradient(135deg,#D4AF37,#b8962d)",color:"#000000",boxShadow:"0 4px 14px rgba(212,175,55,0.35)"},children:["AI Deal Analyzer ",e.jsx(se,{size:14})]}),e.jsxs("button",{onClick:()=>window.print(),className:"text-sm px-4 py-2.5 rounded-xl border border-dark-200 font-semibold hover:border-dark-300 transition-all flex items-center gap-2",style:{color:"#444444"},children:[e.jsx(re,{size:13})," Print Report"]}),e.jsxs("button",{onClick:()=>{v(null),window.scrollTo({top:0,behavior:"smooth"})},className:"text-sm px-4 py-2.5 rounded-xl border border-dark-200 font-semibold hover:border-dark-300 transition-all flex items-center gap-2",style:{color:"#444444"},children:[e.jsx(ae,{size:13})," New Analysis"]})]})]})]})]})]})}export{Je as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.