{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-logo",
  "type": "registry:component",
  "title": "Hero Dot Logo",
  "description": "Light gray stage with a huge graphite dotted mark that swings like a pendulum, casting a soft dotted shadow. Electric lime accents, centered brand bar.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "logo",
    "svg",
    "3d",
    "canvas"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-logo",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-logo.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-logo.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotLogoLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotLogoProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotLogoLink | null;\n  brand?: string;\n  nav?: HeroDotLogoLink[];\n  navCta?: HeroDotLogoLink | null;\n  learnMore?: HeroDotLogoLink | null;\n  accent?: string;\n  density?: number;\n  speed?: number;\n  path?: string;\n  viewBox?: string;\n  depth?: number;\n  swing?: number;\n  spin?: boolean;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n}\n\nconst css = `\n@keyframes hb-hh8-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n.hb-hh8 {\n  --hb-hh8-accent: #b6ff3c;\n  --hb-hh8-ink: #0c0d10;\n  --hb-hh8-mono: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);\n  position: relative;\n  isolation: isolate;\n  box-sizing: border-box;\n  display: flex;\n  flex-direction: column;\n  width: 100%;\n  min-height: 680px;\n  overflow: hidden;\n  container-type: inline-size;\n  background: #e9e9ec;\n  color: #16171b;\n  font-family: var(--font-sans, ui-sans-serif, system-ui, sans-serif);\n  font-style: normal;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-hh8 *, .hb-hh8 *::before, .hb-hh8 *::after { box-sizing: border-box; }\n.hb-hh8-canvas {\n  position: absolute;\n  inset: 0;\n  z-index: 0;\n  display: block;\n  width: 100%;\n  height: 100%;\n  pointer-events: none;\n}\n.hb-hh8-bar {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: 1fr auto 1fr;\n  align-items: center;\n  gap: 24px;\n  width: 100%;\n  max-width: 1240px;\n  margin: 0 auto;\n  padding: 22px 32px;\n}\n.hb-hh8-brand {\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  color: #101115;\n  font-size: 15px;\n  font-weight: 700;\n  letter-spacing: -.02em;\n  text-decoration: none;\n  border-radius: 8px;\n}\n.hb-hh8-mark { flex: none; color: #101115; }\n.hb-hh8-links {\n  display: flex;\n  align-items: center;\n  gap: 2px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-hh8-side-l .hb-hh8-links { justify-content: flex-start; }\n.hb-hh8-side-r { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }\n.hb-hh8-link {\n  display: inline-flex;\n  padding: 7px 12px;\n  border-radius: 8px;\n  color: #53545b;\n  font-size: 13px;\n  font-weight: 500;\n  text-decoration: none;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh8-link:hover { color: #101115; background: rgba(16, 17, 21, .07); }\n.hb-hh8-search {\n  display: inline-grid;\n  place-items: center;\n  width: 34px;\n  height: 34px;\n  padding: 0;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: #53545b;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh8-search:hover { color: #101115; background: rgba(16, 17, 21, .07); }\n.hb-hh8-outline {\n  display: inline-flex;\n  align-items: center;\n  height: 34px;\n  padding: 0 14px;\n  border: 1px solid #16171b;\n  border-radius: 8px;\n  color: #16171b;\n  font-size: 13px;\n  font-weight: 600;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: background-color .2s ease, color .2s ease;\n}\n.hb-hh8-outline:hover { background: #16171b; color: #e9e9ec; }\n.hb-hh8-stage {\n  position: relative;\n  z-index: 1;\n  flex: 1 1 auto;\n  min-height: 300px;\n}\n.hb-hh8-foot {\n  position: relative;\n  z-index: 2;\n  display: flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 18px;\n  width: 100%;\n  max-width: 880px;\n  margin: 0 auto;\n  padding: 0 32px 56px;\n  text-align: center;\n}\n.hb-hh8-title {\n  margin: 0;\n  color: #101115;\n  font-size: clamp(30px, 4.6cqi, 62px);\n  font-weight: 700;\n  line-height: 1;\n  letter-spacing: -.05em;\n  text-wrap: balance;\n  animation: hb-hh8-up .8s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh8-sub {\n  max-width: 36em;\n  margin: 0;\n  color: #50515a;\n  font-size: 15px;\n  line-height: 1.55;\n  text-wrap: pretty;\n  animation: hb-hh8-up .8s .08s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh8-caption {\n  margin: 0;\n  color: #6d6e76;\n  font-family: var(--hb-hh8-mono);\n  font-size: 11.5px;\n  letter-spacing: .04em;\n}\n.hb-hh8-row {\n  display: flex;\n  align-items: stretch;\n  justify-content: center;\n  flex-wrap: wrap;\n  gap: 8px;\n  max-width: 100%;\n  animation: hb-hh8-up .8s .16s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-hh8-cmd {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  height: 44px;\n  padding: 0 6px 0 14px;\n  border: 1px solid rgba(16, 17, 21, .18);\n  border-radius: 8px;\n  background: rgba(255, 255, 255, .55);\n}\n.hb-hh8-prompt { flex: none; color: #16171b; font-family: var(--hb-hh8-mono); font-size: 12px; font-weight: 700; }\n.hb-hh8-code {\n  min-width: 0;\n  overflow: hidden;\n  color: #2b2c33;\n  font-family: var(--hb-hh8-mono);\n  font-size: 12px;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-hh8-copybtn {\n  position: relative;\n  display: inline-grid;\n  flex: none;\n  place-items: center;\n  width: 30px;\n  height: 30px;\n  padding: 0;\n  border: 0;\n  border-radius: 8px;\n  background: transparent;\n  color: #53545b;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-hh8-copybtn:hover { color: #101115; background: rgba(16, 17, 21, .08); }\n.hb-hh8-copybtn[data-done=\"true\"] { color: #101115; background: var(--hb-hh8-accent); }\n.hb-hh8-cta {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 44px;\n  padding: 0 16px 0 20px;\n  border: 1px solid #16171b;\n  border-radius: 8px;\n  background: var(--hb-hh8-accent);\n  color: var(--hb-hh8-ink);\n  font-size: 14px;\n  font-weight: 700;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  white-space: nowrap;\n  box-shadow: 3px 3px 0 #16171b;\n  transition: transform .15s ease, box-shadow .15s ease;\n}\n.hb-hh8-cta:hover { transform: translate(1px, 1px); box-shadow: 2px 2px 0 #16171b; }\n.hb-hh8-cta svg { transition: transform .2s ease; }\n.hb-hh8-cta:hover svg { transform: translateX(2px); }\n.hb-hh8-more {\n  display: inline-flex;\n  align-items: center;\n  gap: 4px;\n  padding: 4px 8px;\n  border-radius: 8px;\n  color: #53545b;\n  font-family: var(--hb-hh8-mono);\n  font-size: 11px;\n  letter-spacing: .1em;\n  text-transform: uppercase;\n  text-decoration: none;\n  transition: color .2s ease;\n}\n.hb-hh8-more:hover { color: #101115; }\n.hb-hh8 a:focus-visible, .hb-hh8 button:focus-visible {\n  outline: 2px solid #16171b;\n  outline-offset: 2px;\n}\n.hb-hh8-sr {\n  position: absolute;\n  width: 1px;\n  height: 1px;\n  overflow: hidden;\n  clip: rect(0 0 0 0);\n  white-space: nowrap;\n}\n@container (max-width: 760px) {\n  .hb-hh8-bar { padding: 16px 20px; gap: 12px; }\n  .hb-hh8-foot { padding: 0 20px 44px; }\n}\n@container (max-width: 640px) {\n  .hb-hh8-bar { grid-template-columns: 1fr auto 1fr; }\n  .hb-hh8-side-l .hb-hh8-links, .hb-hh8-side-r .hb-hh8-links, .hb-hh8-outline { display: none; }\n  .hb-hh8-side-l { min-width: 34px; }\n  .hb-hh8-stage { min-height: calc(52cqi + 20px); }\n  .hb-hh8-sub { font-size: 14px; }\n  .hb-hh8-row { flex-direction: column; align-self: stretch; }\n  .hb-hh8-cta { width: 100%; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-hh8-title, .hb-hh8-sub, .hb-hh8-row { animation: none; }\n  .hb-hh8-link, .hb-hh8-search, .hb-hh8-outline, .hb-hh8-copybtn, .hb-hh8-cta, .hb-hh8-cta svg, .hb-hh8-more { transition: none; }\n  .hb-hh8-cta:hover, .hb-hh8-cta:hover svg { transform: none; }\n}\n`;\n\nconst defaultNav: HeroDotLogoLink[] = [\n  { label: \"Product\", href: \"#\" },\n  { label: \"Brand kit\", href: \"#\" },\n  { label: \"Pricing\", href: \"#\" },\n  { label: \"Changelog\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotLogoLink = { label: \"Sign in\", href: \"#\" };\nconst defaultPrimary: HeroDotLogoLink = { label: \"Upload your mark\", href: \"#\" };\nconst defaultMore: HeroDotLogoLink = { label: \"Learn more\", href: \"#\" };\n\nconst TAU = Math.PI * 2;\nconst GRAPHITE = \"28, 29, 34\";\nconst LEVELS = 8;\n\ninterface Mask {\n  on: Uint8Array;\n  w: number;\n  h: number;\n}\n\ninterface Cloud {\n  n: number;\n  x: Float32Array;\n  y: Float32Array;\n  z: Float32Array;\n  kind: Uint8Array;\n  size: Float32Array;\n  u: Float32Array;\n  sparks: number[];\n  aspect: number;\n}\n\nfunction hash(i: number, salt: number) {\n  let x = (Math.imul(i + 1, 0x9e3779b1) ^ Math.imul(salt + 11, 0x85ebca6b)) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = Math.imul((x >>> 16) ^ x, 0x45d9f3b) >>> 0;\n  x = ((x >>> 16) ^ x) >>> 0;\n  return x / 4294967296;\n}\n\nfunction hexRgb(value: string): [number, number, number] | null {\n  const m = /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.exec(value.trim());\n  if (!m) return null;\n  let h = m[1];\n  if (h.length === 3) h = h[0] + h[0] + h[1] + h[1] + h[2] + h[2];\n  const n = parseInt(h, 16);\n  return [(n >> 16) & 255, (n >> 8) & 255, n & 255];\n}\n\nfunction resolveRgb(value: string, ctx: CanvasRenderingContext2D): [number, number, number] {\n  const direct = hexRgb(value);\n  if (direct) return direct;\n  ctx.fillStyle = \"#b6ff3c\";\n  ctx.fillStyle = value;\n  const out = String(ctx.fillStyle);\n  const hex = hexRgb(out);\n  if (hex) return hex;\n  const nums = out.match(/[\\d.]+/g);\n  if (nums && nums.length >= 3) return [Number(nums[0]), Number(nums[1]), Number(nums[2])];\n  return [182, 255, 60];\n}\n\nfunction inkFor(accent: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return \"#0c0d10\";\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.5 ? \"#0c0d10\" : \"#ffffff\";\n}\n\nconst DEFAULT_PATH = \"M18 2 L32 10 V22 L18 30 L4 22 V10 Z\";\nconst DEFAULT_VIEWBOX = \"0 0 36 32\";\n\nfunction parseViewBox(value: string): [number, number, number, number] | null {\n  const parts = String(value).trim().split(/[\\s,]+/).map(Number);\n  if (parts.length !== 4 || parts.some((p) => !Number.isFinite(p)) || parts[2] <= 0 || parts[3] <= 0) return null;\n  return [parts[0], parts[1], parts[2], parts[3]];\n}\n\nfunction rasterPath(d: string, box: [number, number, number, number], rows: number): Mask | null {\n  if (!d.trim() || typeof document === \"undefined\" || typeof Path2D === \"undefined\") return null;\n  let shape: Path2D;\n  try {\n    shape = new Path2D(d);\n  } catch {\n    return null;\n  }\n  const scale = rows / box[3];\n  const pad = 3;\n  const cw = Math.ceil(box[2] * scale) + pad * 2;\n  const ch = Math.ceil(box[3] * scale) + pad * 2;\n  if (cw < 4 || ch < 4 || cw * ch > 4000000) return null;\n  const canvas = document.createElement(\"canvas\");\n  canvas.width = cw;\n  canvas.height = ch;\n  const g = canvas.getContext(\"2d\", { willReadFrequently: true });\n  if (!g) return null;\n  g.setTransform(scale, 0, 0, scale, pad - box[0] * scale, pad - box[1] * scale);\n  g.fillStyle = \"#ffffff\";\n  g.fill(shape);\n  let data: Uint8ClampedArray;\n  try {\n    data = g.getImageData(0, 0, cw, ch).data;\n  } catch {\n    return null;\n  }\n  const on = new Uint8Array(cw * ch);\n  for (let k = 0, p = 3; k < cw * ch; k++, p += 4) on[k] = data[p] >= 128 ? 1 : 0;\n  return { on, w: cw, h: ch };\n}\n\nfunction maskHeight(m: Mask) {\n  let y0 = m.h;\n  let y1 = -1;\n  for (let j = 1; j < m.h - 1; j++) {\n    for (let i = 1; i < m.w - 1; i++) {\n      if (!m.on[j * m.w + i]) continue;\n      if (j < y0) y0 = j;\n      if (j > y1) y1 = j;\n      break;\n    }\n  }\n  return y1 < 0 ? 0 : y1 - y0 + 1;\n}\n\nfunction buildCloud(m: Mask, depth: number, layerCap: number): Cloud | null {\n  const { on, w, h } = m;\n  let x0 = w;\n  let y0 = h;\n  let x1 = -1;\n  let y1 = -1;\n  for (let j = 1; j < h - 1; j++) {\n    for (let i = 1; i < w - 1; i++) {\n      if (!on[j * w + i]) continue;\n      if (i < x0) x0 = i;\n      if (i > x1) x1 = i;\n      if (j < y0) y0 = j;\n      if (j > y1) y1 = j;\n    }\n  }\n  if (x1 < 0) return null;\n  const bw = x1 - x0 + 1;\n  const bh = y1 - y0 + 1;\n  const cxm = (x0 + x1 + 1) / 2;\n  const cym = (y0 + y1 + 1) / 2;\n  const half = depth / 2;\n  const layers = Math.max(2, Math.min(layerCap, Math.round((depth * bh) / 1.7)));\n  const xs: number[] = [];\n  const ys: number[] = [];\n  const zs: number[] = [];\n  const ks: number[] = [];\n  const ss: number[] = [];\n  const us: number[] = [];\n  const front: number[] = [];\n  for (let j = 1; j < h - 1; j++) {\n    for (let i = 1; i < w - 1; i++) {\n      const k = j * w + i;\n      if (!on[k]) continue;\n      const edge = !on[k - 1] || !on[k + 1] || !on[k - w] || !on[k + w];\n      const x = (i + 0.5 + (hash(k, 1) - 0.5) * 0.18 - cxm) / bh;\n      const y = (cym - j - 0.5 - (hash(k, 2) - 0.5) * 0.18) / bh;\n      const u = ((i - x0) / bw + (y1 - j) / bh) * 0.5;\n      const sz = 0.86 + hash(k, 3) * 0.28;\n      front.push(xs.length);\n      xs.push(x);\n      ys.push(y);\n      zs.push(half);\n      ks.push(edge ? 4 : 0);\n      ss.push(sz);\n      us.push(u);\n      if (hash(k, 5) < 0.42) {\n        xs.push(x);\n        ys.push(y);\n        zs.push(-half);\n        ks.push(2);\n        ss.push(sz * 0.9);\n        us.push(u);\n      }\n      if (edge) {\n        for (let q = 1; q < layers; q++) {\n          xs.push(x);\n          ys.push(y);\n          zs.push(half - (depth * q) / layers);\n          ks.push(1);\n          ss.push(sz * 0.9);\n          us.push(u);\n        }\n      }\n      if ((i & 1) === 0 && (j & 1) === 0) {\n        xs.push(x);\n        ys.push(y);\n        zs.push(half);\n        ks.push(3);\n        ss.push(sz);\n        us.push(u);\n      }\n    }\n  }\n  const n = xs.length;\n  const sparks: number[] = [];\n  for (let q = 0; q < 14 && front.length; q++) sparks.push(front[Math.floor(hash(q, 41) * front.length)]);\n  return {\n    n,\n    x: Float32Array.from(xs),\n    y: Float32Array.from(ys),\n    z: Float32Array.from(zs),\n    kind: Uint8Array.from(ks),\n    size: Float32Array.from(ss),\n    u: Float32Array.from(us),\n    sparks,\n    aspect: bw / bh,\n  };\n}\n\nfunction Mark() {\n  return (\n    <svg className=\"hb-hh8-mark\" width=\"22\" height=\"20\" viewBox=\"0 0 36 32\" fill=\"currentColor\" aria-hidden=\"true\">\n      <path d={DEFAULT_PATH} />\n    </svg>\n  );\n}\n\nfunction NavList({ items }: { items: HeroDotLogoLink[] }) {\n  if (!items.length) return null;\n  return (\n    <ul className=\"hb-hh8-links\">\n      {items.map((item) => (\n        <li key={item.label}>\n          <a className=\"hb-hh8-link\" href={item.href}>\n            {item.label}\n          </a>\n        </li>\n      ))}\n    </ul>\n  );\n}\n\nexport function HeroDotLogo({\n  title = \"Your mark, in a thousand dots.\",\n  subtitle = \"Paste any SVG path and it becomes a swinging dotted object with real depth and a soft dotted shadow. One file, no runtime.\",\n  caption = \"Any SVG path · extruded dots · MIT licensed\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-logo.json\",\n  primaryCta = defaultPrimary,\n  brand = \"Slipstream\",\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  accent = \"#b6ff3c\",\n  density = 1,\n  speed = 1,\n  path = DEFAULT_PATH,\n  viewBox = DEFAULT_VIEWBOX,\n  depth = 0.35,\n  swing = 34,\n  spin = false,\n  headingAs = \"h1\",\n  onSearch,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotLogoProps) {\n  const rootRef = React.useRef<HTMLElement>(null);\n  const canvasRef = React.useRef<HTMLCanvasElement>(null);\n  const stageRef = React.useRef<HTMLDivElement>(null);\n  const timerRef = React.useRef<ReturnType<typeof setTimeout> | null>(null);\n  const [copied, setCopied] = React.useState(false);\n\n  React.useEffect(() => {\n    const root = rootRef.current;\n    const canvas = canvasRef.current;\n    const stage = stageRef.current;\n    const ctx = canvas?.getContext(\"2d\");\n    if (!root || !canvas || !stage || !ctx) return;\n    const reduce = window.matchMedia(\"(prefers-reduced-motion: reduce)\").matches;\n    const mult = Math.min(2, Math.max(0.3, Number.isFinite(density) ? density : 1));\n    const pace = Math.max(0, Number.isFinite(speed) ? speed : 1);\n    const deep = Math.min(1.2, Math.max(0.02, Number.isFinite(depth) ? depth : 0.35));\n    const swingRad = (Math.min(80, Math.max(0, Number.isFinite(swing) ? swing : 34)) * Math.PI) / 180;\n    const pathD = typeof path === \"string\" ? path : \"\";\n    const box = parseViewBox(viewBox) ?? parseViewBox(DEFAULT_VIEWBOX);\n    const lime = resolveRgb(accent, ctx);\n    const limeFill = `rgb(${lime[0]}, ${lime[1]}, ${lime[2]})`;\n    const alphas: string[] = [];\n    for (let b = 0; b < LEVELS; b++) alphas.push(`rgba(${GRAPHITE}, ${(0.1 + (0.86 * b) / (LEVELS - 1)).toFixed(3)})`);\n    const counts = new Int32Array(LEVELS);\n    const starts = new Int32Array(LEVELS);\n\n    let cloud: Cloud | null = null;\n    let sampledRows = 0;\n    let sx = new Float32Array(0);\n    let sy = new Float32Array(0);\n    let sr = new Float32Array(0);\n    let bucket = new Uint8Array(0);\n    let order = new Int32Array(0);\n    let dead = false;\n    let w = 0;\n    let h = 0;\n    let lw = 0;\n    let cx = 0;\n    let cy = 0;\n    let top = 0;\n    let availW = 0;\n    let availH = 0;\n    let dpr = 1;\n    let visible = true;\n    let raf = 0;\n    let last = 0;\n    let time = 0;\n    let pointer = false;\n    let ptx = 0;\n    let pty = 0;\n    let curX = 0;\n    let curY = 0;\n    let resampleTimer: ReturnType<typeof setTimeout> | null = null;\n\n    function aspectGuess() {\n      return cloud ? cloud.aspect : 1.1;\n    }\n\n    function fitUnit() {\n      return Math.max(40, Math.min(availW / aspectGuess(), availH));\n    }\n\n    function spacing() {\n      return (lw < 640 ? 6.4 : 9) / Math.sqrt(mult);\n    }\n\n    function resample(force: boolean) {\n      if (!box) return;\n      const want = Math.min(240, Math.max(36, Math.round(fitUnit() / spacing())));\n      if (!force && cloud && Math.abs(want - sampledRows) / sampledRows < 0.1) return;\n      const cap = lw < 640 ? 8 : 12;\n      const make = (d: string, bx: [number, number, number, number]) => {\n        const probe = rasterPath(d, bx, 48);\n        const pb = probe ? maskHeight(probe) : 0;\n        if (!probe || !pb) return null;\n        const m = rasterPath(d, bx, Math.min(900, (want * 48) / pb));\n        return m ? buildCloud(m, deep, cap) : null;\n      };\n      let c = make(pathD, box);\n      if (!c) {\n        const fb = parseViewBox(DEFAULT_VIEWBOX);\n        if (fb) c = make(DEFAULT_PATH, fb);\n      }\n      cloud = c;\n      sampledRows = want;\n      const n = c ? c.n : 0;\n      if (sx.length < n) {\n        sx = new Float32Array(n);\n        sy = new Float32Array(n);\n        sr = new Float32Array(n);\n        bucket = new Uint8Array(n);\n        order = new Int32Array(n);\n      }\n    }\n\n    function layout() {\n      if (!root || !canvas || !stage) return;\n      const rect = root.getBoundingClientRect();\n      w = rect.width;\n      h = rect.height;\n      lw = root.clientWidth || w;\n      dpr = Math.min(2, window.devicePixelRatio || 1);\n      canvas.width = Math.max(1, Math.round(w * dpr));\n      canvas.height = Math.max(1, Math.round(h * dpr));\n      const st = stage.getBoundingClientRect();\n      cx = w / 2;\n      top = st.top - rect.top;\n      if (lw < 640) {\n        availW = w * 0.8;\n        availH = st.height * 0.9;\n        cy = top + st.height * 0.5;\n      } else {\n        availW = w * 0.7;\n        availH = st.height * 0.9;\n        cy = top + st.height * 0.46;\n      }\n    }\n\n    function draw() {\n      if (!ctx) return;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, h);\n      const c = cloud;\n      if (!c || !w || !h) return;\n      const unit = fitUnit();\n      const A = c.aspect;\n      const phase = time * 0.55 * pace;\n      let yaw: number;\n      let roll: number;\n      if (reduce) {\n        yaw = swingRad * 0.42;\n        roll = 0.028;\n      } else if (spin) {\n        yaw = phase - 0.36 * Math.sin(2 * phase);\n        roll = 0.03 * Math.sin(phase * 0.7);\n      } else {\n        yaw = swingRad * Math.sin(phase);\n        roll = 0.07 * Math.sin(phase - 0.5);\n      }\n      yaw += curX * 0.22;\n      const pitch = 0.05 + curY * 0.14;\n      const cyw = Math.cos(yaw);\n      const syw = Math.sin(yaw);\n      const cp = Math.cos(pitch);\n      const sp = Math.sin(pitch);\n      const cr = Math.cos(roll);\n      const sr0 = Math.sin(roll);\n      const cam = Math.max(3.4, A * 1.6);\n      const face = cyw * cp;\n      const wall = 0.34 + 0.34 * Math.abs(syw);\n      const pivotY = top - unit * 0.1;\n      const rad = (lw < 640 ? 1.5 : 2.1) * Math.sqrt(unit / 520 + 0.2);\n      const band = reduce ? 0.46 : -0.15 + (((time * pace) / 5.5) % 1) * 1.3;\n      const zw = -(deep / 2 + 0.42);\n      const perW = cam / (cam - zw);\n\n      ctx.fillStyle = `rgba(${GRAPHITE}, 0.1)`;\n      ctx.beginPath();\n      for (let i = 0; i < c.n; i++) {\n        if (c.kind[i] !== 3) continue;\n        const x = c.x[i];\n        const y = c.y[i];\n        const z = c.z[i];\n        const xr = x * cyw + z * syw;\n        const zr = -x * syw + z * cyw;\n        const t = zr - zw;\n        const px = cx + (xr + 0.3 * t) * unit * perW + unit * 0.02;\n        const py = cy - (y - 0.42 * t) * unit * perW - unit * 0.03;\n        const r = rad * (0.9 + 0.5 * t) * c.size[i];\n        ctx.moveTo(px + r, py);\n        ctx.arc(px, py, r, 0, TAU);\n      }\n      ctx.fill();\n\n      counts.fill(0);\n      for (let i = 0; i < c.n; i++) {\n        const kind = c.kind[i];\n        if (kind === 3) {\n          bucket[i] = 255;\n          continue;\n        }\n        const x = c.x[i];\n        const y = c.y[i];\n        const z = c.z[i];\n        const x1 = x * cyw + z * syw;\n        const z1 = -x * syw + z * cyw;\n        const y2 = y * cp - z1 * sp;\n        const z2 = y * sp + z1 * cp;\n        const per = cam / (cam - z2);\n        const dx = x1 * unit * per;\n        const dy = y2 * unit * per;\n        const ry = cy - dy - pivotY;\n        const rx = cx + dx - cx;\n        sx[i] = cx + rx * cr - ry * sr0;\n        sy[i] = pivotY + rx * sr0 + ry * cr;\n        let b: number;\n        if (kind === 0 || kind === 4) b = (face > 0 ? 0.62 + 0.38 * face : 0.2) + (kind === 4 ? 0.1 : 0);\n        else if (kind === 1) b = wall;\n        else b = 0.16 + 0.08 * (1 - face);\n        if (b > 0.999) b = 0.999;\n        if (b < 0) b = 0;\n        sr[i] = rad * per * c.size[i] * (kind === 2 ? 0.85 : kind === 1 ? 0.8 : 1);\n        const bi = Math.floor(b * LEVELS);\n        bucket[i] = bi;\n        counts[bi]++;\n      }\n      let acc0 = 0;\n      for (let k = 0; k < LEVELS; k++) {\n        starts[k] = acc0;\n        acc0 += counts[k];\n      }\n      for (let i = 0; i < c.n; i++) if (bucket[i] !== 255) order[starts[bucket[i]]++] = i;\n      let pos = 0;\n      for (let k = 0; k < LEVELS; k++) {\n        const m = counts[k];\n        if (!m) continue;\n        ctx.fillStyle = alphas[k];\n        ctx.beginPath();\n        for (let q = pos; q < pos + m; q++) {\n          const i = order[q];\n          const r = sr[i];\n          ctx.moveTo(sx[i] + r, sy[i]);\n          ctx.arc(sx[i], sy[i], r, 0, TAU);\n        }\n        ctx.fill();\n        pos += m;\n      }\n\n      if (face > 0.2) {\n        ctx.fillStyle = limeFill;\n        ctx.strokeStyle = `rgba(${GRAPHITE}, 0.9)`;\n        ctx.lineWidth = 0.7;\n        ctx.beginPath();\n        for (let i = 0; i < c.n; i++) {\n          const kind = c.kind[i];\n          if (kind !== 0 && kind !== 4) continue;\n          const du = c.u[i] - band;\n          if (du * du > 0.0009) continue;\n          if (hash(i, 13) > 0.8) continue;\n          const r = sr[i] * 1.35;\n          ctx.moveTo(sx[i] + r, sy[i]);\n          ctx.arc(sx[i], sy[i], r, 0, TAU);\n        }\n        ctx.fill();\n        ctx.stroke();\n        ctx.beginPath();\n        for (let q = 0; q < c.sparks.length; q++) {\n          const i = c.sparks[q];\n          if (!reduce && Math.sin(time * 0.9 * pace + q * 2.3) < 0.2) continue;\n          const r = sr[i] * 1.9;\n          ctx.moveTo(sx[i] + r, sy[i]);\n          ctx.arc(sx[i], sy[i], r, 0, TAU);\n        }\n        ctx.fill();\n        ctx.stroke();\n      }\n    }\n\n    function frame(now: number) {\n      raf = 0;\n      const step = last ? Math.min(0.05, (now - last) / 1000) : 0;\n      last = now;\n      time += step;\n      const tx = pointer ? ptx : 0;\n      const ty = pointer ? pty : 0;\n      const ease = Math.min(1, step * 2.4);\n      curX += (tx - curX) * ease;\n      curY += (ty - curY) * ease;\n      draw();\n      schedule();\n    }\n\n    function schedule() {\n      if (reduce || raf || dead || !visible || document.hidden) return;\n      raf = requestAnimationFrame(frame);\n    }\n\n    function stop() {\n      if (raf) cancelAnimationFrame(raf);\n      raf = 0;\n      last = 0;\n    }\n\n    function onMove(e: PointerEvent) {\n      if (!root) return;\n      const rect = root.getBoundingClientRect();\n      pointer = true;\n      ptx = Math.max(-1, Math.min(1, ((e.clientX - rect.left) / rect.width) * 2 - 1));\n      pty = Math.max(-1, Math.min(1, ((e.clientY - rect.top) / rect.height) * 2 - 1));\n    }\n    function onLeave() {\n      pointer = false;\n    }\n    function onVisibility() {\n      if (document.hidden) stop();\n      else schedule();\n    }\n\n    layout();\n    resample(true);\n    layout();\n    resample(false);\n    draw();\n\n    const ro = new ResizeObserver(() => {\n      layout();\n      draw();\n      if (resampleTimer) clearTimeout(resampleTimer);\n      resampleTimer = setTimeout(() => {\n        resampleTimer = null;\n        if (dead) return;\n        resample(false);\n        draw();\n      }, 160);\n    });\n    ro.observe(root);\n    const io = new IntersectionObserver((entries) => {\n      visible = entries[0]?.isIntersecting ?? true;\n      if (visible) schedule();\n      else stop();\n    });\n    io.observe(root);\n    root.addEventListener(\"pointermove\", onMove);\n    root.addEventListener(\"pointerleave\", onLeave);\n    document.addEventListener(\"visibilitychange\", onVisibility);\n    schedule();\n\n    return () => {\n      dead = true;\n      stop();\n      if (resampleTimer) clearTimeout(resampleTimer);\n      ro.disconnect();\n      io.disconnect();\n      root.removeEventListener(\"pointermove\", onMove);\n      root.removeEventListener(\"pointerleave\", onLeave);\n      document.removeEventListener(\"visibilitychange\", onVisibility);\n    };\n  }, [accent, density, speed, path, viewBox, depth, swing, spin]);\n\n  React.useEffect(() => {\n    return () => {\n      if (timerRef.current) clearTimeout(timerRef.current);\n    };\n  }, []);\n\n  function copy() {\n    navigator.clipboard?.writeText(command).catch(() => undefined);\n    setCopied(true);\n    if (timerRef.current) clearTimeout(timerRef.current);\n    timerRef.current = setTimeout(() => setCopied(false), 1600);\n  }\n\n  const Heading = headingAs;\n  const vars = { \"--hb-hh8-accent\": accent, \"--hb-hh8-ink\": inkFor(accent), ...style } as React.CSSProperties;\n  const cut = Math.ceil(nav.length / 2);\n\n  return (\n    <section ref={rootRef} className={`hb-hh8 ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-logo\" precedence=\"default\">{css}</style>\n      <canvas ref={canvasRef} className=\"hb-hh8-canvas\" aria-hidden=\"true\" />\n      <header className=\"hb-hh8-bar\">\n        <nav className=\"hb-hh8-side-l\" aria-label=\"Primary\">\n          <NavList items={nav.slice(0, cut)} />\n        </nav>\n        <a className=\"hb-hh8-brand\" href=\"#\">\n          <Mark />\n          <span>{brand}</span>\n        </a>\n        <div className=\"hb-hh8-side-r\">\n          <NavList items={nav.slice(cut)} />\n          <button type=\"button\" className=\"hb-hh8-search\" aria-label=\"Search\" onClick={onSearch}>\n            <svg width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\" strokeLinecap=\"round\" aria-hidden=\"true\">\n              <circle cx=\"11\" cy=\"11\" r=\"6.5\" />\n              <path d=\"M16 16l4.5 4.5\" />\n            </svg>\n          </button>\n          {navCta ? (\n            <a className=\"hb-hh8-outline\" href={navCta.href}>\n              {navCta.label}\n            </a>\n          ) : null}\n        </div>\n      </header>\n      <div ref={stageRef} className=\"hb-hh8-stage\" aria-hidden=\"true\" />\n      <div className=\"hb-hh8-foot\">\n        <Heading className=\"hb-hh8-title\">{title}</Heading>\n        {subtitle ? <p className=\"hb-hh8-sub\">{subtitle}</p> : null}\n        {command || primaryCta ? (\n          <div className=\"hb-hh8-row\">\n            {command ? (\n              <div className=\"hb-hh8-cmd\">\n                <span className=\"hb-hh8-prompt\" aria-hidden=\"true\">$</span>\n                <code className=\"hb-hh8-code\">{command}</code>\n                <button type=\"button\" className=\"hb-hh8-copybtn\" data-done={copied} onClick={copy} aria-label={copied ? \"Copied\" : \"Copy command\"}>\n                  {copied ? (\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <path d=\"M5 12.5l4.5 4.5L19 7.5\" />\n                    </svg>\n                  ) : (\n                    <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"1.9\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                      <rect x=\"8.5\" y=\"8.5\" width=\"11\" height=\"11\" rx=\"2.2\" />\n                      <path d=\"M15.5 8.5V6.7a2.2 2.2 0 0 0-2.2-2.2H6.7a2.2 2.2 0 0 0-2.2 2.2v6.6a2.2 2.2 0 0 0 2.2 2.2h1.8\" />\n                    </svg>\n                  )}\n                  <span className=\"hb-hh8-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n                </button>\n              </div>\n            ) : null}\n            {primaryCta ? (\n              <a className=\"hb-hh8-cta\" href={primaryCta.href}>\n                {primaryCta.label}\n                <svg width=\"15\" height=\"15\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.4\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n                  <path d=\"M9 6l6 6-6 6\" />\n                </svg>\n              </a>\n            ) : null}\n          </div>\n        ) : null}\n        {caption ? <p className=\"hb-hh8-caption\">{caption}</p> : null}\n        {learnMore ? (\n          <a className=\"hb-hh8-more\" href={learnMore.href}>\n            <span>{learnMore.label}</span>\n            <svg width=\"12\" height=\"12\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2.2\" strokeLinecap=\"round\" strokeLinejoin=\"round\" aria-hidden=\"true\">\n              <path d=\"M6 9l6 6 6-6\" />\n            </svg>\n          </a>\n        ) : null}\n      </div>\n    </section>\n  );\n}\n"
    }
  ]
}