{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "bento-product",
  "type": "registry:component",
  "title": "Bento Product",
  "description": "An asymmetric four-column bento with a revenue chart that switches range, a sprint calendar, working automation toggles, live presence and a typing command bar.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "bento",
    "bento",
    "features",
    "chart",
    "calendar",
    "command",
    "saas"
  ],
  "docs": "https://hyperblur.dev/effects/bento-product",
  "files": [
    {
      "path": "registry/hyperblur/bento-product.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/bento-product.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface BentoProductLink {\n  label: string;\n  href: string;\n}\n\nexport interface BentoProductAutomation {\n  label: string;\n  detail?: string;\n  enabled?: boolean;\n}\n\nexport interface BentoProductPerson {\n  name: string;\n  status: string;\n  color?: string;\n}\n\nexport interface BentoProductProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  eyebrow?: string;\n  title?: string;\n  subtitle?: string;\n  cta?: BentoProductLink | null;\n  automations?: BentoProductAutomation[];\n  people?: BentoProductPerson[];\n  command?: string;\n  onAutomationChange?: (index: number, enabled: boolean) => void;\n  accent?: string;\n}\n\nconst css = `\n@keyframes hb-kb1-rise { from { opacity: 0; transform: translate3d(0, 18px, 0); } to { opacity: 1; transform: none; } }\n@keyframes hb-kb1-draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }\n@keyframes hb-kb1-fade { from { opacity: 0; } to { opacity: 1; } }\n@keyframes hb-kb1-type { 0% { width: 0; } 45%, 82% { width: calc(var(--hb-kb1-n) * 1ch); } 100% { width: 0; } }\n@keyframes hb-kb1-caret { 50% { opacity: 0; } }\n@keyframes hb-kb1-ping { 0% { transform: scale(1); opacity: .7; } 80%, 100% { transform: scale(2.4); opacity: 0; } }\n@keyframes hb-kb1-roam {\n  0%, 100% { transform: translate3d(12%, 10%, 0); }\n  30% { transform: translate3d(58%, 34%, 0); }\n  60% { transform: translate3d(30%, 62%, 0); }\n  80% { transform: translate3d(66%, 14%, 0); }\n}\n.hb-kb1 {\n  --hb-kb1-accent: #8b5cf6;\n  position: relative;\n  box-sizing: border-box;\n  width: 100%;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #0a0a0a;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-kb1 *, .hb-kb1 *::before, .hb-kb1 *::after { box-sizing: border-box; }\n.hb-kb1::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  background: radial-gradient(50% 40% at 20% 0%, color-mix(in srgb, var(--hb-kb1-accent) 16%, transparent), transparent 70%);\n}\n.hb-kb1-in {\n  position: relative;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: clamp(56px, 8cqi, 104px) clamp(16px, 5cqi, 48px);\n}\n.hb-kb1-head {\n  display: grid;\n  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);\n  align-items: end;\n  gap: 20px 48px;\n  margin-bottom: clamp(28px, 4cqi, 44px);\n  animation: hb-kb1-rise .7s cubic-bezier(.2, .8, .2, 1) backwards;\n}\n.hb-kb1-eyebrow {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  margin: 0 0 16px;\n  padding: 5px 11px 5px 9px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 999px;\n  background: rgba(255, 255, 255, .03);\n  color: #a1a1a1;\n  font-size: 12px;\n  font-weight: 500;\n}\n.hb-kb1-eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--hb-kb1-accent); box-shadow: 0 0 10px var(--hb-kb1-accent); }\n.hb-kb1-title {\n  margin: 0;\n  font-size: clamp(30px, 4.4cqi, 48px);\n  font-weight: 600;\n  line-height: 1.06;\n  letter-spacing: -.035em;\n  text-wrap: balance;\n}\n.hb-kb1-side { display: grid; gap: 16px; justify-items: start; }\n.hb-kb1-sub { margin: 0; color: #8f8f8f; font-size: 15.5px; line-height: 1.6; text-wrap: pretty; }\n.hb-kb1-cta {\n  display: inline-flex;\n  align-items: center;\n  gap: 8px;\n  padding: 9px 16px;\n  border-radius: 999px;\n  background: #ededed;\n  color: #0a0a0a;\n  font-size: 14px;\n  font-weight: 600;\n  text-decoration: none;\n  transition: transform .2s ease, background .2s ease;\n}\n.hb-kb1-cta:hover { background: #fff; transform: translate3d(0, -1px, 0); }\n.hb-kb1-cta svg { transition: transform .2s ease; }\n.hb-kb1-cta:hover svg { transform: translate3d(3px, 0, 0); }\n.hb-kb1-cta:focus-visible { outline: 2px solid var(--hb-kb1-accent); outline-offset: 3px; }\n.hb-kb1-grid {\n  display: grid;\n  grid-template-columns: repeat(4, minmax(0, 1fr));\n  grid-template-areas:\n    \"chart chart cal tog\"\n    \"chart chart cal pres\"\n    \"cmd cmd cmd pres\";\n  gap: 12px;\n}\n.hb-kb1-cell {\n  position: relative;\n  display: flex;\n  flex-direction: column;\n  min-width: 0;\n  overflow: hidden;\n  padding: 18px;\n  border: 1px solid rgba(255, 255, 255, .08);\n  border-radius: 18px;\n  background: linear-gradient(180deg, #131313, #0e0e0e);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);\n  animation: hb-kb1-rise .7s cubic-bezier(.2, .8, .2, 1) backwards;\n  animation-delay: calc(var(--hb-kb1-i, 0) * 80ms + 120ms);\n  transition: border-color .25s ease;\n}\n.hb-kb1-cell::before {\n  content: \"\";\n  position: absolute;\n  inset: 0;\n  pointer-events: none;\n  opacity: 0;\n  background: radial-gradient(60% 50% at 0% 0%, color-mix(in srgb, var(--hb-kb1-accent) 14%, transparent), transparent 70%);\n  transition: opacity .35s ease;\n}\n.hb-kb1-cell:hover { border-color: rgba(255, 255, 255, .15); }\n.hb-kb1-cell:hover::before { opacity: 1; }\n.hb-kb1-cell > * { position: relative; }\n.hb-kb1-cap { margin-top: auto; padding-top: 16px; }\n.hb-kb1-cap h3 { margin: 0; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }\n.hb-kb1-cap p { margin: 4px 0 0; color: #8f8f8f; font-size: 13px; line-height: 1.5; }\n.hb-kb1-label { color: #8f8f8f; font-size: 12px; font-weight: 500; }\n.hb-kb1-chart { grid-area: chart; }\n.hb-kb1-chead { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }\n.hb-kb1-value { display: flex; align-items: baseline; gap: 10px; margin-top: 6px; }\n.hb-kb1-value strong { font-size: clamp(24px, 3.2cqi, 34px); font-weight: 600; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }\n.hb-kb1-delta {\n  padding: 2px 8px;\n  border-radius: 999px;\n  background: color-mix(in srgb, #22c55e 14%, transparent);\n  color: #4ade80;\n  font-size: 12px;\n  font-weight: 600;\n}\n.hb-kb1-tabs { display: inline-flex; padding: 3px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: #0b0b0b; }\n.hb-kb1-tab {\n  padding: 5px 10px;\n  border: 0;\n  border-radius: 7px;\n  background: transparent;\n  color: #8f8f8f;\n  font: inherit;\n  font-size: 12px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: background .2s ease, color .2s ease;\n}\n.hb-kb1-tab:hover { color: #ededed; }\n.hb-kb1-tab[aria-pressed=\"true\"] { background: #1f1f1f; color: #ededed; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); }\n.hb-kb1-tab:focus-visible { outline: 2px solid var(--hb-kb1-accent); outline-offset: 1px; }\n.hb-kb1-plot { position: relative; flex: 1; min-height: 150px; margin-top: 18px; }\n.hb-kb1-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }\n.hb-kb1-gridline { stroke: rgba(255, 255, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }\n.hb-kb1-area { animation: hb-kb1-fade 1.2s ease .3s both; }\n.hb-kb1-line {\n  fill: none;\n  stroke: var(--hb-kb1-accent);\n  stroke-width: 2;\n  stroke-linecap: round;\n  stroke-linejoin: round;\n  vector-effect: non-scaling-stroke;\n  stroke-dasharray: 1;\n  animation: hb-kb1-draw 1.4s cubic-bezier(.65, 0, .35, 1) .2s both;\n}\n.hb-kb1-cols { position: absolute; inset: 0; display: flex; }\n.hb-kb1-col { position: relative; flex: 1; }\n.hb-kb1-col::before {\n  content: \"\";\n  position: absolute;\n  top: 0;\n  bottom: 0;\n  left: 50%;\n  width: 1px;\n  background: linear-gradient(transparent, rgba(255, 255, 255, .18), transparent);\n  opacity: 0;\n  transition: opacity .15s ease;\n}\n.hb-kb1-dot {\n  position: absolute;\n  left: 50%;\n  width: 10px;\n  height: 10px;\n  margin: -5px 0 0 -5px;\n  border: 2px solid #0e0e0e;\n  border-radius: 50%;\n  background: var(--hb-kb1-accent);\n  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hb-kb1-accent) 25%, transparent);\n  opacity: 0;\n  transform: scale(.4);\n  transition: opacity .15s ease, transform .2s ease;\n}\n.hb-kb1-tip {\n  position: absolute;\n  left: 50%;\n  z-index: 2;\n  padding: 5px 8px;\n  border: 1px solid rgba(255, 255, 255, .12);\n  border-radius: 8px;\n  background: #1a1a1a;\n  color: #ededed;\n  font-size: 11.5px;\n  font-weight: 600;\n  white-space: nowrap;\n  font-variant-numeric: tabular-nums;\n  opacity: 0;\n  pointer-events: none;\n  transform: translate(-50%, calc(-100% - 12px));\n  transition: opacity .15s ease;\n}\n.hb-kb1-tip span { display: block; color: #8f8f8f; font-weight: 500; font-size: 10.5px; }\n.hb-kb1-col:hover::before, .hb-kb1-col:hover .hb-kb1-dot, .hb-kb1-col:hover .hb-kb1-tip { opacity: 1; }\n.hb-kb1-col:hover .hb-kb1-dot { transform: scale(1); }\n.hb-kb1-col:first-child .hb-kb1-tip { transform: translate(-12%, calc(-100% - 12px)); }\n.hb-kb1-col:last-child .hb-kb1-tip { transform: translate(-88%, calc(-100% - 12px)); }\n.hb-kb1-minis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }\n.hb-kb1-minis div { min-width: 0; }\n.hb-kb1-minis b { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }\n.hb-kb1-cal { grid-area: cal; }\n.hb-kb1-calhead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }\n.hb-kb1-calhead strong { font-size: 13.5px; font-weight: 600; }\n.hb-kb1-chip { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--hb-kb1-accent) 16%, transparent); color: color-mix(in srgb, var(--hb-kb1-accent) 60%, #fff); font-size: 11px; font-weight: 600; }\n.hb-kb1-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px 0; text-align: center; font-size: 11px; font-variant-numeric: tabular-nums; }\n.hb-kb1-days > span { position: relative; display: grid; place-items: center; height: 24px; color: #a1a1a1; }\n.hb-kb1-days > span[data-h=\"true\"] { color: #5c5c5c; font-size: 10px; font-weight: 600; }\n.hb-kb1-days > span[data-r] { background: color-mix(in srgb, var(--hb-kb1-accent) 13%, transparent); color: #ededed; }\n.hb-kb1-days > span[data-r=\"s\"] { border-radius: 8px 0 0 8px; }\n.hb-kb1-days > span[data-r=\"e\"] { border-radius: 0 8px 8px 0; }\n.hb-kb1-days > span[data-t=\"true\"]::before {\n  content: \"\";\n  position: absolute;\n  width: 24px;\n  height: 24px;\n  border-radius: 8px;\n  background: var(--hb-kb1-accent);\n  z-index: -1;\n}\n.hb-kb1-days > span[data-t=\"true\"] { color: #fff; font-weight: 600; z-index: 0; }\n.hb-kb1-days > span[data-e=\"true\"]::after { content: \"\"; position: absolute; bottom: 1px; width: 4px; height: 4px; border-radius: 50%; background: #f5a524; }\n.hb-kb1-events { display: grid; gap: 6px; margin-top: 14px; }\n.hb-kb1-event { display: grid; grid-template-columns: 3px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .03); font-size: 12px; }\n.hb-kb1-event i { align-self: stretch; border-radius: 3px; background: var(--c); }\n.hb-kb1-event span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-kb1-event small { color: #8f8f8f; font-size: 11px; font-variant-numeric: tabular-nums; }\n.hb-kb1-tog { grid-area: tog; }\n.hb-kb1-auto { display: grid; gap: 4px; margin: 10px 0 0; padding: 0; list-style: none; }\n.hb-kb1-auto li { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid rgba(255, 255, 255, .05); }\n.hb-kb1-auto li:last-child { border-bottom: 0; }\n.hb-kb1-auto b { display: block; font-size: 12.5px; font-weight: 500; }\n.hb-kb1-auto small { display: block; color: #6f6f6f; font-size: 11px; }\n.hb-kb1-switch {\n  position: relative;\n  flex: none;\n  width: 34px;\n  height: 20px;\n  padding: 0;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 999px;\n  background: #262626;\n  cursor: pointer;\n  transition: background .25s ease, border-color .25s ease;\n}\n.hb-kb1-switch::after {\n  content: \"\";\n  position: absolute;\n  top: 2px;\n  left: 2px;\n  width: 14px;\n  height: 14px;\n  border-radius: 50%;\n  background: #d4d4d4;\n  box-shadow: 0 1px 3px rgba(0, 0, 0, .4);\n  transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), background .25s ease;\n}\n.hb-kb1-switch[aria-checked=\"true\"] { background: var(--hb-kb1-accent); border-color: transparent; }\n.hb-kb1-switch[aria-checked=\"true\"]::after { transform: translateX(14px); background: #fff; }\n.hb-kb1-switch:focus-visible { outline: 2px solid var(--hb-kb1-accent); outline-offset: 2px; }\n.hb-kb1-pres { grid-area: pres; }\n.hb-kb1-stage { position: relative; height: 74px; margin: 2px 0 10px; border-radius: 12px; background: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, .08) 1px, transparent 0) 0 0 / 12px 12px; }\n.hb-kb1-cursor { position: absolute; inset: 0 30% 30% 0; animation: hb-kb1-roam 9s ease-in-out infinite; }\n.hb-kb1-cursor > div { display: inline-flex; align-items: flex-start; }\n.hb-kb1-cursor svg { flex: none; }\n.hb-kb1-cursor span { margin: 12px 0 0 -2px; padding: 2px 7px; border-radius: 6px 6px 6px 2px; background: var(--hb-kb1-accent); color: #fff; font-size: 10.5px; font-weight: 600; white-space: nowrap; }\n.hb-kb1-people { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }\n.hb-kb1-people li { display: flex; align-items: center; gap: 10px; min-width: 0; }\n.hb-kb1-av { position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--c); color: #0a0a0a; font-size: 10.5px; font-weight: 700; }\n.hb-kb1-av::after { content: \"\"; position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border: 2px solid #101010; border-radius: 50%; background: var(--s, #22c55e); }\n.hb-kb1-av i { position: absolute; right: 0; bottom: 0; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; animation: hb-kb1-ping 2s ease-out infinite; animation-delay: calc(var(--hb-kb1-i, 0) * 500ms); }\n.hb-kb1-people div { min-width: 0; }\n.hb-kb1-people b { display: block; font-size: 12.5px; font-weight: 500; }\n.hb-kb1-people small { display: block; overflow: hidden; color: #7a7a7a; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }\n.hb-kb1-cmd { grid-area: cmd; flex-direction: row; align-items: center; gap: 24px; }\n.hb-kb1-cmd .hb-kb1-cap { flex: 0 0 34%; margin: 0; padding: 0; }\n.hb-kb1-palette { flex: 1; min-width: 0; border: 1px solid rgba(255, 255, 255, .1); border-radius: 14px; background: #0b0b0b; box-shadow: 0 20px 40px -24px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .04); }\n.hb-kb1-input { display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-bottom: 1px solid rgba(255, 255, 255, .07); color: #8f8f8f; font-size: 13px; }\n.hb-kb1-typed { display: inline-block; overflow: hidden; width: calc(var(--hb-kb1-n) * 1ch); max-width: 100%; color: #ededed; font-family: var(--font-mono, ui-monospace, monospace); font-size: 12.5px; white-space: nowrap; vertical-align: bottom; animation: hb-kb1-type 7s steps(var(--hb-kb1-n)) 1s infinite; }\n.hb-kb1-caret { flex: none; width: 2px; height: 16px; margin-left: -8px; background: var(--hb-kb1-accent); animation: hb-kb1-caret 1s steps(1) infinite; }\n.hb-kb1-kbd { margin-left: auto; padding: 2px 6px; border: 1px solid rgba(255, 255, 255, .12); border-radius: 6px; color: #8f8f8f; font-size: 11px; font-family: var(--font-mono, ui-monospace, monospace); }\n.hb-kb1-results { margin: 0; padding: 6px; list-style: none; }\n.hb-kb1-results li { display: flex; align-items: center; gap: 10px; padding: 7px 8px; border-radius: 8px; color: #a1a1a1; font-size: 12.5px; }\n.hb-kb1-results li[data-on=\"true\"] { background: rgba(255, 255, 255, .05); color: #ededed; }\n.hb-kb1-results li svg { flex: none; color: #6f6f6f; }\n.hb-kb1-results li[data-on=\"true\"] svg { color: var(--hb-kb1-accent); }\n.hb-kb1-results li span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.hb-kb1-results li small { color: #5f5f5f; font-size: 11px; }\n@container (max-width: 820px) {\n  .hb-kb1-head { grid-template-columns: minmax(0, 1fr); }\n  .hb-kb1-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: \"chart chart\" \"cal tog\" \"cal pres\" \"cmd cmd\"; }\n}\n@container (max-width: 540px) {\n  .hb-kb1-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: \"chart\" \"cal\" \"tog\" \"pres\" \"cmd\"; }\n  .hb-kb1-cmd { flex-direction: column; align-items: stretch; gap: 14px; }\n  .hb-kb1-cmd .hb-kb1-cap { order: 2; flex: none; }\n  .hb-kb1-minis b { font-size: 13.5px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-kb1 *, .hb-kb1 *::before, .hb-kb1 *::after { animation: none !important; transition: none !important; }\n}\n`;\n\nconst ranges = [\n  { id: \"7D\", total: \"$31,870\", delta: \"+6.4%\", labels: [\"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\", \"Sun\"], data: [3920, 4310, 4080, 4720, 5160, 4890, 4790] },\n  { id: \"30D\", total: \"$128,430\", delta: \"+18.2%\", labels: [\"Oct 3\", \"Oct 6\", \"Oct 9\", \"Oct 12\", \"Oct 15\", \"Oct 18\", \"Oct 21\", \"Oct 24\", \"Oct 27\", \"Oct 30\"], data: [9800, 11200, 10650, 12900, 12100, 14300, 13600, 15800, 16900, 18400] },\n  { id: \"90D\", total: \"$362,915\", delta: \"+41.0%\", labels: [\"Aug 4\", \"Aug 18\", \"Sep 1\", \"Sep 15\", \"Sep 29\", \"Oct 13\", \"Oct 20\", \"Oct 27\"], data: [31200, 34800, 33100, 39600, 42900, 47800, 51200, 56300] },\n];\n\nconst defaultAutomations: BentoProductAutomation[] = [\n  { label: \"Auto-assign reviews\", detail: \"Round robin, design team\", enabled: true },\n  { label: \"Nightly digest\", detail: \"Slack at 6:00 pm\", enabled: false },\n  { label: \"Close stale issues\", detail: \"After 30 days idle\", enabled: true },\n];\n\nconst defaultPeople: BentoProductPerson[] = [\n  { name: \"Maya Chen\", status: \"Editing Q4 Roadmap\", color: \"#c4b5fd\" },\n  { name: \"Jonas Berg\", status: \"In Design review\", color: \"#fcd34d\" },\n  { name: \"Priya Raman\", status: \"Commenting on Launch plan\", color: \"#86efac\" },\n  { name: \"Leo Navarro\", status: \"Away for 12 min\", color: \"#fda4af\" },\n];\n\nfunction money(n: number) {\n  return \"$\" + String(Math.round(n)).replace(/\\B(?=(\\d{3})+(?!\\d))/g, \",\");\n}\n\nfunction initials(name: string) {\n  return name.split(/\\s+/).filter(Boolean).slice(0, 2).map((p) => p[0]?.toUpperCase() ?? \"\").join(\"\");\n}\n\nfunction buildPath(data: number[]) {\n  const min = Math.min(...data) * 0.9;\n  const max = Math.max(...data) * 1.04;\n  const pts = data.map((v, i) => {\n    const x = (i / (data.length - 1)) * 100;\n    const y = 100 - ((v - min) / (max - min)) * 100;\n    return [x, y] as const;\n  });\n  let d = `M${pts[0][0].toFixed(2)},${pts[0][1].toFixed(2)}`;\n  for (let i = 1; i < pts.length; i++) {\n    const [x0, y0] = pts[i - 1];\n    const [x1, y1] = pts[i];\n    const mx = (x0 + x1) / 2;\n    d += ` C${mx.toFixed(2)},${y0.toFixed(2)} ${mx.toFixed(2)},${y1.toFixed(2)} ${x1.toFixed(2)},${y1.toFixed(2)}`;\n  }\n  return { line: d, area: `${d} L100,100 L0,100 Z`, pts };\n}\n\nconst Arrow = () => (\n  <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\" aria-hidden=\"true\">\n    <path d=\"M3 8h10M9 4l4 4-4 4\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n  </svg>\n);\n\nexport function BentoProduct({\n  eyebrow = \"Workspace\",\n  title = \"Plan, ship and stay in sync from one calm workspace\",\n  subtitle = \"Northwind brings revenue, schedules, automations and your whole team into a single surface that updates the moment anything changes.\",\n  cta = { label: \"Explore the platform\", href: \"#\" },\n  automations = defaultAutomations,\n  people = defaultPeople,\n  command = \"Create issue in Q4 Launch\",\n  onAutomationChange,\n  accent = \"#8b5cf6\",\n  className,\n  style,\n  ...rest\n}: BentoProductProps) {\n  const [range, setRange] = React.useState(1);\n  const [enabled, setEnabled] = React.useState<boolean[]>(() => automations.map((a) => Boolean(a.enabled)));\n  const current = ranges[range];\n  const chart = buildPath(current.data);\n  const gid = React.useId().replace(/:/g, \"\");\n\n  const toggle = (i: number) => {\n    const next = !enabled[i];\n    setEnabled((prev) => prev.map((v, j) => (j === i ? next : v)));\n    onAutomationChange?.(i, next);\n  };\n\n  const days: { label: string; head?: boolean; today?: boolean; event?: boolean; r?: string }[] = [\n    ...\"MTWTFSS\".split(\"\").map((d) => ({ label: d, head: true })),\n    ...Array.from({ length: 6 }, () => ({ label: \"\" })),\n    ...Array.from({ length: 30 }, (_, i) => {\n      const n = i + 1;\n      return {\n        label: String(n),\n        today: n === 2,\n        event: n === 4 || n === 12 || n === 18 || n === 24,\n        r: n === 9 ? \"s\" : n === 13 ? \"e\" : n > 9 && n < 13 ? \"m\" : undefined,\n      };\n    }),\n  ];\n\n  return (\n    <section\n      className={[\"hb-kb1\", className].filter(Boolean).join(\" \")}\n      style={{ \"--hb-kb1-accent\": accent, ...style } as React.CSSProperties}\n      {...rest}\n    >\n      <style href=\"hb-bento-product\" precedence=\"default\">{css}</style>\n      <div className=\"hb-kb1-in\">\n        <header className=\"hb-kb1-head\">\n          <div>\n            {eyebrow ? (\n              <p className=\"hb-kb1-eyebrow\">\n                <i aria-hidden=\"true\" />\n                {eyebrow}\n              </p>\n            ) : null}\n            <h2 className=\"hb-kb1-title\">{title}</h2>\n          </div>\n          <div className=\"hb-kb1-side\">\n            {subtitle ? <p className=\"hb-kb1-sub\">{subtitle}</p> : null}\n            {cta ? (\n              <a className=\"hb-kb1-cta\" href={cta.href}>\n                {cta.label}\n                <Arrow />\n              </a>\n            ) : null}\n          </div>\n        </header>\n\n        <div className=\"hb-kb1-grid\">\n          <article className=\"hb-kb1-cell hb-kb1-chart\" style={{ \"--hb-kb1-i\": 0 } as React.CSSProperties}>\n            <div className=\"hb-kb1-chead\">\n              <div>\n                <span className=\"hb-kb1-label\">Net revenue</span>\n                <div className=\"hb-kb1-value\">\n                  <strong>{current.total}</strong>\n                  <span className=\"hb-kb1-delta\">{current.delta}</span>\n                </div>\n              </div>\n              <div className=\"hb-kb1-tabs\" role=\"group\" aria-label=\"Date range\">\n                {ranges.map((r, i) => (\n                  <button key={r.id} type=\"button\" className=\"hb-kb1-tab\" aria-pressed={i === range} onClick={() => setRange(i)}>\n                    {r.id}\n                  </button>\n                ))}\n              </div>\n            </div>\n            <div className=\"hb-kb1-plot\">\n              <svg viewBox=\"0 0 100 100\" preserveAspectRatio=\"none\" aria-hidden=\"true\">\n                <defs>\n                  <linearGradient id={`${gid}-a`} x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                    <stop offset=\"0\" stopColor={accent} stopOpacity=\".32\" />\n                    <stop offset=\"1\" stopColor={accent} stopOpacity=\"0\" />\n                  </linearGradient>\n                </defs>\n                {[20, 45, 70, 95].map((y) => (\n                  <line key={y} className=\"hb-kb1-gridline\" x1=\"0\" x2=\"100\" y1={y} y2={y} />\n                ))}\n                <g key={current.id}>\n                  <path className=\"hb-kb1-area\" d={chart.area} fill={`url(#${gid}-a)`} />\n                  <path className=\"hb-kb1-line\" d={chart.line} pathLength={1} />\n                </g>\n              </svg>\n              <div className=\"hb-kb1-cols\">\n                {chart.pts.map(([, y], i) => (\n                  <div key={`${current.id}-${i}`} className=\"hb-kb1-col\">\n                    <span className=\"hb-kb1-dot\" style={{ top: `${y.toFixed(2)}%` }} />\n                    <span className=\"hb-kb1-tip\" style={{ top: `${y.toFixed(2)}%` }}>\n                      <span>{current.labels[i]}</span>\n                      {money(current.data[i])}\n                    </span>\n                  </div>\n                ))}\n              </div>\n            </div>\n            <div className=\"hb-kb1-minis\">\n              <div>\n                <span className=\"hb-kb1-label\">Orders</span>\n                <b>3,218</b>\n              </div>\n              <div>\n                <span className=\"hb-kb1-label\">Avg. order</span>\n                <b>$39.90</b>\n              </div>\n              <div>\n                <span className=\"hb-kb1-label\">Refunds</span>\n                <b>0.6%</b>\n              </div>\n            </div>\n          </article>\n\n          <article className=\"hb-kb1-cell hb-kb1-cal\" style={{ \"--hb-kb1-i\": 1 } as React.CSSProperties}>\n            <div className=\"hb-kb1-calhead\">\n              <strong>November 2026</strong>\n              <span className=\"hb-kb1-chip\">Sprint 14</span>\n            </div>\n            <div className=\"hb-kb1-days\" aria-hidden=\"true\">\n              {days.map((d, i) => (\n                <span key={i} data-h={d.head ? \"true\" : undefined} data-t={d.today ? \"true\" : undefined} data-e={d.event ? \"true\" : undefined} data-r={d.r}>\n                  {d.label}\n                </span>\n              ))}\n            </div>\n            <div className=\"hb-kb1-events\">\n              <div className=\"hb-kb1-event\" style={{ \"--c\": accent } as React.CSSProperties}>\n                <i />\n                <span>Design review</span>\n                <small>10:00</small>\n              </div>\n              <div className=\"hb-kb1-event\" style={{ \"--c\": \"#f5a524\" } as React.CSSProperties}>\n                <i />\n                <span>Launch sync</span>\n                <small>14:30</small>\n              </div>\n            </div>\n            <div className=\"hb-kb1-cap\">\n              <h3>Plans that line up</h3>\n              <p>Sprints, reviews and launches on one shared calendar.</p>\n            </div>\n          </article>\n\n          <article className=\"hb-kb1-cell hb-kb1-tog\" style={{ \"--hb-kb1-i\": 2 } as React.CSSProperties}>\n            <span className=\"hb-kb1-label\">Automations</span>\n            <ul className=\"hb-kb1-auto\">\n              {automations.map((a, i) => (\n                <li key={a.label}>\n                  <div>\n                    <b>{a.label}</b>\n                    {a.detail ? <small>{a.detail}</small> : null}\n                  </div>\n                  <button\n                    type=\"button\"\n                    role=\"switch\"\n                    aria-checked={Boolean(enabled[i])}\n                    aria-label={a.label}\n                    className=\"hb-kb1-switch\"\n                    onClick={() => toggle(i)}\n                  />\n                </li>\n              ))}\n            </ul>\n          </article>\n\n          <article className=\"hb-kb1-cell hb-kb1-pres\" style={{ \"--hb-kb1-i\": 3 } as React.CSSProperties}>\n            <div className=\"hb-kb1-stage\" aria-hidden=\"true\">\n              <div className=\"hb-kb1-cursor\">\n                <div>\n                  <svg width=\"16\" height=\"16\" viewBox=\"0 0 16 16\">\n                    <path d=\"M2 1.5l11 5.2-4.6 1.3L6.6 13 2 1.5z\" fill={accent} stroke=\"#fff\" strokeWidth=\"1\" strokeLinejoin=\"round\" />\n                  </svg>\n                  <span>{people[0]?.name.split(\" \")[0] ?? \"Maya\"}</span>\n                </div>\n              </div>\n            </div>\n            <ul className=\"hb-kb1-people\">\n              {people.map((p, i) => (\n                <li key={p.name}>\n                  <span\n                    className=\"hb-kb1-av\"\n                    style={{ \"--c\": p.color ?? \"#d4d4d4\", \"--s\": i === people.length - 1 ? \"#f5a524\" : \"#22c55e\", \"--hb-kb1-i\": i } as React.CSSProperties}\n                  >\n                    {initials(p.name)}\n                    {i < people.length - 1 ? <i aria-hidden=\"true\" /> : null}\n                  </span>\n                  <div>\n                    <b>{p.name}</b>\n                    <small>{p.status}</small>\n                  </div>\n                </li>\n              ))}\n            </ul>\n            <div className=\"hb-kb1-cap\">\n              <h3>Know who is around</h3>\n              <p>Live presence and cursors on every doc.</p>\n            </div>\n          </article>\n\n          <article className=\"hb-kb1-cell hb-kb1-cmd\" style={{ \"--hb-kb1-i\": 4 } as React.CSSProperties}>\n            <div className=\"hb-kb1-cap\">\n              <h3>Everything is one keystroke away</h3>\n              <p>Jump to any project, run an action or invite a teammate without touching the mouse.</p>\n            </div>\n            <div className=\"hb-kb1-palette\" aria-hidden=\"true\">\n              <div className=\"hb-kb1-input\">\n                <svg width=\"15\" height=\"15\" viewBox=\"0 0 16 16\" fill=\"none\">\n                  <circle cx=\"7\" cy=\"7\" r=\"4.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n                  <path d=\"M10.5 10.5L14 14\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n                </svg>\n                <span className=\"hb-kb1-typed\" style={{ \"--hb-kb1-n\": command.length } as React.CSSProperties}>\n                  {command}\n                </span>\n                <span className=\"hb-kb1-caret\" />\n                <span className=\"hb-kb1-kbd\">⌘K</span>\n              </div>\n              <ul className=\"hb-kb1-results\">\n                <li data-on=\"true\">\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\">\n                    <circle cx=\"8\" cy=\"8\" r=\"5.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n                    <path d=\"M8 5.5v5M5.5 8h5\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n                  </svg>\n                  <span>Create issue in Q4 Launch</span>\n                  <small>↵</small>\n                </li>\n                <li>\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\">\n                    <rect x=\"2.5\" y=\"2.5\" width=\"11\" height=\"11\" rx=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n                    <path d=\"M2.5 6.5h11\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n                  </svg>\n                  <span>Open Q4 Launch board</span>\n                  <small>G then B</small>\n                </li>\n                <li>\n                  <svg width=\"14\" height=\"14\" viewBox=\"0 0 16 16\" fill=\"none\">\n                    <circle cx=\"6\" cy=\"6\" r=\"2.5\" stroke=\"currentColor\" strokeWidth=\"1.5\" />\n                    <path d=\"M1.5 13.5c.6-2.3 2.3-3.5 4.5-3.5s3.9 1.2 4.5 3.5M12 5v4M10 7h4\" stroke=\"currentColor\" strokeWidth=\"1.5\" strokeLinecap=\"round\" />\n                  </svg>\n                  <span>Invite teammate</span>\n                  <small>I</small>\n                </li>\n              </ul>\n            </div>\n          </article>\n        </div>\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}