{
  "$schema": "https://ui.shadcn.com/schema/registry-item.json",
  "name": "device-grows-around",
  "title": "Device Grows Around",
  "description": "A live plays counter card grows a device frame around it, with range tabs and delta stats.",
  "dependencies": ["remotion", "@remotion/google-fonts"],
  "registryDependencies": ["@remocn/gsh"],
  "files": [
    {
      "path": "registry/remocn/device-grows-around/index.tsx",
      "content": "\"use client\";\n\nimport { loadFont as loadSora } from \"@remotion/google-fonts/Sora\";\nimport type { CSSProperties, ReactNode } from \"react\";\nimport {\n  AbsoluteFill,\n  Easing,\n  interpolate,\n  interpolateColors,\n  random,\n  spring,\n  useCurrentFrame,\n  useVideoConfig,\n} from \"remotion\";\nimport type { GradientParams } from \"@/lib/remocn/gsh/gradient-engine\";\nimport { GshGround } from \"@/lib/remocn/gsh/gsh-ground\";\nimport type { GshPresetId } from \"@/lib/remocn/gsh/presets\";\n\nconst sora = loadSora(\"normal\", {\n  weights: [\"300\", \"400\"],\n  subsets: [\"latin\"],\n});\n\nconst REMOCN_R_PATH =\n  \"M 0.01 0.81 C 0.01 1.73, 0.36 2.79, 1.09 4.13 C 4.91 11.04, 13.45 17.16, 21.7 18.9 C 22.94 19.16, 23.18 19.16, 51.39 19.27 C 76.07 19.36, 80.02 19.4, 81.32 19.57 C 89.89 20.69, 96.2 24.68, 99.38 31.01 C 103.19 38.56, 102.53 50.1, 97.91 57.07 C 94.66 61.96, 89.68 64.99, 83.26 66 C 82.81 66.07, 70.18 66.83, 55.2 67.69 C 24.82 69.43, 27.03 69.23, 24.18 70.4 C 19.9 72.15, 14.84 75.7, 10.65 79.89 C 4.86 85.68, 1.3 91.91, 0.25 98.13 C 0.12 98.85, 0.08 103.13, 0.04 116.66 L 0 134.26 9.5 134.26 L 19 134.26 19.05 119.41 C 19.1 103.27, 19.08 103.82, 19.82 101.04 C 21.79 93.65, 27.86 88.75, 36.45 87.63 C 37.23 87.53, 39.41 87.5, 43.57 87.53 C 50.12 87.59, 50.75 87.65, 53.22 88.45 C 56.61 89.56, 59.67 91.86, 62.02 95.07 C 62.52 95.76, 69.35 103.85, 77.2 113.07 C 85.04 122.28, 91.63 130.04, 91.85 130.32 C 92.07 130.59, 92.5 131.34, 92.82 131.97 C 93.52 133.35, 94.11 133.93, 95.06 134.13 C 95.5 134.23, 98.97 134.26, 106.36 134.23 L 117.01 134.19 100.82 113.07 C 91.91 101.45, 84.52 91.78, 84.39 91.57 C 83.36 89.89, 83.66 87.53, 85.09 86 C 85.79 85.25, 86.36 84.94, 88.07 84.38 C 96.18 81.72, 104.15 76.62, 109.97 70.36 C 120.59 58.93, 124.06 44.32, 119.44 30.43 C 114.59 15.81, 101.93 4.02, 87.64 0.83 C 83.93 0.01, 88.09 0.08, 41.85 0.04 L 0.01 0 0.01 0.81 Z\";\n\nconst ENTER = Easing.bezier(0.32, 0.72, 0, 1);\nconst SOFT = Easing.bezier(0.22, 1, 0.36, 1);\nconst MOVE = Easing.bezier(0.65, 0, 0.35, 1);\nconst CAM = Easing.bezier(0.87, 0, 0.13, 1);\nconst HEAVY = { mass: 1, damping: 26, stiffness: 120 };\nconst CHIP = { mass: 0.5, damping: 12, stiffness: 200 };\nconst CARD = { mass: 0.8, damping: 18, stiffness: 160 };\n\nconst B = {\n  avatar: 2,\n  name: 6,\n  nameStep: 2,\n  sub: 30,\n  subStep: 1,\n  grow: 48,\n  status: 54,\n  icons: 60,\n  price: 60,\n  delta: 66,\n  chart: 66,\n  tabs: 78,\n  card: 84,\n  list: 90,\n  flood: 96,\n  push: 108,\n  lock: 150,\n  end: 186,\n};\n\nexport const DEVICE_GROWS_AROUND_DURATION = B.end;\n\nconst PW = 420;\nconst PH = 900;\nconst PR = 66;\nconst BZ = 9;\n\nconst ramp = (f: number, start: number, dur: number, easing = ENTER) =>\n  interpolate(f, [start, start + dur], [0, 1], {\n    extrapolateLeft: \"clamp\",\n    extrapolateRight: \"clamp\",\n    easing,\n  });\n\nconst mix = (a: number, b: number, t: number) => a + (b - a) * t;\n\nconst fmt = (n: number) => Math.round(n).toLocaleString(\"en-US\");\n\nfunction chartPoints(n: number) {\n  const pts: number[] = [];\n  let v = 0.18;\n  for (let i = 0; i < n; i++) {\n    const trend = (i / (n - 1)) * 0.62;\n    v = v * 0.55 + (0.18 + trend + (random(`dga-${i}`) - 0.5) * 0.22) * 0.45;\n    pts.push(Math.min(0.96, Math.max(0.04, v)));\n  }\n  pts[n - 1] = 0.9;\n  return pts;\n}\n\nconst POINTS = chartPoints(44);\n\nfunction Rise({\n  t,\n  children,\n  style,\n  dist = 14,\n}: {\n  t: number;\n  children: ReactNode;\n  style?: CSSProperties;\n  dist?: number;\n}) {\n  return (\n    <div style={{ position: \"absolute\", overflow: \"hidden\", ...style }}>\n      <div\n        style={{\n          transform: `translateY(${(1 - t) * dist}px)`,\n          opacity: Math.min(1, t * 1.6),\n          filter: t < 0.98 ? `blur(${(1 - t) * 3}px)` : undefined,\n        }}\n      >\n        {children}\n      </div>\n    </div>\n  );\n}\n\nfunction Icon({\n  d,\n  size,\n  color,\n  sw = 1.6,\n}: {\n  d: string;\n  size: number;\n  color: string;\n  sw?: number;\n}) {\n  return (\n    <svg\n      viewBox=\"0 0 24 24\"\n      width={size}\n      height={size}\n      style={{ display: \"block\" }}\n      aria-hidden\n    >\n      <path\n        d={d}\n        fill=\"none\"\n        stroke={color}\n        strokeWidth={sw}\n        strokeLinecap=\"round\"\n        strokeLinejoin=\"round\"\n      />\n    </svg>\n  );\n}\n\nexport interface DeviceGrowsAroundProps {\n  theme?: \"dark\" | \"light\";\n  accent?: string;\n  name?: string;\n  badge?: string;\n  subtitle?: string;\n  metric?: number;\n  delta?: string;\n  total?: number;\n  gain?: number;\n  ground?: GshPresetId;\n  groundParams?: Partial<GradientParams>;\n}\n\nexport function DeviceGrowsAround({\n  theme = \"dark\",\n  accent = \"#3B5BFD\",\n  name = \"Launch Film\",\n  badge = \"v2\",\n  subtitle = \"Remocn Studio export\",\n  metric = 48213,\n  delta = \"6,904 (16.7%) today\",\n  total = 1284507,\n  gain = 412880,\n  ground,\n  groundParams,\n}: DeviceGrowsAroundProps) {\n  const frame = useCurrentFrame();\n  const { width, height, fps } = useVideoConfig();\n  const dark = theme === \"dark\";\n  const portrait = height > width * 1.2;\n  const stageW = portrait ? 1080 : 1280;\n  const stageH = portrait ? 1920 : 720;\n  const sc = width / stageW;\n\n  const stage = dark ? \"#030407\" : \"#eeede9\";\n  const ink = dark ? \"#f2f3f8\" : \"#12141b\";\n  const soft = dark ? \"rgba(232,236,252,0.56)\" : \"rgba(18,20,27,0.52)\";\n  const faint = dark ? \"rgba(232,236,252,0.32)\" : \"rgba(18,20,27,0.3)\";\n  const green = dark ? \"#41e08d\" : \"#0e9a52\";\n  const hair = dark ? \"rgba(255,255,255,0.1)\" : \"rgba(18,20,27,0.08)\";\n  const screenBase = dark ? \"#06070c\" : \"#ffffff\";\n  const bezel = dark ? \"#0b0c11\" : \"#fbfbfc\";\n  const btnBg = dark ? \"rgba(255,255,255,0.07)\" : \"rgba(18,20,27,0.05)\";\n  const cardBg = dark ? \"rgba(8,10,28,0.46)\" : \"rgba(255,255,255,0.78)\";\n  const cardShadow = dark\n    ? \"0 0 0 1px rgba(255,255,255,0.09), inset 0 1px 0 rgba(255,255,255,0.07), 0 8px 24px rgba(0,0,10,0.3)\"\n    : \"0 0 0 1px rgba(18,20,40,0.06), 0 2px 6px rgba(30,40,90,0.05), 0 12px 28px rgba(30,40,90,0.08)\";\n\n  const nameChars = Array.from(name);\n  const subChars = Array.from(subtitle);\n  const subStart = Math.max(B.sub, B.name + nameChars.length * B.nameStep);\n  const nameTyped = nameChars.filter(\n    (_, i) => frame >= B.name + i * B.nameStep,\n  ).length;\n  const subTyped = subChars.filter(\n    (_, i) => frame >= subStart + i * B.subStep,\n  ).length;\n  const badgeAt = B.name + nameChars.length * B.nameStep;\n  const subEnd = subStart + subChars.length * B.subStep;\n\n  const tint = (at: number) =>\n    interpolateColors(frame, [at, at + 9], [accent, ink]);\n\n  const nameW = nameChars.length * 23 * 0.6 + (badge ? 46 : 0);\n  const subW = subChars.length * 16 * 0.56;\n  const LX = (58 + 126 + Math.max(nameW, subW)) / 2;\n  const LY = 112;\n\n  const cx = stageW / 2;\n  const K = portrait\n    ? {\n        sT: 2.55,\n        aT: [cx, 900],\n        s0: 1.95,\n        f0: [PW / 2, 450],\n        a0: [cx, 985],\n        s1: 2.68,\n        f1: [PW / 2, 614],\n        a1: [cx, 960],\n      }\n    : {\n        sT: 2.55,\n        aT: [cx, 356],\n        s0: 1.62,\n        f0: [PW / 2, 0],\n        a0: [cx, 40],\n        s1: 3.2,\n        f1: [PW / 2, 545],\n        a1: [cx, 360],\n      };\n\n  const g = spring({ frame: frame - B.grow, fps, config: HEAVY });\n  const p = ramp(frame, B.push, 36, CAM);\n  const pPrev = ramp(frame - 1, B.push, 36, CAM);\n  const drift = ramp(frame, B.push + 36, B.end - B.push - 36, MOVE);\n  const sA = Math.exp(mix(Math.log(K.sT), Math.log(K.s0), g));\n  const s =\n    Math.exp(mix(Math.log(sA), Math.log(K.s1), p)) * (1 + 0.025 * drift);\n  const fx = mix(mix(LX, K.f0[0], g), K.f1[0], p);\n  const fy = mix(mix(LY, K.f0[1], g), K.f1[1], p);\n  const ax = mix(mix(K.aT[0], K.a0[0], g), K.a1[0], p);\n  const ay = mix(mix(K.aT[1], K.a0[1], g), K.a1[1], p);\n  const camBlur = Math.min(3, Math.abs(p - pPrev) * 70);\n\n  const bezelIn = ramp(frame, B.grow, 18, SOFT);\n  const bezelScale = mix(\n    1.07,\n    1,\n    spring({ frame: frame - B.grow, fps, config: CARD }),\n  );\n  const baseCol = interpolateColors(bezelIn, [0, 1], [stage, screenBase]);\n  const flood = ramp(frame, B.flood, 26, MOVE);\n  const bezelOut = ramp(frame, B.push + 18, 16, MOVE);\n\n  const avatarIn = spring({ frame: frame - B.avatar, fps, config: CHIP });\n  const badgeIn = spring({ frame: frame - badgeAt, fps, config: CHIP });\n  const statusIn = ramp(frame, B.status, 12);\n  const iconsIn = spring({ frame: frame - B.icons, fps, config: CHIP });\n  const priceIn = ramp(frame, B.price, 14);\n  const deltaIn = ramp(frame, B.delta, 14);\n  const chartIn = ramp(frame, B.chart, 30, MOVE);\n  const cardIn = spring({ frame: frame - B.card, fps, config: CARD });\n  const count = ramp(frame, B.card, B.lock - B.card, MOVE);\n  const lockTick = spring({ frame: frame - B.lock, fps, config: CHIP });\n  const tick =\n    frame >= B.lock ? 1 + 0.05 * Math.sin(Math.min(1, lockTick) * Math.PI) : 1;\n\n  const caretOn =\n    frame < subEnd + 6\n      ? frame < B.name\n        ? Math.floor(frame / 6) % 2 === 0\n        : true\n      : Math.floor((frame - subEnd) / 7) % 2 === 0 && frame < B.grow + 14;\n  const caretOnSub = subTyped > 0;\n\n  const chartX0 = 24;\n  const chartX1 = 396;\n  const chartY0 = 268;\n  const chartY1 = 420;\n  const pts = POINTS.map((v, i) => [\n    chartX0 + ((chartX1 - chartX0) * i) / (POINTS.length - 1),\n    chartY1 - (chartY1 - chartY0) * v,\n  ]);\n  const line = pts\n    .map(\n      (pt, i) =>\n        `${i === 0 ? \"M\" : \"L\"}${pt[0].toFixed(1)} ${pt[1].toFixed(1)}`,\n    )\n    .join(\" \");\n  const area = `${line} L${chartX1} ${chartY1 + 20} L${chartX0} ${chartY1 + 20} Z`;\n  const head =\n    pts[Math.min(pts.length - 1, Math.floor(chartIn * (pts.length - 1)))];\n\n  const tabs = [\"1H\", \"1D\", \"1W\", \"1M\", \"1Y\", \"All\"];\n  const sources = [\n    [\"Social\", 0.41],\n    [\"Direct\", 0.27],\n    [\"Search\", 0.18],\n  ] as const;\n\n  const resolvedGround: GshPresetId | undefined = ground;\n  const resolvedParams: Partial<GradientParams> | undefined =\n    groundParams ??\n    (ground\n      ? undefined\n      : dark\n        ? {\n            kind: \"beam\",\n            colors: [\"#e6ecff\", \"#8a9dff\", \"#3150f0\", \"#0a1250\"],\n            background: \"#03050f\",\n            speed: 0.6,\n            loopSeconds: 14,\n            scale: 1.8,\n            warp: 0.35,\n            seed: 5,\n          }\n        : {\n            kind: \"beam\",\n            colors: [\"#ffffff\", \"#c9d3ff\", \"#8399ff\", \"#e4e8fb\"],\n            background: \"#eef0f9\",\n            speed: 0.6,\n            loopSeconds: 14,\n            scale: 1.8,\n            warp: 0.35,\n            seed: 5,\n          });\n\n  const screen: CSSProperties = {\n    position: \"absolute\",\n    left: BZ,\n    top: BZ,\n    width: PW - BZ * 2,\n    height: PH - BZ * 2,\n    borderRadius: PR - BZ,\n  };\n\n  const floodEdge = flood * 135;\n  const floodMask = `linear-gradient(180deg, transparent ${floodEdge - 35}%, #000 ${floodEdge}%)`;\n\n  return (\n    <AbsoluteFill\n      style={{\n        fontFamily: sora.fontFamily,\n        overflow: \"hidden\",\n        background: stage,\n        fontVariantNumeric: \"tabular-nums\",\n      }}\n    >\n      <GshGround\n        preset={resolvedGround}\n        params={resolvedParams}\n        timeOffset={3}\n        timeScale={0.5}\n      />\n      <div\n        style={{\n          position: \"absolute\",\n          left: 0,\n          top: 0,\n          width: stageW,\n          height: stageH,\n          transform: `scale(${sc})`,\n          transformOrigin: \"0 0\",\n          overflow: \"hidden\",\n          filter: camBlur > 0.1 ? `blur(${camBlur}px)` : undefined,\n        }}\n      >\n        <div\n          style={{\n            position: \"absolute\",\n            left: 0,\n            top: 0,\n            width: PW,\n            height: PH,\n            transformOrigin: \"0 0\",\n            transform: `translate(${ax - fx * s}px, ${ay - fy * s}px) scale(${s})`,\n          }}\n        >\n          <div\n            style={{\n              ...screen,\n              boxShadow: `0 0 0 9000px ${stage}`,\n              opacity: 1 - bezelOut,\n            }}\n          />\n          <div\n            style={{\n              ...screen,\n              left: BZ - 2,\n              top: BZ - 2,\n              width: PW - BZ * 2 + 4,\n              height: PH - BZ * 2 + 4,\n              borderRadius: PR - BZ + 2,\n              background: baseCol,\n              maskImage: flood > 0 ? floodMask : undefined,\n              WebkitMaskImage: flood > 0 ? floodMask : undefined,\n            }}\n          />\n          <div\n            style={{\n              position: \"absolute\",\n              inset: 0,\n              borderRadius: PR,\n              border: `${BZ}px solid ${bezel}`,\n              boxShadow: dark\n                ? \"0 0 0 1px rgba(255,255,255,0.16), inset 0 0 0 1px rgba(255,255,255,0.07), 0 30px 80px rgba(0,0,0,0.6)\"\n                : \"0 0 0 1px rgba(18,20,40,0.1), inset 0 0 0 1px rgba(18,20,40,0.05), 0 4px 10px rgba(30,40,90,0.06), 0 30px 70px rgba(30,40,90,0.12)\",\n              opacity: bezelIn * (1 - bezelOut),\n              transform: `scale(${bezelScale})`,\n              transformOrigin: `${LX}px ${LY}px`,\n            }}\n          />\n          <div style={{ ...screen, overflow: \"hidden\" }}>\n            <div\n              style={{\n                position: \"absolute\",\n                left: -BZ,\n                top: -BZ,\n                width: PW,\n                height: PH,\n              }}\n            >\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: PW / 2 - 52,\n                  top: 20,\n                  width: 104,\n                  height: 30,\n                  borderRadius: 20,\n                  background: \"#000\",\n                  opacity: bezelIn,\n                  transform: `scale(${mix(0.7, 1, bezelIn)})`,\n                }}\n              />\n              <Rise\n                t={statusIn}\n                dist={8}\n                style={{ left: 50, top: 24, height: 26 }}\n              >\n                <div style={{ fontSize: 16, color: ink, lineHeight: \"26px\" }}>\n                  9:41\n                </div>\n              </Rise>\n              <div\n                style={{\n                  position: \"absolute\",\n                  right: 40,\n                  top: 30,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  gap: 6,\n                  opacity: ramp(frame, B.status + 4, 10),\n                }}\n              >\n                <svg width={18} height={12} viewBox=\"0 0 18 12\" aria-hidden>\n                  {[0, 1, 2, 3].map((k) => (\n                    <rect\n                      key={`sig${k.toString()}`}\n                      x={k * 4.6}\n                      y={9 - k * 3}\n                      width={3.2}\n                      height={3 + k * 3}\n                      rx={1}\n                      fill={ink}\n                    />\n                  ))}\n                </svg>\n                <svg width={17} height={12} viewBox=\"0 0 17 12\" aria-hidden>\n                  <path\n                    d=\"M1 4.2a11 11 0 0 1 15 0M3.6 7a7 7 0 0 1 9.8 0M6.2 9.7a3 3 0 0 1 4.6 0\"\n                    fill=\"none\"\n                    stroke={ink}\n                    strokeWidth={1.7}\n                    strokeLinecap=\"round\"\n                  />\n                </svg>\n                <svg width={26} height={12} viewBox=\"0 0 26 12\" aria-hidden>\n                  <rect\n                    x={0.7}\n                    y={0.7}\n                    width={22}\n                    height={10.6}\n                    rx={3.4}\n                    fill=\"none\"\n                    stroke={faint}\n                    strokeWidth={1.2}\n                  />\n                  <rect\n                    x={2.4}\n                    y={2.4}\n                    width={15}\n                    height={7.2}\n                    rx={2}\n                    fill={ink}\n                  />\n                  <rect\n                    x={23.8}\n                    y={4}\n                    width={1.6}\n                    height={4}\n                    rx={0.8}\n                    fill={faint}\n                  />\n                </svg>\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 22,\n                  top: LY - 12,\n                  opacity: Math.min(1, iconsIn),\n                  transform: `translateX(${(1 - Math.min(1, iconsIn)) * 8}px)`,\n                }}\n              >\n                <Icon d=\"M15 5l-7 7 7 7\" size={24} color={soft} sw={1.8} />\n              </div>\n              {[\n                \"M12 7v5l3 2M4.5 12a7.5 7.5 0 1 0 2.2-5.3M4 4v3.5h3.5\",\n                \"M12 4v11M8 8l4-4 4 4M6 12v6.5h12V12\",\n              ].map((d, k) => (\n                <div\n                  key={`btn${k.toString()}`}\n                  style={{\n                    position: \"absolute\",\n                    left: 322 + k * 42,\n                    top: LY - 17,\n                    width: 34,\n                    height: 34,\n                    borderRadius: 17,\n                    background: btnBg,\n                    boxShadow: `inset 0 0 0 1px ${hair}`,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    justifyContent: \"center\",\n                    transform: `scale(${Math.max(0, spring({ frame: frame - B.icons - 2 - k * 2, fps, config: CHIP }))})`,\n                  }}\n                >\n                  <Icon d={d} size={17} color={ink} />\n                </div>\n              ))}\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 58,\n                  top: LY - 27,\n                  width: 54,\n                  height: 54,\n                  borderRadius: 27,\n                  background: dark ? \"#181a23\" : \"#12141b\",\n                  boxShadow: dark\n                    ? \"inset 0 0 0 1px rgba(255,255,255,0.12), inset 0 1px 0 rgba(255,255,255,0.1)\"\n                    : \"0 2px 6px rgba(18,20,40,0.18)\",\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  justifyContent: \"center\",\n                  transform: `scale(${Math.max(0, avatarIn)})`,\n                }}\n              >\n                <svg\n                  viewBox=\"0 0 124.06 134.26\"\n                  height={22}\n                  width={(22 * 124.06) / 134.26}\n                  aria-hidden\n                >\n                  <path fill=\"#ffffff\" d={REMOCN_R_PATH} />\n                </svg>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    right: -1,\n                    bottom: 1,\n                    width: 14,\n                    height: 14,\n                    borderRadius: 7,\n                    background: green,\n                    boxShadow: `0 0 0 3px ${baseCol}`,\n                    transform: `scale(${Math.max(0, spring({ frame: frame - B.icons, fps, config: CHIP }))})`,\n                  }}\n                />\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 126,\n                  top: 84,\n                  height: 30,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  whiteSpace: \"pre\",\n                  fontSize: 23,\n                  letterSpacing: \"-0.02em\",\n                  color: ink,\n                }}\n              >\n                {nameChars.slice(0, nameTyped).map((ch, i) => (\n                  <span\n                    key={`n${i.toString()}`}\n                    style={{ color: tint(B.name + i * B.nameStep) }}\n                  >\n                    {ch}\n                  </span>\n                ))}\n                {!caretOnSub && (\n                  <span\n                    style={{\n                      display: \"inline-block\",\n                      width: 2.5,\n                      height: 26,\n                      marginLeft: 2,\n                      borderRadius: 2,\n                      background: accent,\n                      opacity: caretOn ? 1 : 0,\n                    }}\n                  />\n                )}\n                {badge ? (\n                  <span\n                    style={{\n                      marginLeft: 10,\n                      fontSize: 13,\n                      letterSpacing: 0,\n                      lineHeight: \"20px\",\n                      padding: \"0 7px\",\n                      borderRadius: 6,\n                      color: dark ? \"#aab8ff\" : accent,\n                      background: dark\n                        ? \"rgba(90,115,255,0.2)\"\n                        : \"rgba(59,91,253,0.1)\",\n                      opacity: Math.min(1, Math.max(0, badgeIn)),\n                      transform: `scale(${Math.max(0, badgeIn)})`,\n                    }}\n                  >\n                    {badge}\n                  </span>\n                ) : null}\n              </div>\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 126,\n                  top: 118,\n                  height: 24,\n                  display: \"flex\",\n                  alignItems: \"center\",\n                  whiteSpace: \"pre\",\n                  fontSize: 16,\n                  fontWeight: 300,\n                  color: soft,\n                }}\n              >\n                {subChars.slice(0, subTyped).map((ch, i) => (\n                  <span\n                    key={`s${i.toString()}`}\n                    style={{\n                      color:\n                        frame < subStart + i * B.subStep + 8\n                          ? interpolateColors(\n                              frame,\n                              [\n                                subStart + i * B.subStep,\n                                subStart + i * B.subStep + 8,\n                              ],\n                              [accent, soft],\n                            )\n                          : soft,\n                    }}\n                  >\n                    {ch}\n                  </span>\n                ))}\n                {caretOnSub && (\n                  <span\n                    style={{\n                      display: \"inline-block\",\n                      width: 2,\n                      height: 19,\n                      marginLeft: 2,\n                      borderRadius: 2,\n                      background: accent,\n                      opacity: caretOn ? 1 : 0,\n                    }}\n                  />\n                )}\n              </div>\n\n              <Rise\n                t={priceIn}\n                dist={30}\n                style={{ left: 38, top: 160, height: 64 }}\n              >\n                <div\n                  style={{\n                    fontSize: 50,\n                    lineHeight: \"64px\",\n                    letterSpacing: \"-0.035em\",\n                    color: ink,\n                    fontWeight: 300,\n                  }}\n                >\n                  {fmt(metric)}\n                  <span\n                    style={{\n                      fontSize: 20,\n                      color: soft,\n                      marginLeft: 10,\n                      letterSpacing: 0,\n                    }}\n                  >\n                    views\n                  </span>\n                </div>\n              </Rise>\n              <Rise\n                t={deltaIn}\n                dist={14}\n                style={{ left: 40, top: 226, height: 24 }}\n              >\n                <div\n                  style={{\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 6,\n                    fontSize: 15,\n                    lineHeight: \"24px\",\n                    color: green,\n                  }}\n                >\n                  <svg width={10} height={10} viewBox=\"0 0 10 10\" aria-hidden>\n                    <path d=\"M5 1.5L9 8H1z\" fill={green} />\n                  </svg>\n                  <span>{delta}</span>\n                </div>\n              </Rise>\n\n              <svg\n                width={PW}\n                height={PH}\n                viewBox={`0 0 ${PW} ${PH}`}\n                style={{ position: \"absolute\", left: 0, top: 0 }}\n                aria-hidden\n              >\n                <defs>\n                  <linearGradient id=\"dga-fill\" x1=\"0\" y1=\"0\" x2=\"0\" y2=\"1\">\n                    <stop offset=\"0%\" stopColor={green} stopOpacity={0.22} />\n                    <stop offset=\"100%\" stopColor={green} stopOpacity={0} />\n                  </linearGradient>\n                  <clipPath id=\"dga-clip\">\n                    <rect\n                      x={0}\n                      y={0}\n                      width={chartX0 + (chartX1 - chartX0) * chartIn + 2}\n                      height={PH}\n                    />\n                  </clipPath>\n                </defs>\n                {[0, 1, 2].map((k) => (\n                  <line\n                    key={`gl${k.toString()}`}\n                    x1={chartX0}\n                    x2={chartX1}\n                    y1={chartY0 + k * 64}\n                    y2={chartY0 + k * 64}\n                    stroke={hair}\n                    strokeDasharray=\"2 5\"\n                    opacity={ramp(frame, B.chart, 10)}\n                  />\n                ))}\n                <g clipPath=\"url(#dga-clip)\" opacity={chartIn > 0 ? 1 : 0}>\n                  <path d={area} fill=\"url(#dga-fill)\" />\n                  <path\n                    d={line}\n                    fill=\"none\"\n                    stroke={green}\n                    strokeWidth={2.2}\n                    strokeLinejoin=\"round\"\n                    strokeLinecap=\"round\"\n                  />\n                </g>\n                {chartIn > 0 && (\n                  <circle cx={head[0]} cy={head[1]} r={4.5} fill={green} />\n                )}\n              </svg>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 24,\n                  top: 440,\n                  width: 372,\n                  height: 34,\n                  display: \"flex\",\n                  justifyContent: \"space-between\",\n                  alignItems: \"center\",\n                }}\n              >\n                {tabs.map((tb, k) => {\n                  const tIn = ramp(frame, B.tabs + k * 2, 12);\n                  const active = tb === \"1W\";\n                  return (\n                    <div\n                      key={tb}\n                      style={{\n                        width: 52,\n                        height: 30,\n                        lineHeight: \"30px\",\n                        textAlign: \"center\",\n                        borderRadius: 15,\n                        fontSize: 13,\n                        color: active ? ink : soft,\n                        background: active ? btnBg : \"transparent\",\n                        boxShadow: active\n                          ? `inset 0 0 0 1px ${hair}`\n                          : undefined,\n                        opacity: tIn,\n                        transform: `translateY(${(1 - tIn) * 8}px)`,\n                      }}\n                    >\n                      {tb}\n                    </div>\n                  );\n                })}\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 24,\n                  top: 484,\n                  width: 372,\n                  height: 168,\n                  borderRadius: 20,\n                  background: cardBg,\n                  boxShadow: cardShadow,\n                  opacity: Math.min(1, cardIn * 1.4),\n                  transform: `translateY(${(1 - cardIn) * 26}px)`,\n                }}\n              >\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    top: 14,\n                    display: \"flex\",\n                    alignItems: \"center\",\n                    gap: 6,\n                    padding: \"0 8px\",\n                    height: 22,\n                    borderRadius: 6,\n                    fontSize: 12,\n                    color: green,\n                    background: dark\n                      ? \"rgba(65,224,141,0.14)\"\n                      : \"rgba(14,154,82,0.1)\",\n                  }}\n                >\n                  <div\n                    style={{\n                      width: 6,\n                      height: 6,\n                      borderRadius: 3,\n                      background: green,\n                      opacity: 0.55 + 0.45 * Math.cos(frame / 5),\n                    }}\n                  />\n                  Live\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    top: 44,\n                    display: \"flex\",\n                    justifyContent: \"space-between\",\n                    alignItems: \"baseline\",\n                  }}\n                >\n                  <div\n                    style={{\n                      fontSize: 34,\n                      letterSpacing: \"-0.035em\",\n                      color: ink,\n                      transform: `scale(${tick})`,\n                      transformOrigin: \"left center\",\n                    }}\n                  >\n                    {fmt(mix(total * 0.962, total, count))}\n                  </div>\n                  <div\n                    style={{\n                      fontSize: 20,\n                      letterSpacing: \"-0.02em\",\n                      color: green,\n                      transform: `scale(${tick})`,\n                      transformOrigin: \"right center\",\n                    }}\n                  >\n                    +{fmt(mix(gain * 0.88, gain, count))}\n                  </div>\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    top: 92,\n                    display: \"flex\",\n                    gap: 8,\n                    fontSize: 13,\n                    color: soft,\n                    whiteSpace: \"nowrap\",\n                  }}\n                >\n                  <span>Plays</span>\n                  <span style={{ color: ink }}>all time</span>\n                  <span style={{ color: faint }}>(since launch)</span>\n                </div>\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    top: 120,\n                    height: 1,\n                    background: hair,\n                  }}\n                />\n                <div\n                  style={{\n                    position: \"absolute\",\n                    left: 16,\n                    right: 16,\n                    top: 134,\n                    display: \"flex\",\n                    justifyContent: \"space-between\",\n                    fontSize: 13,\n                    color: soft,\n                  }}\n                >\n                  <span>\n                    Completion{\" \"}\n                    <span style={{ color: ink, marginLeft: 6 }}>71%</span>\n                  </span>\n                  <span>\n                    Shares{\" \"}\n                    <span style={{ color: ink, marginLeft: 6 }}>\n                      {fmt(mix(9120, 9412, count))}\n                    </span>\n                  </span>\n                </div>\n              </div>\n\n              <div\n                style={{\n                  position: \"absolute\",\n                  left: 28,\n                  top: 676,\n                  width: 364,\n                }}\n              >\n                <div\n                  style={{\n                    fontSize: 13,\n                    color: soft,\n                    marginBottom: 12,\n                    opacity: ramp(frame, B.list, 12),\n                  }}\n                >\n                  Top sources\n                </div>\n                {sources.map(([label, v], k) => {\n                  const rIn = ramp(frame, B.list + 4 + k * 3, 14);\n                  const bar = ramp(frame, B.list + 8 + k * 3, 24, MOVE);\n                  return (\n                    <div\n                      key={label}\n                      style={{\n                        height: 52,\n                        opacity: rIn,\n                        transform: `translateY(${(1 - rIn) * 10}px)`,\n                      }}\n                    >\n                      <div\n                        style={{\n                          display: \"flex\",\n                          justifyContent: \"space-between\",\n                          fontSize: 15,\n                          color: ink,\n                        }}\n                      >\n                        <span>{label}</span>\n                        <span style={{ color: soft }}>\n                          {Math.round(v * 100 * bar)}%\n                        </span>\n                      </div>\n                      <div\n                        style={{\n                          marginTop: 9,\n                          height: 4,\n                          borderRadius: 2,\n                          background: hair,\n                        }}\n                      >\n                        <div\n                          style={{\n                            width: `${v * 100 * bar * 2.2}%`,\n                            height: 4,\n                            borderRadius: 2,\n                            background: k === 0 ? accent : faint,\n                          }}\n                        />\n                      </div>\n                    </div>\n                  );\n                })}\n              </div>\n            </div>\n          </div>\n        </div>\n      </div>\n      <svg\n        width=\"100%\"\n        height=\"100%\"\n        style={{\n          position: \"absolute\",\n          inset: 0,\n          opacity: dark ? 0.07 : 0.05,\n          mixBlendMode: dark ? \"screen\" : \"multiply\",\n          pointerEvents: \"none\",\n        }}\n        aria-hidden\n      >\n        <filter id=\"dga-grain\">\n          <feTurbulence\n            type=\"fractalNoise\"\n            baseFrequency=\"0.9\"\n            numOctaves={2}\n            seed={Math.floor(frame / 2)}\n          />\n          <feColorMatrix values=\"0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 1.4 -0.2\" />\n        </filter>\n        <rect width=\"100%\" height=\"100%\" filter=\"url(#dga-grain)\" />\n      </svg>\n    </AbsoluteFill>\n  );\n}\n\nexport default DeviceGrowsAround;\n",
      "type": "registry:component",
      "target": "components/remocn/device-grows-around.tsx"
    }
  ],
  "type": "registry:component"
}
