No closed deals yet.
',d=(e,t,n,o)=>`\n
\n ${c("blue",`
${escapeHtml(e.ticker)}${escapeHtml(e.spreadType)}
`+d("Strikes",`${escapeHtml(String(e.strikeSell))}/${escapeHtml(String(e.strikeBuy))}`)+d("Contracts",e.contracts))}\n ${d("Days",e.daysHeld??"—",function(e){return null==e.durationPct?"":(e.durationPct<=25?"days-b1":e.durationPct<=50?"days-b2":e.durationPct<=75?"days-b3":"days-b4")+(e.durationPct<=25&&e.win?" days-gold":"")}(e))}\n ${c("purple",d("Commission","-"+fmtSigned$(e.commission))+d("Tax",e.taxAmount>0?"-"+fmtSigned$(e.taxAmount):"—",null,"dealTax-"+e.id))}\n
\n ${e.win?"WIN":"LOSS"}\n \n ${fmtSigned$(e.gross)}\n ${fmtSigned$(e.net)}\n \n
\n
\n
\n ${d("Entry",escapeHtml(formatDateDisplay(e.startDate,!0)))}\n ${d("Closed",escapeHtml(formatDateDisplay(e.closeDate,!0)))}\n ${d("Entry Price",`${escapeHtml(String(e.openSellPrice))}/${escapeHtml(String(e.openBuyPrice))}`)}\n ${d("Closing Price",`${escapeHtml(String(e.closeSellPrice))}/${escapeHtml(String(e.closeBuyPrice))}`)}\n ${d("Plan → Actual",`${e.targetPtPct}% → ${e.realizedPtPct}%`)}\n ${d("Δ",`${e.ptPctDelta>=0?"+":""}${e.ptPctDelta}%`,"delta"+(t?" flag":""))}\n
\n
`}).join("")||'No closed deals yet.
',m=e.openDeals.map(e=>`No open positions.
';return`\n\n\n