{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "hero-dot-earth",
  "type": "registry:component",
  "title": "Hero Dot Earth",
  "description": "A pure black hero with a huge canvas planet of thousands of tiny dots where the continents stand out bright against a sparse ocean. It spins on a tilted axis, leans toward the pointer, with a bottom-aligned headline and an install command.",
  "author": "Hyperblur <hello@hyperblur.dev>",
  "dependencies": [],
  "registryDependencies": [],
  "categories": [
    "hero",
    "hero",
    "globe",
    "earth",
    "continents",
    "canvas",
    "dots"
  ],
  "docs": "https://hyperblur.dev/effects/hero-dot-earth",
  "files": [
    {
      "path": "registry/hyperblur/hero-dot-earth.tsx",
      "type": "registry:component",
      "target": "components/hyperblur/hero-dot-earth.tsx",
      "content": "\"use client\";\n\nimport * as React from \"react\";\n\nexport interface HeroDotEarthLink {\n  label: string;\n  href: string;\n}\n\nexport interface HeroDotEarthProps extends Omit<React.HTMLAttributes<HTMLElement>, \"title\"> {\n  title?: string;\n  subtitle?: string;\n  caption?: string;\n  command?: string;\n  primaryCta?: HeroDotEarthLink | null;\n  brand?: string;\n  nav?: HeroDotEarthLink[];\n  navCta?: HeroDotEarthLink | null;\n  learnMore?: HeroDotEarthLink | null;\n  accent?: string;\n  density?: number;\n  speed?: number;\n  oceanDots?: number;\n  headingAs?: \"h1\" | \"h2\";\n  onSearch?: () => void;\n}\n\nconst css = `\n@keyframes hb-ze-up {\n  from { opacity: 0; transform: translate3d(0, 14px, 0); }\n  to { opacity: 1; transform: translate3d(0, 0, 0); }\n}\n@keyframes hb-ze-bob {\n  0%, 100% { transform: translate3d(0, 0, 0); }\n  50% { transform: translate3d(0, 4px, 0); }\n}\n.hb-ze {\n  --hb-ze-accent: #ffb84d;\n  --hb-ze-ink: #140d02;\n  --hb-ze-mono: ui-monospace, \"Geist Mono\", 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: 620px;\n  overflow: hidden;\n  container-type: inline-size;\n  background:\n    radial-gradient(60% 50% at 50% 42%, color-mix(in srgb, var(--hb-ze-accent) 6%, transparent), transparent 70%),\n    #020202;\n  color: #ededed;\n  font-family: inherit;\n  -webkit-font-smoothing: antialiased;\n}\n.hb-ze *, .hb-ze *::before, .hb-ze *::after { box-sizing: border-box; }\n.hb-ze-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-ze::after {\n  content: \"\";\n  position: absolute;\n  inset: auto 0 0;\n  z-index: 1;\n  height: 52%;\n  pointer-events: none;\n  background: linear-gradient(to top, #020202 0%, rgba(2, 2, 2, .86) 38%, rgba(2, 2, 2, 0) 100%);\n}\n.hb-ze-bar {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: 1fr auto 1fr;\n  align-items: center;\n  gap: 16px;\n  width: 100%;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 18px 32px;\n}\n.hb-ze-brand {\n  display: inline-flex;\n  align-items: center;\n  gap: 9px;\n  justify-self: start;\n  color: #f4f4f4;\n  font-size: 14px;\n  font-weight: 600;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  border-radius: 6px;\n}\n.hb-ze-mark { flex: none; color: var(--hb-ze-accent); }\n.hb-ze-links {\n  display: flex;\n  align-items: center;\n  gap: 4px;\n  margin: 0;\n  padding: 0;\n  list-style: none;\n}\n.hb-ze-link {\n  display: inline-flex;\n  padding: 6px 12px;\n  border-radius: 999px;\n  color: #8f8f8f;\n  font-family: var(--hb-ze-mono);\n  font-size: 12px;\n  letter-spacing: .02em;\n  text-decoration: none;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-ze-link:hover { color: #ededed; background: rgba(255, 255, 255, .05); }\n.hb-ze-tools {\n  display: flex;\n  align-items: center;\n  justify-self: end;\n  gap: 8px;\n}\n.hb-ze-search {\n  display: inline-grid;\n  place-items: center;\n  width: 32px;\n  height: 32px;\n  padding: 0;\n  border: 0;\n  border-radius: 999px;\n  background: transparent;\n  color: #8f8f8f;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-ze-search:hover { color: #ededed; background: rgba(255, 255, 255, .06); }\n.hb-ze-outline {\n  display: inline-flex;\n  align-items: center;\n  height: 32px;\n  padding: 0 14px;\n  border: 1px solid rgba(255, 255, 255, .16);\n  border-radius: 999px;\n  color: #ededed;\n  font-family: var(--hb-ze-mono);\n  font-size: 12px;\n  letter-spacing: .02em;\n  text-decoration: none;\n  white-space: nowrap;\n  transition: border-color .2s ease, background-color .2s ease;\n}\n.hb-ze-outline:hover { border-color: rgba(255, 255, 255, .34); background: rgba(255, 255, 255, .04); }\n.hb-ze-stage {\n  position: relative;\n  z-index: 2;\n  flex: 1 1 auto;\n  min-height: 240px;\n}\n.hb-ze-foot {\n  position: relative;\n  z-index: 2;\n  display: grid;\n  grid-template-columns: minmax(0, 1fr) auto;\n  align-items: end;\n  gap: 28px 40px;\n  width: 100%;\n  max-width: 1120px;\n  margin: 0 auto;\n  padding: 0 32px 76px;\n}\n.hb-ze-copy { min-width: 0; }\n.hb-ze-title {\n  max-width: 11em;\n  margin: 0;\n  color: #f5f5f5;\n  font-size: clamp(28px, 5.4cqi, 56px);\n  font-weight: 700;\n  line-height: 1.02;\n  letter-spacing: -.045em;\n  text-wrap: balance;\n  animation: hb-ze-up .8s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-ze-sub {\n  max-width: 34em;\n  margin: 16px 0 0;\n  color: #8f8f8f;\n  font-size: 15px;\n  line-height: 1.55;\n  text-wrap: pretty;\n  animation: hb-ze-up .8s .08s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-ze-side {\n  display: flex;\n  flex-direction: column;\n  align-items: flex-start;\n  gap: 12px;\n  min-width: 0;\n  animation: hb-ze-up .8s .16s cubic-bezier(.2, .7, .2, 1) both;\n}\n.hb-ze-caption {\n  margin: 0;\n  color: #6f6f6f;\n  font-family: var(--hb-ze-mono);\n  font-size: 11.5px;\n  letter-spacing: .04em;\n}\n.hb-ze-caption b { color: var(--hb-ze-accent); font-weight: 500; }\n.hb-ze-row {\n  display: flex;\n  align-items: stretch;\n  gap: 8px;\n  max-width: 100%;\n}\n.hb-ze-cmd {\n  display: flex;\n  align-items: center;\n  gap: 8px;\n  min-width: 0;\n  height: 42px;\n  padding: 0 6px 0 14px;\n  border: 1px solid rgba(255, 255, 255, .1);\n  border-radius: 10px;\n  background: rgba(14, 14, 14, .82);\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);\n  -webkit-backdrop-filter: blur(8px);\n  backdrop-filter: blur(8px);\n}\n.hb-ze-prompt { flex: none; color: var(--hb-ze-accent); font-family: var(--hb-ze-mono); font-size: 12px; }\n.hb-ze-code {\n  min-width: 0;\n  overflow: hidden;\n  color: #d6d6d6;\n  font-family: var(--hb-ze-mono);\n  font-size: 12px;\n  white-space: nowrap;\n  text-overflow: ellipsis;\n}\n.hb-ze-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: 7px;\n  background: transparent;\n  color: #8f8f8f;\n  cursor: pointer;\n  transition: color .2s ease, background-color .2s ease;\n}\n.hb-ze-copybtn:hover { color: #ededed; background: rgba(255, 255, 255, .07); }\n.hb-ze-copybtn[data-done=\"true\"] { color: var(--hb-ze-accent); }\n.hb-ze-cta {\n  display: inline-flex;\n  flex: none;\n  align-items: center;\n  justify-content: center;\n  gap: 6px;\n  height: 42px;\n  padding: 0 14px 0 18px;\n  border-radius: 10px;\n  background: var(--hb-ze-accent);\n  color: var(--hb-ze-ink);\n  font-size: 14px;\n  font-weight: 600;\n  letter-spacing: -.01em;\n  text-decoration: none;\n  white-space: nowrap;\n  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 8px 28px -10px var(--hb-ze-accent);\n  transition: filter .2s ease, transform .2s ease;\n}\n.hb-ze-cta:hover { filter: brightness(1.08); }\n.hb-ze-cta svg { transition: transform .2s ease; }\n.hb-ze-cta:hover svg { transform: translateX(2px); }\n.hb-ze-more {\n  position: absolute;\n  left: 50%;\n  bottom: 18px;\n  z-index: 2;\n  display: inline-flex;\n  flex-direction: column;\n  align-items: center;\n  gap: 2px;\n  padding: 4px 8px;\n  border-radius: 6px;\n  color: #6f6f6f;\n  font-family: var(--hb-ze-mono);\n  font-size: 10.5px;\n  letter-spacing: .12em;\n  text-transform: uppercase;\n  text-decoration: none;\n  transform: translateX(-50%);\n  transition: color .2s ease;\n}\n.hb-ze-more:hover { color: #ededed; }\n.hb-ze-more svg { animation: hb-ze-bob 1.8s ease-in-out infinite; }\n.hb-ze a:focus-visible, .hb-ze button:focus-visible {\n  outline: 2px solid var(--hb-ze-accent);\n  outline-offset: 2px;\n}\n.hb-ze-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-ze-foot { grid-template-columns: minmax(0, 1fr); padding: 0 24px 72px; }\n  .hb-ze-bar { padding: 16px 24px; }\n}\n@container (max-width: 640px) {\n  .hb-ze-bar { grid-template-columns: 1fr auto; }\n  .hb-ze-links, .hb-ze-search { display: none; }\n  .hb-ze-stage { min-height: calc(80cqi + 24px); }\n  .hb-ze-sub { font-size: 14px; }\n  .hb-ze-side, .hb-ze-row { align-self: stretch; }\n  .hb-ze-row { flex-direction: column; }\n  .hb-ze-cta { width: 100%; }\n}\n@container (max-width: 360px) {\n  .hb-ze-bar { padding: 14px 18px; }\n  .hb-ze-foot { padding: 0 18px 68px; }\n}\n@media (prefers-reduced-motion: reduce) {\n  .hb-ze-title, .hb-ze-sub, .hb-ze-side, .hb-ze-more svg { animation: none; }\n  .hb-ze-link, .hb-ze-search, .hb-ze-outline, .hb-ze-copybtn, .hb-ze-cta, .hb-ze-cta svg, .hb-ze-more { transition: none; }\n  .hb-ze-cta:hover svg { transform: none; }\n}\n`;\n\nconst defaultNav: HeroDotEarthLink[] = [\n  { label: \"Docs\", href: \"#\" },\n  { label: \"Examples\", href: \"#\" },\n  { label: \"Kit\", href: \"#\" },\n];\nconst defaultNavCta: HeroDotEarthLink = { label: \"Sign in\", href: \"#\" };\nconst defaultPrimary: HeroDotEarthLink = { label: \"Get started\", href: \"#\" };\nconst defaultMore: HeroDotEarthLink = { label: \"Learn more\", href: \"#\" };\n\nconst TAU = Math.PI * 2;\nconst GOLDEN = Math.PI * (3 - Math.sqrt(5));\nconst WARM: [number, number, number] = [255, 243, 224];\nconst ALPHAS = [0.08, 0.2, 0.36, 0.55, 0.76, 0.96];\nconst TONES = 4;\n\nconst LAND: number[][] = [\n  [-168,66,-162,70,-156,71.3,-141,70,-128,70,-115,68.5,-108,68,-95,68.5,-94,72,-88,69.5,-82,69,-82,66,-87,64,-94,60,-93,58,-88,56.5,-82,55,-80,52,-79,55,-77,60,-78,62.2,-72,61.5,-70,59.5,-65,60,-62,57,-58,54,-56,52,-60,50,-66,50,-65,48,-61,46,-66,44.5,-70,43.5,-70,41.7,-74,40.5,-76,38,-76,35,-81,31.5,-80,27,-80,25.2,-82,26.5,-83,29.5,-86,30,-89,30,-90,29,-94,29.5,-97,27.5,-97.5,22,-96,19,-94,18.2,-91,18.5,-90.5,21,-87,21.5,-87.5,18,-88,16,-84,15.8,-83,14.5,-83.5,11,-81,9,-79,9.5,-77.5,8.5,-78,7.2,-80,7.3,-82.5,8.2,-85.5,10,-87.5,13,-91,14,-94,16,-97,15.8,-102,18,-105.5,20.5,-105.3,23.2,-109,25.5,-112,29,-114.7,31.7,-113.5,29.5,-111,26,-109.5,23,-110.5,24,-112.5,26,-114.5,28,-116.5,31,-117.1,32.5,-118.5,34,-120.6,34.5,-122.5,37.5,-124,40.5,-124,46,-124.7,48.3,-125.5,50,-128,51.5,-130,54.5,-134,57,-137,58.5,-140,59.7,-144,60,-148,60.5,-152,59.3,-154,57.5,-158,56.5,-163,54.8,-161,57.5,-165,60.5,-166,62.5,-161,64.5,-166,65],\n  [-80,73.5,-72,71.5,-65,67,-62,66,-67,62.5,-72,64,-78,65,-85,70,-90,73],\n  [-85,72,-80,73.5,-90,74,-100,73,-100,70,-92,72],\n  [-125,72,-115,73,-105,73,-100,71,-110,69,-118,70,-124,70],\n  [-73,78,-60,82,-30,83.5,-20,81,-18,76,-20,70,-24,69.5,-32,68,-40,65,-43,60,-48,61,-52,64.5,-54,68,-58,75,-68,76.5],\n  [-77.4,8.6,-75.5,10.6,-72,12,-68,10.6,-64,10.5,-61,10.7,-60,8.5,-57,6,-52,5,-50,1.5,-50,0,-46,-1,-43,-2.5,-39,-3.7,-35.2,-5.5,-34.8,-8,-37,-12,-39,-17.5,-40.5,-22,-44,-23,-48,-26,-48.5,-28.5,-53,-34,-58,-34.5,-57.5,-37.5,-62,-39,-62.5,-41,-65,-41,-64.5,-43,-66,-46,-67.5,-46.5,-66,-48,-68.5,-50.5,-69,-52,-68.3,-53.3,-68,-55.2,-72,-54,-75,-50,-75.5,-47,-73.5,-43,-73.8,-39,-71.7,-33,-71.5,-30,-70.3,-23,-70.3,-18.3,-75.5,-14.5,-79,-8,-81.2,-6,-80.2,-3.5,-80.5,-1,-80,1,-78.8,1.8,-77.4,4,-77.8,7],\n  [-9,37,-8.8,38.7,-9.5,38.7,-8.8,41.5,-9,43,-2,43.5,-1.5,46,-4.5,48.5,-1.5,49.5,1.5,50.5,4,51.5,5,53.3,8,55,8.2,57,10.6,57.7,10,55,11,54,14,54,19,54.5,21,55.5,21,57,24,57.2,23.5,59.3,28,59.8,30,60,23,60,21.5,61,21.3,63,25,65,24.8,65.8,22,65.7,21.5,64,17.5,62.5,17,60.5,19,59.5,16.5,57,14.5,56,13,55.5,12.5,56.5,11.5,58.8,10.5,59.5,8,58,5.5,59,5,61,7,63,10.5,64.5,14,67,16.5,69,21,70.2,26,71,31,70.3,33,69.4,41,67.3,44,66.5,44,68.5,53,68.5,60,69,68,69,68,72.5,70,73,73,72,80,73.5,88,75.3,100,77,105,77.5,113,73.8,125,73.5,130,71,140,72.5,150,71.5,160,69.7,170,70,180,69,180,65,177,62.5,170,60,164,60,162,57,162.5,55,160,53,156.7,50.9,155.5,55.5,156,57.5,160,61.5,155,59.3,150,59.5,143,59.3,136,54.7,140,53,141,51,140.5,48.5,137,46,133,43,131,42.5,129.5,40.5,128,38.6,129.4,36.5,129,35,126.5,34.5,126.5,37.2,125,39.5,124.3,40,122,40.5,121,39,122.5,37.2,119,37.2,120.7,36.5,119.2,34.8,121,32,122,30,121.5,28,119.5,25.5,117,23.2,114,22.3,110.5,21.3,109.9,20.3,108.5,21.7,106.7,20.5,105.8,19,108.5,15.5,109.3,12,107,10.4,105,8.7,104.8,10.3,103,10.5,102.5,12,100.8,13.3,99.5,10.8,100.3,7,101.5,6.8,103.5,4.5,103.5,1.5,104.2,1.4,101.3,2.8,100.4,5.5,98.3,8.5,98.6,11,97.7,16.5,94.5,17,94.3,20,92.3,21.5,91.5,22.7,89,21.9,87,21.5,86.5,19.8,84.5,18.3,82.2,16.5,80.3,15.5,80.3,13,79.9,10.3,78.5,8.9,77.4,8.1,76.2,9.7,74.8,12.7,73,17.3,72.8,19.1,72.7,21.2,70.5,20.8,69,22.3,70.5,23,68.5,23.5,67,24.8,66.5,25.4,62,25.2,57,26.5,56.3,27.2,54,26.7,51.5,27.8,50.2,30,48.5,30,48,29.4,49.8,26.5,50.2,25.3,51.5,24.3,52.5,24.2,54.5,24.4,56.3,26.2,56.4,24.8,58.6,23.5,59.8,22.5,58.5,20.5,57,18.9,55.5,17.5,52.5,16.3,49,14.2,45,12.8,43.3,12.7,42.8,15,41.5,18.5,39,21.5,38,24.5,35,28,34.8,29.5,34.2,27.8,33.3,28.5,32.6,29.9,32.3,31.3,34.2,31.3,35,33,36,35.5,36,36.6,33,36.2,30.5,36.6,29,36.5,27.5,37,26.4,38.5,26.2,40,29,41,31.5,41.2,35,42,38,41,41.5,41.5,41.5,42.5,40,43.4,38,44.5,37.3,45,35.5,45.2,33.5,44.5,32.5,45.4,33.5,46,31,46.6,30,45.5,29.6,45.2,28.8,44,28,42.7,27.9,41.9,29,41.2,26.2,40.2,25.5,40.9,24,40,23,40.3,22.8,39,24,38.2,23,36.5,22,36.5,21,38.3,20.2,39.7,19.5,41.5,18.5,42.5,16,43.5,14.5,45.2,13.7,45.6,12.3,45.3,12.4,44.3,13.6,43.5,14.5,42.2,16.1,41.9,18.5,40.2,17.2,40.3,16.6,39.7,17.1,39,16.5,38.4,15.8,38,16.1,39,15.6,40,14.8,40.7,14.2,40.8,12.5,41.5,10.5,42.8,9,44.3,7.5,43.8,6,43,4,43.4,3,42.5,3.2,41.9,0.8,41,-0.3,39.5,0.2,38.8,-0.7,37.6,-2,36.8,-4.5,36.7,-5.5,36,-6.4,36.8,-7.5,37.2],\n  [32.5,31.3,30,31.2,25,31.6,20,32.8,19,30.3,16,31.2,11,33.2,10.3,33.9,11,37.1,10,37.3,8,36.9,3,36.8,-1,35.4,-5.3,35.9,-6,35.5,-9.5,32.5,-9.8,30,-13,27.5,-15,23.7,-16.5,20,-17.2,14.7,-16.5,12.3,-13.7,9.5,-11.5,7,-8,4.5,-4,5.2,1,6,3.5,6.3,6,4.3,8.5,4.5,9.8,3.5,9.5,1,9,-1,9.3,-1,11.8,-4.5,12.3,-6,13.3,-9,13.8,-11.5,13.5,-16,11.8,-17.2,12,-22,14.5,-23,15,-26.5,16.5,-28.6,18.4,-32,18.4,-34.4,20,-34.8,22.5,-34,25.6,-34,27,-33.5,30,-31.5,32.8,-27,32.8,-25.5,35.3,-24,35.5,-21.5,34.7,-19.7,40.5,-15,40.7,-10.5,39.2,-7,38.8,-5,40.2,-2.7,41.5,-1.8,43.5,1,46,2.1,48,5,51.3,10.5,51,11.9,48,11.2,44,10.4,43.1,11.6,43.4,12.7,41.8,14.5,39.5,15.5,38.5,18,37.2,21,36,23.5,34,27,32.6,29.9],\n  [49.3,-12,50.5,-15.5,49.5,-19.5,47.2,-24.9,45,-25.6,43.4,-23.5,44.3,-20,44.5,-16.2,47,-15],\n  [-5.5,50,1.5,51,1.7,52.8,0,53.5,-2,55.8,-2,57.5,-3.5,58.6,-5,58.6,-6,57,-5.5,55,-3,54.8,-3,53.3,-4.8,52.5,-5,51.7,-3,51.3],\n  [-10,51.7,-6,52,-6,54.2,-8,55.2,-10,54.2],\n  [-24,65.5,-22,66.4,-15,66.3,-13.5,65,-18,63.4,-22,63.8],\n  [130.2,33.5,131.5,31.2,132.5,33,134.7,33.7,135.7,33.5,137,34.6,139.5,35,140.9,35.7,141.8,38.3,142,40,141.2,41.4,140,41,139.8,39.5,139,38,137,37,136.5,36.2,135.5,35.7,133,35.5,131,34.6],\n  [140,42,141.5,41.8,145.5,43.3,143.5,44.2,141.5,45.4,141.5,43.5],\n  [142,46,143.5,49,143,54,142.5,54,142,50],\n  [120.1,23,121,22,121.9,25,121,25.3],\n  [108.7,19.2,110.5,20,111,19.5,110,18.3,109,18.4],\n  [80,9.8,81.9,7.5,81.2,6,80,6.2,79.8,8],\n  [120.4,18.6,122.3,18.5,121.8,16,124.1,13.1,122,13.8,120.6,14.2,120.2,16.2],\n  [122,8,123.4,8.7,126.5,9.3,126.3,6.5,125.5,5.8,124,6.8,123,7.6],\n  [109,1.5,110,2,111.5,1.5,113,3.2,115,5,116.7,7,119,5.2,118,1,116.5,-1.5,116,-3.5,114.5,-4,112,-3.3,110.2,-2.9,109.2,-0.8],\n  [95.3,5.6,98,4,100.5,2.2,103.7,-1,106,-3,105.9,-5.8,104.5,-5.9,102.2,-3.9,100.5,-1,98.7,1.7,95.8,3.8],\n  [105.2,-6.8,106.5,-6,108.5,-6.5,111,-6.5,112.7,-6.9,114.5,-7.8,114.5,-8.7,111,-8.3,108,-7.8,105.3,-6.9],\n  [119.4,-5.5,118.9,-2.8,119.8,0.3,121,1.2,125,1.5,122,-0.7,123.3,-1.2,122.8,-4.7,121.4,-4.5,120.4,-5.5],\n  [131,-0.8,134,-0.9,138,-1.7,141,-2.7,145.5,-5.3,147.5,-6,147.8,-7.8,150.5,-10.3,147,-10,144,-8,141,-9.1,138,-8.3,137.8,-5.5,135,-4.4,133,-4,132,-2.7],\n  [113.5,-22,114,-26,115,-34,118,-35,123.5,-34,126,-32.3,131,-31.5,134,-32.8,135.7,-34.8,137.8,-33,138,-35.5,139.5,-36.9,141,-38.2,144,-38.3,146,-39,147.5,-38,150,-37.5,151.2,-33.9,153.2,-30,153.5,-28,153,-25,150.8,-22.5,149,-20.5,146.2,-19,145.4,-15,143.5,-14,142.5,-10.7,141.6,-13.5,141.3,-16.5,139.5,-17.5,136,-15,136.8,-12.2,133,-11.5,131,-12.3,129.5,-15,126,-14,123,-17,122.2,-18.3,121,-19.7,116.5,-20.7],\n  [144.7,-40.7,148.3,-40.9,148,-43,146.5,-43.6,145.2,-42.2],\n  [172.7,-34.5,175.5,-37,178.5,-37.7,176,-39.5,175,-41.6,174.8,-39.5,173.8,-39.2,174.6,-37.5],\n  [172.7,-40.5,174.2,-41.5,173,-43.5,171,-44.5,169,-46.6,166.5,-46,168,-44,171.5,-41.8],\n  [12.5,38,15.6,38.2,15.1,36.7,12.5,37.6],\n  [8.2,41,9.7,41,9.6,39,8.4,39],\n];\n\nconst MASK_W = 180;\nconst MASK_H = 90;\nlet maskCache: Uint8Array | null = null;\n\nfunction insidePoly(poly: number[], lon: number, lat: number) {\n  let c = false;\n  const n = poly.length / 2;\n  for (let i = 0, j = n - 1; i < n; j = i++) {\n    const xi = poly[i * 2];\n    const yi = poly[i * 2 + 1];\n    const xj = poly[j * 2];\n    const yj = poly[j * 2 + 1];\n    if (yi > lat !== yj > lat && lon < ((xj - xi) * (lat - yi)) / (yj - yi) + xi) c = !c;\n  }\n  return c;\n}\n\nfunction landMask() {\n  if (maskCache) return maskCache;\n  const m = new Uint8Array(MASK_W * MASK_H);\n  for (let r = 0; r < MASK_H; r++) {\n    const lat = 90 - (r + 0.5) * (180 / MASK_H);\n    for (let q = 0; q < MASK_W; q++) {\n      const lon = -180 + (q + 0.5) * (360 / MASK_W);\n      let land = lat < -71;\n      for (let k = 0; !land && k < LAND.length; k++) if (insidePoly(LAND[k], lon, lat)) land = true;\n      m[r * MASK_W + q] = land ? 1 : 0;\n    }\n  }\n  maskCache = m;\n  return m;\n}\n\nfunction isLand(mask: Uint8Array, x: number, y: number, z: number) {\n  const lat = Math.asin(Math.max(-1, Math.min(1, y))) * (180 / Math.PI);\n  const lon = -Math.atan2(z, x) * (180 / Math.PI);\n  let r = Math.floor(((90 - lat) / 180) * MASK_H);\n  let q = Math.floor(((lon + 180) / 360) * MASK_W);\n  if (r < 0) r = 0;\n  if (r >= MASK_H) r = MASK_H - 1;\n  q = ((q % MASK_W) + MASK_W) % MASK_W;\n  return mask[r * MASK_W + q] === 1;\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 = \"#ffb84d\";\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 [255, 184, 77];\n}\n\nfunction inkFor(accent: string) {\n  const rgb = hexRgb(accent);\n  if (!rgb) return \"#140d02\";\n  const lum = (0.2126 * rgb[0] + 0.7152 * rgb[1] + 0.0722 * rgb[2]) / 255;\n  return lum > 0.55 ? \"#140d02\" : \"#ffffff\";\n}\n\nfunction Mark() {\n  return (\n    <svg className=\"hb-ze-mark\" width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" aria-hidden=\"true\">\n      <circle cx=\"12\" cy=\"12\" r=\"9\" stroke=\"currentColor\" strokeWidth=\"1.6\" strokeDasharray=\"1.4 2.2\" strokeLinecap=\"round\" />\n      <ellipse cx=\"12\" cy=\"12\" rx=\"9\" ry=\"3.2\" stroke=\"currentColor\" strokeWidth=\"1.6\" transform=\"rotate(-18 12 12)\" />\n      <circle cx=\"12\" cy=\"12\" r=\"2.2\" fill=\"currentColor\" />\n    </svg>\n  );\n}\n\nexport function HeroDotEarth({\n  title = \"Software that reaches every continent.\",\n  subtitle = \"Deploy once and serve every region from the nearest point of presence. Plain source you own, no runtime and no lock-in.\",\n  caption = \"6 continents · 40 edge regions · MIT licensed\",\n  command = \"npx shadcn@latest add https://hyperblur.dev/r/hero-dot-earth.json\",\n  primaryCta = defaultPrimary,\n  brand = \"Meridian\",\n  nav = defaultNav,\n  navCta = defaultNavCta,\n  learnMore = defaultMore,\n  accent = \"#ffb84d\",\n  density = 1,\n  speed = 1,\n  oceanDots = 0.14,\n  headingAs = \"h1\",\n  onSearch,\n  className = \"\",\n  style,\n  ...rest\n}: HeroDotEarthProps) {\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.2, Number.isFinite(density) ? density : 1));\n    const oceanKeep = Math.min(1, Math.max(0, Number.isFinite(oceanDots) ? oceanDots : 0.14));\n    const pace = Math.max(0, Number.isFinite(speed) ? speed : 1);\n\n    const nGen = Math.round(14000 * mult);\n    const nDust = Math.round(240 * Math.min(1.4, mult));\n    const mask = landMask();\n    const gx = new Float32Array(nGen);\n    const gy = new Float32Array(nGen);\n    const gz = new Float32Array(nGen);\n    const gl = new Uint8Array(nGen);\n    let kept = 0;\n    for (let i = 0; i < nGen; i++) {\n      const yy = 1 - (2 * (i + 0.5)) / nGen;\n      const r = Math.sqrt(Math.max(0, 1 - yy * yy));\n      const th = i * GOLDEN;\n      const px = Math.cos(th) * r;\n      const pz = Math.sin(th) * r;\n      const land = isLand(mask, px, yy, pz);\n      if (!land && hash(i, 7) > oceanKeep) continue;\n      gx[kept] = px;\n      gy[kept] = yy;\n      gz[kept] = pz;\n      gl[kept] = land ? 1 : 0;\n      kept++;\n    }\n    const nBase = kept;\n    const total = nBase;\n\n    const bx = gx;\n    const by = gy;\n    const bz = gz;\n    const bl = gl;\n    const bs = new Float32Array(total);\n    for (let i = 0; i < nBase; i++) bs[i] = 0.75 + hash(i, 3) * 0.45;\n    const da = new Float32Array(nDust);\n    const dr = new Float32Array(nDust);\n    const dz = new Float32Array(nDust);\n    const dp = new Float32Array(nDust);\n    const dt = new Float32Array(nDust);\n    for (let k = 0; k < nDust; k++) {\n      da[k] = hash(k, 41) * TAU;\n      const u = hash(k, 42);\n      dr[k] = 1.08 + u * u * 1.25;\n      dz[k] = 0.25 + hash(k, 43) * 0.75;\n      dp[k] = hash(k, 44) * TAU;\n      dt[k] = 0.4 + hash(k, 45) * 1.4;\n    }\n\n    const sx = new Float32Array(total);\n    const sy = new Float32Array(total);\n    const ss = new Float32Array(total);\n    const bucket = new Uint8Array(total);\n    const order = new Int32Array(total);\n    const buckets = ALPHAS.length * TONES;\n    const counts = new Int32Array(buckets);\n    const starts = new Int32Array(buckets);\n\n    const acc = resolveRgb(accent, ctx);\n    const fills: string[] = [];\n    for (let b = 0; b < ALPHAS.length; b++) {\n      for (let t = 0; t < TONES; t++) {\n        const m = t / (TONES - 1);\n        const r = Math.round(WARM[0] + (acc[0] - WARM[0]) * m);\n        const g = Math.round(WARM[1] + (acc[1] - WARM[1]) * m);\n        const bl = Math.round(WARM[2] + (acc[2] - WARM[2]) * m);\n        fills.push(`rgba(${r}, ${g}, ${bl}, ${ALPHAS[b].toFixed(3)})`);\n      }\n    }\n    const glowA = `rgba(${acc[0]}, ${acc[1]}, ${acc[2]}, 0.10)`;\n    const glowB = `rgba(${acc[0]}, ${acc[1]}, ${acc[2]}, 0)`;\n\n    let w = 0;\n    let h = 0;\n    let cx = 0;\n    let cy = 0;\n    let R = 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\n    function layout() {\n      if (!root || !canvas || !stage || !ctx) return;\n      const rect = root.getBoundingClientRect();\n      w = rect.width;\n      h = rect.height;\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      cx = w / 2;\n      if (w < 640) {\n        const st = stage.getBoundingClientRect();\n        R = w * 0.38;\n        cy = st.top - rect.top + st.height / 2;\n      } else {\n        R = Math.min(w * 0.3, h * 0.42);\n        cy = h * 0.44;\n      }\n    }\n\n    function draw() {\n      if (!ctx || !w || !h) return;\n      ctx.setTransform(dpr, 0, 0, dpr, 0, 0);\n      ctx.clearRect(0, 0, w, h);\n\n      const glow = ctx.createRadialGradient(cx, cy, R * 0.2, cx, cy, R * 1.45);\n      glow.addColorStop(0, glowA);\n      glow.addColorStop(1, glowB);\n      ctx.fillStyle = glow;\n      ctx.fillRect(0, 0, w, h);\n\n      const spin = -1.15 + time * 0.09 * pace + curX * 0.45;\n      const tiltX = 0.34 + curY * 0.3;\n      const tiltZ = 0.4;\n      const cY = Math.cos(spin);\n      const sY = Math.sin(spin);\n      const cX = Math.cos(tiltX);\n      const sX = Math.sin(tiltX);\n      const cZ = Math.cos(tiltZ);\n      const sZ = Math.sin(tiltZ);\n      const ox = curX * R * 0.05;\n      const oy = curY * R * 0.04;\n\n      counts.fill(0);\n      for (let i = 0; i < total; i++) {\n        const x = bx[i];\n        const y = by[i];\n        const z = bz[i];\n        const x1 = x * cY + z * sY;\n        const z1 = -x * sY + z * cY;\n        const y2 = y * cX - z1 * sX;\n        const z2 = y * sX + z1 * cX;\n        const x3 = x1 * cZ - y2 * sZ;\n        const y3 = x1 * sZ + y2 * cZ;\n        const p = 1 + z2 * 0.07;\n        sx[i] = cx + ox + x3 * R * p;\n        sy[i] = cy + oy - y3 * R * p;\n        const front = (z2 + 1) * 0.5;\n        const rim = z2 > -0.08 ? Math.exp(-(z2 * z2) / 0.01) : 0;\n        let b = bl[i] ? 0.34 + 0.5 * front + 0.5 * rim : (0.04 + 0.62 * front * front + 0.5 * rim) * 0.3;\n        if (b > 0.999) b = 0.999;\n        const bi = Math.floor(b * ALPHAS.length);\n        const rr = x3 * x3 + y3 * y3;\n        let ti = Math.floor(rr * rr * TONES);\n        if (ti >= TONES) ti = TONES - 1;\n        let s = bs[i] * (0.62 + 0.55 * front + 0.25 * rim);\n        s *= bl[i] ? 1.18 : 0.8;\n        if (s > 1.4) s = 1.4;\n        if (s < 0.6) s = 0.6;\n        ss[i] = s;\n        const k = bi * TONES + ti;\n        bucket[i] = k;\n        counts[k]++;\n      }\n      let acc0 = 0;\n      for (let k = 0; k < buckets; k++) {\n        starts[k] = acc0;\n        acc0 += counts[k];\n      }\n      for (let i = 0; i < total; i++) order[starts[bucket[i]]++] = i;\n\n      let pos = 0;\n      for (let k = 0; k < buckets; k++) {\n        const n = counts[k];\n        if (!n) continue;\n        ctx.fillStyle = fills[k];\n        ctx.beginPath();\n        for (let q = pos; q < pos + n; q++) {\n          const i = order[q];\n          const s = ss[i];\n          ctx.rect(sx[i] - s / 2, sy[i] - s / 2, s, s);\n        }\n        ctx.fill();\n        pos += n;\n      }\n\n      ctx.fillStyle = \"rgb(236, 226, 210)\";\n      const swirl = time * 0.012 * pace;\n      for (let k = 0; k < nDust; k++) {\n        const a = da[k] + swirl * (1.6 - dr[k] * 0.5);\n        const px = cx + Math.cos(a) * dr[k] * R + curX * dz[k] * 18;\n        const py = cy + Math.sin(a) * dr[k] * R * 0.92 + curY * dz[k] * 12;\n        if (px < -4 || px > w + 4 || py < -4 || py > h + 4) continue;\n        const twinkle = reduce ? 1 : 0.55 + 0.45 * Math.sin(time * dt[k] + dp[k]);\n        ctx.globalAlpha = (0.08 + 0.32 * dz[k]) * twinkle;\n        const s = 0.6 + dz[k] * 0.7;\n        ctx.fillRect(px - s / 2, py - s / 2, s, s);\n      }\n      ctx.globalAlpha = 1;\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      let tx = ptx;\n      let ty = pty;\n      if (!pointer) {\n        tx = Math.sin(time * 0.21) * 0.45;\n        ty = Math.sin(time * 0.13 + 1.2) * 0.25;\n      }\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 || !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    draw();\n\n    const ro = new ResizeObserver(() => {\n      layout();\n      draw();\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      stop();\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, oceanDots]);\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-ze-accent\": accent, \"--hb-ze-ink\": inkFor(accent), ...style } as React.CSSProperties;\n\n  return (\n    <section ref={rootRef} className={`hb-ze ${className}`} style={vars} {...rest}>\n      <style href=\"hb-hero-dot-earth\" precedence=\"default\">{css}</style>\n      <canvas ref={canvasRef} className=\"hb-ze-canvas\" aria-hidden=\"true\" />\n      <header className=\"hb-ze-bar\">\n        <a className=\"hb-ze-brand\" href=\"#\">\n          <Mark />\n          <span>{brand}</span>\n        </a>\n        {nav.length ? (\n          <nav aria-label=\"Primary\">\n            <ul className=\"hb-ze-links\">\n              {nav.map((item) => (\n                <li key={item.label}>\n                  <a className=\"hb-ze-link\" href={item.href}>\n                    {item.label}\n                  </a>\n                </li>\n              ))}\n            </ul>\n          </nav>\n        ) : (\n          <span />\n        )}\n        <div className=\"hb-ze-tools\">\n          <button type=\"button\" className=\"hb-ze-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-ze-outline\" href={navCta.href}>\n              {navCta.label}\n            </a>\n          ) : null}\n        </div>\n      </header>\n      <div ref={stageRef} className=\"hb-ze-stage\" aria-hidden=\"true\" />\n      <div className=\"hb-ze-foot\">\n        <div className=\"hb-ze-copy\">\n          <Heading className=\"hb-ze-title\">{title}</Heading>\n          {subtitle ? <p className=\"hb-ze-sub\">{subtitle}</p> : null}\n        </div>\n        {caption || command || primaryCta ? (\n          <div className=\"hb-ze-side\">\n            {caption ? <p className=\"hb-ze-caption\">{caption}</p> : null}\n            {command || primaryCta ? (\n              <div className=\"hb-ze-row\">\n                {command ? (\n                  <div className=\"hb-ze-cmd\">\n                    <span className=\"hb-ze-prompt\" aria-hidden=\"true\">$</span>\n                    <code className=\"hb-ze-code\">{command}</code>\n                    <button type=\"button\" className=\"hb-ze-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-ze-sr\" aria-live=\"polite\">{copied ? \"Copied\" : \"\"}</span>\n                    </button>\n                  </div>\n                ) : null}\n                {primaryCta ? (\n                  <a className=\"hb-ze-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          </div>\n        ) : null}\n      </div>\n      {learnMore ? (\n        <a className=\"hb-ze-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    </section>\n  );\n}\n"
    }
  ]
}