{
  "$schema": "https://shadcn-vue.com/schema/registry-item.json",
  "name": "safe-note-calculator",
  "title": "Safe Note Calculator",
  "type": "registry:block",
  "files": [
    {
      "path": "packages/registry-vue/blocks/safe-note-calculator/SafeNoteCalculator.vue",
      "content": "<script setup lang=\"ts\">\nimport { computed, ref, type HTMLAttributes } from 'vue'\nimport {\n  BadgePercent,\n  Check,\n  CheckCircle2,\n  Copy,\n  DollarSign,\n  FileSpreadsheet,\n  Layers,\n  Percent,\n  PieChart,\n  Scale,\n  ShieldCheck,\n  TrendingUp,\n} from 'lucide-vue-next'\nimport { cn } from '@/lib/utils'\nimport { Badge } from '@/components/ui/badge'\nimport { Button } from '@/components/ui/button'\nimport { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from '@/components/ui/card'\nimport { Input } from '@/components/ui/input'\nimport { Separator } from '@/components/ui/separator'\nimport { Slider } from '@/components/ui/slider'\nimport { Switch } from '@/components/ui/switch'\nimport { Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow } from '@/components/ui/table'\nimport { Tabs, TabsList, TabsTrigger } from '@/components/ui/tabs'\n\ninterface Props {\n  class?: HTMLAttributes['class']\n}\n\nconst props = defineProps<Props>()\n\ntype RoundPreset = 'seed-standard' | 'preseed-safe' | 'uncapped-discount' | 'bridge-round'\n\ninterface PresetConfig {\n  id: RoundPreset\n  label: string\n  investment: number\n  valuationCap: number\n  hasDiscount: boolean\n  discountRate: number\n  shares: number\n  seriesAPreMoney: number\n  description: string\n}\n\nconst PRESETS: Record<RoundPreset, PresetConfig> = {\n  'seed-standard': {\n    id: 'seed-standard',\n    label: 'Standard Seed ($1M @ $15M)',\n    investment: 1_000_000,\n    valuationCap: 15_000_000,\n    hasDiscount: true,\n    discountRate: 20,\n    shares: 10_000_000,\n    seriesAPreMoney: 25_000_000,\n    description: 'Standard YC Post-Money SAFE with $15M valuation cap and optional 20% discount clause.',\n  },\n  'preseed-safe': {\n    id: 'preseed-safe',\n    label: 'Pre-Seed ($500K @ $8M)',\n    investment: 500_000,\n    valuationCap: 8_000_000,\n    hasDiscount: true,\n    discountRate: 20,\n    shares: 10_000_000,\n    seriesAPreMoney: 18_000_000,\n    description: 'Early-stage angel or accelerator round with $8M valuation cap.',\n  },\n  'uncapped-discount': {\n    id: 'uncapped-discount',\n    label: 'Uncapped (25% Disc)',\n    investment: 750_000,\n    valuationCap: 60_000_000,\n    hasDiscount: true,\n    discountRate: 25,\n    shares: 10_000_000,\n    seriesAPreMoney: 20_000_000,\n    description: 'High valuation cap structure where the 25% discount governs share conversion price.',\n  },\n  'bridge-round': {\n    id: 'bridge-round',\n    label: 'Growth Bridge ($2M @ $25M)',\n    investment: 2_000_000,\n    valuationCap: 25_000_000,\n    hasDiscount: true,\n    discountRate: 15,\n    shares: 10_000_000,\n    seriesAPreMoney: 45_000_000,\n    description: 'Late seed extension bridging into a larger institutional Series A equity round.',\n  },\n}\n\nconst INVESTMENT_MARKS = {\n  100000: '$100K',\n  1000000: '$1M',\n  2500000: '$2.5M',\n  5000000: '$5M',\n}\n\nconst VALUATION_CAP_MARKS = {\n  2000000: '$2M',\n  15000000: '$15M',\n  30000000: '$30M',\n  50000000: '$50M',\n}\n\nconst DISCOUNT_RATE_MARKS = {\n  10: '10%',\n  15: '15%',\n  20: '20%',\n  25: '25%',\n  30: '30%',\n}\n\nconst SERIES_A_MARKS = {\n  5000000: '$5M',\n  25000000: '$25M',\n  50000000: '$50M',\n  80000000: '$80M',\n}\n\nconst SCENARIO_VALUATIONS = [10_000_000, 15_000_000, 20_000_000, 25_000_000, 40_000_000, 60_000_000]\n\nconst selectedPreset = ref<RoundPreset>('seed-standard')\nconst investmentAmount = ref(1_000_000)\nconst valuationCap = ref(15_000_000)\nconst hasDiscount = ref(true)\nconst discountRate = ref(20)\nconst companyCapitalization = ref(10_000_000)\nconst seriesAPreMoney = ref(25_000_000)\nconst copied = ref(false)\n\nfunction handlePresetChange(value: string | number) {\n  const presetId = String(value) as RoundPreset\n  selectedPreset.value = presetId\n  const preset = PRESETS[presetId]\n  if (preset) {\n    investmentAmount.value = preset.investment\n    valuationCap.value = preset.valuationCap\n    hasDiscount.value = preset.hasDiscount\n    discountRate.value = preset.discountRate\n    companyCapitalization.value = preset.shares\n    seriesAPreMoney.value = preset.seriesAPreMoney\n  }\n}\n\n// Core SAFE conversion economics\nconst calculations = computed(() => {\n  const inv = Math.max(1, investmentAmount.value)\n  const cap = Math.max(1, valuationCap.value)\n  const shares = Math.max(1, companyCapitalization.value)\n  const seriesA = Math.max(1, seriesAPreMoney.value)\n  const disc = hasDiscount.value ? Math.max(0, Math.min(99, discountRate.value)) : 0\n\n  // Series A unqualified price per share\n  const seriesAPricePerShare = seriesA / shares\n\n  // Cap conversion price per share\n  const capPricePerShare = cap / shares\n\n  // Discount conversion price per share\n  const discountPricePerShare = hasDiscount.value ? seriesAPricePerShare * (1 - disc / 100) : seriesAPricePerShare\n\n  // In YC Post-Money SAFE, investor converts at the lower of Cap Price or Discount Price\n  let conversionPrice = capPricePerShare\n  let governingMechanism: 'cap' | 'discount' = 'cap'\n\n  if (hasDiscount.value && discountPricePerShare < capPricePerShare) {\n    conversionPrice = discountPricePerShare\n    governingMechanism = 'discount'\n  } else {\n    conversionPrice = capPricePerShare\n    governingMechanism = 'cap'\n  }\n\n  // Converted shares issued\n  const safeShares = conversionPrice > 0 ? Math.round(inv / conversionPrice) : 0\n\n  // Equity percentage calculation\n  const safeOwnershipPct = Math.min(100, Math.max(0, (safeShares / shares) * 100))\n  const founderShares = Math.max(0, shares - safeShares)\n  const founderOwnershipPct = Math.max(0, 100 - safeOwnershipPct)\n\n  // Effective discount achieved vs Series A price\n  const effectiveDiscountPct =\n    seriesAPricePerShare > 0 ? Math.max(0, ((seriesAPricePerShare - conversionPrice) / seriesAPricePerShare) * 100) : 0\n\n  // Implied Value of SAFE stake at Series A price\n  const impliedSeriesAValue = safeShares * seriesAPricePerShare\n  const valueGain = Math.max(0, impliedSeriesAValue - inv)\n  const paperRoiMultiple = inv > 0 ? impliedSeriesAValue / inv : 1\n\n  return {\n    seriesAPricePerShare,\n    capPricePerShare,\n    discountPricePerShare,\n    conversionPrice,\n    governingMechanism,\n    safeShares,\n    founderShares,\n    totalShares: shares,\n    safeOwnershipPct,\n    founderOwnershipPct,\n    effectiveDiscountPct,\n    impliedSeriesAValue,\n    valueGain,\n    paperRoiMultiple,\n  }\n})\n\n// Sensitivity scenarios across different Series A pre-money valuations\nconst scenarioResults = computed(() => {\n  const inv = Math.max(1, investmentAmount.value)\n  const cap = Math.max(1, valuationCap.value)\n  const shares = Math.max(1, companyCapitalization.value)\n  const disc = hasDiscount.value ? Math.max(0, Math.min(99, discountRate.value)) : 0\n\n  return SCENARIO_VALUATIONS.map((scenarioValuation) => {\n    const seriesAPrice = scenarioValuation / shares\n    const capPrice = cap / shares\n    const discountPrice = hasDiscount.value ? seriesAPrice * (1 - disc / 100) : seriesAPrice\n\n    let convPrice = capPrice\n    let mechanism = 'Valuation Cap'\n    if (hasDiscount.value && discountPrice < capPrice) {\n      convPrice = discountPrice\n      mechanism = `Discount (${disc}%)`\n    }\n\n    const issuedShares = convPrice > 0 ? Math.round(inv / convPrice) : 0\n    const ownershipPct = (issuedShares / shares) * 100\n    const effectiveDiscount = seriesAPrice > 0 ? Math.max(0, ((seriesAPrice - convPrice) / seriesAPrice) * 100) : 0\n    const impliedValue = issuedShares * seriesAPrice\n    const isCurrentTarget = scenarioValuation === seriesAPreMoney.value\n\n    return {\n      valuation: scenarioValuation,\n      seriesAPrice,\n      convPrice,\n      mechanism,\n      issuedShares,\n      ownershipPct,\n      effectiveDiscount,\n      impliedValue,\n      isCurrentTarget,\n    }\n  })\n})\n\n// Number & Currency Formatters\nconst fmtCurrency = (val: number) => {\n  return new Intl.NumberFormat('en-US', {\n    style: 'currency',\n    currency: 'USD',\n    minimumFractionDigits: 2,\n    maximumFractionDigits: 2,\n  }).format(val || 0)\n}\n\nconst fmtCurrencyWhole = (val: number) => {\n  return new Intl.NumberFormat('en-US', {\n    style: 'currency',\n    currency: 'USD',\n    minimumFractionDigits: 0,\n    maximumFractionDigits: 0,\n  }).format(val || 0)\n}\n\nconst fmtPercent = (val: number, decimals = 2) => {\n  return `${(val || 0).toFixed(decimals)}%`\n}\n\nconst fmtNumber = (val: number) => {\n  return new Intl.NumberFormat('en-US', {\n    maximumFractionDigits: 0,\n  }).format(val || 0)\n}\n\nfunction copySummary() {\n  const c = calculations.value\n  const text = `YC Post-Money SAFE Conversion Summary:\n- Investment Amount: ${fmtCurrency(investmentAmount.value)}\n- Valuation Cap: ${fmtCurrency(valuationCap.value)}\n- Series A Target: ${fmtCurrency(seriesAPreMoney.value)} Pre-Money\n- Investor Ownership: ${fmtPercent(c.safeOwnershipPct)} (${fmtNumber(c.safeShares)} shares)\n- Conversion Price: ${fmtCurrency(c.conversionPrice)} / share (vs Series A ${fmtCurrency(c.seriesAPricePerShare)})\n- Effective Discount: ${fmtPercent(c.effectiveDiscountPct)}\n- Governing Term: ${c.governingMechanism === 'cap' ? 'Valuation Cap' : 'Discount Rate'}`\n\n  navigator.clipboard?.writeText(text)\n  copied.value = true\n  setTimeout(() => {\n    copied.value = false\n  }, 2000)\n}\n</script>\n\n<template>\n  <div\n    data-slot=\"safe-note-calculator\"\n    :class=\"cn('mx-auto w-full max-w-6xl space-y-8 p-4 sm:p-6 lg:p-8', props.class)\"\n  >\n    <!-- Header -->\n    <div class=\"flex flex-col items-center gap-4 text-center\">\n      <Badge wrap variant=\"outline\" class=\"gap-1.5 px-3 py-1 text-xs font-medium tracking-wider uppercase\">\n        <Scale class=\"text-primary size-3.5\" />\n        YC Post-Money SAFE v1.1 &middot; Valuation Cap + Discount\n      </Badge>\n      <div class=\"space-y-2\">\n        <h2 class=\"text-foreground text-2xl font-bold tracking-tight sm:text-3xl lg:text-4xl\">\n          Y Combinator Post-Money SAFE Calculator\n        </h2>\n        <p class=\"text-muted-foreground mx-auto max-w-2xl text-sm sm:text-base\">\n          Model founder dilution, investor ownership percentages, and conversion price per share.\n        </p>\n      </div>\n\n      <!-- Preset Tabs -->\n      <div class=\"mt-2 flex w-full justify-center\">\n        <Tabs :model-value=\"selectedPreset\" @update:model-value=\"handlePresetChange\" class=\"w-full sm:w-auto\">\n          <TabsList variant=\"segmented\" class=\"grid w-full grid-cols-2 sm:flex sm:w-auto\">\n            <TabsTrigger value=\"seed-standard\" class=\"gap-1.5\">\n              <ShieldCheck class=\"size-3.5\" />\n              Standard Seed\n            </TabsTrigger>\n            <TabsTrigger value=\"preseed-safe\" class=\"gap-1.5\">\n              <TrendingUp class=\"size-3.5\" />\n              Pre-Seed SAFE\n            </TabsTrigger>\n            <TabsTrigger value=\"uncapped-discount\" class=\"gap-1.5\">\n              <BadgePercent class=\"size-3.5\" />\n              Uncapped Disc\n            </TabsTrigger>\n            <TabsTrigger value=\"bridge-round\" class=\"gap-1.5\">\n              <Layers class=\"size-3.5\" />\n              Growth Bridge\n            </TabsTrigger>\n          </TabsList>\n        </Tabs>\n      </div>\n    </div>\n\n    <!-- 2-Column Calculator Layout -->\n    <div class=\"grid grid-cols-1 gap-8 lg:grid-cols-12 lg:items-start\">\n      <!-- Left Input Card -->\n      <div class=\"space-y-6 lg:col-span-7\">\n        <Card>\n          <CardHeader>\n            <CardTitle class=\"flex items-center gap-2\">\n              <DollarSign class=\"text-primary size-5\" />\n              SAFE Terms &amp; Round Inputs\n            </CardTitle>\n            <CardDescription>\n              Configure investment size, valuation cap, optional discount rate, capitalization, and Series A targets.\n            </CardDescription>\n          </CardHeader>\n          <CardContent class=\"space-y-7\">\n            <!-- 1. Investment Amount -->\n            <div class=\"space-y-3.5\">\n              <div class=\"flex items-center justify-between gap-4\">\n                <div>\n                  <span class=\"text-foreground text-sm font-medium\">Investment Amount</span>\n                  <p class=\"text-muted-foreground text-xs\">Total cash invested into the SAFE.</p>\n                </div>\n                <div class=\"w-36 sm:w-44\">\n                  <Input\n                    id=\"safe-investment-input\"\n                    type=\"number\"\n                    size=\"small\"\n                    :min=\"25000\"\n                    :max=\"10000000\"\n                    :step=\"25000\"\n                    prefix=\"$\"\n                    :model-value=\"investmentAmount\"\n                    @update:model-value=\"(val) => (investmentAmount = Number(val) || 0)\"\n                  />\n                </div>\n              </div>\n              <div class=\"pb-5\">\n                <Slider\n                  :model-value=\"investmentAmount\"\n                  :min=\"100000\"\n                  :max=\"5000000\"\n                  :step=\"25000\"\n                  :marks=\"INVESTMENT_MARKS\"\n                  :tooltip=\"(val) => `$${val.toLocaleString('en-US')}`\"\n                  @update:model-value=\"(val) => (investmentAmount = typeof val === 'number' ? val : val[0])\"\n                />\n              </div>\n              <div class=\"flex flex-wrap items-center gap-1.5 pt-1\">\n                <span class=\"text-muted-foreground text-xs\">Quick select:</span>\n                <Button\n                  v-for=\"amt in [250000, 500000, 1000000, 1500000, 2000000, 3000000]\"\n                  :key=\"amt\"\n                  variant=\"outline\"\n                  size=\"sm\"\n                  class=\"h-6 px-2 text-xs\"\n                  @click=\"investmentAmount = amt\"\n                >\n                  ${{ amt >= 1000000 ? `${(amt / 1000000).toFixed(amt % 1000000 === 0 ? 0 : 1)}M` : `${amt / 1000}K` }}\n                </Button>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- 2. Post-Money Valuation Cap -->\n            <div class=\"space-y-3.5\">\n              <div class=\"flex items-center justify-between gap-4\">\n                <div>\n                  <span class=\"text-foreground text-sm font-medium\">Post-Money Valuation Cap</span>\n                  <p class=\"text-muted-foreground text-xs\">Maximum valuation ceiling for conversion.</p>\n                </div>\n                <div class=\"w-36 sm:w-44\">\n                  <Input\n                    id=\"safe-cap-input\"\n                    type=\"number\"\n                    size=\"small\"\n                    :min=\"500000\"\n                    :max=\"100000000\"\n                    :step=\"500000\"\n                    prefix=\"$\"\n                    :model-value=\"valuationCap\"\n                    @update:model-value=\"(val) => (valuationCap = Number(val) || 0)\"\n                  />\n                </div>\n              </div>\n              <div class=\"pb-5\">\n                <Slider\n                  :model-value=\"valuationCap\"\n                  :min=\"2000000\"\n                  :max=\"50000000\"\n                  :step=\"500000\"\n                  :marks=\"VALUATION_CAP_MARKS\"\n                  :tooltip=\"(val) => `$${val.toLocaleString('en-US')}`\"\n                  @update:model-value=\"(val) => (valuationCap = typeof val === 'number' ? val : val[0])\"\n                />\n              </div>\n              <div class=\"flex flex-wrap items-center gap-1.5 pt-1\">\n                <span class=\"text-muted-foreground text-xs\">Cap benchmarks:</span>\n                <Button\n                  v-for=\"cap in [5000000, 8000000, 12000000, 15000000, 20000000, 30000000]\"\n                  :key=\"cap\"\n                  variant=\"outline\"\n                  size=\"sm\"\n                  class=\"h-6 px-2 text-xs\"\n                  @click=\"valuationCap = cap\"\n                >\n                  ${{ (cap / 1000000).toFixed(0) }}M\n                </Button>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- 3. Discount Rate Input & Toggle -->\n            <div class=\"space-y-3.5\">\n              <div class=\"flex items-center justify-between gap-4\">\n                <div class=\"space-y-1\">\n                  <div class=\"flex items-center gap-2\">\n                    <span class=\"text-foreground text-sm font-medium\">Discount Rate Clause</span>\n                    <Badge\n                      wrap\n                      v-if=\"hasDiscount\"\n                      variant=\"outline\"\n                      class=\"border-success/20 bg-success/10 text-success text-xs font-normal\"\n                    >\n                      Active\n                    </Badge>\n                    <Badge wrap v-else variant=\"outline\" class=\"text-muted-foreground text-xs font-normal\">\n                      Cap Only\n                    </Badge>\n                  </div>\n                  <p class=\"text-muted-foreground text-xs\">\n                    Percentage discount on Series A price if cap is not exceeded.\n                  </p>\n                </div>\n                <div class=\"flex flex-wrap items-center gap-3\">\n                  <Switch\n                    :model-value=\"hasDiscount\"\n                    @update:model-value=\"(val) => (hasDiscount = val)\"\n                    aria-label=\"Toggle discount clause\"\n                  />\n                  <div v-if=\"hasDiscount\" class=\"w-24 sm:w-28\">\n                    <Input\n                      id=\"safe-discount-input\"\n                      type=\"number\"\n                      size=\"small\"\n                      :min=\"0\"\n                      :max=\"50\"\n                      :step=\"1\"\n                      suffix=\"%\"\n                      :model-value=\"discountRate\"\n                      @update:model-value=\"(val) => (discountRate = Number(val) || 0)\"\n                    />\n                  </div>\n                </div>\n              </div>\n\n              <div v-if=\"hasDiscount\" class=\"space-y-3 pt-1\">\n                <div class=\"pb-5\">\n                  <Slider\n                    :model-value=\"discountRate\"\n                    :min=\"5\"\n                    :max=\"35\"\n                    :step=\"1\"\n                    :marks=\"DISCOUNT_RATE_MARKS\"\n                    :tooltip=\"(val) => `${val}% Discount`\"\n                    @update:model-value=\"(val) => (discountRate = typeof val === 'number' ? val : val[0])\"\n                  />\n                </div>\n                <div class=\"flex flex-wrap items-center gap-1.5 pt-1\">\n                  <span class=\"text-muted-foreground text-xs\">Standard rates:</span>\n                  <Button\n                    v-for=\"rate in [10, 15, 20, 25, 30]\"\n                    :key=\"rate\"\n                    :variant=\"discountRate === rate ? 'default' : 'outline'\"\n                    size=\"sm\"\n                    class=\"h-6 px-2 text-xs\"\n                    @click=\"discountRate = rate\"\n                  >\n                    {{ rate }}%\n                  </Button>\n                </div>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- 4. Company Existing Capitalization -->\n            <div class=\"space-y-3.5\">\n              <div class=\"flex items-center justify-between gap-4\">\n                <div>\n                  <span class=\"text-foreground text-sm font-medium\">Company Existing Capitalization</span>\n                  <p class=\"text-muted-foreground text-xs\">Total pre-conversion issued shares and option pool.</p>\n                </div>\n                <div class=\"w-36 sm:w-44\">\n                  <Input\n                    id=\"safe-shares-input\"\n                    type=\"number\"\n                    size=\"small\"\n                    :min=\"1000000\"\n                    :max=\"100000000\"\n                    :step=\"500000\"\n                    suffix=\"Shares\"\n                    :model-value=\"companyCapitalization\"\n                    @update:model-value=\"(val) => (companyCapitalization = Number(val) || 0)\"\n                  />\n                </div>\n              </div>\n              <div class=\"flex flex-wrap items-center gap-1.5 pt-1\">\n                <span class=\"text-muted-foreground text-xs\">Common share counts:</span>\n                <Button\n                  v-for=\"count in [5000000, 8000000, 10000000, 12000000, 15000000]\"\n                  :key=\"count\"\n                  :variant=\"companyCapitalization === count ? 'default' : 'outline'\"\n                  size=\"sm\"\n                  class=\"h-6 px-2 text-xs\"\n                  @click=\"companyCapitalization = count\"\n                >\n                  {{ (count / 1000000).toFixed(0) }}M Shares\n                </Button>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- 5. Series A Pre-Money Target -->\n            <div class=\"space-y-3.5\">\n              <div class=\"flex items-center justify-between gap-4\">\n                <div>\n                  <span class=\"text-foreground text-sm font-medium\">Series A Pre-Money Target</span>\n                  <p class=\"text-muted-foreground text-xs\">Target qualified financing equity valuation.</p>\n                </div>\n                <div class=\"w-36 sm:w-44\">\n                  <Input\n                    id=\"safe-series-a-input\"\n                    type=\"number\"\n                    size=\"small\"\n                    :min=\"1000000\"\n                    :max=\"200000000\"\n                    :step=\"1000000\"\n                    prefix=\"$\"\n                    :model-value=\"seriesAPreMoney\"\n                    @update:model-value=\"(val) => (seriesAPreMoney = Number(val) || 0)\"\n                  />\n                </div>\n              </div>\n              <div class=\"pb-5\">\n                <Slider\n                  :model-value=\"seriesAPreMoney\"\n                  :min=\"5000000\"\n                  :max=\"80000000\"\n                  :step=\"1000000\"\n                  :marks=\"SERIES_A_MARKS\"\n                  :tooltip=\"(val) => `$${val.toLocaleString('en-US')}`\"\n                  @update:model-value=\"(val) => (seriesAPreMoney = typeof val === 'number' ? val : val[0])\"\n                />\n              </div>\n              <div class=\"flex flex-wrap items-center gap-1.5 pt-1\">\n                <span class=\"text-muted-foreground text-xs\">Series A benchmarks:</span>\n                <Button\n                  v-for=\"target in [15000000, 20000000, 25000000, 35000000, 50000000, 75000000]\"\n                  :key=\"target\"\n                  variant=\"outline\"\n                  size=\"sm\"\n                  class=\"h-6 px-2 text-xs\"\n                  @click=\"seriesAPreMoney = target\"\n                >\n                  ${{ (target / 1000000).toFixed(0) }}M\n                </Button>\n              </div>\n            </div>\n          </CardContent>\n        </Card>\n      </div>\n\n      <!-- Right Results Card (Sticky on desktop) -->\n      <div class=\"lg:sticky lg:top-8 lg:col-span-5\">\n        <Card class=\"border-border bg-card shadow-xs\">\n          <CardHeader class=\"pb-4\">\n            <div class=\"flex items-center justify-between\">\n              <span class=\"text-muted-foreground text-xs font-semibold tracking-wider uppercase\">\n                Investor Ownership Stake\n              </span>\n              <Badge\n                wrap\n                variant=\"secondary\"\n                :class=\"\n                  calculations.governingMechanism === 'cap'\n                    ? 'bg-primary/10 text-primary border-primary/20 text-xs font-semibold'\n                    : 'border-success/20 bg-success/10 text-success text-xs font-semibold'\n                \"\n              >\n                {{ calculations.governingMechanism === 'cap' ? 'Cap Governs' : 'Discount Governs' }}\n              </Badge>\n            </div>\n            <div class=\"mt-4\">\n              <div class=\"flex items-baseline gap-2\">\n                <span class=\"text-foreground text-3xl font-bold tracking-tight tabular-nums sm:text-4xl\">\n                  {{ fmtPercent(calculations.safeOwnershipPct) }}\n                </span>\n                <span class=\"text-muted-foreground text-sm font-medium\">Post-SAFE Ownership</span>\n              </div>\n              <p class=\"text-muted-foreground mt-1 text-xs\">\n                SAFE investor receives\n                <span class=\"text-foreground font-semibold tabular-nums\">{{ fmtNumber(calculations.safeShares) }}</span>\n                shares at conversion.\n              </p>\n            </div>\n          </CardHeader>\n\n          <CardContent class=\"space-y-5\">\n            <Separator />\n\n            <!-- Key Economics Metrics Grid -->\n            <div class=\"grid grid-cols-1 gap-3 sm:grid-cols-2\">\n              <div class=\"bg-muted/40 rounded-lg border p-3\">\n                <span class=\"text-muted-foreground block text-xs\">SAFE Conversion Price</span>\n                <span class=\"text-foreground text-base font-bold tabular-nums\">\n                  {{ fmtCurrency(calculations.conversionPrice) }}\n                </span>\n                <span class=\"text-muted-foreground block text-xs tabular-nums\">\n                  vs Series A {{ fmtCurrency(calculations.seriesAPricePerShare) }}\n                </span>\n              </div>\n\n              <div class=\"bg-muted/40 rounded-lg border p-3\">\n                <span class=\"text-muted-foreground block text-xs\">Converted Shares Issued</span>\n                <span class=\"text-foreground text-base font-bold tabular-nums\">\n                  {{ fmtNumber(calculations.safeShares) }}\n                </span>\n                <span class=\"text-muted-foreground block text-xs\">Equity units</span>\n              </div>\n\n              <div class=\"bg-muted/40 rounded-lg border p-3\">\n                <span class=\"text-muted-foreground block text-xs\">Effective Discount</span>\n                <span class=\"text-success text-success text-base font-bold tabular-nums\">\n                  {{ fmtPercent(calculations.effectiveDiscountPct) }}\n                </span>\n                <span class=\"text-muted-foreground block text-xs\">Savings vs Series A</span>\n              </div>\n\n              <div class=\"bg-muted/40 rounded-lg border p-3\">\n                <span class=\"text-muted-foreground block text-xs\">Implied Series A Value</span>\n                <span class=\"text-foreground text-base font-bold tabular-nums\">\n                  {{ fmtCurrencyWhole(calculations.impliedSeriesAValue) }}\n                </span>\n                <span class=\"text-success text-success block text-xs tabular-nums\">\n                  +{{ fmtCurrencyWhole(calculations.valueGain) }} ({{ calculations.paperRoiMultiple.toFixed(2) }}x)\n                </span>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- Visual Equity Distribution Bar -->\n            <div class=\"space-y-2.5\">\n              <div class=\"flex items-center justify-between text-xs font-medium\">\n                <span class=\"text-foreground\">Founders vs. SAFE Investor</span>\n                <span class=\"text-muted-foreground tabular-nums\">\n                  {{ fmtPercent(calculations.founderOwnershipPct) }} / {{ fmtPercent(calculations.safeOwnershipPct) }}\n                </span>\n              </div>\n              <div class=\"bg-muted relative flex h-3 w-full overflow-hidden rounded-full shadow-inner\">\n                <div\n                  class=\"bg-primary h-full transition-[width] duration-300\"\n                  :style=\"{ width: `${calculations.founderOwnershipPct}%` }\"\n                />\n                <div\n                  class=\"bg-success h-full transition-[width] duration-300\"\n                  :style=\"{ width: `${calculations.safeOwnershipPct}%` }\"\n                />\n              </div>\n              <div\n                class=\"text-muted-foreground flex flex-col gap-1.5 text-xs sm:flex-row sm:items-center sm:justify-between\"\n              >\n                <div class=\"flex items-center gap-1.5\">\n                  <span class=\"bg-primary size-2 shrink-0 rounded-full\" />\n                  <span\n                    >Founders: {{ fmtPercent(calculations.founderOwnershipPct) }} ({{\n                      fmtNumber(calculations.founderShares)\n                    }}\n                    sh)</span\n                  >\n                </div>\n                <div class=\"flex items-center gap-1.5\">\n                  <span class=\"bg-success size-2 shrink-0 rounded-full\" />\n                  <span\n                    >SAFE: {{ fmtPercent(calculations.safeOwnershipPct) }} ({{\n                      fmtNumber(calculations.safeShares)\n                    }}\n                    sh)</span\n                  >\n                </div>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- Post-Conversion Dilution Breakdown Table -->\n            <div class=\"space-y-2\">\n              <span class=\"text-foreground text-xs font-semibold tracking-wider uppercase\">\n                Post-Conversion Dilution Breakdown\n              </span>\n              <div class=\"overflow-hidden rounded-lg border\">\n                <div class=\"overflow-x-auto\">\n                  <Table density=\"compact\">\n                    <TableHeader>\n                      <TableRow>\n                        <TableHead class=\"text-xs\">Stakeholder</TableHead>\n                        <TableHead class=\"text-right text-xs\">Ownership</TableHead>\n                        <TableHead class=\"text-right text-xs\">Shares</TableHead>\n                        <TableHead class=\"text-right text-xs\">Implied Value</TableHead>\n                      </TableRow>\n                    </TableHeader>\n                    <TableBody>\n                      <TableRow>\n                        <TableCell class=\"text-xs font-medium\">Founders &amp; Existing</TableCell>\n                        <TableCell class=\"text-right text-xs font-medium tabular-nums\">\n                          {{ fmtPercent(calculations.founderOwnershipPct) }}\n                        </TableCell>\n                        <TableCell class=\"text-right text-xs tabular-nums\">\n                          {{ fmtNumber(calculations.founderShares) }}\n                        </TableCell>\n                        <TableCell class=\"text-right text-xs tabular-nums\">\n                          {{ fmtCurrencyWhole(calculations.founderShares * calculations.seriesAPricePerShare) }}\n                        </TableCell>\n                      </TableRow>\n                      <TableRow>\n                        <TableCell class=\"text-success text-xs font-medium\"> SAFE Seed Investors </TableCell>\n                        <TableCell class=\"text-success text-success text-right text-xs font-bold tabular-nums\">\n                          {{ fmtPercent(calculations.safeOwnershipPct) }}\n                        </TableCell>\n                        <TableCell class=\"text-right text-xs font-semibold tabular-nums\">\n                          {{ fmtNumber(calculations.safeShares) }}\n                        </TableCell>\n                        <TableCell class=\"text-right text-xs font-semibold tabular-nums\">\n                          {{ fmtCurrencyWhole(calculations.impliedSeriesAValue) }}\n                        </TableCell>\n                      </TableRow>\n                    </TableBody>\n                    <TableFooter>\n                      <TableRow>\n                        <TableCell class=\"text-xs font-bold\">Total Post-SAFE</TableCell>\n                        <TableCell class=\"text-right text-xs font-bold tabular-nums\">100.00%</TableCell>\n                        <TableCell class=\"text-right text-xs font-bold tabular-nums\">\n                          {{ fmtNumber(calculations.totalShares) }}\n                        </TableCell>\n                        <TableCell class=\"text-right text-xs font-bold tabular-nums\">\n                          {{ fmtCurrencyWhole(seriesAPreMoney) }}\n                        </TableCell>\n                      </TableRow>\n                    </TableFooter>\n                  </Table>\n                </div>\n              </div>\n            </div>\n\n            <Separator />\n\n            <!-- Key SAFE Takeaways Checklist -->\n            <ul class=\"text-muted-foreground space-y-2 text-xs\">\n              <li class=\"flex items-center gap-2\">\n                <CheckCircle2 class=\"text-primary size-3.5 shrink-0\" />\n                <span>Post-money cap fixes ownership before Series A round</span>\n              </li>\n              <li class=\"flex items-center gap-2\">\n                <CheckCircle2 class=\"text-primary size-3.5 shrink-0\" />\n                <span>Converts to Preferred Stock with investor liquidation preference</span>\n              </li>\n              <li class=\"flex items-center gap-2\">\n                <CheckCircle2 class=\"text-primary size-3.5 shrink-0\" />\n                <span>No debt maturity dates, no interest accrual compounding</span>\n              </li>\n            </ul>\n          </CardContent>\n\n          <CardFooter class=\"flex flex-col gap-2.5 pt-2\">\n            <Button class=\"w-full gap-2 font-semibold shadow-xs\" size=\"lg\" @click=\"copySummary\">\n              <Check v-if=\"copied\" class=\"text-success size-4\" />\n              <Copy v-else class=\"size-4\" />\n              {{ copied ? 'Copied Summary to Clipboard!' : 'Copy Valuation Breakdown' }}\n            </Button>\n            <Button variant=\"outline\" class=\"w-full gap-2\" size=\"default\">\n              <FileSpreadsheet class=\"size-4\" />\n              Export Cap Table Summary\n            </Button>\n          </CardFooter>\n        </Card>\n      </div>\n    </div>\n\n    <!-- Bottom Section: Series A Valuation Sensitivity Table -->\n    <Card>\n      <CardHeader class=\"flex flex-col gap-2 sm:flex-row sm:items-center sm:justify-between\">\n        <div>\n          <CardTitle class=\"flex items-center gap-2\">\n            <TrendingUp class=\"text-primary size-5\" />\n            Series A Qualified Financing Sensitivity Matrix\n          </CardTitle>\n          <CardDescription>\n            Simulate how SAFE investor ownership percentage, share price, and conversion mechanism respond across\n            different next-round valuations.\n          </CardDescription>\n        </div>\n      </CardHeader>\n      <CardContent>\n        <div class=\"overflow-x-auto\">\n          <Table density=\"cozy\">\n            <TableHeader>\n              <TableRow>\n                <TableHead>Series A Valuation</TableHead>\n                <TableHead class=\"text-right\">Series A Price</TableHead>\n                <TableHead class=\"text-right\">SAFE Conversion Price</TableHead>\n                <TableHead>Governing Term</TableHead>\n                <TableHead class=\"text-right\">Shares Issued</TableHead>\n                <TableHead class=\"text-right\">SAFE Ownership</TableHead>\n                <TableHead class=\"text-right\">Effective Savings</TableHead>\n                <TableHead class=\"text-right\">Implied Stake Value</TableHead>\n              </TableRow>\n            </TableHeader>\n            <TableBody>\n              <TableRow\n                v-for=\"row in scenarioResults\"\n                :key=\"row.valuation\"\n                :class=\"row.isCurrentTarget ? 'bg-primary/5 font-medium' : ''\"\n              >\n                <TableCell class=\"font-medium\">\n                  <div class=\"flex items-center gap-2\">\n                    <span class=\"tabular-nums\">{{ fmtCurrencyWhole(row.valuation) }}</span>\n                    <Badge wrap v-if=\"row.isCurrentTarget\" variant=\"default\" class=\"h-5 px-1.5 text-xs\">\n                      Current Target\n                    </Badge>\n                  </div>\n                </TableCell>\n                <TableCell class=\"text-right tabular-nums\">{{ fmtCurrency(row.seriesAPrice) }}</TableCell>\n                <TableCell class=\"text-foreground text-right font-semibold tabular-nums\">\n                  {{ fmtCurrency(row.convPrice) }}\n                </TableCell>\n                <TableCell>\n                  <Badge\n                    wrap\n                    variant=\"outline\"\n                    :class=\"\n                      row.mechanism === 'Valuation Cap'\n                        ? 'border-primary/20 bg-primary/10 text-primary text-xs'\n                        : 'border-success/20 bg-success/10 text-success text-xs'\n                    \"\n                  >\n                    {{ row.mechanism }}\n                  </Badge>\n                </TableCell>\n                <TableCell class=\"text-right tabular-nums\">{{ fmtNumber(row.issuedShares) }}</TableCell>\n                <TableCell class=\"text-foreground text-right font-bold tabular-nums\">\n                  {{ fmtPercent(row.ownershipPct) }}\n                </TableCell>\n                <TableCell class=\"text-success text-success text-right font-medium tabular-nums\">\n                  {{ fmtPercent(row.effectiveDiscount) }}\n                </TableCell>\n                <TableCell class=\"text-right font-semibold tabular-nums\">\n                  {{ fmtCurrencyWhole(row.impliedValue) }}\n                </TableCell>\n              </TableRow>\n            </TableBody>\n          </Table>\n        </div>\n      </CardContent>\n    </Card>\n\n    <!-- Post-Money SAFE Legal & Governance Guide -->\n    <div class=\"grid grid-cols-1 gap-4 sm:grid-cols-3\">\n      <Card class=\"p-4\">\n        <div class=\"flex items-start gap-3\">\n          <div class=\"bg-primary/10 text-primary mt-0.5 rounded-md p-2\">\n            <ShieldCheck class=\"size-4\" />\n          </div>\n          <div class=\"space-y-1\">\n            <h4 class=\"text-foreground text-sm font-semibold\">Post-Money Cap Protection</h4>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              Acts as an ownership percentage guarantee for seed investors prior to the priced round, regardless of\n              subsequent SAFE issuances.\n            </p>\n          </div>\n        </div>\n      </Card>\n\n      <Card class=\"p-4\">\n        <div class=\"flex items-start gap-3\">\n          <div class=\"bg-success/10 text-success mt-0.5 rounded-md p-2\">\n            <Percent class=\"size-4\" />\n          </div>\n          <div class=\"space-y-1\">\n            <h4 class=\"text-foreground text-sm font-semibold\">Discount Rate Safety Net</h4>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              Protects investors if Series A prices below the valuation cap, guaranteeing a 15%–25% discount off the\n              institutional share price.\n            </p>\n          </div>\n        </div>\n      </Card>\n\n      <Card class=\"p-4\">\n        <div class=\"flex items-start gap-3\">\n          <div class=\"bg-warning/10 text-warning mt-0.5 rounded-md p-2\">\n            <PieChart class=\"size-4\" />\n          </div>\n          <div class=\"space-y-1\">\n            <h4 class=\"text-foreground text-sm font-semibold\">Founder Dilution Transparency</h4>\n            <p class=\"text-muted-foreground text-xs leading-relaxed\">\n              YC v1.1 post-money SAFEs dilute only founders and common shareholders, eliminating pre-money SAFE circular\n              dilution surprises.\n            </p>\n          </div>\n        </div>\n      </Card>\n    </div>\n  </div>\n</template>\n",
      "type": "registry:block",
      "target": "~/app/components/blocks/SafeNoteCalculator.vue"
    }
  ],
  "dependencies": [
    "lucide-vue-next"
  ],
  "devDependencies": [],
  "registryDependencies": [
    "https://uipkge.dev/r/vue/badge.json",
    "https://uipkge.dev/r/vue/button.json",
    "https://uipkge.dev/r/vue/card.json",
    "https://uipkge.dev/r/vue/input.json",
    "https://uipkge.dev/r/vue/separator.json",
    "https://uipkge.dev/r/vue/slider.json",
    "https://uipkge.dev/r/vue/switch.json",
    "https://uipkge.dev/r/vue/table.json",
    "https://uipkge.dev/r/vue/tabs.json"
  ],
  "description": "Y Combinator Post-Money SAFE note valuation, conversion share price, effective discount, and cap table equity dilution simulator with interactive parameter controls and Series A financing sensitivity matrix.",
  "categories": [
    "finance",
    "legal",
    "billing"
  ]
}