{"$schema":"https://ui.shadcn.com/schema/registry-item.json","name":"light-writing","type":"registry:component","title":"Light writing","description":"A welcome that writes itself: one line of light writes the word, then bends into the next word or into your logo.","author":"Hairline UI","dependencies":[],"files":[{"path":"registry/light-writing.tsx","type":"registry:component","content":"// Hairline UI · light-writing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n\"use client\";\n\nimport * as React from \"react\";\nimport { createSpring, useInteractionActivity, useInteractionReducedMotion, type Spring } from \"./ui-interaction-motion\";\nimport { createTubeRenderer, resolveColors, type Rgb, type TubeRenderer, type TubeStroke } from \"./light-writing-gl\";\nimport { SPACING, layoutText, pairDrawings, parsePath, penIndex, timeDrawing, type MorphPair, type TimedDrawing } from \"./light-writing-path\";\n\n/* ─────────────────────────────────────────────────────────\n * LIGHT WRITING: a word written in one line of light\n *\n * A glass tube writes the word the way a hand would, then the\n * same line bends into the next word or into your mark:\n *\n *   writing   a white-hot tip draws the letters in one stroke;\n *             it slows in loops and runs on the straights\n *   holding   colour keeps flowing along the line\n *   changing  the line squeezes together and unfolds as the next\n *             word or a logo, point by point, on a spring\n *   erasing   the tail chases the tip until nothing is left\n *\n * Words come from a single-line script (Latin letters with\n * accents); marks are any SVG path. Off screen or in a hidden tab\n * it stops, and its holds wait.\n *\n * Reduced motion: each item appears whole and still.\n * ───────────────────────────────────────────────────────── */\n\n/** A word to write, or a drawn mark: an SVG path `d` (any size; it is scaled to the lettering) and what it says. */\nexport type LightWritingItem = string | { path: string; label: string };\n\nexport interface LightWritingProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\"> {\n  /** One word or phrase to write. */\n  text?: string;\n  /** Several, shown in turn: each one is written, held, then the line turns into the next. Wins over `text`. */\n  items?: LightWritingItem[];\n  /** The item showing, when you drive it (a launch screen that turns into the logo once the app is ready). */\n  index?: number;\n  defaultIndex?: number;\n  onIndexChange?: (index: number) => void;\n  /** Whether it moves on by itself after `hold`. On by default when there is more than one item and no `index`. */\n  autoPlay?: boolean;\n  /** Start again from the first item after the last. */\n  loop?: boolean;\n  /** How long each item stays once written, in ms. */\n  hold?: number;\n  /** How one item becomes the next: the line bends into it, or the first is erased and the next written. */\n  change?: \"morph\" | \"rewrite\";\n  /** Hide it by erasing; show it again by writing. */\n  show?: boolean;\n  /** Pen speed; 1 writes \"hello\" in about 1.8 seconds. */\n  speed?: number;\n  /** Tube thickness as a fraction of the letters' x-height. */\n  weight?: number;\n  /** CSS colours that flow along the line; theme variables welcome. */\n  colors?: string[];\n  /** Light around the tube, 0 to 1. */\n  glow?: number;\n  /** Called when an item has been written (or the line has finished turning into it). */\n  onWritten?: (index: number) => void;\n  /** What it says, for screen readers. Defaults to the items' words. */\n  label?: string;\n}\n\nconst COLORS = [\"var(--chart-1, var(--primary))\", \"var(--chart-2, var(--primary))\", \"var(--chart-5, var(--primary))\"];\n// A light needs colour: when the theme's chart colours are all grey (shadcn's neutral theme), the tube uses these.\nconst VIVID: Rgb[] = [[0.26, 0.47, 1], [0.96, 0.32, 0.62], [1, 0.56, 0.18]];\nconst ERASE = 1.5; // erasing runs faster than writing\nconst COOL = 0.35; // seconds for a finished stroke's tip to cool\nconst FLOW = 0.22; // colour bands per second flowing along the line\nconst PERIOD = 6; // x-heights of line per colour band\nconst MORPH = { stiffness: 64, damping: 15 };\nconst WAVE = 0.3; // how far behind the end of a stroke starts moving, as a share of the morph\nconst SQUEEZE = 0.68; // how far the line pulls in sideways halfway through a morph\nconst BLEED = 0.3; // how far the canvas reaches past the box for the glow, as a share of the box's shorter side\n\nconst labelOf = (item: LightWritingItem) => (typeof item === \"string\" ? item : item.label);\n\ntype Placed = {\n  timed: TimedDrawing;\n  /** Strokes in canvas pixels. */\n  strokes: Float32Array[];\n  /** Where each stroke starts along the whole drawing, in pixels. */\n  orders: number[];\n  total: number;\n  /** Pixels between points. */\n  step: number;\n};\n\ntype Morph = {\n  pairs: MorphPair[];\n  /** Interpolated points, one array per pair. */\n  live: Float32Array[];\n  lengthsFrom: number[];\n  lengthsTo: number[];\n  center: number;\n  target: number;\n};\n\ntype Phase = \"blank\" | \"writing\" | \"shown\" | \"erasing\" | \"morphing\";\n\nconst lengthOf = (pts: Float32Array) => {\n  let L = 0;\n  for (let i = 2; i < pts.length; i += 2) L += Math.hypot(pts[i] - pts[i - 2], pts[i + 1] - pts[i - 1]);\n  return L;\n};\nconst smoothstep = (x: number) => (x <= 0 ? 0 : x >= 1 ? 1 : x * x * (3 - 2 * x));\n\nexport function LightWriting({\n  text,\n  items: itemsProp,\n  index: indexProp,\n  defaultIndex = 0,\n  onIndexChange,\n  autoPlay,\n  loop = true,\n  hold = 2000,\n  change = \"morph\",\n  show = true,\n  speed = 1,\n  weight = 0.36,\n  colors = COLORS,\n  glow = 1,\n  onWritten,\n  label,\n  className = \"\",\n  style,\n  ...props\n}: LightWritingProps) {\n  const items = React.useMemo<LightWritingItem[]>(() => itemsProp ?? (text !== undefined ? [text] : []), [itemsProp, text]);\n  const itemsKey = items.map((i) => (typeof i === \"string\" ? `t:${i}` : `p:${i.label}:${i.path}`)).join(\"\\u0001\");\n  const reduced = useInteractionReducedMotion();\n  const { ref: activityRef, active } = useInteractionActivity<HTMLDivElement>();\n  const canvas = React.useRef<HTMLCanvasElement>(null);\n  const fallback = React.useRef<SVGSVGElement>(null);\n  const [failed, setFailed] = React.useState(false);\n  const [ownIndex, setOwnIndex] = React.useState(defaultIndex);\n  const controlled = indexProp !== undefined;\n  const count = items.length;\n  const index = count ? (((controlled ? indexProp : ownIndex) % count) + count) % count : 0;\n  const playing = autoPlay ?? (!controlled && count > 1);\n  const colorKey = colors.join(\"|\");\n\n  // The latest props, for the frame loop.\n  const advance = (to: number) => {\n    if (!controlled) setOwnIndex(to);\n    onIndexChange?.(to);\n  };\n  const input = React.useRef({ index, playing, loop, hold, change, show, speed, glow, reduced, onWritten, advance, controlled, count });\n  React.useLayoutEffect(() => {\n    input.current = { index, playing, loop, hold, change, show, speed, glow, reduced, onWritten, advance, controlled, count };\n  });\n\n  const engine = React.useRef<{\n    renderer: TubeRenderer | null;\n    placed: Placed[];\n    scale: number;\n    radius: number;\n    palette: Rgb[];\n    dark: boolean;\n    phase: Phase;\n    /** The item on screen, or being written, erased or turned into. */\n    shown: number;\n    clock: number;\n    hold: number;\n    shift: number;\n    morph: Morph | null;\n    spring: Spring | null;\n    pending: number | null;\n    frame: (dt: number) => boolean;\n    draw: () => void;\n    go: (to: number) => void;\n  } | null>(null);\n  const [layoutTick, setLayoutTick] = React.useState(0);\n\n  // The renderer lives as long as the canvas.\n  React.useEffect(() => {\n    const el = canvas.current;\n    if (!el) return;\n    let renderer: TubeRenderer | null = null;\n    try {\n      renderer = createTubeRenderer(el);\n    } catch {\n      renderer = null;\n    }\n    if (!renderer) {\n      const frame = requestAnimationFrame(() => setFailed(true));\n      return () => cancelAnimationFrame(frame);\n    }\n    const r = renderer;\n    const e: NonNullable<typeof engine.current> = {\n      renderer: r,\n      placed: [],\n      scale: 1,\n      radius: 4,\n      palette: [[0.19, 0.36, 0.87], [0.11, 0.69, 0.48], [0.88, 0.64, 0.11], [0.91, 0.45, 0.23]],\n      dark: false,\n      phase: \"blank\",\n      shown: input.current.index,\n      clock: 0,\n      hold: 0,\n      shift: 0,\n      morph: null,\n      spring: null,\n      pending: null,\n      frame: () => false,\n      draw: () => {},\n      go: () => {},\n    };\n\n    const strokesNow: TubeStroke[] = [];\n    const stroke = (i: number): TubeStroke => {\n      if (!strokesNow[i]) strokesNow[i] = { points: new Float32Array(0), from: 0, to: 0, radius: 0, order: 0, step: 1, headHeat: 0, tailHeat: 0 };\n      return strokesNow[i];\n    };\n\n    /** The line as it is right now, as strokes for the renderer. */\n    const build = (): { list: TubeStroke[]; total: number } => {\n      const p = e.placed[e.shown];\n      let n = 0;\n      if (e.phase === \"morphing\" && e.morph) {\n        const m = e.morph;\n        const t = e.spring ? e.spring.get() : 1;\n        // The line pulls in sideways and changes shape while it is narrow, so the change reads as one bundle unfolding.\n        const pull = SQUEEZE * Math.pow(Math.sin(Math.PI * Math.min(1, Math.max(0, t))), 0.8);\n        let order = 0;\n        m.pairs.forEach((pair, k) => {\n          const live = m.live[k];\n          const points = pair.from.length / 2;\n          // A stroke with no partner melts away early in the morph, or grows late, all at once: never a long thin sliver.\n          const melting = pair.toSize < pair.fromSize, growing = pair.toSize > pair.fromSize;\n          const alone = melting ? smoothstep(t / 0.45) : growing ? smoothstep((t - 0.55) / 0.45) : -1;\n          let size = 0;\n          for (let i = 0; i < points; i++) {\n            const u = points > 1 ? i / (points - 1) : 0;\n            const local = alone >= 0 ? alone : smoothstep((t * (1 + WAVE) - WAVE * u - 0.15) / 0.7);\n            const x = pair.from[i * 2] + (pair.to[i * 2] - pair.from[i * 2]) * local;\n            const y = pair.from[i * 2 + 1] + (pair.to[i * 2 + 1] - pair.from[i * 2 + 1]) * local;\n            live[i * 2] = m.center + (x - m.center) * (1 - pull);\n            live[i * 2 + 1] = y;\n            if (i === points >> 1) size = pair.fromSize + (pair.toSize - pair.fromSize) * local;\n          }\n          const length = m.lengthsFrom[k] + (m.lengthsTo[k] - m.lengthsFrom[k]) * Math.min(1, Math.max(0, t));\n          const s = stroke(n++);\n          s.points = live;\n          s.from = 0;\n          s.to = points - 1;\n          s.radius = e.radius * Math.max(0, size);\n          s.order = order;\n          s.step = length / Math.max(1, points - 1);\n          s.headHeat = 0;\n          s.tailHeat = 0;\n          order += length;\n        });\n        strokesNow.length = n;\n        return { list: strokesNow, total: Math.max(1, order) };\n      }\n      if (!p || e.phase === \"blank\") {\n        strokesNow.length = 0;\n        return { list: strokesNow, total: 1 };\n      }\n      // While erasing, the tip stays where it stopped and `hold` is the tail's clock.\n      const writtenTime = e.clock;\n      const tailTime = e.phase === \"erasing\" ? e.hold : -Infinity;\n      p.timed.strokes.forEach((ts, k) => {\n        const last = ts.points.length / 2 - 1;\n        const to = writtenTime === Infinity ? last : penIndex(ts, writtenTime);\n        if (to < 0) return;\n        const from = tailTime === -Infinity ? 0 : Math.max(0, penIndex(ts, tailTime));\n        if (tailTime !== -Infinity && tailTime >= ts.at[last]) return;\n        const s = stroke(n++);\n        s.points = p.strokes[k];\n        s.from = from;\n        s.to = to;\n        s.radius = e.radius;\n        s.order = p.orders[k];\n        s.step = p.step;\n        const end = ts.at[last];\n        s.headHeat = e.phase === \"erasing\" ? 0 : writtenTime < end ? 1 : Math.max(0, 1 - (writtenTime - end) / COOL);\n        s.tailHeat = e.phase === \"erasing\" && tailTime > ts.at[0] ? 0.85 : 0;\n      });\n      strokesNow.length = n;\n      return { list: strokesNow, total: p.total };\n    };\n\n    e.draw = () => {\n      const { list, total } = build();\n      const now = input.current;\n      r.draw(list, {\n        palette: e.palette,\n        period: PERIOD * e.scale,\n        shift: e.shift,\n        total,\n        glow: Math.max(0, Math.min(1, now.glow)) * (e.dark ? 1 : 0.3),\n        dark: e.dark,\n      });\n    };\n\n    const written = (i: number) => {\n      e.phase = \"shown\";\n      e.hold = 0;\n      input.current.onWritten?.(i);\n    };\n\n    /** Move to another item the way `change` says; under reduced motion, at once. */\n    e.go = (to: number) => {\n      const target = e.placed[to];\n      if (!target) return;\n      const now = input.current;\n      if (now.reduced) {\n        e.shown = to;\n        e.phase = now.show ? \"shown\" : \"blank\";\n        e.clock = Infinity;\n        e.morph = null;\n        e.spring?.stop();\n        e.draw();\n        if (now.show) now.onWritten?.(to);\n        return;\n      }\n      if (e.phase === \"blank\") {\n        e.shown = to;\n        e.phase = \"writing\";\n        e.clock = 0;\n        return;\n      }\n      if (now.change === \"rewrite\") {\n        e.pending = to;\n        if (e.phase !== \"erasing\") {\n          if (e.phase === \"morphing\") e.clock = Infinity;\n          e.phase = \"erasing\";\n          e.hold = 0;\n        }\n        return;\n      }\n      // Morph from whatever is on screen now: the drawing, or the line mid-way through another morph.\n      const from: Float32Array[] = [];\n      const midway = e.phase === \"morphing\" ? e.morph : null;\n      if (midway) {\n        const t = e.spring?.get() ?? 1;\n        midway.pairs.forEach((pair, k) => {\n          // Strokes that have almost melted away are left behind.\n          if (pair.fromSize + (pair.toSize - pair.fromSize) * smoothstep(t) > 0.25) from.push(Float32Array.from(midway.live[k]));\n        });\n      } else e.placed[e.shown]?.strokes.forEach((s) => from.push(s));\n      const pairs = pairDrawings(from, target.strokes);\n      const left = Math.min(...[...from, ...target.strokes].map((s) => s.reduce((m, v, i) => (i % 2 === 0 ? Math.min(m, v) : m), Infinity)));\n      const right = Math.max(...[...from, ...target.strokes].map((s) => s.reduce((m, v, i) => (i % 2 === 0 ? Math.max(m, v) : m), -Infinity)));\n      e.morph = {\n        pairs,\n        live: pairs.map((pair) => new Float32Array(pair.from.length)),\n        lengthsFrom: pairs.map((pair) => lengthOf(pair.from)),\n        lengthsTo: pairs.map((pair) => lengthOf(pair.to)),\n        center: (left + right) / 2,\n        target: to,\n      };\n      const velocity = e.phase === \"morphing\" && e.spring ? Math.max(0, e.spring.getVelocity()) * 0.5 : 0;\n      e.phase = \"morphing\";\n      e.shown = to;\n      if (!e.spring) e.spring = createSpring(0, MORPH, () => {}, 0.0005);\n      e.spring.jump(0);\n      e.spring.push(velocity);\n      e.spring.set(1);\n    };\n\n    /** One frame of time: returns whether anything still moves. */\n    e.frame = (dt: number) => {\n      const now = input.current;\n      e.shift += dt * FLOW;\n      const p = e.placed[e.shown];\n      if (!p) return false;\n      switch (e.phase) {\n        case \"blank\":\n          if (now.show && e.pending === null) {\n            e.phase = \"writing\";\n            e.clock = 0;\n          } else if (e.pending !== null && now.show) {\n            e.shown = e.pending;\n            e.pending = null;\n            e.phase = \"writing\";\n            e.clock = 0;\n          }\n          break;\n        case \"writing\":\n          e.clock += dt * now.speed;\n          if (!now.show) {\n            e.phase = \"erasing\";\n            e.hold = 0;\n          } else if (e.clock >= p.timed.duration) written(e.shown);\n          break;\n        case \"shown\":\n          e.clock += dt * now.speed;\n          if (!now.show) {\n            e.phase = \"erasing\";\n            e.hold = 0;\n            break;\n          }\n          if (now.index !== e.shown) {\n            e.go(now.index);\n            break;\n          }\n          e.hold += dt * 1000;\n          if (now.playing && now.count > 1 && e.hold >= now.hold) {\n            const next = e.shown + 1;\n            if (next < now.count || now.loop) {\n              const to = next % now.count;\n              // When the index is yours, ask once per hold; the change starts when the new index arrives.\n              e.hold = 0;\n              now.advance(to);\n              if (!now.controlled) e.go(to);\n            }\n          }\n          break;\n        case \"erasing\":\n          // `hold` doubles as the tail's clock while erasing.\n          e.hold += dt * now.speed * ERASE;\n          if (e.hold >= Math.min(e.clock, p.timed.duration)) {\n            e.phase = \"blank\";\n            e.hold = 0;\n            if (e.pending !== null) {\n              e.shown = e.pending;\n              e.pending = null;\n              if (now.show) {\n                e.phase = \"writing\";\n                e.clock = 0;\n              }\n            }\n          }\n          break;\n        case \"morphing\":\n          if (!e.spring || Math.abs(e.spring.get() - 1) < 0.002 && Math.abs(e.spring.getVelocity()) < 0.01) {\n            e.morph = null;\n            e.clock = Infinity;\n            written(e.shown);\n          }\n          break;\n      }\n      return true;\n    };\n\n    engine.current = e;\n    const lost = (event: Event) => {\n      event.preventDefault();\n      setFailed(true);\n    };\n    el.addEventListener(\"webglcontextlost\", lost);\n    return () => {\n      el.removeEventListener(\"webglcontextlost\", lost);\n      e.spring?.stop();\n      r.dispose();\n      engine.current = null;\n    };\n  }, []);\n\n  // Lay the items out for the canvas's size: every word at one letter size and baseline, marks to the lettering's height.\n  React.useEffect(() => {\n    const el = canvas.current;\n    const host = el?.parentElement;\n    if (!el || !host) return;\n    let width = 0, height = 0;\n    const lay = () => {\n      const box = host.getBoundingClientRect();\n      if (box.width < 2 || box.height < 2) return;\n      if (Math.abs(box.width - width) < 0.5 && Math.abs(box.height - height) < 0.5) return;\n      width = box.width;\n      height = box.height;\n      const dpr = Math.min(2, window.devicePixelRatio || 1);\n      // The canvas reaches past the box on every side, so the light fades out on the page instead of stopping at an edge.\n      const bleed = Math.round(Math.min(width, height) * BLEED);\n      el.style.inset = `${-bleed}px`;\n      el.style.width = `${width + bleed * 2}px`;\n      el.style.height = `${height + bleed * 2}px`;\n      el.width = Math.round((width + bleed * 2) * dpr);\n      el.height = Math.round((height + bleed * 2) * dpr);\n      const innerW = width * dpr, innerH = height * dpr;\n      const e = engine.current;\n      // Marks stand as tall as the lettering, from the top of the tallest letter to the bottom of the deepest.\n      const words = items.map((item) => (typeof item === \"string\" ? layoutText(item) : null));\n      let markHeight = 0;\n      words.forEach((w) => w && w.strokes.length && (markHeight = Math.max(markHeight, w.bounds[3] - w.bounds[1])));\n      const drawings = items.map((item, i) => timeDrawing(words[i] ?? parsePath((item as { path: string }).path, markHeight ? markHeight * 0.92 : 2.6)));\n      // Room for the glow and the thickness of the tube.\n      // Room inside the box for the tube's thickness.\n      const pad = 0.06 * Math.min(innerW, innerH);\n      let top = Infinity, bottom = -Infinity, widest = 0;\n      drawings.forEach((d) => {\n        top = Math.min(top, d.bounds[1]);\n        bottom = Math.max(bottom, d.bounds[3]);\n        widest = Math.max(widest, d.bounds[2] - d.bounds[0]);\n      });\n      if (!Number.isFinite(top)) return;\n      const scale = Math.max(1, Math.min((innerW - pad * 2) / Math.max(1e-3, widest + weight), (innerH - pad * 2) / Math.max(1e-3, bottom - top + weight)));\n      const placed = drawings.map((d): Placed => {\n        const ox = el.width / 2 - ((d.bounds[0] + d.bounds[2]) / 2) * scale;\n        const oy = el.height / 2 - ((top + bottom) / 2) * scale;\n        const strokes = d.strokes.map((s) => {\n          const out = new Float32Array(s.points.length);\n          for (let i = 0; i < out.length; i += 2) {\n            out[i] = ox + s.points[i] * scale;\n            out[i + 1] = oy + s.points[i + 1] * scale;\n          }\n          return out;\n        });\n        const orders: number[] = [];\n        let total = 0;\n        d.strokes.forEach((s) => {\n          orders.push(total);\n          total += s.length * scale;\n        });\n        return { timed: d, strokes, orders, total, step: SPACING * scale };\n      });\n      if (!e) return;\n      e.placed = placed;\n      e.scale = scale;\n      e.radius = (weight * scale) / 2;\n      // A new layout ends any morph in flight: its points belong to the old size.\n      if (e.phase === \"morphing\") {\n        e.morph = null;\n        e.spring?.stop();\n        e.phase = \"shown\";\n        e.clock = Infinity;\n      }\n      if (e.shown >= placed.length) e.shown = 0;\n      setLayoutTick((t) => t + 1);\n    };\n    lay();\n    const observer = new ResizeObserver(lay);\n    observer.observe(host);\n    return () => observer.disconnect();\n    // itemsKey stands for items.\n    // eslint-disable-next-line react-hooks/exhaustive-deps\n  }, [itemsKey, weight, failed]);\n\n  // Colours from the theme, again whenever the theme changes.\n  React.useEffect(() => {\n    const el = canvas.current;\n    if (!el || failed) return;\n    const apply = () => {\n      const e = engine.current;\n      if (!e) return;\n      const resolved = resolveColors(el.parentElement ?? document.body, [...colorKey.split(\"|\"), \"var(--background, #fff)\"]);\n      const bg = resolved.pop()!;\n      const grey = resolved.every(([r, g, b]) => Math.max(r, g, b) - Math.min(r, g, b) < 0.12);\n      e.palette = !resolved.length ? e.palette : grey && colorKey === COLORS.join(\"|\") ? VIVID : resolved;\n      e.dark = 0.2126 * bg[0] + 0.7152 * bg[1] + 0.0722 * bg[2] < 0.45;\n      e.draw();\n    };\n    apply();\n    const root = document.documentElement;\n    let theme = `${root.className}|${root.dataset.theme ?? \"\"}`;\n    const watch = new MutationObserver(() => {\n      const next = `${root.className}|${root.dataset.theme ?? \"\"}`;\n      if (next === theme) return;\n      theme = next;\n      apply();\n    });\n    watch.observe(root, { attributes: true, attributeFilter: [\"class\", \"data-theme\"] });\n    return () => watch.disconnect();\n  }, [colorKey, failed, layoutTick]);\n\n  // Driven from outside: a new index (or showing and hiding) starts its change on the next frame; reduced motion shows it at once.\n  React.useEffect(() => {\n    const e = engine.current;\n    if (!e || !e.placed.length) return;\n    if (reduced) {\n      if (e.shown !== index || e.phase !== (show ? \"shown\" : \"blank\")) {\n        e.shown = index;\n        e.phase = show ? \"shown\" : \"blank\";\n        e.clock = Infinity;\n        e.morph = null;\n        e.spring?.stop();\n        e.draw();\n      }\n      return;\n    }\n    if (index === e.shown) return;\n    if (e.phase === \"blank\") e.shown = index;\n    else if (e.phase === \"erasing\") e.pending = index;\n    else e.go(index);\n  }, [index, show, reduced, layoutTick]);\n\n  // Under reduced motion the items still take turns, each appearing whole.\n  React.useEffect(() => {\n    if (!reduced || !playing || count < 2 || !active) return;\n    const timer = window.setTimeout(() => {\n      const next = index + 1;\n      if (next < count || loop) input.current.advance(next % count);\n    }, hold + 1200);\n    return () => window.clearTimeout(timer);\n  }, [reduced, playing, count, active, index, loop, hold]);\n\n  // The loop: only while on screen and the tab is visible. Reduced motion draws once and holds.\n  React.useEffect(() => {\n    const e = engine.current;\n    if (!e || failed) return;\n    if (reduced) {\n      if (e.phase !== \"blank\") {\n        e.phase = show ? \"shown\" : \"blank\";\n        e.clock = Infinity;\n      }\n      e.draw();\n      return;\n    }\n    if (!active) return;\n    let frame = 0;\n    let last = 0;\n    const tick = (now: number) => {\n      const dt = last ? Math.min(1 / 20, (now - last) / 1000) : 1 / 60;\n      last = now;\n      const cur = engine.current;\n      if (!cur) return;\n      cur.frame(dt);\n      cur.draw();\n      frame = requestAnimationFrame(tick);\n    };\n    frame = requestAnimationFrame(tick);\n    return () => cancelAnimationFrame(frame);\n  }, [active, reduced, failed, show, layoutTick]);\n\n  // Without WebGL 2: the same line, still, as an SVG stroke with the colours along it.\n  React.useEffect(() => {\n    const svg = fallback.current;\n    const host = svg?.parentElement;\n    if (!failed || !svg || !host) return;\n    const box = host.getBoundingClientRect();\n    const d = timeDrawing(typeof items[index] === \"string\" ? layoutText(items[index] as string) : parsePath((items[index] as { path: string }).path));\n    const [l, t, r, b] = d.bounds;\n    const k = Math.min((box.width * 0.8) / Math.max(1e-3, r - l), (box.height * 0.7) / Math.max(1e-3, b - t));\n    const ox = box.width / 2 - ((l + r) / 2) * k, oy = box.height / 2 - ((t + b) / 2) * k;\n    svg.setAttribute(\"viewBox\", `0 0 ${box.width} ${box.height}`);\n    const path = svg.querySelector(\"path\");\n    if (!path) return;\n    path.setAttribute(\n      \"d\",\n      d.strokes\n        .map((s) => {\n          let out = \"\";\n          for (let i = 0; i < s.points.length; i += 2) out += `${i ? \"L\" : \"M\"}${(ox + s.points[i] * k).toFixed(1)} ${(oy + s.points[i + 1] * k).toFixed(1)}`;\n          return out;\n        })\n        .join(\"\"),\n    );\n    path.setAttribute(\"stroke-width\", String(weight * k));\n  }, [failed, itemsKey, index, weight, items]);\n\n  const spoken = label ?? items.map(labelOf).join(\", \");\n  const gradientId = React.useId();\n  return (\n    <div\n      ref={activityRef}\n      role=\"img\"\n      aria-label={spoken}\n      {...props}\n      className={`relative block w-full ${className}`}\n      style={{ aspectRatio: \"12 / 5\", ...style }}\n    >\n      <canvas ref={canvas} aria-hidden=\"true\" className=\"pointer-events-none absolute inset-0 size-full\" style={{ display: failed ? \"none\" : undefined }} />\n      {failed ? (\n        <svg ref={fallback} aria-hidden=\"true\" className=\"absolute inset-0 size-full\" fill=\"none\">\n          <defs>\n            <linearGradient id={gradientId} x1=\"0\" x2=\"1\" y1=\"0\" y2=\"0\">\n              {colors.map((c, i) => (\n                <stop key={i} offset={`${(i / Math.max(1, colors.length - 1)) * 100}%`} style={{ stopColor: c }} />\n              ))}\n            </linearGradient>\n          </defs>\n          <path stroke={`url(#${gradientId})`} strokeLinecap=\"round\" strokeLinejoin=\"round\" />\n        </svg>\n      ) : null}\n    </div>\n  );\n}\n\nexport default LightWriting;\n"},{"path":"registry/light-writing-path.ts","type":"registry:component","content":"// Hairline UI · light-writing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n/* ─────────────────────────────────────────────────────────\n * LIGHT WRITING geometry: words and marks as lines a pen draws\n *\n * Everything here is pure and React-free. Units are x-heights\n * (the height of a lowercase x is 1), y down, baseline at 0.\n *\n *   layoutText   letters from the script, chained into the lines\n *                a hand would draw: joined letters become one\n *                stroke, i-dots and t-crosses come after the word\n *   parsePath    any SVG path (a logo) as strokes, through the\n *                browser's own path geometry\n *   timeDrawing  when the pen reaches each point: it slows in\n *                tight curves and runs on the straights, by the\n *                two-thirds power law of human handwriting\n *   pairDrawings what each stroke of one drawing turns into in the\n *                next, so a word can morph into a mark\n * ───────────────────────────────────────────────────────── */\n\nimport { SCRIPT_GLYPHS, SCRIPT_X_HEIGHT } from \"./light-writing-glyphs\";\n\n/** One stroke: x, y pairs at an even spacing. */\nexport type Stroke = Float32Array;\n\nexport interface Drawing {\n  strokes: Stroke[];\n  /** Left, top, right, bottom. */\n  bounds: [number, number, number, number];\n}\n\n/** A drawing with the pen's timing: when it reaches each point, in seconds at speed 1. */\nexport interface TimedStroke {\n  points: Float32Array;\n  /** Distance along the stroke at each point. */\n  along: Float32Array;\n  /** Seconds after the drawing starts at which the pen reaches each point. */\n  at: Float32Array;\n  length: number;\n}\nexport interface TimedDrawing {\n  strokes: TimedStroke[];\n  bounds: [number, number, number, number];\n  duration: number;\n}\n\n/** Spacing of the points every stroke is resampled to, in x-heights. */\nexport const SPACING = 0.035;\n/** A letter's stroke joins the line when it starts this close to the pen (x-heights): long strokes from further away, so\n * the connector up to an o or an a is drawn, short ones (dots, crosses, accents) only when they touch. */\nconst JOIN = 1.4;\n/** How much closer the far end of a stroke must be before it is drawn backwards. */\nconst FLIP = 0.3;\nconst JOIN_SHORT = 0.5;\nconst SHORT = 1.1;\n/** Extra room between letters, as a fraction of each advance: the tube is thicker than the script's pen. */\nconst TRACKING = 1.06;\n\nconst glyphCache = new Map<string, { advance: number; strokes: number[][] } | null>();\n\nfunction glyph(ch: string) {\n  const hit = glyphCache.get(ch);\n  if (hit !== undefined) return hit;\n  const raw = SCRIPT_GLYPHS[ch];\n  let out: { advance: number; strokes: number[][] } | null = null;\n  if (raw !== undefined) {\n    const [advance, ...parts] = raw.split(\";\");\n    out = {\n      advance: +advance / SCRIPT_X_HEIGHT,\n      strokes: parts.map((part) => {\n        const v = part.split(\" \").map(Number);\n        const pts: number[] = [];\n        let x = 0, y = 0;\n        for (let i = 0; i < v.length; i += 2) {\n          x += v[i];\n          y += v[i + 1];\n          pts.push(x / SCRIPT_X_HEIGHT, -y / SCRIPT_X_HEIGHT);\n        }\n        return pts;\n      }),\n    };\n  }\n  glyphCache.set(ch, out);\n  return out;\n}\n\n/** Whether the script has a letter for every character (spaces aside). */\nexport function canWrite(text: string) {\n  for (const ch of text) if (!/\\s/.test(ch) && !glyph(ch)) return false;\n  return true;\n}\n\nconst polyLength = (pts: number[]) => {\n  let L = 0;\n  for (let i = 2; i < pts.length; i += 2) L += Math.hypot(pts[i] - pts[i - 2], pts[i + 1] - pts[i - 1]);\n  return L;\n};\n\nconst reversed = (pts: number[]) => {\n  const out: number[] = [];\n  for (let i = pts.length - 2; i >= 0; i -= 2) out.push(pts[i], pts[i + 1]);\n  return out;\n};\n\n/**\n * The text as the strokes a hand would draw, in order. Letters that meet are chained into one line; what is left of a\n * letter (a dot, a cross) is drawn after its word, the way people dot their i's last.\n */\nexport function layoutText(text: string): Drawing {\n  const lines: number[][] = [];\n  let lifts: number[][] = [];\n  let main: number[] | null = null;\n  let x = 0;\n  const flush = () => {\n    if (main) lines.push(main);\n    lines.push(...lifts);\n    main = null;\n    lifts = [];\n  };\n  for (const ch of text.normalize(\"NFC\")) {\n    if (/\\s/.test(ch)) {\n      flush();\n      x += (glyph(\" \")?.advance ?? 1.26) * TRACKING;\n      continue;\n    }\n    const g = glyph(ch) ?? glyph(\"?\");\n    if (!g) continue;\n    const rest = g.strokes.map((s) => s.map((v, i) => (i % 2 === 0 ? v + x : v)));\n    // Carry on from where the pen is, as long as the next part starts close by.\n    while (rest.length) {\n      if (!main) {\n        // A new line starts with the letter's longest stroke, drawn so it ends on the right, towards the next letter.\n        let best = 0;\n        for (let i = 1; i < rest.length; i++) if (rest[i].length > rest[best].length) best = i;\n        const s = rest.splice(best, 1)[0];\n        main = s[0] > s[s.length - 2] ? reversed(s) : s;\n        continue;\n      }\n      const ex = main[main.length - 2], ey = main[main.length - 1];\n      let pick = -1, flip = false, near = Infinity;\n      for (let i = 0; i < rest.length; i++) {\n        const s = rest[i];\n        const reach = polyLength(s) < SHORT ? JOIN_SHORT : JOIN;\n        const a = Math.hypot(s[0] - ex, s[1] - ey);\n        const b = Math.hypot(s[s.length - 2] - ex, s[s.length - 1] - ey);\n        // Keep the script's own direction (an o goes round anticlockwise) unless the far end is clearly closer.\n        const d = Math.min(a, b + FLIP);\n        if (d < reach && d < near) {\n          near = d;\n          pick = i;\n          flip = b + FLIP < a;\n        }\n      }\n      if (pick < 0) break;\n      const s = rest.splice(pick, 1)[0];\n      main.push(...(flip ? reversed(s) : s));\n    }\n    // A capital that doesn't reach its neighbour: lift the pen and start again.\n    if (rest.length && main) {\n      const head = rest.reduce((a, b) => (b.length > a.length ? b : a));\n      const ex = main[main.length - 2];\n      if (Math.min(head[0], head[head.length - 2]) > ex + JOIN) {\n        lines.push(main);\n        main = null;\n        rest.splice(rest.indexOf(head), 1);\n        main = head[0] > head[head.length - 2] ? reversed(head) : head;\n      }\n    }\n    lifts.push(...rest);\n    x += g.advance * TRACKING;\n  }\n  flush();\n  return finish(lines.map((l) => resample(relax(resample(smooth(l), SPACING)), SPACING)));\n}\n\n/** A path from an SVG (a logo, a signature) as strokes, sized so it stands `height` x-heights tall. */\nexport function parsePath(d: string, height = 2.6): Drawing {\n  if (typeof document === \"undefined\") return finish([]);\n  const path = document.createElementNS(\"http://www.w3.org/2000/svg\", \"path\");\n  path.setAttribute(\"d\", d);\n  let total = 0;\n  try {\n    total = path.getTotalLength();\n  } catch {\n    return finish([]);\n  }\n  if (!(total > 0)) return finish([]);\n  const lines: number[][] = [];\n  const steps = Math.min(6000, Math.max(200, Math.ceil(total / 0.5)));\n  const step = total / steps;\n  let line: number[] = [];\n  let px = NaN, py = NaN;\n  for (let i = 0; i <= steps; i++) {\n    const p = path.getPointAtLength(i * step);\n    // getPointAtLength skips the gap of a move: a jump much longer than a step is the pen lifting.\n    if (line.length && Math.hypot(p.x - px, p.y - py) > step * 3) {\n      if (line.length >= 4) lines.push(line);\n      line = [];\n    }\n    line.push(p.x, p.y);\n    px = p.x;\n    py = p.y;\n  }\n  if (line.length >= 4) lines.push(line);\n  let top = Infinity, bottom = -Infinity, left = Infinity;\n  for (const l of lines)\n    for (let i = 0; i < l.length; i += 2) {\n      left = Math.min(left, l[i]);\n      top = Math.min(top, l[i + 1]);\n      bottom = Math.max(bottom, l[i + 1]);\n    }\n  const k = height / Math.max(1e-6, bottom - top);\n  return finish(lines.map((l) => resample(l.map((v, i) => (i % 2 === 0 ? (v - left) * k : (v - bottom) * k)), SPACING)));\n}\n\nfunction finish(strokes: Stroke[]): Drawing {\n  let l = Infinity, t = Infinity, r = -Infinity, b = -Infinity;\n  for (const s of strokes)\n    for (let i = 0; i < s.length; i += 2) {\n      l = Math.min(l, s[i]);\n      r = Math.max(r, s[i]);\n      t = Math.min(t, s[i + 1]);\n      b = Math.max(b, s[i + 1]);\n    }\n  return { strokes, bounds: strokes.length ? [l, t, r, b] : [0, 0, 0, 0] };\n}\n\n/** Centripetal Catmull-Rom through the points, so the script's straight segments become one smooth curve. */\nfunction smooth(pts: number[]): number[] {\n  const n = pts.length / 2;\n  if (n < 3) return pts;\n  const P = (i: number): [number, number] => {\n    if (i < 0) return [2 * pts[0] - pts[2], 2 * pts[1] - pts[3]];\n    if (i >= n) return [2 * pts[(n - 1) * 2] - pts[(n - 2) * 2], 2 * pts[(n - 1) * 2 + 1] - pts[(n - 2) * 2 + 1]];\n    return [pts[i * 2], pts[i * 2 + 1]];\n  };\n  const out: number[] = [pts[0], pts[1]];\n  for (let i = 0; i < n - 1; i++) {\n    const p0 = P(i - 1), p1 = P(i), p2 = P(i + 1), p3 = P(i + 2);\n    const knot = (a: [number, number], b: [number, number]) => Math.max(1e-4, Math.sqrt(Math.hypot(b[0] - a[0], b[1] - a[1])));\n    const t1 = knot(p0, p1), t2 = t1 + knot(p1, p2), t3 = t2 + knot(p2, p3);\n    const seg = Math.hypot(p2[0] - p1[0], p2[1] - p1[1]);\n    const sub = Math.max(2, Math.ceil(seg / (SPACING * 0.5)));\n    for (let k = 1; k <= sub; k++) {\n      const t = t1 + ((t2 - t1) * k) / sub;\n      const xy: number[] = [];\n      for (let c = 0; c < 2; c++) {\n        const a1 = ((t1 - t) / t1) * p0[c] + (t / t1) * p1[c];\n        const a2 = ((t2 - t) / (t2 - t1)) * p1[c] + ((t - t1) / (t2 - t1)) * p2[c];\n        const a3 = ((t3 - t) / (t3 - t2)) * p2[c] + ((t - t2) / (t3 - t2)) * p3[c];\n        const b1 = ((t2 - t) / t2) * a1 + (t / t2) * a2;\n        const b2 = ((t3 - t) / (t3 - t1)) * a2 + ((t - t1) / (t3 - t1)) * a3;\n        xy.push(((t2 - t) / (t2 - t1)) * b1 + ((t - t1) / (t2 - t1)) * b2);\n      }\n      out.push(xy[0], xy[1]);\n    }\n  }\n  return out;\n}\n\n/** A few passes of neighbour averaging: the script's sharpest corners become small round turns a tube can follow. */\nfunction relax(pts: Float32Array, passes = 4): Float32Array {\n  const n = pts.length / 2;\n  let a = pts;\n  for (let p = 0; p < passes; p++) {\n    const b = Float32Array.from(a);\n    for (let i = 1; i < n - 1; i++) {\n      b[i * 2] = a[i * 2] * 0.5 + (a[i * 2 - 2] + a[i * 2 + 2]) * 0.25;\n      b[i * 2 + 1] = a[i * 2 + 1] * 0.5 + (a[i * 2 - 1] + a[i * 2 + 3]) * 0.25;\n    }\n    a = b;\n  }\n  return a;\n}\n\n/** Points at an even spacing along a polyline. */\nexport function resample(pts: ArrayLike<number>, spacing: number): Float32Array {\n  const n = pts.length / 2;\n  if (n < 2) return Float32Array.from(pts);\n  const out: number[] = [pts[0], pts[1]];\n  let carry = 0;\n  for (let i = 0; i < n - 1; i++) {\n    const ax = pts[i * 2], ay = pts[i * 2 + 1], bx = pts[i * 2 + 2], by = pts[i * 2 + 3];\n    const len = Math.hypot(bx - ax, by - ay);\n    let d = spacing - carry;\n    while (d <= len) {\n      const t = d / len;\n      out.push(ax + (bx - ax) * t, ay + (by - ay) * t);\n      d += spacing;\n    }\n    carry = len - (d - spacing);\n  }\n  const lx = pts[(n - 1) * 2], ly = pts[(n - 1) * 2 + 1];\n  if (Math.hypot(lx - out[out.length - 2], ly - out[out.length - 1]) > spacing * 0.25) out.push(lx, ly);\n  return Float32Array.from(out);\n}\n\n/** The same stroke as `count` points spread evenly along it. */\nexport function resampleCount(s: Stroke, count: number): Float32Array {\n  const n = s.length / 2;\n  const along = new Float32Array(n);\n  for (let i = 1; i < n; i++) along[i] = along[i - 1] + Math.hypot(s[i * 2] - s[i * 2 - 2], s[i * 2 + 1] - s[i * 2 - 1]);\n  const total = along[n - 1] || 1;\n  const out = new Float32Array(count * 2);\n  let j = 0;\n  for (let k = 0; k < count; k++) {\n    const want = (total * k) / Math.max(1, count - 1);\n    while (j < n - 2 && along[j + 1] < want) j++;\n    const span = along[j + 1] - along[j] || 1;\n    const t = n > 1 ? Math.min(1, Math.max(0, (want - along[j]) / span)) : 0;\n    out[k * 2] = s[j * 2] + ((s[(j + 1) * 2] ?? s[j * 2]) - s[j * 2]) * t;\n    out[k * 2 + 1] = s[j * 2 + 1] + ((s[(j + 1) * 2 + 1] ?? s[j * 2 + 1]) - s[j * 2 + 1]) * t;\n  }\n  return out;\n}\n\n/** Pen speed in x-heights per second at speed 1, on a curve of radius one x-height. */\nconst PEN = 17;\n/** Time the pen spends in the air between strokes, in seconds at speed 1. */\nconst LIFT = 0.12;\n\n/**\n * When the pen reaches each point. Hands slow down in tight curves and speed up on gentle ones: speed grows with the cube\n * root of the curve's radius (the two-thirds power law of drawing movements), so a loop takes its time and a stroke runs.\n */\nexport function timeDrawing(drawing: Drawing): TimedDrawing {\n  let clock = 0;\n  const strokes = drawing.strokes.map((points, k): TimedStroke => {\n    if (k > 0) clock += LIFT;\n    const n = points.length / 2;\n    const along = new Float32Array(n);\n    const at = new Float32Array(n);\n    const speed = new Float32Array(n);\n    for (let i = 0; i < n; i++) {\n      const a = Math.max(0, i - 2), b = Math.min(n - 1, i + 2);\n      const c = Math.min(n - 1, Math.max(0, i));\n      // Curvature from the turn between the points around this one.\n      const ux = points[c * 2] - points[a * 2], uy = points[c * 2 + 1] - points[a * 2 + 1];\n      const vx = points[b * 2] - points[c * 2], vy = points[b * 2 + 1] - points[c * 2 + 1];\n      const lu = Math.hypot(ux, uy), lv = Math.hypot(vx, vy);\n      let radius = 4;\n      if (lu > 1e-6 && lv > 1e-6) {\n        const turn = Math.abs(Math.atan2(ux * vy - uy * vx, ux * vx + uy * vy));\n        radius = turn > 1e-4 ? Math.min(4, ((lu + lv) / 2) / turn) : 4;\n      }\n      speed[i] = PEN * Math.cbrt(Math.max(0.08, radius));\n    }\n    // A hand can't change speed instantly: smooth it, and let the pen get going at the start of a stroke.\n    const eased = new Float32Array(n);\n    for (let i = 0; i < n; i++) {\n      let sum = 0, w = 0;\n      for (let j = Math.max(0, i - 6); j <= Math.min(n - 1, i + 6); j++) {\n        sum += speed[j];\n        w++;\n      }\n      const start = Math.min(1, 0.45 + (i * SPACING) / 0.9);\n      eased[i] = (sum / w) * start;\n    }\n    for (let i = 1; i < n; i++) {\n      const d = Math.hypot(points[i * 2] - points[i * 2 - 2], points[i * 2 + 1] - points[i * 2 - 1]);\n      along[i] = along[i - 1] + d;\n      at[i] = at[i - 1] + d / ((eased[i] + eased[i - 1]) / 2);\n    }\n    for (let i = 0; i < n; i++) at[i] += clock;\n    clock = at[n - 1];\n    return { points, along, at, length: along[n - 1] };\n  });\n  return { strokes, bounds: drawing.bounds, duration: clock };\n}\n\n/** Where the pen is along a stroke at time `t`: a point index with its fraction, or -1 before it starts. */\nexport function penIndex(stroke: TimedStroke, t: number): number {\n  const at = stroke.at;\n  const n = at.length;\n  if (t <= at[0]) return -1;\n  if (t >= at[n - 1]) return n - 1;\n  let lo = 0, hi = n - 1;\n  while (hi - lo > 1) {\n    const mid = (lo + hi) >> 1;\n    if (at[mid] <= t) lo = mid;\n    else hi = mid;\n  }\n  return lo + (t - at[lo]) / Math.max(1e-6, at[hi] - at[lo]);\n}\n\n/** One stroke's journey in a morph: from these points to those, both with the same count. */\nexport interface MorphPair {\n  from: Float32Array;\n  to: Float32Array;\n  /** Thickness at the start and end: a stroke with no partner shrinks away, or grows from nothing. */\n  fromSize: number;\n  toSize: number;\n}\n\nconst strokeLength = (s: Stroke) => {\n  let L = 0;\n  for (let i = 2; i < s.length; i += 2) L += Math.hypot(s[i] - s[i - 2], s[i + 1] - s[i - 1]);\n  return L;\n};\n\nfunction centroid(s: Stroke): [number, number] {\n  let x = 0, y = 0;\n  const n = s.length / 2;\n  for (let i = 0; i < s.length; i += 2) {\n    x += s[i];\n    y += s[i + 1];\n  }\n  return [x / n, y / n];\n}\n\n/**\n * What each stroke of `a` becomes in `b`. Strokes pair up longest with longest, each turned the way that moves its\n * points least; a stroke left over melts into a point (or grows out of one) where its partner line passes closest.\n */\nexport function pairDrawings(a: Stroke[], b: Stroke[]): MorphPair[] {\n  const byLength = (list: Stroke[]) => list.map((s) => ({ s, L: strokeLength(s) })).sort((p, q) => q.L - p.L);\n  const A = byLength(a), B = byLength(b);\n  const pairs: MorphPair[] = [];\n  const shared = Math.min(A.length, B.length);\n  for (let i = 0; i < shared; i++) {\n    const n = Math.max(24, Math.ceil(Math.max(A[i].s.length, B[i].s.length) / 2));\n    const from = resampleCount(A[i].s, n);\n    const fwd = resampleCount(B[i].s, n);\n    const back = new Float32Array(n * 2);\n    for (let k = 0; k < n; k++) {\n      back[k * 2] = fwd[(n - 1 - k) * 2];\n      back[k * 2 + 1] = fwd[(n - 1 - k) * 2 + 1];\n    }\n    let df = 0, db = 0;\n    for (let k = 0; k < n * 2; k++) {\n      df += (from[k] - fwd[k]) ** 2;\n      db += (from[k] - back[k]) ** 2;\n    }\n    pairs.push({ from, to: db < df ? back : fwd, fromSize: 1, toSize: 1 });\n  }\n  const anchor = pairs[0];\n  const pointFor = (s: Stroke, side: \"from\" | \"to\") => {\n    const [cx, cy] = centroid(s);\n    if (!anchor) return [cx, cy] as [number, number];\n    const line = anchor[side];\n    let best = 0, bd = Infinity;\n    for (let k = 0; k < line.length; k += 2) {\n      const d = (line[k] - cx) ** 2 + (line[k + 1] - cy) ** 2;\n      if (d < bd) {\n        bd = d;\n        best = k;\n      }\n    }\n    return [line[best], line[best + 1]] as [number, number];\n  };\n  for (let i = shared; i < A.length; i++) {\n    const n = Math.max(8, A[i].s.length / 2);\n    const from = resampleCount(A[i].s, n);\n    const [px, py] = pointFor(A[i].s, \"to\");\n    const to = new Float32Array(n * 2);\n    for (let k = 0; k < n; k++) {\n      to[k * 2] = px;\n      to[k * 2 + 1] = py;\n    }\n    pairs.push({ from, to, fromSize: 1, toSize: 0 });\n  }\n  for (let i = shared; i < B.length; i++) {\n    const n = Math.max(8, B[i].s.length / 2);\n    const to = resampleCount(B[i].s, n);\n    const [px, py] = pointFor(B[i].s, \"from\");\n    const from = new Float32Array(n * 2);\n    for (let k = 0; k < n; k++) {\n      from[k * 2] = px;\n      from[k * 2 + 1] = py;\n    }\n    pairs.push({ from, to, fromSize: 0, toSize: 1 });\n  }\n  return pairs;\n}\n"},{"path":"registry/light-writing-gl.ts","type":"registry:component","content":"// Hairline UI · light-writing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n/* ─────────────────────────────────────────────────────────\n * LIGHT WRITING renderer: a glass tube of light (WebGL 2)\n *\n * Each frame the line is built on the CPU as triangle strips\n * (a few thousand vertices) and drawn in three steps:\n *\n *   order    which pass of the line is on top at every pixel,\n *            and which is lowest: the latest and earliest point\n *            along the line, kept with MAX blending\n *   tube     the line shaded as a lit glass tube; where it\n *            crosses an earlier pass of itself, the top pass\n *            turns translucent so the one below shows through\n *   glow     the tube blurred at a quarter size and laid back\n *            over it: the light it gives off\n *\n * Colour bands flow along the line from the theme's colours,\n * and the moving ends burn white the way a hot tip does.\n * ───────────────────────────────────────────────────────── */\n\nexport type Rgb = [number, number, number];\n\n/** One stroke to draw: points in canvas pixels, and the part of it that shows, as point indices with fractions. */\nexport interface TubeStroke {\n  points: ArrayLike<number>;\n  /** First and last visible point, fractional. */\n  from: number;\n  to: number;\n  /** Tube radius in pixels. */\n  radius: number;\n  /** Where point 0 sits along the whole drawing, and the distance between points, in pixels: for colour and order. */\n  order: number;\n  step: number;\n  /** How hot the leading and trailing ends are, 0 to 1: a pen tip writing or erasing. */\n  headHeat: number;\n  tailHeat: number;\n}\n\nexport interface TubeLook {\n  palette: Rgb[];\n  /** Pixels of line per colour band. */\n  period: number;\n  /** How far the colours have flowed, in bands. */\n  shift: number;\n  /** Total length of the drawing in pixels, so the order map can be normalised. */\n  total: number;\n  /** 0 to 1. */\n  glow: number;\n  dark: boolean;\n}\n\nconst FLOATS = 8; // x, y, nx, ny, side, cap, order, heat\nconst MAX_COLORS = 6;\n\nconst TUBE_VERT = `#version 300 es\nin vec2 aPos;\nin vec2 aNormal;\nin vec2 aShape;\nin float aOrder;\nin float aHeat;\nuniform vec2 uView;\nout vec2 vNormal;\nout vec2 vShape;\nout float vOrder;\nout float vHeat;\nvoid main() {\n  vNormal = aNormal;\n  vShape = aShape;\n  vOrder = aOrder;\n  vHeat = aHeat;\n  gl_Position = vec4(aPos / uView * vec2(2.0, -2.0) + vec2(-1.0, 1.0), 0.0, 1.0);\n}`;\n\nconst ORDER_FRAG = `#version 300 es\nprecision highp float;\nin vec2 vShape;\nin float vOrder;\nuniform float uTotal;\nout vec4 o;\nvoid main() {\n  // Only the solid part of the tube claims a pixel: under its soft edge the pass below must still be drawn, or a dark\n  // crack shows where one pass meets another.\n  float rho = length(vShape);\n  if (rho > 1.0 - 2.5 * max(fwidth(rho), 1e-3)) discard;\n  float s = clamp(vOrder / uTotal, 0.0, 1.0);\n  o = vec4(s, 1.0 - s, 0.0, 1.0);\n}`;\n\nconst TUBE_FRAG = `#version 300 es\nprecision highp float;\nin vec2 vNormal;\nin vec2 vShape;\nin float vOrder;\nin float vHeat;\nuniform sampler2D uOrderMap;\nuniform vec2 uView;\nuniform float uTotal;\nuniform float uGap;\nuniform float uEps;\nuniform vec3 uPalette[${MAX_COLORS}];\nuniform int uCount;\nuniform float uPeriod;\nuniform float uShift;\nuniform float uDark;\nout vec4 o;\n\nvec3 toHsv(vec3 c) {\n  vec4 K = vec4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0);\n  vec4 p = mix(vec4(c.bg, K.wz), vec4(c.gb, K.xy), step(c.b, c.g));\n  vec4 q = mix(vec4(p.xyw, c.r), vec4(c.r, p.yzx), step(p.x, c.r));\n  float d = q.x - min(q.w, q.y);\n  return vec3(abs(q.z + (q.w - q.y) / (6.0 * d + 1e-10)), d / (q.x + 1e-10), q.x);\n}\nvec3 toRgb(vec3 c) {\n  vec3 p = abs(fract(c.xxx + vec3(1.0, 2.0 / 3.0, 1.0 / 3.0)) * 6.0 - 3.0);\n  return c.z * mix(vec3(1.0), clamp(p - 1.0, 0.0, 1.0), c.y);\n}\n// Neighbouring colours meet through the hues between them, the short way round, never through grey.\nvec3 band(float u) {\n  float x = fract(u) * float(uCount);\n  int i = int(floor(x));\n  float f = fract(x);\n  vec3 a = uPalette[0], b = uPalette[0];\n  for (int k = 0; k < ${MAX_COLORS}; k++) {\n    if (k == i) a = uPalette[k];\n    if (k == (i + 1) % uCount) b = uPalette[k];\n  }\n  vec3 ha = toHsv(a), hb = toHsv(b);\n  float dh = hb.x - ha.x;\n  dh -= floor(dh + 0.5);\n  if (ha.y < 0.08) { ha.x = hb.x; dh = 0.0; }\n  if (hb.y < 0.08) dh = 0.0;\n  return toRgb(vec3(fract(ha.x + dh * f), mix(ha.y, hb.y, f), mix(ha.z, hb.z, f)));\n}\n\nvoid main() {\n  float rho = length(vShape);\n  float aa = max(fwidth(rho), 1e-3) * 1.25;\n  float cover = 1.0 - smoothstep(1.0 - aa, 1.0, rho);\n  if (cover <= 0.0) discard;\n\n  // The same pass folding over itself at a tight turn: only its latest fragment is drawn, so its light never doubles.\n  // An earlier pass further back along the line stays, and shows through the glass of the one above it.\n  float top = texture(uOrderMap, gl_FragCoord.xy / uView).r;\n  float behind = top - clamp(vOrder / uTotal, 0.0, 1.0);\n  // Faded rather than cut, so there is no straight seam where \"the same pass\" ends and \"a pass beneath\" begins.\n  float keep = behind <= uEps ? 1.0 : smoothstep(uGap * 0.6, uGap * 1.3, behind);\n  if (keep <= 0.002) discard;\n\n  float r = min(rho, 1.0);\n  vec3 base = band(vOrder / uPeriod - uShift);\n  float luma = dot(base, vec3(0.299, 0.587, 0.114));\n  vec3 vivid = clamp(mix(vec3(luma), base, 1.35), 0.0, 1.0);\n  // Light inside frosted glass, not a lit cylinder: an even, paler fill, and thin vivid rims where the walls catch it.\n  float rim = smoothstep(0.62, 0.94, r) * (1.0 - 0.3 * smoothstep(0.94, 1.0, r));\n  float core = 1.0 - smoothstep(0.0, 0.8, r);\n  vec3 col;\n  float alpha;\n  if (uDark > 0.5) {\n    col = mix(mix(vivid, vec3(1.0), 0.3 + 0.32 * core) * 0.9, vivid * 1.35, rim);\n    alpha = mix(0.52, 0.95, rim);\n  } else {\n    col = mix(mix(vivid, vec3(1.0), 0.24 + 0.2 * core), vivid * 0.88, rim);\n    alpha = mix(0.8, 1.0, rim);\n  }\n  // The pen's tip burns white.\n  float heat = clamp(vHeat, 0.0, 1.0);\n  col = mix(col, vec3(1.0), heat * 0.9);\n  alpha = mix(alpha, 1.0, heat) * cover * keep;\n  cover *= keep;\n  // On a dark page light adds up: its colour goes on nearly whole while what lies under it still shows through.\n  float strength = uDark > 0.5 ? mix(alpha, cover, 0.65) : alpha;\n  o = vec4(min(col, vec3(1.0)) * strength, alpha);\n}`;\n\nconst QUAD_VERT = `#version 300 es\nin vec2 aPos;\nout vec2 vUv;\nvoid main() { vUv = aPos * 0.5 + 0.5; gl_Position = vec4(aPos, 0.0, 1.0); }`;\n\nconst BLUR_FRAG = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nuniform sampler2D uSrc;\nuniform vec2 uStep;\nout vec4 o;\nvoid main() {\n  vec4 c = texture(uSrc, vUv) * 0.2270;\n  c += (texture(uSrc, vUv + uStep * 1.3846) + texture(uSrc, vUv - uStep * 1.3846)) * 0.3162;\n  c += (texture(uSrc, vUv + uStep * 3.2308) + texture(uSrc, vUv - uStep * 3.2308)) * 0.0703;\n  o = c;\n}`;\n\nconst COMPOSE_FRAG = `#version 300 es\nprecision highp float;\nin vec2 vUv;\nuniform sampler2D uTube;\nuniform sampler2D uGlow;\nuniform sampler2D uGlowWide;\nuniform float uGlowAmount;\nuniform float uFloor;\nout vec4 o;\nvoid main() {\n  vec4 tube = texture(uTube, vUv);\n  vec4 glow = texture(uGlow, vUv) * 0.85 + texture(uGlowWide, vUv) * 0.7;\n  // In 8-bit buffers the blur's last trace rounds into a flat sheet; fade it out gently instead of cutting it.\n  if (uFloor > 0.0) glow *= smoothstep(uFloor, uFloor * 4.0, glow.a);\n  // The light sits behind the glass: it shows around the tube, not on top of it.\n  o = tube + glow * uGlowAmount * (1.0 - tube.a);\n}`;\n\ntype Target = { tex: WebGLTexture; fb: WebGLFramebuffer; w: number; h: number };\n\nexport function createTubeRenderer(canvas: HTMLCanvasElement) {\n  const gl = canvas.getContext(\"webgl2\", { premultipliedAlpha: true, alpha: true, antialias: false, preserveDrawingBuffer: false });\n  if (!gl) return null;\n\n  const shader = (type: number, src: string) => {\n    const s = gl.createShader(type)!;\n    gl.shaderSource(s, src);\n    gl.compileShader(s);\n    if (!gl.getShaderParameter(s, gl.COMPILE_STATUS)) throw new Error(gl.getShaderInfoLog(s) ?? \"shader\");\n    return s;\n  };\n  const shaders: WebGLShader[] = [];\n  const programs: WebGLProgram[] = [];\n  const program = (vert: string, frag: string, attribs: string[]) => {\n    const p = gl.createProgram()!;\n    const v = shader(gl.VERTEX_SHADER, vert);\n    const f = shader(gl.FRAGMENT_SHADER, frag);\n    shaders.push(v, f);\n    gl.attachShader(p, v);\n    gl.attachShader(p, f);\n    attribs.forEach((name, i) => gl.bindAttribLocation(p, i, name));\n    gl.linkProgram(p);\n    if (!gl.getProgramParameter(p, gl.LINK_STATUS)) throw new Error(gl.getProgramInfoLog(p) ?? \"link\");\n    programs.push(p);\n    const cache = new Map<string, WebGLUniformLocation | null>();\n    return {\n      p,\n      u(name: string) {\n        if (!cache.has(name)) cache.set(name, gl.getUniformLocation(p, name));\n        return cache.get(name) ?? null;\n      },\n    };\n  };\n\n  const tubeAttribs = [\"aPos\", \"aNormal\", \"aShape\", \"aOrder\", \"aHeat\"];\n  const P = {\n    order: program(TUBE_VERT, ORDER_FRAG, tubeAttribs),\n    tube: program(TUBE_VERT, TUBE_FRAG, tubeAttribs),\n    blur: program(QUAD_VERT, BLUR_FRAG, [\"aPos\"]),\n    compose: program(QUAD_VERT, COMPOSE_FRAG, [\"aPos\"]),\n  };\n\n  // The line's vertices, rewritten every frame.\n  const lineVao = gl.createVertexArray()!;\n  const lineBuffer = gl.createBuffer()!;\n  gl.bindVertexArray(lineVao);\n  gl.bindBuffer(gl.ARRAY_BUFFER, lineBuffer);\n  const stride = FLOATS * 4;\n  const layout: [number, number, number][] = [[0, 2, 0], [1, 2, 2], [2, 2, 4], [3, 1, 6], [4, 1, 7]];\n  for (const [loc, size, offset] of layout) {\n    gl.enableVertexAttribArray(loc);\n    gl.vertexAttribPointer(loc, size, gl.FLOAT, false, stride, offset * 4);\n  }\n  // One triangle that covers the screen, for the full-screen steps.\n  const quadVao = gl.createVertexArray()!;\n  const quadBuffer = gl.createBuffer()!;\n  gl.bindVertexArray(quadVao);\n  gl.bindBuffer(gl.ARRAY_BUFFER, quadBuffer);\n  gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 3, -1, -1, 3]), gl.STATIC_DRAW);\n  gl.enableVertexAttribArray(0);\n  gl.vertexAttribPointer(0, 2, gl.FLOAT, false, 0, 0);\n  gl.bindVertexArray(null);\n\n  let data = new Float32Array(4096 * FLOATS);\n  let used = 0;\n  const grow = (verts: number) => {\n    if ((used + verts) * FLOATS <= data.length) return;\n    const next = new Float32Array(Math.max(data.length * 2, (used + verts) * FLOATS * 1.5));\n    next.set(data.subarray(0, used * FLOATS));\n    data = next;\n  };\n  const vert = (x: number, y: number, nx: number, ny: number, side: number, cap: number, order: number, heat: number) => {\n    const o = used * FLOATS;\n    data[o] = x;\n    data[o + 1] = y;\n    data[o + 2] = nx;\n    data[o + 3] = ny;\n    data[o + 4] = side;\n    data[o + 5] = cap;\n    data[o + 6] = order;\n    data[o + 7] = heat;\n    used++;\n  };\n\n  const sample = (pts: ArrayLike<number>, f: number, n: number): [number, number] => {\n    const i = Math.max(0, Math.min(n - 1, Math.floor(f)));\n    const j = Math.min(n - 1, i + 1);\n    const t = f - i;\n    return [pts[i * 2] + (pts[j * 2] - pts[i * 2]) * t, pts[i * 2 + 1] + (pts[j * 2 + 1] - pts[i * 2 + 1]) * t];\n  };\n\n  // Scratch for one stroke's visible points.\n  let xs = new Float32Array(1024);\n  let ys = new Float32Array(1024);\n  let os = new Float32Array(1024);\n  let limP = new Float32Array(1024);\n  let limM = new Float32Array(1024);\n  let soft = new Float32Array(1024);\n\n  /** Writes one stroke as a strip: a round cap, the body, a round cap. Strips are chained with two repeated vertices. */\n  const buildStroke = (s: TubeStroke) => {\n    const n = s.points.length / 2;\n    const from = Math.max(0, s.from);\n    const to = Math.min(n - 1, s.to);\n    if (n < 2 || to - from < 1e-3 || s.radius <= 0.05) return;\n    const first = Math.ceil(from + 1e-6), last = Math.floor(to - 1e-6);\n    const count = Math.max(0, last - first + 1) + 2;\n    if (xs.length < count) {\n      xs = new Float32Array(count * 2);\n      ys = new Float32Array(count * 2);\n      os = new Float32Array(count * 2);\n    }\n    let k = 0;\n    const push = (f: number) => {\n      const [x, y] = sample(s.points, f, n);\n      xs[k] = x;\n      ys[k] = y;\n      os[k] = s.order + f * s.step;\n      k++;\n    };\n    push(from);\n    for (let i = first; i <= last; i++) {\n      // A whole point right next to a fractional end adds nothing but a tangent that points anywhere.\n      if (Math.abs(i - from) < 0.2 || Math.abs(to - i) < 0.2) continue;\n      push(i);\n    }\n    push(to);\n    if (k < 2) return;\n    const r = s.radius;\n    const headOrder = os[k - 1], tailOrder = os[0];\n    const reach = r * 7;\n    if (limP.length < k) {\n      limP = new Float32Array(k * 2);\n      limM = new Float32Array(k * 2);\n      soft = new Float32Array(k * 2);\n    }\n    // Where the pen reverses (the foot of an h, the joint after an o) the line is drawn as two strokes meeting, each with\n    // a round end, the way a pen turns back; bending one tube through a reversal crumples it.\n    const cuts = [0];\n    let best = -1, bestCos = 1;\n    for (let i = 2; i < k - 2; i++) {\n      const ux = xs[i] - xs[i - 2], uy = ys[i] - ys[i - 2], vx = xs[i + 2] - xs[i], vy = ys[i + 2] - ys[i];\n      const cos = (ux * vx + uy * vy) / ((Math.hypot(ux, uy) * Math.hypot(vx, vy)) || 1);\n      if (cos < -0.2) {\n        if (cos < bestCos) {\n          bestCos = cos;\n          best = i;\n        }\n      } else if (best >= 0) {\n        if (best - cuts[cuts.length - 1] >= 3 && k - 1 - best >= 3) cuts.push(best);\n        best = -1;\n        bestCos = 1;\n      }\n    }\n    cuts.push(k - 1);\n    // Each side of a reversal stops a little short of it; their round ends meet and make the turn.\n    const spans: [number, number][] = [];\n    const back = (i: number, d: number) => {\n      let j = i, run = 0;\n      while (j > 0 && run < d) {\n        run += Math.hypot(xs[j] - xs[j - 1], ys[j] - ys[j - 1]);\n        j--;\n      }\n      return j;\n    };\n    const ahead = (i: number, d: number) => {\n      let j = i, run = 0;\n      while (j < k - 1 && run < d) {\n        run += Math.hypot(xs[j + 1] - xs[j], ys[j + 1] - ys[j]);\n        j++;\n      }\n      return j;\n    };\n    for (let c = 0; c < cuts.length - 1; c++) {\n      const i0 = c === 0 ? cuts[c] : ahead(cuts[c], r * 0.7);\n      const i1 = c === cuts.length - 2 ? cuts[c + 1] : back(cuts[c + 1], r * 0.7);\n      if (i1 - i0 >= 1) spans.push([i0, i1]);\n    }\n    grow(k * 2 + spans.length * 6);\n    const startVert = used;\n    for (const [i0, i1] of spans) {\n      // How far each wall may reach: in a turn tighter than the tube the inside wall stops short of the turn's centre\n      // instead of folding past it (folded walls draw fans of streaks). Eased along the line so it never creases.\n      for (let i = i0; i <= i1; i++) {\n        limP[i] = r;\n        limM[i] = r;\n        // A window the same size on both sides: a lopsided one near an end reads a bend that isn't there.\n        const h = Math.min(2, i - i0, i1 - i);\n        if (h < 1) continue;\n        const a = i - h, b = i + h;\n        const dx = xs[b] - 2 * xs[i] + xs[a], dy = ys[b] - 2 * ys[i] + ys[a];\n        const bend = Math.hypot(dx, dy);\n        if (bend < 1e-4) continue;\n        const chord = Math.hypot(xs[b] - xs[a], ys[b] - ys[a]) / 2;\n        const inner = Math.max(r * 0.2, Math.min(r, ((chord * chord) / bend) * 0.95));\n        const tx = (xs[b] - xs[a]) / (chord * 2 || 1), ty = (ys[b] - ys[a]) / (chord * 2 || 1);\n        if (dx * -ty + dy * tx > 0) limP[i] = inner;\n        else limM[i] = inner;\n      }\n      for (const lim of [limP, limM]) {\n        for (let i = i0; i <= i1; i++) {\n          let m = r;\n          for (let j = Math.max(i0, i - 3); j <= Math.min(i1, i + 3); j++) m = Math.min(m, lim[j]);\n          soft[i] = m;\n        }\n        for (let i = i0; i <= i1; i++) {\n          let sum = 0, w = 0;\n          for (let j = Math.max(i0, i - 3); j <= Math.min(i1, i + 3); j++) {\n            sum += soft[j];\n            w++;\n          }\n          lim[i] = sum / w;\n        }\n      }\n      for (let i = i0; i <= i1; i++) {\n        const a = Math.max(i0, i - 2), b = Math.min(i1, i + 2);\n        let tx = xs[b] - xs[a], ty = ys[b] - ys[a];\n        const len = Math.hypot(tx, ty) || 1;\n        tx /= len;\n        ty /= len;\n        const nx = -ty, ny = tx;\n        const heat = Math.min(1, s.headHeat * Math.exp(-(headOrder - os[i]) / reach) + s.tailHeat * Math.exp(-(os[i] - tailOrder) / reach));\n        // The caps take the walls of the body beside them, so an end inside a tight curl doesn't flare into a corner.\n        const plus = limP[i], minus = limM[i];\n        if (i === i0) {\n          // Leading cap, and a repeat of its first vertex to join the previous strip.\n          const cx = xs[i] - tx * r, cy = ys[i] - ty * r;\n          if (used > 0) vert(cx + nx * plus, cy + ny * plus, nx, ny, 1, -1, os[i], heat);\n          vert(cx + nx * plus, cy + ny * plus, nx, ny, 1, -1, os[i], heat);\n          vert(cx - nx * minus, cy - ny * minus, nx, ny, -1, -1, os[i], heat);\n        }\n        vert(xs[i] + nx * plus, ys[i] + ny * plus, nx, ny, 1, 0, os[i], heat);\n        vert(xs[i] - nx * minus, ys[i] - ny * minus, nx, ny, -1, 0, os[i], heat);\n        if (i === i1) {\n          const cx = xs[i] + tx * r, cy = ys[i] + ty * r;\n          vert(cx + nx * plus, cy + ny * plus, nx, ny, 1, 1, os[i], heat);\n          vert(cx - nx * minus, cy - ny * minus, nx, ny, -1, 1, os[i], heat);\n          // Repeat the last vertex so the next strip's join makes only empty triangles.\n          vert(cx - nx * minus, cy - ny * minus, nx, ny, -1, 1, os[i], heat);\n        }\n      }\n    }\n    return startVert;\n  };\n\n  const targets: Target[] = [];\n  // The glow is blurred in half floats where the GPU can render them, so its faint edge fades smoothly.\n  const halfFloat = !!gl.getExtension(\"EXT_color_buffer_float\");\n  const makeTarget = (w: number, h: number, soft = false): Target => {\n    const tex = gl.createTexture()!;\n    gl.bindTexture(gl.TEXTURE_2D, tex);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE);\n    gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE);\n    if (soft && halfFloat) gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA16F, w, h, 0, gl.RGBA, gl.HALF_FLOAT, null);\n    else gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA8, w, h, 0, gl.RGBA, gl.UNSIGNED_BYTE, null);\n    const fb = gl.createFramebuffer()!;\n    gl.bindFramebuffer(gl.FRAMEBUFFER, fb);\n    gl.framebufferTexture2D(gl.FRAMEBUFFER, gl.COLOR_ATTACHMENT0, gl.TEXTURE_2D, tex, 0);\n    const t = { tex, fb, w, h };\n    targets.push(t);\n    return t;\n  };\n  let T: { order: Target; tube: Target; glowA: Target; glowB: Target; wideA: Target; wideB: Target } | null = null;\n  const sizeTargets = () => {\n    const w = canvas.width, h = canvas.height;\n    if (T && T.tube.w === w && T.tube.h === h) return T;\n    targets.splice(0).forEach((t) => {\n      gl.deleteTexture(t.tex);\n      gl.deleteFramebuffer(t.fb);\n    });\n    const qw = Math.max(1, Math.round(w / 4)), qh = Math.max(1, Math.round(h / 4));\n    const ew = Math.max(1, Math.round(w / 8)), eh = Math.max(1, Math.round(h / 8));\n    T = { order: makeTarget(w, h, true), tube: makeTarget(w, h), glowA: makeTarget(qw, qh, true), glowB: makeTarget(qw, qh, true), wideA: makeTarget(ew, eh, true), wideB: makeTarget(ew, eh, true) };\n    return T;\n  };\n\n  const into = (t: Target | null) => {\n    gl.bindFramebuffer(gl.FRAMEBUFFER, t ? t.fb : null);\n    gl.viewport(0, 0, t ? t.w : canvas.width, t ? t.h : canvas.height);\n  };\n  const bindTex = (unit: number, tex: WebGLTexture, loc: WebGLUniformLocation | null) => {\n    gl.activeTexture(gl.TEXTURE0 + unit);\n    gl.bindTexture(gl.TEXTURE_2D, tex);\n    gl.uniform1i(loc, unit);\n  };\n  const blur = (src: Target, mid: Target, out: Target, spread: number) => {\n    gl.useProgram(P.blur.p);\n    gl.bindVertexArray(quadVao);\n    into(mid);\n    bindTex(0, src.tex, P.blur.u(\"uSrc\"));\n    gl.uniform2f(P.blur.u(\"uStep\"), spread / mid.w, 0);\n    gl.drawArrays(gl.TRIANGLES, 0, 3);\n    into(out);\n    bindTex(0, mid.tex, P.blur.u(\"uSrc\"));\n    gl.uniform2f(P.blur.u(\"uStep\"), 0, spread / out.h);\n    gl.drawArrays(gl.TRIANGLES, 0, 3);\n  };\n\n  const paletteData = new Float32Array(MAX_COLORS * 3);\n  let lost = false;\n  canvas.addEventListener(\"webglcontextlost\", () => (lost = true));\n\n  return {\n    draw(strokes: TubeStroke[], look: TubeLook) {\n      if (lost) return;\n      const t = sizeTargets();\n      used = 0;\n      for (const s of strokes) buildStroke(s);\n      const view: [number, number] = [canvas.width, canvas.height];\n      const total = Math.max(1, look.total);\n      const maxRadius = strokes.reduce((m, s) => Math.max(m, s.radius), 1);\n\n      gl.bindVertexArray(lineVao);\n      gl.bindBuffer(gl.ARRAY_BUFFER, lineBuffer);\n      gl.bufferData(gl.ARRAY_BUFFER, data.subarray(0, used * FLOATS), gl.STREAM_DRAW);\n\n      // 1. Which pass of the line is highest and lowest at each pixel.\n      into(t.order);\n      gl.clearColor(0, 0, 0, 0);\n      gl.clear(gl.COLOR_BUFFER_BIT);\n      if (used) {\n        gl.enable(gl.BLEND);\n        gl.blendEquation(gl.MAX);\n        gl.useProgram(P.order.p);\n        gl.uniform2fv(P.order.u(\"uView\"), view);\n        gl.uniform1f(P.order.u(\"uTotal\"), total);\n        gl.drawArrays(gl.TRIANGLE_STRIP, 0, used);\n      }\n\n      // 2. The tube, in the order it was drawn, premultiplied.\n      into(t.tube);\n      gl.clear(gl.COLOR_BUFFER_BIT);\n      if (used) {\n        gl.blendEquation(gl.FUNC_ADD);\n        gl.blendFunc(gl.ONE, gl.ONE_MINUS_SRC_ALPHA);\n        gl.useProgram(P.tube.p);\n        gl.uniform2fv(P.tube.u(\"uView\"), view);\n        gl.uniform1f(P.tube.u(\"uTotal\"), total);\n        // Two fragments belong to one pass of the line unless they are further apart along it than a few tube widths.\n        gl.uniform1f(P.tube.u(\"uGap\"), Math.max((maxRadius * 5) / total, 3 / 255));\n        gl.uniform1f(P.tube.u(\"uEps\"), halfFloat ? 0.0015 : 1.5 / 255);\n        const count = Math.max(1, Math.min(MAX_COLORS, look.palette.length));\n        paletteData.fill(0);\n        for (let i = 0; i < count; i++) paletteData.set(look.palette[i], i * 3);\n        gl.uniform3fv(P.tube.u(\"uPalette\"), paletteData);\n        gl.uniform1i(P.tube.u(\"uCount\"), count);\n        gl.uniform1f(P.tube.u(\"uPeriod\"), Math.max(1, look.period));\n        gl.uniform1f(P.tube.u(\"uShift\"), look.shift);\n        gl.uniform1f(P.tube.u(\"uDark\"), look.dark ? 1 : 0);\n        bindTex(0, t.order.tex, P.tube.u(\"uOrderMap\"));\n        gl.drawArrays(gl.TRIANGLE_STRIP, 0, used);\n      }\n      gl.disable(gl.BLEND);\n\n      // 3. The light it gives off: a near glow and a wide one.\n      const glow = used ? look.glow : 0;\n      if (glow > 0) {\n        // Several narrow passes rather than a few wide ones: a sparse kernel leaves rings in the light.\n        blur(t.tube, t.glowA, t.glowB, 1.4);\n        blur(t.glowB, t.glowA, t.glowB, 1.4);\n        blur(t.glowB, t.wideA, t.wideB, 1.3);\n        blur(t.wideB, t.wideA, t.wideB, 1.3);\n        blur(t.wideB, t.wideA, t.wideB, 1.3);\n      }\n      gl.useProgram(P.compose.p);\n      gl.bindVertexArray(quadVao);\n      into(null);\n      bindTex(0, t.tube.tex, P.compose.u(\"uTube\"));\n      bindTex(1, t.glowB.tex, P.compose.u(\"uGlow\"));\n      bindTex(2, t.wideB.tex, P.compose.u(\"uGlowWide\"));\n      gl.uniform1f(P.compose.u(\"uGlowAmount\"), glow);\n      gl.uniform1f(P.compose.u(\"uFloor\"), halfFloat ? 0 : 1.5 / 255);\n      gl.drawArrays(gl.TRIANGLES, 0, 3);\n      gl.bindVertexArray(null);\n    },\n    dispose() {\n      targets.forEach((t) => {\n        gl.deleteTexture(t.tex);\n        gl.deleteFramebuffer(t.fb);\n      });\n      programs.forEach((p) => gl.deleteProgram(p));\n      shaders.forEach((s) => gl.deleteShader(s));\n      gl.deleteBuffer(lineBuffer);\n      gl.deleteBuffer(quadBuffer);\n      gl.deleteVertexArray(lineVao);\n      gl.deleteVertexArray(quadVao);\n    },\n  };\n}\n\nexport type TubeRenderer = NonNullable<ReturnType<typeof createTubeRenderer>>;\n\n/** Any CSS colour, theme variables included, as 0–1 RGB: resolved by the browser, read back from one pixel. */\nexport function resolveColors(host: HTMLElement, colors: string[]): Rgb[] {\n  const probe = document.createElement(\"span\");\n  probe.style.cssText = \"position:absolute;width:0;height:0;overflow:hidden;pointer-events:none\";\n  host.appendChild(probe);\n  const paint = document.createElement(\"canvas\").getContext(\"2d\", { willReadFrequently: true });\n  const out = colors.map((css): Rgb => {\n    probe.style.color = \"\";\n    probe.style.color = css;\n    const computed = getComputedStyle(probe).color;\n    if (!paint) return [0.2, 0.36, 0.87];\n    paint.clearRect(0, 0, 1, 1);\n    paint.fillStyle = \"#3a5ddd\";\n    paint.fillStyle = computed;\n    paint.fillRect(0, 0, 1, 1);\n    const [r, g, b] = paint.getImageData(0, 0, 1, 1).data;\n    return [r / 255, g / 255, b / 255];\n  });\n  probe.remove();\n  return out;\n}\n"},{"path":"registry/light-writing-glyphs.ts","type":"registry:component","content":"// Hairline UI · light-writing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n// Letterforms for light-writing: every glyph is a line a pen can follow.\n//\n// EMS Allure, created by Sheldon B. Michaels, SVG font conversion by Windell H. Oskay,\n// a derivative of Allura by Rob Leuschke (TypeSETit). Licensed under the SIL Open Font\n// License 1.1 (https://openfontlicense.org): you may use, modify and redistribute it,\n// but not sell the font by itself, and this notice must stay with it.\n//\n// Format, per character: \"advance;stroke;stroke…\". A stroke is integer x y pairs in font\n// units (1000 per em, y up, baseline 0, x-height 300), each pair relative to the one before.\n\nexport const SCRIPT_UNITS = 1000;\nexport const SCRIPT_X_HEIGHT = 300;\nexport const SCRIPT_ASCENT = 800;\nexport const SCRIPT_DESCENT = 200;\n\nexport const SCRIPT_GLYPHS: Record<string, string> = {\n  \"0\": \"662;466 583 -34 25 -89 3 -50 -22 -104 -69 -57 -57 -47 -76 -38 -122 -6 -101 41 -101 69 -47 79 -22 88 15 104 54 98 98 56 107 32 116 0 95 -25 79 -51 50 -53 41 -54 16 -75 3\",\n  \"1\": \"378;170 450 91 73 54 66 41 57 28 0 -97 -218 -95 -217 -38 -110 -9 -63;6 9 63 23 63 0 73 6 79 -3\",\n  \"2\": \"702;198 491 -3 10 0 35 92 66 85 28 100 13 101 -22 48 -35 28 -76 -32 -78 -78 -86 -104 -81 -85 -60 -89 -57 -63 -35 -28 -15 -47 -32 -19 -19 -47 -31 0 31 25 35 38 13 66 -4 69 -25 44 -28 104 -41 110 -3 57 25 47 38 13 28\",\n  \"3\": \"665;239 498 16 69 66 50 85 22 73 4 79 -19 47 -60 3 -66 -19 -38 -44 -38 -35 -28 -72 -16 -76 -13 -50 -19 -13 10 -6 28 76 -6 113 -22 54 -19 31 -47 9 -82 -22 -63 -59 -66 -67 -47 -75 -32 -133 -19 -72 10 -44 28 -28 53 9 38 16 22\",\n  \"4\": \"558;243 -6 25 101 53 154 98 214 85 173 -132 -110 -133 -104 -135 -82 -66 -56 -41 -60 53 28 38 16 95 0 78 -3 73 -16 76 0 81 31 38 26 25 31\",\n  \"5\": \"643;318 608 -98 -148 -56 -98 56 35 92 31 75 4 73 -16 63 -38 25 -57 0 -66 -25 -72 -66 -82 -79 -51 -94 -37 -92 -16 -75 0 -67 12 -47 23 -28 47 -10 50 19 25;280 614 142 10 148 6 82 -6\",\n  \"6\": \"602;551 507 3 69 -31 48 -73 12 -113 -22 -123 -94 -69 -88 -57 -120 -28 -126 9 -88 51 -66 75 -26 79 0 60 29 72 56 48 63 25 98 -16 72 -57 41 -69 7 -66 -13 -44 -38\",\n  \"7\": \"501;110 507 38 85 60 38 110 6 129 -15 76 -4 53 -6 41 22 -182 -195 -142 -177 -104 -122 -63 -107 -13 -7\",\n  \"8\": \"592;384 662 -116 -51 -73 -75 7 -76 25 -54 66 -31 66 0 76 -25 47 -70 -3 -85 -35 -50 -101 -69 -88 -51 -82 -9 -78 6 -57 32 -13 78 44 82 101 76 252 138 79 41 53 44 19 76 -25 54 -57 25 -107 -6\",\n  \"9\": \"605;369 328 -51 -35 -75 -9 -79 25 -38 50 0 95 44 97 69 60 60 32 104 15 82 -28 54 -72 12 -76 -22 -113 -31 -85 -63 -101 -76 -73 -75 -60 -57 -28 -69 -13 -54 0 -57 45 -12 34 3 70\",\n  \" \": \"378\",\n  \"!\": \"359;444 665 -41 -73 -108 -230 -63 -148;204 63 -22 -22\",\n  \"\\\"\": \"302;95 548 -16 -145;233 548 -22 -148\",\n  \"#\": \"926;410 743 -243 -702;693 737 -233 -699;95 469 730 3;13 192 740 0\",\n  \"$\": \"592;372 403 75 60 32 69 -16 54 -44 22 -91 0 -123 -32 -79 -63 -28 -56 -7 -35 7 -47 148 -177 28 -47 -25 -34 -57 -16 -50 6 -54 10 -25 12;432 658 -29 -25 -164 -274 -176 -346\",\n  \"%\": \"548;189 649 -69 -28 -54 -63 0 -79 38 -35 60 6 47 45 32 50 3 57 -13 31 -28 13 66 -22 142 6 63 32 -66 -89 -199 -293 -154 -261;306 202 -45 -70 -6 -72 41 -38 44 0 60 44 32 47 9 89 -31 31 -57 3 -47 -34\",\n  \"&\": \"828;602 658 -29 -12 -31 -51 -16 -34 0 -41;548 621 -38 41 -53 28 -98 -10 -79 -28 -31 -85 25 -79 47 -78 66 -70 -113 -12 -110 -13 -98 -76 -41 -94 32 -85 63 -57 104 -19 119 13 107 28 89 47 59 70 38 72 10 66 -7 41 -18 54;728 491 0 -28 -32 -35 -126 -78 -98 -41 -88 -44 -44 -73 3 -38 29 -44\",\n  \"'\": \"173;98 551 -19 -151\",\n  \"(\": \"447;501 684 -208 -111 -145 -129 -75 -129 -48 -161 -6 -135 19 -117 28 -63\",\n  \")\": \"617;372 684 56 -130 -3 -192 -69 -204 -110 -149 -107 -85 -98 -47 -91 -35\",\n  \"*\": \"762;236 602 7 -4 157 -337;457 617 -271 -346;554 438 -437 -10\",\n  \"+\": \"731;101 243 485 0;435 432 -186 -416\",\n  \",\": \"211;104 57 19 -35 -22 -31 -73 -108\",\n  \"-\": \"444;161 236 226 7\",\n  \".\": \"224;145 63 -16 -25\",\n  \"/\": \"564;482 655 -230 -299 -126 -173 -101 -161\",\n  \":\": \"246;195 252 -12 -22;139 63 -13 -22\",\n  \";\": \"224;189 252 -16 -22;101 60 19 -19 -3 -22 -16 -28 -69 -92\",\n  \"<\": \"450;391 561 -290 -284 66 -91 41 -54 44 -72\",\n  \"=\": \"646;189 318 384 10;145 139 44 15 359 -3\",\n  \">\": \"472;252 554 76 -116 63 -63 -98 -95 -120 -116 -88 -85\",\n  \"?\": \"564;139 561 12 41 22 22 73 41 63 31 104 -3 56 -41 29 -91 -32 -85 -44 -63 -60 -48 -47 -28 -69 -57 -32 -44 -12 -31;129 57 -22 -25\",\n  \"@\": \"895;602 517 -92 34 -129 -50 -97 -73 -64 -72 -34 -63 -3 -57 25 -34 41 -16 60 16 53 50 88 88 104 123 22 0 -47 -94 -22 -70 -6 -85 28 -31 69 6 82 66 70 104 38 88 9 107 -38 95 -101 63 -119 12 -133 -15 -141 -63 -133 -104 -78 -104 -57 -154 9 -114 35 -72 91 -79 126 -35 152 3 160 41 10 7 135 88 73 79 28 56 6 54 -6 66\",\n  \"A\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19\",\n  \"B\": \"860;95 328 -73 41 -19 50 22 91 92 73 211 97 220 32 148 -3 85 -32 38 -50 -3 -66 -28 -41 -51 -41 -139 -44 -69 -10 -60 -9 -41 -6 114 -86 91 -78 35 -88 -16 -86 -47 -59 -73 -51 -94 -6 -63 0 -57 19 -28 57 -13 50 -69 -50 -47 -32 -13 25 38 123 138 258 48 104 47 51 60 12 38 -3\",\n  \"C\": \"690;296 362 107 10 123 69 91 85 41 82 -19 72 -75 32 -189 -50 -126 -86 -139 -157 -69 -139 -28 -148 47 -107 129 -56 157 15 130 51 119 78 73 76\",\n  \"D\": \"1033;652 554 -107 -47 -73 -104 -18 -69 -67 -148 -37 -79 -48 -98 -37 -53 -29 6 -31 70 -3 81 12 95 19 -63 142 -110 135 -44 218 34 135 88 113 107 57 152 -12 160 -70 95 -123 53 -220 26 -195 -35 -152 -57 -107 -66 -59 -88 -10 -76 41 -63 63 -28\",\n  \"E\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47\",\n  \"F\": \"624;517 576 -82 -25 -66 -72 -38 -95 -54 -88 -60 -126 -53 -94 -6 -51 18 -25 48 9 28 38 16 19;73 372 -48 31 -31 73 50 113 101 63 201 38 167 -16 117 -16 79 0 82 -3 37 22 -15 3 -73 -75 -22 -51 3 -47;230 309 -35 -22 375 44\",\n  \"G\": \"951;825 639 -44 57 -50 22 -110 0 -167 -41 -126 -69 -120 -91 -73 -98 -47 -82 -22 -91 13 -85 47 -66 88 -51 110 -12 148 40 108 70 119 91 54 51 22 28 60 41 19 19 -32 -10 -53 -91 -92 -312 -104 -167 -107 -145 -101 -53 -94 -7 -44 38 0 73 38 82 100 103 130 86 113 59 123 41 31 7 85 15\",\n  \"H\": \"939;290 539 12 0 98 53 47 60 35 47 -38 -110;444 589 -120 -334 -113 -198 -101 -129 -104 -54 -56 0 -73 32 -6 22;939 680 -85 -37 -44 -76 -51 -120 -47 -110 -47 -126 -32 -104 10 -66 28 -32 57 -3 66 51 75 75 38 51;41 198 -9 95 50 60 154 19 79 -13 126 -16 173 -37 145 -16 73 16 18 15\",\n  \"I\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25\",\n  \"J\": \"687;643 715 -29 -28 -47 -101 -66 -186 -73 -198 -100 -161 -70 -76 -113 -59 -91 22 -26 81 54 101 132 133 95 59 119 54 101 28 95 19;268 438 -51 38 -6 91 54 66 132 41 126 10 113 -16 48 -22\",\n  \"K\": \"759;132 532 123 60 79 107 -126 -340 -54 -151 -44 -76 -69 -100 -66 -82 -101 -70 -85 -9 -47 16 -35 56;756 699 -192 -116 -183 -148 -145 -142 -91 -113;296 403 54 -214 85 -148 94 -50 66 12 29 47 -13 22 -16 26\",\n  \"L\": \"617;230 126 9 0 186 76 164 135 98 173 15 114;709 624 -38 78 -66 19 -107 -41 -88 -113 -64 -198 -97 -281 -35 -94 -38 -63 -31 -38 -19 -13;123 82 -117 -32 13 32 116 -41 167 -117 133 -75 148 -60 167 9 69 51 19 31 3 63\",\n  \"M\": \"1351;224 536 78 34 41 35 35 41 28 47 22 6 -63 -170 -78 -214 -82 -167 -76 -129 -66 -60 -63 -19 -38 44 19 63 114 139 154 170 198 186 123 72 79 19 72 -28 35 -92 -16 -198 -19 -126 -34 -113 25 6 72 116 177 265 75 107 70 51 50 -7 19 -25 13 -50 -38 -111 -38 -78 -44 -95 -22 -75 0 -79 38 -79 97 16 104 91 35 54\",\n  \"N\": \"932;-230 -38 19 -53 57 -35 88 19 104 72 91 142 85 164 60 161 47 129 29 97 9 -330 22 -139 66 -154 60 -54 66 -16 70 35 88 129 57 145 37 198 7 117 -13 57 -22 63 47 -66 29 -38 25 -19 28 -16;158 513 12 4 88 41 35 37 35 63;158 513 12 4 88 41 35 37 35 63\",\n  \"O\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6\",\n  \"P\": \"639;504 576 -63 -15 -54 -35 -41 -47 -15 -63 -25 -54 -60 -97 -48 -92 -28 -75 -9 -35 -7 -31 16 -32 35 13 38 44;101 359 -60 35 -19 69 22 82 88 66 98 47 94 29 126 15 174 -9 116 -44 63 -54 7 -72 -35 -82 -57 -63 -79 -38 -135 -44 -129 -22 -76 -13 -85 10\",\n  \"Q\": \"800;699 715 76 -35 41 -72 -3 -145 -54 -176 -113 -164 -114 -88 -85 -38 -110 -22 -126 22 -98 57 -59 113 -4 186 67 160 97 101 82 54 88 47 95 25 94 -16 73 -47 38 -82 3 -126 -19 -113 -70 -117 -85 -88 -75 -47 -54 -19 -110 -38 -44 16 6 22 60 -6 101 -47 101 -70 107 -69 129 -76 164 -31;895 -214 141 25 44 57 4 28 -4 66\",\n  \"R\": \"639;498 573 -79 -9 -63 -63 -16 -63 -47 -104 -85 -136 -54 -113 -12 -50 19 -32 37 16 22 19 7 6;82 369 -54 50 -6 76 32 66 107 75 113 35 132 25 152 -3 113 -13 101 -63 41 -81 -25 -89 -111 -82 -123 -44 -122 -37 -98 -4 -132 13 -4 22 114 -85 69 -113 117 -139 129 -95 135 -59 120 0 63 37 25 38 6 35\",\n  \"S\": \"706;693 580 28 41 0 47 -56 41 -145 -19 -170 -54 -82 -78 -3 -73 97 -47 155 -47 100 -54 41 -60 -6 -53 -35 -54 -94 -72 -151 -63 -205 -41 -104 15 -35 38 -9 82 35 73 63 53 72 38 104 31\",\n  \"T\": \"554;57 378 -48 47 -12 76 41 91 75 54 85 31 89 13 179 -3 173 -22 167 -3 54 12 -35 16 -82 -110 -9 -41 -6 -54 15 -22;529 570 -79 -31 -59 -63 -67 -123 -85 -148 -59 -139 0 -41 18 -25 32 22 38 41\",\n  \"U\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15\",\n  \"V\": \"737;54 454 -54 75 25 82 48 35 116 22 113 9 89 0 56 -22 22 -6;331 718 6 -132 -38 -104 -41 -72 -47 -120 -47 -123 -22 -85 3 -91 41 -29 91 0 123 70 132 122 145 189 107 164 60 91 51 64 44 34 44 28 19 0\",\n  \"W\": \"1206;69 444 -34 32 -26 69 38 69 98 48 120 18 126 -3 69 -12 28 -13;416 709 -29 -117 -59 -91 -108 -148 -85 -136 -44 -72 -37 -79 -13 -60 6 -44 16 -19 35 -9 50 6 85 32 95 56 66 57 101 82 91 101 98 126 28 75 9 60 -9 57 -35 -16 -12 -63 3 -91 -6 -117 25 -123 44 -85 57 -50 88 -38 63 10 47 19 66 94 44 98 22 100 10 63 -13 130 -31 81 -67 51 -72 19 -47 -6 -22 -19\",\n  \"X\": \"806;66 457 -50 34 -13 63 22 67 79 44 91 22 73 9 110 -12 63 -10 28 -9 16 -3;419 699 -22 -138 13 -151 22 -126 56 -136 70 -94 63 -38 81 34 73 63 41 45;778 696 -82 -113 -126 -164 -101 -132 -119 -114 -107 -110 -108 -79 -103 -72 -133 -44 -91 12 -54 19 -22 41 -3 19\",\n  \"Y\": \"627;28 482 7 3 85 38 75 60 57 63 25 19 10 3 -57 -114 -88 -160 -73 -164 -12 -76 -7 -78 35 -60 73 0 75 38 101 91 69 75 60 86 79 110 53 94 26 76 41 63 53 25 44 6 -75 -47 -51 -57 -50 -176 -57 -195 -69 -211 -51 -107 -60 -98 -50 -73 -63 -62 -85 -54 -79 -13 -37 13 -29 50 3 54 32 63 69 82 98 91 126 69 85 32 154 50 28 0\",\n  \"Z\": \"627;145 554 -10 57 45 51 75 31 126 6 120 -9 94 -16 79 -25 60 -16 54 16 34 19 13 34 -32 7 -44 -25 -38 -38 -126 -107 -138 -139 -95 -110 -60 -66 -75 -76 -63 -44 -57 -41 -50 -25 -38 -10 -19 26 16 18 47 -18 82 -32 98 -72 135 -85 135 -70 158 0 76 38 34 69 -6 29 -6 28;239 340 -3 -19 385 19\",\n  \"[\": \"526;570 652 -126 0 -126 -183 -138 -233 -85 -160 -26 -63 133 0\",\n  \"\\\\\": \"381;44 652 104 -205 66 -170 44 -116 51 -133\",\n  \"]\": \"510;428 655 126 -6 -75 -173 -117 -199 -82 -129 -94 -135 -132 6\",\n  \"^\": \"791;186 662 192 103 107 -107\",\n  \"_\": \"709;-28 -35 702 0\",\n  \"`\": \"406;73 523 129 -79\",\n  \"a\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13\",\n  \"b\": \"416;-31 183 78 69 85 76 101 78 79 70 82 107 22 91 -44 47 -88 -41 -89 -116 -97 -205 -60 -157 -10 -130 10 -18 12 91 82 98 117 72 85 19 31 -38 4 -44 -41 -69 -41 -63 -98 -79 -54 -22 -148 -28\",\n  \"c\": \"346;243 306 -4 44 -41 15 -97 -37 -117 -120 -31 -38 -25 -60 6 -44 19 -41 104 -9 129 41 82 66 47 60\",\n  \"d\": \"381;328 312 -26 44 -44 13 -107 -35 -104 -69 -85 -89 -25 -69 6 -57 70 -34 66 47 97 85 101 104 110 82 145 123 136 135 25 76 -3 41 -51 12 -78 -37 -51 -51 -69 -110 -54 -98 -94 -208 -47 -151 -13 -110 25 -54 44 -15 38 12\",\n  \"e\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48\",\n  \"f\": \"334;-110 -365 50 44 69 227 95 248 94 215 79 148 51 100 91 79 47 22 57 -22 -16 -98 -101 -154 -116 -123 -70 -60 -47 -41 -56 -28 -92 -9 3 25 180 -3 98 12\",\n  \"g\": \"469;306 350 -111 3 -126 -66 -85 -82 -41 -41 -22 -54 19 -53 41 -38 110 50 85 89 89 94 22 22 31 0 -154 -359 -129 -246 -57 -50 -50 -29 -45 -6 -50 35 19 101 69 60 101 88 63 44 173 110 111 88 69 73\",\n  \"h\": \"561;-31 183 144 132 230 167 104 123 22 97 -75 16 -70 -56 -69 -76 -75 -129 -79 -148 -88 -277 97 116 82 104 95 63 41 19 22 -22 -10 -51 -50 -78 -29 -107 23 -57 66 0 63 44 69 66 47 54\",\n  \"i\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;123 476 -28 -38\",\n  \"j\": \"258;-31 183 97 104 38 25 9 -13 -195 -444 -91 -164 -70 -82 -63 -25 -59 10 -22 53 28 66 107 104 183 123 126 92 94 75 76 76;205 482 -38 -38 19 -16\",\n  \"k\": \"356;-31 183 63 69 66 85;73 356 85 0 113 72 110 114 57 85 12 69 -44 32 -88 -32 -69 -79 -66 -119 -57 -104 -107 -255 -38 -126 44 41 88 119 101 111 76 59 50 3;139 249 47 -205 72 -129 104 -63 66 0 29 28 3 19 -3 35\",\n  \"l\": \"261;-25 176 116 89 148 163 107 161 48 73 -13 47 -69 9 -69 -44 -95 -142 -107 -192 -69 -142 -22 -113 28 -60 66 -6 76 35 75 78 35 51\",\n  \"m\": \"687;-31 183 78 72 29 66 -111 -293 73 76 129 148 66 57 47 28 22 3 7 -28 -13 -38 -88 -167 110 88 85 66 88 32 -44 -63 -47 -135 13 -57 59 -19 89 50 94 114\",\n  \"n\": \"580;148 328 -107 -303 142 161 88 94 63 38 47 19 13 -25 -63 -117 -41 -94 3 -54 35 -31 59 9 63 44 63 63 35 51\",\n  \"o\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73\",\n  \"p\": \"356;25 359 -97 -302 -104 -249 -51 -158 -28 -19 164 407 47 -25 129 50 123 72 50 92 10 72 -41 47 -88 -25 -66 -47 -57 -76 -41 -50 -66 -116\",\n  \"q\": \"542;324 334 -100 25 -136 -66 -123 -113 -25 -60 6 -51 23 -41 66 -3 85 51 66 78 129 130 107 132 -50 -10 -117 -315 -116 -296 -10 -145 32 -53 85 0 34 47 13 107 -13 139 -34 145 75 -7 92 51 63 56 31 48\",\n  \"r\": \"369;-31 183 66 104 119 176 -107 -72 0 -26 13 -9 198 -3 -113 -139 -63 -113 16 -79 88 6 110 104 41 51\",\n  \"s\": \"302;-31 183 40 34 26 44 31 67 51 66 132 53 44 7 50 -10 7 -31 -7 -32 -15 -16;54 274 19 -41 88 -50 37 -48 -3 -47 -44 -53 -72 -41 -47 -22 -57 -3 -10 12 0 35 19 19\",\n  \"t\": \"290;-31 183 50 41 35 37 56 76 73 120 34 53 -34 7 -174 -366 -15 -85 25 -44 79 6 94 82 66 73;54 346 204 10\",\n  \"u\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63\",\n  \"v\": \"321;-31 183 88 91 16 38 -4 25 -34 19 -35 0;41 334 -13 -164 -28 -85 0 -76 126 177 98 113 94 82 85 51 44 -13\",\n  \"w\": \"554;69 346 -82 -119 -44 -107 -6 -51 13 -37 47 -13 60 22 63 72 75 114 41 63 29 -3 -60 -111 -10 -91 29 -53 56 -16 111 66 110 123 50 107 0 57 -22 53 -53 13\",\n  \"x\": \"488;-31 183 91 123 66 15 16 -44 16 -75 22 -85 22 -76 69 -28 69 28 57 60 60 82;400 346 -38 -3 -135 -107 -117 -101 -113 -129 -79 -107 -16 -31 -19 -51\",\n  \"y\": \"488;88 312 -85 -79 -34 -47 -16 -54 -7 -47 16 -38 51 -15 56 15 107 104 104 126 54 57 35 -3 -95 -192 -91 -237 -76 -132 -79 -116 -56 -51 -107 3 -32 48 44 94 107 85 139 101 142 75 141 114 51 60\",\n  \"z\": \"551;35 202 50 75 60 54 69 9 88 -25 82 -19 63 22 10 22 -25 16 -35 -22 -57 -54 -214 -195 -66 -63 -57 -13 -16 29 32 28 47 0 51 -25 103 -57 95 -3 69 47 85 89 51 66\",\n  \"{\": \"488;432 668 -133 -25 -66 -98 -6 -101 -38 -60 -57 -15 -69 -7 63 -34 28 -54 -31 -66 -47 -50 -41 -86 38 -75 40 -16 45 -9\",\n  \"|\": \"296;132 684 -6 -712\",\n  \"}\": \"558;372 674 75 -9 35 -38 -10 -60 -40 -57 -35 -66 -28 -60 50 -22 63 -6 -107 -41 -51 -41 -22 -47 -9 -82 -38 -69 -94 -95 -41 -9 -92 -3\",\n  \"~\": \"491;161 463 34 35 51 0 75 -26 63 -25 22 22 16 13\",\n  \" \": \"378\",\n  \"¡\": \"359;110 41 41 72 107 230 63 148;350 643 22 22\",\n  \"¢\": \"266;243 306 -4 44 -41 15 -97 -37 -117 -120 -31 -38 -25 -60 6 -44 19 -41 104 -9 129 41 82 66 47 60;119 530 -6 -641\",\n  \"£\": \"942;449 411 335 24;1002 709 15 97 -22 57 -75 32 -79 -26 -88 -50 -82 -107 -63 -132 -47 -158 -70 -205 -59 -78 -92 -98 -154 -32 -85 23 -35 31 13 66 82 44 82 3 100 -37 120 -63 120 -51 107 -12 116 28 67 41 41 63\",\n  \"¥\": \"510;54 662 56 -193 54 -91 60 -57 56 -9 60 22 73 79 56 91 22 85 7 50 -35 26 -44 -10 -35 -44 -41 -101 -15 -119 -22 -123 0 -173 9 -148;186 135 230 0;186 261 230 0\",\n  \"¦\": \"91;290 220 3 -78 -8 -74 -6 -53 -6 -30 -6 -23;290 693 3 -79 -8 -73 -6 -53 -6 -31 -6 -22\",\n  \"¨\": \"567;299 531 -15 -25;516 481 -16 -25\",\n  \"©\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;369 339 53 4 62 35 45 43 21 40 -10 37 -38 15 -94 -25 -63 -42 -69 -79 -35 -69 -14 -74 23 -54 65 -28 79 8 64 25 60 39 36 38\",\n  \"ª\": \"263;405 721 -19 -25 -25 -27 -38 -23 -30 -7 -14 23 6 39 21 66 -10 -16 -50 -49 -54 -44 -44 -19 -22 24 3 44 46 54 57 34 40 13 41 0 7 -6\",\n  \"«\": \"270;156 449 -116 -227 27 -73 16 -43 18 -58;282 449 -116 -227 27 -73 16 -43 18 -58\",\n  \"®\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;438 444 -40 -5 -31 -31 -8 -32 -24 -52 -42 -67 -27 -57 -6 -25 9 -16 19 8 11 9 3 4;230 342 -27 25 -3 38 16 33 53 38 57 17 66 13 76 -2 56 -6 51 -32 20 -41 -12 -44 -55 -41 -62 -22 -61 -19 -49 -1 -66 6 -2 11 57 -43 35 -56 58 -70 64 -47 68 -30 60 0 32 19 12 19 3 17\",\n  \"°\": \"306;153 665 0 2 15 47 30 33 44 24 33 11 32 -1 30 -5 26 -21 12 -30 4 -22 -5 -39 -14 -37 -27 -36 -29 -24 -28 -13 -47 -3 -33 16 -19 39 3 50 17 31 25 30 26 13 19 10 13 0 13 -2\",\n  \"±\": \"585;582 0 182 5;534 383 388 0;801 534 -148 -332\",\n  \"²\": \"351;257 876 -2 4 0 18 46 33 42 14 51 6 50 -11 24 -17 14 -38 -16 -39 -39 -43 -52 -41 -43 -30 -44 -28 -31 -17 -14 -8 -24 -16 -10 -9 -23 -16 0 16 12 17 19 6 33 -1 35 -13 22 -14 52 -21 55 -1 29 12 23 19 6 15\",\n  \"³\": \"332;277 879 8 35 33 25 43 11 36 1 39 -9 24 -30 1 -33 -9 -19 -22 -19 -17 -14 -37 -8 -37 -6 -26 -10 -6 5 -3 14 38 -3 56 -11 27 -9 16 -24 5 -41 -11 -32 -30 -33 -33 -23 -38 -16 -66 -9 -36 4 -23 14 -14 27 5 19 8 11\",\n  \"´\": \"378;306 565 -129 -78\",\n  \"·\": \"268;249 340 -18 -30\",\n  \"¹\": \"189;243 855 45 36 27 34 20 28 15 0 -49 -109 -47 -108 -19 -56 -5 -31;161 635 31 11 32 0 36 3 39 -2\",\n  \"º\": \"306;153 665 0 2 15 47 30 33 44 24 33 11 32 -1 30 -5 26 -21 12 -30 4 -22 -5 -39 -14 -37 -27 -36 -29 -24 -28 -13 -47 -3 -33 16 -19 39 3 50 17 31 25 30 26 13 19 10 13 0 13 -2\",\n  \"»\": \"284;101 444 30 -94 25 -50 -39 -76 -48 -93 -35 -68;227 444 30 -94 25 -50 -39 -76 -48 -93 -35 -68\",\n  \"¼\": \"898;102 648 55 44 32 39 25 34 17 0 -59 -130 -57 -130 -22 -67 -6 -37;4 384 38 13 37 0 44 4 47 -2;639 655 -229 -299 -126 -173 -101 -161;618 -4 15 61 32 92 59 129 51 104 -79 -66 -80 -63 -81 -49 -40 -34 -24 -36 32 17 22 10 57 0 47 -2 44 -10 45 0 49 19 23 15 15 19\",\n  \"½\": \"1037;102 648 55 44 32 39 25 34 17 0 -59 -130 -57 -130 -22 -67 -6 -37;4 384 38 13 37 0 44 4 47 -2;639 655 -229 -299 -126 -173 -101 -161;592 295 -2 6 0 20 54 40 52 17 60 8 60 -14 29 -20 17 -46 -19 -47 -47 -51 -63 -49 -51 -36 -53 -34 -37 -21 -17 -9 -29 -19 -11 -12 -28 -19 0 19 15 21 22 8 40 -2 42 -15 26 -17 62 -25 67 -2 34 15 28 23 7 17\",\n  \"¾\": \"1173;144 677 9 41 40 30 51 14 43 2 48 -12 28 -36 2 -39 -12 -23 -26 -23 -21 -17 -43 -9 -46 -8 -30 -11 -7 6 -4 17 45 -4 68 -13 32 -12 19 -28 6 -49 -13 -38 -36 -40 -40 -28 -45 -19 -80 -11 -43 5 -27 17 -17 32 6 23 10 13;639 655 -229 -299 -126 -173 -101 -161;618 -4 15 61 32 92 59 129 51 104 -79 -66 -80 -63 -81 -49 -40 -34 -24 -36 32 17 22 10 57 0 47 -2 44 -10 45 0 49 19 23 15 15 19\",\n  \"¿\": \"564;466 167 -12 -41 -22 -22 -73 -41 -63 -31 -104 3 -57 41 -28 91 32 85 44 63 60 47 47 29 69 56 32 44 12 32;476 671 22 25\",\n  \"À\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;722 934 129 -79\",\n  \"Á\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;1056 959 -129 -78\",\n  \"Â\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;827 880 120 65 67 -67\",\n  \"Ã\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;923 875 28 28 42 0 62 -20 52 -21 18 18 13 10\",\n  \"Ä\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;771 933 -16 -25;973 943 -16 -25\",\n  \"Å\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;897 949 0 2 15 47 29 32 45 25 33 10 32 -1 30 -5 26 -20 12 -31 4 -21 -5 -39 -14 -38 -28 -36 -28 -24 -28 -13 -48 -3 -33 16 -19 39 4 50 16 32 26 30 25 13 20 9 12 0 14 -1\",\n  \"È\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47;428 944 129 -78\",\n  \"É\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47;740 959 -129 -79\",\n  \"Ê\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47;450 920 124 67 68 -69\",\n  \"Ë\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47;494 896 -16 -26;800 904 -16 -25\",\n  \"Ì\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25;276 947 129 -79\",\n  \"Í\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25;591 978 -129 -79\",\n  \"Î\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25;359 904 123 66 69 -68\",\n  \"Ï\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25;414 923 -16 -25;639 903 -16 -25\",\n  \"Ð\": \"1033;306 284 272 7;652 554 -107 -47 -73 -104 -18 -69 -67 -148 -37 -79 -48 -98 -37 -53 -29 6 -31 70 -3 81 12 95 19 -63 142 -110 135 -44 218 34 135 88 113 107 57 152 -12 160 -70 95 -123 53 -220 26 -195 -35 -152 -57 -107 -66 -59 -88 -10 -76 41 -63 63 -28\",\n  \"Ñ\": \"932;-230 -38 19 -53 57 -35 88 19 104 72 91 142 85 164 60 161 47 129 29 97 9 -330 22 -139 66 -154 60 -54 66 -16 70 35 88 129 57 145 37 198 7 117 -13 57 -22 63 47 -66 29 -38 25 -19 28 -16;158 513 12 4 88 41 35 37 35 63;158 513 12 4 88 41 35 37 35 63;498 861 28 28 41 0 61 -20 52 -21 18 18 12 11\",\n  \"Ò\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;469 930 129 -78\",\n  \"Ó\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;762 942 -129 -79\",\n  \"Ô\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;442 899 122 65 67 -67\",\n  \"Õ\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;405 825 27 27 39 0 59 -19 49 -20 17 17 12 10\",\n  \"Ö\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;548 899 -15 -25;798 937 -15 -25\",\n  \"×\": \"324;88 369 44 12 26 16 22 -54 40 -129 26 -129 19 -53 -4 -19;365 397 -3 9 -75 -72 -117 -126 -88 -107 -63 -76 -38 -50 -19 -41\",\n  \"Ø\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;778 757 -310 -404 -170 -234 -136 -217\",\n  \"Ù\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15;452 940 129 -79\",\n  \"Ú\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15;650 983 -129 -79\",\n  \"Û\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15;381 864 117 63 65 -65\",\n  \"Ü\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15;448 934 -15 -25;670 922 -15 -25\",\n  \"Ý\": \"627;28 482 7 3 85 38 75 60 57 63 25 19 10 3 -57 -114 -88 -160 -73 -164 -12 -76 -7 -78 35 -60 73 0 75 38 101 91 69 75 60 86 79 110 53 94 26 76 41 63 53 25 44 6 -75 -47 -51 -57 -50 -176 -57 -195 -69 -211 -51 -107 -60 -98 -50 -73 -63 -62 -85 -54 -79 -13 -37 13 -29 50 3 54 32 63 69 82 98 91 126 69 85 32 154 50 28 0;626 979 -129 -79\",\n  \"à\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;91 581 129 -79\",\n  \"á\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;358 573 -129 -79\",\n  \"â\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;109 472 112 61 63 -63\",\n  \"ã\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;154 503 28 28 40 0 60 -20 51 -20 17 17 13 11\",\n  \"ä\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;271 520 -15 -25;473 534 -15 -25\",\n  \"å\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;200 665 0 2 15 47 30 33 44 24 33 11 32 -1 31 -5 25 -21 12 -30 4 -22 -5 -39 -14 -37 -27 -36 -28 -24 -29 -13 -47 -3 -33 16 -19 39 4 50 16 31 25 30 26 13 20 10 12 0 13 -2\",\n  \"è\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48;-17 600 129 -79\",\n  \"é\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48;293 596 -129 -79\",\n  \"ê\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48;70 519 121 66 68 -68\",\n  \"ë\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48;125 497 -15 -25;400 477 -16 -25\",\n  \"ì\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;-56 597 129 -79\",\n  \"í\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;223 582 -129 -79\",\n  \"î\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;36 524 124 67 68 -69\",\n  \"ï\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;117 495 -16 -25;388 486 -15 -25\",\n  \"ñ\": \"580;148 328 -107 -303 142 161 88 94 63 38 47 19 13 -25 -63 -117 -41 -94 3 -54 35 -31 59 9 63 44 63 63 35 51;170 533 30 29 42 0 64 -21 54 -21 18 18 14 11\",\n  \"ò\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;19 586 129 -79\",\n  \"ó\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;311 577 -129 -79\",\n  \"ô\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;73 458 106 57 59 -59\",\n  \"õ\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;42 457 26 26 38 0 57 -19 47 -19 17 17 11 9\",\n  \"ö\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;186 515 -16 -25;412 491 -16 -25\",\n  \"÷\": \"666;429 472 -16 -25;443 220 -16 -25;241 331 340 6\",\n  \"ø\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;293 437 -161 -210 -88 -121 -70 -113\",\n  \"ù\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63;68 594 129 -78\",\n  \"ú\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63;357 572 -130 -79\",\n  \"û\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63;114 520 124 67 69 -69\",\n  \"ü\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63;239 519 -16 -25;499 513 -16 -26\",\n  \"ý\": \"488;88 312 -85 -79 -34 -47 -16 -54 -7 -47 16 -38 51 -15 56 15 107 104 104 126 54 57 35 -3 -95 -192 -91 -237 -76 -132 -79 -116 -56 -51 -107 3 -32 48 44 94 107 85 139 101 142 75 141 114 51 60;353 589 -130 -78\",\n  \"ÿ\": \"488;88 312 -85 -79 -34 -47 -16 -54 -7 -47 16 -38 51 -15 56 15 107 104 104 126 54 57 35 -3 -95 -192 -91 -237 -76 -132 -79 -116 -56 -51 -107 3 -32 48 44 94 107 85 139 101 142 75 141 114 51 60;253 479 -16 -25;477 497 -15 -26\",\n  \"–\": \"666;241 236 340 7\",\n  \"—\": \"888;321 236 454 7\",\n  \"“\": \"366;103 669 59 -71;245 669 58 -71\",\n  \"”\": \"366;147 612 -58 -71;289 612 -58 -71\",\n  \"‹\": \"180;156 449 -116 -227 27 -73 16 -43 18 -58\",\n  \"›\": \"189;101 444 30 -94 25 -50 -39 -76 -48 -93 -35 -68\",\n  \"€\": \"706;595 554 7 4 15 28 -9 66 -63 50 -85 13 -132 -13 -111 -63 -82 -85 -59 -138 -13 -123 28 -139 70 -69 94 -50 107 -13 117 19 101 47 47 32 35 44 0 16;80 354 -28 -33 288 10;80 543 -28 -33 288 10\",\n  \"Ÿ\": \"627;28 482 7 3 85 38 75 60 57 63 25 19 10 3 -57 -114 -88 -160 -73 -164 -12 -76 -7 -78 35 -60 73 0 75 38 101 91 69 75 60 86 79 110 53 94 26 76 41 63 53 25 44 6 -75 -47 -51 -57 -50 -176 -57 -195 -69 -211 -51 -107 -60 -98 -50 -73 -63 -62 -85 -54 -79 -13 -37 13 -29 50 3 54 32 63 69 82 98 91 126 69 85 32 154 50 28 0;364 923 -16 -25;618 928 -15 -25\",\n  \"Ă\": \"1062;-9 41 18 -57 57 -41 88 -9 120 41 132 104 123 126 133 154 75 104 76 95 69 78 57 63 19 7 -82 -136 -79 -224 -44 -157 -3 -91 25 -79 44 -16 91 51 76 72 44 54;129 161 3 85 35 56 82 29 75 3 117 -22 72 -16 139 -16 161 -19 88 0 28 13 29 19;1022 1035 -4 -7 -12 -18 -22 -24 -32 -24 -42 -18 -54 -7 -52 7 -36 19 -24 25 -13 24 -6 19 -2 8\",\n  \"Ĕ\": \"850;662 580 6 -76 -79 158 -88 56 -101 -12 -76 -85 4 -95 37 -98 41 -56 38 -51 60 -15 3 31 -41 13 -107 -4 -179 -25 -139 -104 -44 -110 47 -98 126 -59 148 3 180 25 145 60 113 75 47 67 7 25 -4 47;755 1038 -4 -8 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 19 -24 24 -13 25 -6 19 -2 8\",\n  \"Ğ\": \"951;825 639 -44 57 -50 22 -110 0 -167 -41 -126 -69 -120 -91 -73 -98 -47 -82 -22 -91 13 -85 47 -66 88 -51 110 -12 148 40 108 70 119 91 54 51 22 28 60 41 19 19 -32 -10 -53 -91 -92 -312 -104 -167 -107 -145 -101 -53 -94 -7 -44 38 0 73 38 82 100 103 130 86 113 59 123 41 31 7 85 15;787 1066 -4 -8 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 19 -24 24 -13 25 -6 19 -2 8\",\n  \"Ĭ\": \"548;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25;659 1023 -4 -7 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 18 -24 25 -13 25 -6 19 -2 7\",\n  \"Ŏ\": \"850;38 328 0 6 50 157 98 107 148 82 110 35 107 -3 101 -16 85 -69 41 -101 13 -72 -16 -130 -47 -126 -92 -119 -94 -79 -95 -44 -157 -9 -110 53 -63 129 12 167 54 104 85 101 85 44 66 31 41 0 44 -6;755 1038 -4 -8 -12 -18 -22 -23 -32 -24 -42 -18 -54 -7 -52 7 -36 19 -24 24 -13 25 -6 19 -2 8\",\n  \"Ŭ\": \"671;9 476 10 6 85 38 63 50 66 60 16 32 31 0 -72 -104 -104 -227 -50 -111 -19 -103 22 -85 72 -23 95 32 119 82 161 154 117 142 81 129 41 98 -6 63 -41 22 -50 -19 -51 -28 -47 -82 -35 -104 -34 -139 -35 -173 -22 -139 3 -104 16 -82 22 -41 35 -15 31 -3 29 15;698 1068 -4 -8 -12 -18 -22 -23 -32 -24 -42 -18 -54 -7 -52 7 -36 19 -24 24 -13 25 -6 19 -2 8\",\n  \"ă\": \"526;495 183 -38 -51 -51 -53 -75 -47 -60 -13 -28 44 12 79 41 132 -19 -31 -101 -98 -107 -88 -88 -38 -44 47 6 88 92 107 113 70 82 25 82 0 12 -13;452 690 -4 -7 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 19 -24 24 -13 25 -6 19 -2 7\",\n  \"ĕ\": \"346;66 170 82 41 69 38 35 57 -13 44 -59 6 -117 -69 -47 -35 -51 -60 -31 -53 -6 -51 22 -44 82 -35 138 35 44 38 63 53 38 48;395 638 -4 -7 -12 -18 -22 -24 -32 -23 -42 -19 -54 -7 -52 7 -36 19 -24 25 -13 24 -6 20 -2 7\",\n  \"ğ\": \"469;306 350 -111 3 -126 -66 -85 -82 -41 -41 -22 -54 19 -53 41 -38 110 50 85 89 89 94 22 22 31 0 -154 -359 -129 -246 -57 -50 -50 -29 -45 -6 -50 35 19 101 69 60 101 88 63 44 173 110 111 88 69 73;434 654 -4 -7 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 18 -24 25 -13 25 -6 19 -2 7\",\n  \"ĭ\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54;364 646 -4 -7 -12 -18 -22 -24 -32 -23 -42 -19 -54 -7 -52 7 -36 19 -24 25 -13 25 -6 19 -2 7\",\n  \"ŏ\": \"391;195 337 -53 28 -76 -50 -72 -82 -35 -72 -16 -85 70 -67 88 32 82 69 47 98 9 38 0 38 -19 0;167 158 16 -57 31 -29 41 4 41 34 63 73;409 656 -4 -7 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 18 -24 25 -13 25 -6 19 -2 7\",\n  \"ŭ\": \"495;47 309 -66 -92 -35 -94 -3 -66 48 -29 88 26 66 85 82 100 66 114 31 -10 -110 -179 -9 -66 -3 -44 53 -32 66 19 92 79 50 63;442 650 -4 -7 -12 -18 -22 -23 -32 -24 -42 -18 -54 -8 -52 8 -36 18 -24 25 -13 25 -6 19 -2 7\",\n  \"Ć\": \"690;296 362 107 10 123 69 91 85 41 82 -19 72 -75 32 -189 -50 -126 -86 -139 -157 -69 -139 -28 -148 47 -107 129 -56 157 15 130 51 119 78 73 76;688 953 -129 -79\",\n  \"ć\": \"346;243 306 -4 44 -41 15 -97 -37 -117 -120 -31 -38 -25 -60 6 -44 19 -41 104 -9 129 41 82 66 47 60;271 565 -129 -79\",\n  \"Đ\": \"1033;306 284 272 7;652 554 -107 -47 -73 -104 -18 -69 -67 -148 -37 -79 -48 -98 -37 -53 -29 6 -31 70 -3 81 12 95 19 -63 142 -110 135 -44 218 34 135 88 113 107 57 152 -12 160 -70 95 -123 53 -220 26 -195 -35 -152 -57 -107 -66 -59 -88 -10 -76 41 -63 63 -28\",\n  \"đ\": \"381;344 548 272 8;328 312 -26 44 -44 13 -107 -35 -104 -69 -85 -89 -25 -69 6 -57 70 -34 66 47 97 85 101 104 110 82 145 123 136 135 25 76 -3 41 -51 12 -78 -37 -51 -51 -69 -110 -54 -98 -94 -208 -47 -151 -13 -110 25 -54 44 -15 38 12\",\n  \"Č\": \"690;296 362 107 10 123 69 91 85 41 82 -19 72 -75 32 -189 -50 -126 -86 -139 -157 -69 -139 -28 -148 47 -107 129 -56 157 15 130 51 119 78 73 76;639 908 -116 -62 -64 64\",\n  \"č\": \"346;243 306 -4 44 -41 15 -97 -37 -117 -120 -31 -38 -25 -60 6 -44 19 -41 104 -9 129 41 82 66 47 60;362 592 -116 -62 -64 64\",\n  \"Š\": \"706;693 580 28 41 0 47 -56 41 -145 -19 -170 -54 -82 -78 -3 -73 97 -47 155 -47 100 -54 41 -60 -6 -53 -35 -54 -94 -72 -151 -63 -205 -41 -104 15 -35 38 -9 82 35 73 63 53 72 38 104 31;656 878 -115 -62 -65 64\",\n  \"š\": \"302;-31 183 40 34 26 44 31 67 51 66 132 53 44 7 50 -10 7 -31 -7 -32 -15 -16;54 274 19 -41 88 -50 37 -48 -3 -47 -44 -53 -72 -41 -47 -22 -57 -3 -10 12 0 35 19 19;345 608 -116 -63 -64 64\",\n  \"Ž\": \"627;145 554 -10 57 45 51 75 31 126 6 120 -9 94 -16 79 -25 60 -16 54 16 34 19 13 34 -32 7 -44 -25 -38 -38 -126 -107 -138 -139 -95 -110 -60 -66 -75 -76 -63 -44 -57 -41 -50 -25 -38 -10 -19 26 16 18 47 -18 82 -32 98 -72 135 -85 135 -70 158 0 76 38 34 69 -6 29 -6 28;239 340 -3 -19 385 19;605 910 -116 -62 -64 64\",\n  \"ž\": \"551;35 202 50 75 60 54 69 9 88 -25 82 -19 63 22 10 22 -25 16 -35 -22 -57 -54 -214 -195 -66 -63 -57 -13 -16 29 32 28 47 0 51 -25 103 -57 95 -3 69 47 85 89 51 66;451 603 -115 -62 -64 64\",\n  \"ß\": \"440;76 200 -8 -19 -20 -47 -24 -58 -22 -54 -12 -35 5 0 21 44 16 53 15 61 15 70 21 78 29 86 24 60 28 58 27 53 27 49 23 43 17 36 28 40 31 8 30 -17 23 -37 13 -49 -2 -56 -30 -59 -58 -58 -64 -51 -51 -36 -17 -16 36 11 72 14 66 -9 49 -34 20 -58 -22 -81 -76 -106 -99 -75 -83 -6 -65 39 -47 57 -29 53 -10 23\",\n  \"ş\": \"302;54 -17 1 -7 1 -7 1 -7 1 -7 0 -6 0 -7 -1 -7 -2 -10 -4 -11 -4 -10 -4 -9 -4 -7 -6 -6 -9 -7 -11 -5 -11 -5 -11 -3 -11 0;-31 183 14 11 13 11 11 13 10 13 9 15 9 15 9 26 9 23 11 22 13 21 18 20 22 21 28 19 29 13 28 10 24 7 17 3 6 1 2 1 6 1 8 2 10 1 9 2 9 0 9 0 9 -1 9 -1 9 -1 8 -3 6 -4 4 -6 2 -6 1 -7 0 -6 0 -4 0 -2 -2 -12 -2 -9 -2 -6 -3 -6 -5 -7 -8 -8;54 274 10 -23 15 -17 19 -14 21 -12 21 -12 21 -13 17 -14 13 -15 7 -14 3 -15 -1 -17 -5 -20 -25 -38 -50 -37 -60 -28 -56 -13 -36 8 -3 36 3 4 4 5 4 4 4 3 3 2 1 1\",\n  \"Ç\": \"690;234 -25 0 -30 0 -6 0 -6 0 -5 0 -6 -1 -6 0 -5 -4 -12 -5 -14 -8 -16 -8 -16 -9 -14 -7 -9 -11 -9 -16 -8 -18 -8 -19 -5 -19 -2 -17 1;296 362 107 10 123 69 91 85 41 82 -19 72 -75 32 -189 -50 -126 -86 -139 -157 -69 -139 -28 -148 47 -107 129 -56 157 15 130 51 119 78 73 76\",\n  \"æ\": \"660;366 170 43 23 46 29 42 30 33 32 16 30 -6 27 -38 8 -65 -22 -74 -45 -70 -60 -48 -70 -12 -71 30 -50 59 -16 77 13 81 36 76 54 59 65;242 146 8 20 10 22 10 21 10 22 9 22 7 21 -47 -58 -57 -59 -61 -55 -62 -44 -57 -26 -47 -2 -28 21 -5 37 12 45 25 48 31 45 35 35 40 30 50 29 56 24 55 15 49 1 39 -17\",\n  \"Ş\": \"706;230 8 -3 -30 -1 -6 0 -6 -1 -5 0 -6 -1 -5 -1 -6 -5 -11 -7 -14 -9 -15 -9 -15 -10 -13 -9 -9 -11 -7 -17 -7 -18 -6 -20 -3 -19 -1 -17 3;693 580 28 41 0 47 -56 41 -145 -19 -170 -54 -82 -78 -3 -73 97 -47 155 -47 100 -54 41 -60 -6 -53 -35 -54 -94 -72 -151 -63 -205 -41 -104 15 -35 38 -9 82 35 73 63 53 72 38 104 31\",\n  \"İ\": \"548;543 816 -28 -38;501 693 -91 -280 -76 -189 -54 -98 -60 -76 -53 -22 -69 -9 -89 6 -15 25 28 22 44 -31 51 -9 330 6;233 450 -57 73 26 79 75 63 117 19 129 -7 75 -3 67 -25\",\n  \"˘\": \"791;485 761 -4 -7 -12 -18 -22 -24 -32 -23 -42 -19 -54 -7 -52 7 -36 19 -24 25 -13 24 -6 19 -2 8\",\n  \"Æ\": \"1330;89 316 156 12 156 5 155 1 156 -3 156 -5 156 -5;1097 544 -5 35 2 28 8 25 15 23 24 25 32 31 -94 -4 -103 2 -103 1 -96 -7 -78 -22 -53 -43;-44 -101 11 30 31 77 43 106 52 116 54 109 52 82 49 63 48 59 49 54 47 48 45 38 42 28 50 21 40 9 32 0 24 -9 15 -16 6 -22 -17 -101 -36 -107 -43 -107 -37 -107 -19 -101 10 -94 15 -34 18 -27 21 -21 25 -17 32 -16 40 -15 48 -13 58 -7 63 -1 65 4 63 8 57 12 57 21 60 30 57 34 48 31 34 24 12 9\",\n  \"ı\": \"249;-31 183 69 53 22 92 -98 -243 19 -63 73 -16 78 63 51 60 34 54\",\n  \"ç\": \"346;99 28 0 -23 0 -4 0 -4 0 -4 0 -5 -1 -4 0 -4 -2 -8 -4 -11 -5 -12 -6 -12 -6 -10 -5 -7 -7 -7 -10 -6 -13 -5 -13 -4 -12 -2 -12 1;243 306 -4 44 -41 15 -97 -37 -117 -120 -31 -38 -25 -60 6 -44 19 -41 104 -9 129 41 82 66 47 60\",\n  \"¸\": \"690;234 -25 0 -30 0 -6 0 -6 0 -5 0 -6 -1 -6 0 -5 -4 -12 -5 -14 -8 -16 -8 -16 -9 -14 -7 -9 -11 -9 -16 -8 -18 -8 -19 -5 -19 -2 -17 1\",\n};\n"},{"path":"registry/ui-interaction-motion.ts","type":"registry:component","content":"// Hairline UI · light-writing · MIT License\n// Copyright (c) 2026 Hairline UI · https://hairlineui.com/license#components\n\n'use client';\n\nimport * as React from 'react';\n\nexport const EASE_OUT = 'cubic-bezier(0.16, 1, 0.3, 1)';\nexport const EASE_SETTLE = 'cubic-bezier(0.22, 1.18, 0.36, 1)';\n/** Thrown things (indicators, thumbs): a slight overshoot on transform only. */\nexport const EASE_THROW = 'cubic-bezier(0.34, 1.36, 0.64, 1)';\n/**\n * The press every button primitive shares: a 3% give that eases in and settles back.\n * Tailwind v4's scale-* writes the `scale` property, so `scale` has to be in the list\n * or the press snaps.\n */\nexport const INTERACTION_PRESS =\n  'transition-[background-color,color,box-shadow,opacity,scale] duration-200 ease-[cubic-bezier(0.16,1,0.3,1)] active:scale-[0.97] motion-reduce:transition-none motion-reduce:active:scale-100';\nexport const INTERACTION_FOCUS ='focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/50 focus-visible:ring-offset-2 focus-visible:ring-offset-background';\n\nconst query = '(prefers-reduced-motion: reduce)';\nconst subscribe = (notify: () => void) => {\n  const media = window.matchMedia(query);\n  media.addEventListener('change', notify);\n  return () => media.removeEventListener('change', notify);\n};\nexport const useInteractionReducedMotion = () => React.useSyncExternalStore(subscribe, () => window.matchMedia(query).matches, () => false);\n\nexport function useInteractionActivity<T extends Element>() {\n  const ref = React.useRef<T>(null);\n  const [visible, setVisible] = React.useState(false);\n  const [hidden, setHidden] = React.useState(false);\n  React.useEffect(() => {\n    const el = ref.current;\n    if (!el) return;\n    const observer = new IntersectionObserver(([entry]) => setVisible(entry.isIntersecting));\n    observer.observe(el);\n    const visibility = () => setHidden(document.hidden);\n    visibility(); document.addEventListener('visibilitychange', visibility);\n    return () => { observer.disconnect(); document.removeEventListener('visibilitychange', visibility); };\n  }, []);\n  return { ref, active: visible && !hidden };\n}\n\nexport function interactionIcon(on: boolean, reduced: boolean): React.CSSProperties {\n  return { opacity: on ? 1 : 0, transform: on ? 'none' : 'scale(0.6)', filter: on ? 'blur(0px)' : 'blur(3px)', transition: reduced ? 'none' : `opacity 220ms ${EASE_OUT}, transform 380ms ${EASE_OUT}, filter 220ms ${EASE_OUT}` };\n}\n\n/** A raised object: one tight contact shadow, one short ambient, a hairline of light on its top edge. */\nexport const MATERIAL_LIFT =\n  'shadow-[0_1px_1.5px_rgb(0_0_0/0.07),0_3px_8px_-2px_rgb(0_0_0/0.1),inset_0_0.5px_0_rgb(255_255_255/0.8)] dark:shadow-[0_1px_2px_rgb(0_0_0/0.5),0_4px_10px_-2px_rgb(0_0_0/0.35),inset_0_0.5px_0_rgb(255_255_255/0.1)]';\n/** A trough something sits in, shaded from above, lit along its bottom edge. */\nexport const MATERIAL_RECESS =\n  'shadow-[inset_0_1px_2.5px_rgb(0_0_0/0.09),inset_0_-0.5px_0_rgb(255_255_255/0.7)] dark:shadow-[inset_0_1px_3px_rgb(0_0_0/0.45),inset_0_-0.5px_0_rgb(255_255_255/0.07)]';\n\nexport type SpringConfig = { stiffness: number; damping: number; mass?: number };\nexport interface Spring {\n  get(): number;\n  getVelocity(): number;\n  getTarget(): number;\n  /** Aim somewhere new from wherever it is now, keeping its speed. */\n  set(target: number): void;\n  /** Add speed (units per second), on top of what it already has. */\n  push(velocity: number): void;\n  /** Be there now, at rest. */\n  jump(value: number): void;\n  configure(config: SpringConfig): void;\n  stop(): void;\n}\n\n// Every moving spring on the page shares one frame loop, which sleeps when the last one rests. Each spring's onFrame runs\n// once per frame after all of them have stepped, so several springs that draw one shape paint it once.\nconst SPRING_STEP = 1 / 240;\ntype Running = { step: () => void };\nconst runningSprings = new Set<Running>();\nconst springPainters = new Set<() => void>();\nlet springFrame = 0;\nlet springLast = 0;\nlet springSpare = 0;\n\nfunction springTick(now: number) {\n  // A hidden tab stops the frames, so the first one back must not count the whole gap as time passed.\n  springSpare += Math.min((now - springLast) / 1000, 0.05);\n  springLast = now;\n  while (springSpare >= SPRING_STEP) {\n    runningSprings.forEach((spring) => spring.step());\n    springSpare -= SPRING_STEP;\n  }\n  const painters = [...springPainters];\n  springPainters.clear();\n  painters.forEach((paint) => paint());\n  springFrame = runningSprings.size ? requestAnimationFrame(springTick) : 0;\n}\n\nfunction wakeSprings(spring: Running) {\n  runningSprings.add(spring);\n  if (springFrame) return;\n  springSpare = 0;\n  springFrame = requestAnimationFrame((now) => {\n    springLast = now - 1000 / 60;\n    springTick(now);\n  });\n}\n\n/**\n * A spring that carries its speed: re-aim it mid-flight and it curves on from where it is, push it while it swings and the\n * push adds to the swing. Use it for anything that can be interrupted; a curve restarts from a standstill every time.\n * `onFrame` should write straight to the DOM. `precision` is how close counts as there, in the value's own units.\n */\nexport function createSpring(initial: number, config: SpringConfig, onFrame: () => void, precision = 0.01): Spring {\n  let value = initial;\n  let velocity = 0;\n  let target = initial;\n  let { stiffness, damping, mass = 1 } = config;\n  const running: Running = {\n    step() {\n      velocity += ((-stiffness * (value - target) - damping * velocity) / mass) * SPRING_STEP;\n      value += velocity * SPRING_STEP;\n      if (Math.abs(value - target) < precision && Math.abs(velocity) < precision * 10) {\n        value = target;\n        velocity = 0;\n        runningSprings.delete(running);\n      }\n      springPainters.add(onFrame);\n    },\n  };\n  return {\n    get: () => value,\n    getVelocity: () => velocity,\n    getTarget: () => target,\n    set(next) {\n      if (next === target && !runningSprings.has(running)) return;\n      target = next;\n      wakeSprings(running);\n    },\n    push(speed) {\n      velocity += speed;\n      wakeSprings(running);\n    },\n    jump(next) {\n      value = next;\n      target = next;\n      velocity = 0;\n      runningSprings.delete(running);\n      onFrame();\n    },\n    configure(next) {\n      ({ stiffness, damping, mass = 1 } = next);\n    },\n    stop() {\n      runningSprings.delete(running);\n    },\n  };\n}\n\n/** Sample recent movement rather than averaging a long drag and losing its release velocity. */\nexport type PointerSample = { x: number; time: number };\nexport function samplePointer(samples: PointerSample[], x: number, time: number) {\n  samples.push({ x, time });\n  while (samples.length > 2 && time - samples[0].time > 100) samples.shift();\n}\nexport function releaseVelocity(samples: PointerSample[], now: number) {\n  if (samples.length < 2 || now - samples[samples.length - 1].time > 100) return 0;\n  const first = samples[0], last = samples[samples.length - 1];\n  return (last.x - first.x) / Math.max(1, last.time - first.time);\n}\n\n/** Smooth Apple/rational rubber-band curve: continuous exponential-like resistance without linear kinks. */\nexport function rubberBand(overshoot: number, dimension = 320, constant = 0.55): number {\n  const d = dimension || 320;\n  const abs = Math.abs(overshoot);\n  return Math.sign(overshoot) * (1 - 1 / ((abs * constant) / d + 1)) * d;\n}\n\n/** Projects resting travel from release velocity (velocity in px/ms; time in seconds). */\nexport function projectInertia(distance: number, velocity: number, time = 0.12): number {\n  return distance + velocity * 1000 * time;\n}\n\n/** Smooths incoming release velocity toward a boundary so springs don't slam or clip into walls. */\nexport function softenVelocity(velocity: number, distanceToTarget: number, factor = 10): number {\n  const maxAllowed = Math.abs(distanceToTarget) * factor;\n  return Math.sign(velocity) * Math.min(Math.abs(velocity), maxAllowed);\n}\n\n/** A damped spring sampled by WAAPI: tuned for organic lightness with a hint of life (3% breath). */\nexport function springFrames(\n  from: number,\n  to: number,\n  velocity = 0,\n  duration = 480,\n  config: { omega?: number; damping?: number; steps?: number } = {},\n) {\n  const { omega = 16, damping = 0.74, steps = 36 } = config;\n  const damped = omega * Math.sqrt(Math.max(0.001, 1 - damping * damping));\n  const displacement = from - to;\n  const coefficient = (velocity * 1000 + damping * omega * displacement) / damped;\n  return Array.from({ length: steps + 1 }, (_, i) => {\n    const t = (i / steps) * (duration / 1000);\n    const value = to + Math.exp(-damping * omega * t) * (displacement * Math.cos(damped * t) + coefficient * Math.sin(damped * t));\n    return { value: i === steps ? to : value, offset: i / steps };\n  });\n}\n\n"}],"css":{},"docs":"Docs and live preview: https://hairlineui.com/ui/light-writing. MIT licensed: https://hairlineui.com/license#components","meta":{"license":"MIT"}}