A Claude Code skill that reverse-engineers any animation frame by frame, then proves the copy moves the same.
Add the Clerk and WorkOS examples and WebGL tracing
NiazMorshed20070d995d55fcc2
diff --git a/.github/assets/bento-clone.webp b/.github/assets/bento-clone.webpdeleted file mode 100644index 39bcbfb..0000000Binary files a/.github/assets/bento-clone.webp and /dev/null differdiff --git a/.github/assets/entrance-compare.webp b/.github/assets/entrance-compare.webpdeleted file mode 100644index ca8e0e1..0000000Binary files a/.github/assets/entrance-compare.webp and /dev/null differdiff --git a/.github/assets/entrance.webp b/.github/assets/entrance.webpnew file mode 100644index 0000000..d244b86Binary files /dev/null and b/.github/assets/entrance.webp differdiff --git a/.github/assets/hover-agentic-commerce.webp b/.github/assets/hover-agentic-commerce.webpdeleted file mode 100644index 56da53d..0000000Binary files a/.github/assets/hover-agentic-commerce.webp and /dev/null differdiff --git a/.github/assets/hover-crypto.webp b/.github/assets/hover-crypto.webpdeleted file mode 100644index c3389bd..0000000Binary files a/.github/assets/hover-crypto.webp and /dev/null differdiff --git a/.github/assets/hover-issuing.webp b/.github/assets/hover-issuing.webpdeleted file mode 100644index 4090b55..0000000Binary files a/.github/assets/hover-issuing.webp and /dev/null differdiff --git a/.github/assets/hover.webp b/.github/assets/hover.webpnew file mode 100644index 0000000..f8753f9Binary files /dev/null and b/.github/assets/hover.webp differdiff --git a/README.md b/README.mdindex 4ca65e3..09c992b 100644--- a/README.md+++ b/README.md@@ -1,134 +1,109 @@<h1 align="center">motion-clone</h1>-<p align="center"><b>A Claude Code skill that clones any animation frame by frame, then proves the copy moves the same.</b><br>From a live site, a screen recording, an mp4, a gif or a Lottie file, into your own codebase.</p>+<p align="center"><b>Clone any animation, frame by frame. Then prove the copy moves the same.</b><br>A Claude Code skill that works from a live site, a screen recording, an mp4, a gif or a Lottie file.</p><p align="center"><a href="https://code.claude.com/docs/en/skills"><img src="https://img.shields.io/badge/Claude_Code-skill-171717?style=flat-square&logo=claude&logoColor=white" alt="Claude Code skill"></a><a href="https://agentskills.io"><img src="https://img.shields.io/badge/Agent_Skills-compatible-171717?style=flat-square" alt="Agent Skills compatible"></a>+ <a href="#install"><img src="https://img.shields.io/badge/runs_on-Bun-171717?style=flat-square&logo=bun&logoColor=white" alt="Runs on Bun"></a><a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-171717?style=flat-square" alt="MIT license"></a>- <a href="#requirements"><img src="https://img.shields.io/badge/runs_on-Bun-171717?style=flat-square&logo=bun&logoColor=white" alt="Runs on Bun"></a></p><p align="center">- <a href="#install"><img src="https://img.shields.io/badge/Install-npx_skills_add-d7d7d0?style=for-the-badge&labelColor=171717&logo=npm&logoColor=white" alt="Install with npx"></a>+ <img src=".github/assets/entrance.webp" width="760" alt="Two recordings of the same three cards fading in: stripe.com on top, the copy motion-clone built below. The chat bubbles, the particle ring, the Visa card and the dotted globe appear at the same moments in both."></p>+<p align="center"><sub>Three cards from stripe.com. Top: the original. Bottom: the copy, filmed the same way.</sub></p>-<p align="center">- <a href="#quick-start">Quick start</a> ·- <a href="#gallery">Gallery</a> ·- <a href="#how-it-works">How it works</a> ·- <a href="#writing-a-prompt">Writing a prompt</a> ·- <a href="#whats-inside">What's inside</a> ·- <a href="#limits">Limits</a>-</p>--<p align="center">- <img src=".github/assets/entrance-compare.webp" width="720" alt="Two recordings of the same three cards fading in: stripe.com on top, the clone below. The chat bubbles, the particle ring, the Visa card and the dotted globe appear at the same moments in both.">-</p>+Copying an animation by eye always ends the same way. It looks right in a screenshot and feels off in motion: the easing is a little sharp, the second line starts a beat late, the card lifts four pixels instead of six. Nobody can say what's wrong, so nobody fixes it.-<p align="center"><sub>Three cards from the stripe.com homepage. Top: stripe.com. Bottom: the clone motion-clone built, recorded with the same command.</sub></p>+motion-clone measures instead. Claude films the original, writes down every timing and easing, rebuilds the animation in your code, films the copy the same way, and compares the two until the numbers agree. You get the code and the evidence.------Copying an animation by eye goes the same way every time. The copy looks right in a screenshot and feels wrong in motion: the easing is a little sharper, the second line starts a beat late, the card lifts four pixels instead of six. Nobody can say what is off, so nobody fixes it.--motion-clone treats an animation as something to measure. Claude records the reference, reads it frame by frame and writes down every timing and easing. Then it rebuilds the animation in your stack, records the copy the same way and compares the two until the numbers agree. You get the code and the evidence: timing errors, pixel mismatch, easing fits and side-by-side sheets.--## Quick start+## Install```shnpx skills add NiazMorshed2007/motion-clone -g```-The [skills CLI](https://skills.sh) asks which agents to set up. Add `-a claude-code` to skip the question.--Then, in Claude Code:+The [skills CLI](https://skills.sh) asks which agents to set up; add `-a claude-code` to skip the question. Then, in Claude Code, say what you want, where it is and where it should go:```text/motion-clone the hero entrance on https://example.com, into components/Hero.tsx+/motion-clone this loader, 0:03 to 0:05 of ~/Downloads/loader.mov+/motion-clone the card hover in this gif, match it exactly+/motion-clone the logo marquee from https://example.com, with our logos and pause on hover```-The first run downloads Playwright's Chromium and a static ffmpeg into the skill's folder (about 250 MB). No API keys.--## Gallery--Each card was cloned by its own agent running this skill, in 28 to 40 minutes. Left: stripe.com. Right: the clone. Same pointer path, same recording command.--<table>- <tr>- <td width="33%"><img src=".github/assets/hover-agentic-commerce.webp" alt="The agentic commerce card on stripe.com and in the clone, side by side: a chat with two product cards over a ring of pink particles; the pointer enters, the card grows and the border lights up."></td>- <td width="33%"><img src=".github/assets/hover-issuing.webp" alt="The card issuing card on stripe.com and in the clone, side by side: an iridescent Visa card that tilts towards the pointer."></td>- <td width="33%"><img src=".github/assets/hover-crypto.webp" alt="The crypto card on stripe.com and in the clone, side by side: a rotating dotted globe with arcs and amount labels."></td>- </tr>- <tr>- <td><sub><b>Agentic commerce</b>: chat timing within 43 ms, layout within 0.05 px, 10,000-point particle ring that reacts to the pointer.</sub></td>- <td><sub><b>Card issuing</b>: three.js. 0.03 % of pixels differ at rest; the tilt settles within 0.4 px of stripe.com's.</sub></td>- <td><sub><b>Stablecoins and crypto</b>: globe pose exact, arc and label timings within stripe.com's own spread.</sub></td>- </tr>-</table>--<p align="center"><img src=".github/assets/bento-clone.webp" width="720" alt="The three cloned cards side by side at rest."></p>+Needs [Bun](https://bun.sh) 1.1 or later, on macOS or Linux (Windows is untested). The first run installs a static ffmpeg into the skill's folder and Playwright's Chromium into Playwright's usual cache, about 250 MB together. No API keys. Other agents that read `SKILL.md` can install it too, but it has only been tested with Claude Code.## How it works-| Step | What happens |-|---|---|-| **Capture** | Records the reference in a headless browser at a fixed viewport and frame rate: a video, numbered frames, every CSS and Web Animations API animation it finds, and the position of chosen elements on every frame. |-| **Spec** | One row per element per property: start, duration, from → to, easing, stagger. A row with a "?" means the frames haven't been read yet. |-| **Build** | Implements it with what your project already uses: CSS, Framer Motion, GSAP, three.js. |-| **Verify** | Records the clone with the exact same command, then compares timing, pixels and easing curves and builds side-by-side sheets. |-| **Repeat** | Fixes the smallest thing the evidence points at and records again, usually 2 to 5 rounds. A row that still fails after 5 is reported with its numbers and the reason. |--How close it has to be depends on your words:--| Level | Say | Must match |-|---|---|---|-| Motion-faithful (default) | "clone this animation" | trigger, order, stagger, timing within 80 ms, easing family, distance |-| Pixel-faithful | "match it exactly", "pixel-perfect" | all of the above plus fonts, sizes, colours, spacing, assets; ≤ 2 % mean pixel mismatch |-| Mixed | "clone X and add Y" | the cloned parts at one of the levels above; your additions kept separate |+1. **Record.** It films the reference in a headless browser at a fixed viewport and frame rate: a video, numbered frames, every CSS and Web Animations API animation it finds, and the position of chosen elements on every frame. For canvas and WebGL it also traces the GPU calls (shaders, uniforms, draw calls, the three.js scene) on a virtual clock that makes every capture identical.+2. **Spec.** One row per element per property: start, duration, from → to, easing, stagger. A row with a "?" means the frames haven't been read yet.+3. **Build.** It writes the animation with what your project already uses: CSS, Framer Motion, GSAP, three.js.+4. **Verify.** It films the clone with the exact same command, then compares timing, pixels and easing curves and makes side-by-side sheets.+5. **Repeat.** It fixes the smallest thing the evidence points at and films again, usually 2 to 5 rounds. A row that still fails after 5 is reported with its numbers and the reason.-## Writing a prompt+<p align="center">+ <img src=".github/assets/hover.webp" width="520" alt="The card issuing card hovered on stripe.com and in the copy, side by side: the same pointer path makes the Visa card tilt the same way in both.">+</p>+<p align="center"><sub>The same pointer path on stripe.com and on the copy. The tilt settles within 0.4 px.</sub></p>-Name the thing, where it is and where it should go. Narrow it to one section, one widget or a time range when you only want part of it.+How close the copy has to be depends on your words:-```text-/motion-clone the hero entrance on https://example.com, into components/Hero.tsx-/motion-clone this loader, 0:03 to 0:05 of ~/Downloads/loader.mov-/motion-clone the card hover in this gif, match it exactly-/motion-clone the logo marquee from https://example.com, with our logos and pause on hover-```+| Say | Level | Must match |+|---|---|---|+| "clone this animation" | Moves the same (default) | trigger, order, stagger, timing within 80 ms, easing family, distance |+| "match it exactly", "pixel-perfect" | Looks the same | all of the above, plus fonts, sizes, colours, spacing and assets; ≤ 2 % mean pixel mismatch |+| "clone X and add Y" | Yours on top | the cloned parts at one of the levels above; your additions kept separate |-## What's inside+## Examples-This repo holds the skill and the site that shows it off. Only `skills/motion-clone/` is installed by the skills CLI.+Three cards from the stripe.com homepage, the integrations visual from workos.com/atlas and the feature cards from clerk.com, each cloned by its own agent running this skill, most in 30 to 60 minutes. The [site](site/) shows the Stripe and WorkOS ones next to a recording of the original, and runs the Clerk cards live in the page.-| Path | What it is |-|---|---|-| `skills/motion-clone/SKILL.md` | The workflow Claude follows: scope, capture, spec, build, verify, report. |-| `skills/motion-clone/references/` | Capture recipes per source type, how to read frames into a spec, implementation patterns per stack, pass criteria and fixes. |-| `skills/motion-clone/scripts/capture.ts` | Records a page: video, frames, declared animations, computed styles, fonts, libraries, per-frame element tracks. Triggers: load, scroll, hover, leave, pointer path, drag, click, none. |-| `skills/motion-clone/scripts/frames.ts` | Extracts and crops frames from a video or gif. |-| `skills/motion-clone/scripts/compare.ts` | Frame-by-frame comparison: alignment, timing error, mismatch, activity curves, diff images. |-| `skills/motion-clone/scripts/easing.ts` | Fits a tracked property to named easings, detects overshoot and springs, diffs two tracks. |-| `skills/motion-clone/scripts/sheet.ts` | Labelled contact sheets and reference / clone / diff comparison sheets. |-| `site/` | The showcase website (Next.js, static export on Cloudflare Workers) with the cloned examples running live. See [`site/README.md`](site/README.md). |+| Clone | Built with | Measured against the original |+|---|---|---|+| **Agentic commerce**: a chat over a 10,000-point particle ring | three.js, CSS | chat timing within 43 ms, layout within 0.05 px |+| **Card issuing**: a Visa card that tilts toward the pointer | three.js, Web Workers | 0.03 % of pixels differ at rest; tilt within 0.4 px |+| **Stablecoins and crypto**: a dotted globe with flying payments | three.js, Web Workers | globe pose exact; arcs and labels within stripe.com's own spread |+| **Connected to all your tools** (workos.com): a robot reaching out to a dome of app icons | HTML, SVG, WebGPU | 0.05 % of pixels differ; each link within 10 ms |+| **Feature cards** (clerk.com): passcodes, magic links, a radar, a laptop opening and more, each playing on hover | HTML, SVG, canvas, WebGL2 | each card's motion within 40 ms; under 0.6 % of pixels differ |-## Requirements+## Canvas, WebGL and 3D-- [Bun](https://bun.sh) 1.1 or later.-- macOS or Linux. Windows is untested.-- About 250 MB on first run for Chromium and ffmpeg, installed by `skills/motion-clone/scripts/setup.sh` into the skill's own folder.+A canvas only shows pixels, so motion-clone records the calls that drew them. With `--gl` it traces WebGL, WebGPU and canvas 2D. It hooks the three.js, Pixi, PlayCanvas, Babylon and OGL scene graphs through their own devtools entry points, and reaches into workers. Out come the shader sources, every constant uniform, the render passes, the textures and models, and each animated uniform or object property as a curve that can be fitted and compared. `--clock virtual` runs the page on a clock that is advanced frame by frame, with `Math.random` seeded in the page and its workers. Every frame is then exact however slow the GPU is, and two captures of a WebGL globe with random arcs and worker-generated dots come out byte-identical.-The skills CLI can install it for other agents that read `SKILL.md`, but it has only been tested with Claude Code.+On live stripe.com this recovers the issuing card's four-pass composite, its shaders and constants such as `u_twistFrequencyX = 0.059`. It also records the card's tilt as a curve: −0.174 → 0.262 rad between 33 and 1800 ms on the pointer path. `gl.ts compare` then checks the clone against it channel by channel; the tilt matched within 33 ms and 0.5 % of its range. See [`references/webgl.md`](skills/motion-clone/references/webgl.md).## Limits-- WebGL and canvas are compared as pixels. Random content, like particles, never matches exactly, so it is judged against two recordings of the reference.-- Headless browsers draw WebGL in software, so frame pacing in recordings differs from a real screen.- Pages behind a login, YouTube and Loom can't be recorded directly; hand it a screen recording.- Physics springs are fitted from their overshoot and settle time, not read from the source.+- Workers are seeded and traced, but their own clocks run in real time. Canvases inside iframes need the iframe's own URL.+- When a clone can't reproduce the reference's random generator, particles are compared with a blurred mismatch (density, colour, motion) instead of dot by dot.+- `--gpu hardware` uses the real GPU (macOS: Metal; Linux: Vulkan, untested). The default, SwiftShader, is slower but gives the same pixels on every machine.- It clones what you point it at. Fonts, images and code from another site still belong to their owners; make sure you may use what you copy.+## Repository++Only `skills/motion-clone/` is installed by the skills CLI; `site/` is the website with the examples running live ([`site/README.md`](site/README.md)).++<details>+<summary>What's in the skill</summary>++| Path | What it is |+|---|---|+| `SKILL.md` | The workflow Claude follows: scope, capture, spec, build, verify, report. |+| `references/` | Capture recipes per source type, reading frames into a spec, implementation patterns per stack, WebGL, pass criteria and fixes. |+| `scripts/capture.ts` | Records a page: video, frames, declared animations, computed styles, fonts, libraries, per-frame element tracks. Triggers: load, scroll, hover, leave, pointer path, drag, click, none. `--clock virtual` steps a virtual clock frame by frame (exact frames, identical captures, seeded `Math.random`); `--gl` traces the GPU; `--assets` saves models, textures and scripts. |+| `scripts/gl.ts` | Reads a GPU trace: canvases, three.js / Pixi / PlayCanvas / Babylon / OGL scene graphs, shaders, passes, textures, animated uniforms as channels, and a reference-vs-clone comparison. |+| `scripts/inpage/` | What runs inside the page: the virtual clock and the WebGL / WebGPU / canvas 2D tracer. |+| `scripts/frames.ts` | Extracts and crops frames from a video or gif. |+| `scripts/compare.ts` | Frame-by-frame comparison: alignment, timing error, mismatch, activity curves, diff images, and a blurred mismatch for particles and noise. |+| `scripts/easing.ts` | Fits a tracked property or GPU channel to named easings, detects overshoot and springs, diffs two tracks. |+| `scripts/sheet.ts` | Labelled contact sheets and reference / clone / diff comparison sheets. |++</details>+## License-[MIT](LICENSE). The gallery and the site's examples recreate three cards from stripe.com as a study of the technique; it is not affiliated with or endorsed by Stripe. Stripe and Visa are trademarks of their respective owners.+[MIT](LICENSE). The examples recreate parts of stripe.com, workos.com and clerk.com as a study of the technique; it is not affiliated with or endorsed by Stripe, WorkOS or Clerk. All trademarks belong to their owners.diff --git a/site/README.md b/site/README.mdindex 2f7ee28..f5ac23c 100644--- a/site/README.md+++ b/site/README.md@@ -1,6 +1,6 @@# motion-clone site-The showcase website for the motion-clone skill in [`../skills/motion-clone`](../skills/motion-clone), a Claude Code skill that clones animations frame by frame. Commands below run from this `site/` folder. Next.js 16, exported as static files and served by a Cloudflare Worker (static assets only, no server code).+The website for the motion-clone skill in [`../skills/motion-clone`](../skills/motion-clone). Next.js 16, exported as static files and served by a Cloudflare Worker (static assets only, no server code). Commands below run from this `site/` folder.## Develop@@ -11,12 +11,26 @@ bun run dev # http://localhost:3000`predev` and `prebuild` copy three.js and the Inter font from `node_modules` into `public/examples/stripe-bento/vendor/` (git-ignored), because the live examples are plain HTML pages loaded in iframes.-## Build and preview like production-```shbun run preview # next build, then wrangler dev on http://localhost:8787+bun run lint+```++## Add an example++1. Put the clone, as a standalone page, in `public/examples/<name>/` (see `stripe-bento/`).+2. Put its media in `public/media/<slug>/`: `poster.webp` (the clone at rest, for the thumbnails) and, for a recorded example, `compare.mp4` (the original and the clone, recorded the same way and side by side in one file).+3. Add an entry to `src/examples.ts`. The home page shows it at the end, under Examples; what it does and its numbers sit behind a "details" tooltip. `show.kind` picks the picture: `"video"` plays `compare.mp4`; `"live"` runs the clone itself in the page, in an iframe (the clerk.com cards do this; `clerk-bento/?card=<slug>&embed` frames one card for it).++To record the media, add a row to `CLIPS` in `scripts/record-media.ts`: the original's URL, the clone's path and the elements to film, plus `pin` when the animation picks things at random, so both sides pick the same. With the site running on `bun run preview`:++```sh+bun run media # every clip+bun run media --only <slug> # one clip```+It films the original and the clone in the same browser with the same scroll, pointer path and timing, at 2x and 60 fps, and writes `compare.mp4` and `poster.webp` into `public/media/<slug>/`. Both recordings go into one file so they can never drift apart on the page. It also writes the README animations in `../.github/assets/`. It needs Playwright's Chromium (`bunx playwright install chromium`), and `ffmpeg`, `cwebp` and `webpmux` on your PATH (`brew install ffmpeg webp`). The 2x zoom and GPU flags it uses are tested on macOS.+## Deploy to Cloudflare WorkersSet the public URL first, so the Open Graph and canonical links are absolute:@@ -38,12 +52,13 @@ Then either:| Path | What it is ||---|---|| `src/app/page.tsx` | The whole page: copy, sections, tables. |-| `src/components/` | `LiveExample` (scaled or cropped iframe of a live clone), `CompareVideo` (drag to compare stripe.com and the clone), `Nav`, `Sidenote`, `CopyCommand`. |-| `public/examples/stripe-bento/` | The three cloned stripe.com cards as a standalone page; `?card=agentic-commerce\|issuing\|crypto` shows one. |-| `public/media/` | Comparison recordings (stripe.com and clone, same capture command) and the comparison sheet. |-| `public/og.png` | Social preview image. |+| `src/examples.ts` | The examples, in the order they appear. |+| `src/components/` | `CompareVideo` (plays a `compare.mp4` while it's on screen), `LiveCard` (a clone in an iframe, scaled down on narrow screens), `Nav`, `Sidenote`, `CopyCommand`. |+| `public/examples/` | The clones as standalone pages. `stripe-bento/?card=agentic-commerce\|issuing\|crypto` shows one card; `workos-atlas/` is the workos.com integrations visual; `clerk-bento/` is clerk.com's grid of feature cards (`?card=<slug>` for one). |+| `public/media/` | Comparisons and posters, one folder per example. `stripe-bento/` is the entrance at the top of the page. |+| `scripts/record-media.ts` | Records the examples' media and the README animations. || `marketing/launch.md` | Launch post drafts. |## About the examples-The live examples recreate three cards from stripe.com as a study of the technique. They use Inter instead of Stripe's licensed Söhne, but the widget code ports Stripe's shaders and uses Stripe's images. Not affiliated with or endorsed by Stripe.+The live examples recreate parts of stripe.com, workos.com and clerk.com as a study of the technique. The Stripe cards use Inter instead of Stripe's licensed Söhne, but port Stripe's shaders and use Stripe's images; the WorkOS visual uses WorkOS's robot images, app icons and screen shaders; the Clerk cards use Geist and Geist Mono instead of Clerk's licensed fonts, and port Clerk's inline SVG, light-streak canvas and dot-field shader. Not affiliated with or endorsed by Stripe, WorkOS or Clerk.diff --git a/site/bun.lock b/site/bun.lockindex 6aaac8d..b49ded4 100644--- a/site/bun.lock+++ b/site/bun.lock@@ -18,6 +18,7 @@"@types/react-dom": "^19","eslint": "^9","eslint-config-next": "16.4.3",+ "playwright": "1.64.1","tailwindcss": "^4","typescript": "^5","wrangler": "^4.155.0",@@ -26,7 +27,6 @@},"trustedDependencies": ["esbuild",- "sharp","unrs-resolver","workerd",],@@ -817,6 +817,10 @@"picomatch": ["[email protected]", "", {}, "sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA=="],+ "playwright": ["[email protected]", "", { "dependencies": { "playwright-core": "1.64.1" }, "bin": { "playwright": "cli.js" } }, "sha512-HCrVhHr5QQuwYoswEUGTb7gGp522yflbv/ST8nF4sFWGuLjQCt17Q/EubpGGSNKYn1tsTCPZxqHhHCfVURu7UA=="],++ "playwright-core": ["[email protected]", "", { "bin": { "playwright-core": "cli.js" } }, "sha512-BC4s8y6SEVA6Q1rSxZTto8hI1KUI3xXlHGZgvGqP4IqPdI/a6FX9H29IDNz7vKo9l21b6LfYosScPL6M3xxyDQ=="],+"possible-typed-array-names": ["[email protected]", "", {}, "sha512-/+5VFTchJDoVj3bhoqi6UeymcD00DAwb1nJwamzPvHEszJ4FpF6SNNbUbOS8yI56qHzdV8eK0qEfOSiodkTdxg=="],"postcss": ["[email protected]", "", { "dependencies": { "nanoid": "^3.3.16", "picocolors": "^1.1.1", "source-map-js": "^1.2.1" } }, "sha512-g50586zr4bZmwFiTlflMu8E0bDTb5I5gertgwAKmsdUlTQIhZtunzUlD1WSzwcVWPoAVpsrA6vlfCD7oXvRwgg=="],diff --git a/site/eslint.config.mjs b/site/eslint.config.mjsindex 05e726d..ced3153 100644--- a/site/eslint.config.mjs+++ b/site/eslint.config.mjs@@ -12,6 +12,9 @@ const eslintConfig = defineConfig(["out/**","build/**","next-env.d.ts",+ ".wrangler/**",+ // three.js and fonts copied in by scripts/vendor-examples.mjs+ "public/examples/*/vendor/**",]),]);diff --git a/site/marketing/launch.md b/site/marketing/launch.mdindex e46b6d6..aa70fc6 100644--- a/site/marketing/launch.md+++ b/site/marketing/launch.md@@ -1,6 +1,6 @@# Launch drafts-Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one of the comparison recordings (`public/media/hover-issuing-*.mp4` side by side, or the README's animated webps).+Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one of the comparison recordings (`public/media/stripe-issuing/compare.mp4`, or the README's `.github/assets/entrance.webp` and `hover.webp`).## X / Threads / Bluesky@@ -10,7 +10,7 @@ Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one o>> It rebuilt three cards from the stripe.com homepage, WebGL included, and measured every one against the original: timing within 43 ms, tilt within 0.4 px.>-> npx skills add NiazMorshed2007/motion-clone+> npx skills add NiazMorshed2007/motion-clone -g> <site>**Thread**@@ -19,7 +19,7 @@ Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one o2. Copying motion by eye always ends the same way: looks right in a screenshot, feels off in motion. The easing is sharper, something starts a beat late. motion-clone measures instead: it records the reference, writes every timing and easing down, builds, records the copy the same way and compares.3. The loop doesn't end until the numbers agree: timing error, pixel mismatch, easing fit, side-by-side sheets. If a row still fails after 5 rounds it says so, with the numbers. [image: comparison sheet]4. Works from a live URL, a screen recording, an mp4 or a gif. Say "match it exactly" for pixel-level, or "clone X and add Y" to mix in your own parts. It writes in whatever your project already uses.-5. Install: npx skills add NiazMorshed2007/motion-clone. Live demos (the clones run in the page, hover them): <site>+5. Install: npx skills add NiazMorshed2007/motion-clone -g. Live demos (the clones run in the page, hover them): <site>@@ -27,7 +27,7 @@ Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one o>> I built motion-clone, a skill for Claude Code that treats an animation as something to measure. It records the reference (a live site, a video, a gif), reads it frame by frame, rebuilds it in your codebase, then records the copy the same way and compares the two until timing, easing and layout agree.>-> To test it, I had it rebuild three cards from the stripe.com homepage, including two three.js scenes. Every card came back with numbers: chat timing within 43 ms of the original, the card tilt within 0.4 px, the globe's pose exact.+> To test it, I had it rebuild three cards from the stripe.com homepage, all three of them three.js scenes. Every card came back with numbers: chat timing within 43 ms of the original, the card tilt within 0.4 px, the globe's pose exact.>> Open source, MIT: <site>@@ -39,9 +39,9 @@ Replace `<site>` with the deployed URL. Attach `public/og.png`, or better, one o> Hi HN. motion-clone is a skill (a folder of instructions and scripts) for Claude Code. You point it at an animation on a site, in a video or in a gif, and it records it with Playwright, writes a spec (one row per element per property: start, duration, easing), rebuilds it in your stack, then records the clone with the same command and compares: timing error, pixel mismatch per frame, easing curve fits, and side-by-side sheets. It iterates until the rows pass, and reports any that don't after five rounds.>-> The demo page has three cards from stripe.com rebuilt by it, running live, next to recordings of the originals. Two of them are three.js scenes, so it had to recover shaders and timings from the page's scripts rather than from CSS.+> The demo page has three cards from stripe.com rebuilt by it, running live, next to recordings of the originals. All three are three.js scenes, so it had to recover shaders and timings from what the page sent to the GPU rather than from CSS.>-> Limits: WebGL is compared as pixels, random content is judged against two recordings of the reference, and headless WebGL frame pacing differs from a real screen. Install with `npx skills add NiazMorshed2007/motion-clone`.+> Limits: pages behind a login need a screen recording, physics springs are fitted from their overshoot rather than read from the source, and web workers' own clocks still run in real time. Install with `npx skills add NiazMorshed2007/motion-clone -g`.## Where to postdiff --git a/site/next.config.ts b/site/next.config.tsindex fa5a40d..825ab49 100644--- a/site/next.config.ts+++ b/site/next.config.ts@@ -5,6 +5,10 @@ const nextConfig: NextConfig = {output: "export",trailingSlash: true,images: { unoptimized: true },+ // The static host serves examples/<name>/index.html for the folder URL; `next dev` doesn't, so map it here.+ ...(process.env.NODE_ENV === "development" && {+ rewrites: async () => [{ source: "/examples/:name/", destination: "/examples/:name/index.html" }],+ }),turbopack: {rules: {"*.css": {diff --git a/site/package.json b/site/package.jsonindex 640a52f..a075f6f 100644--- a/site/package.json+++ b/site/package.json@@ -3,14 +3,15 @@"version": "0.1.0","private": true,"scripts": {- "vendor": "node scripts/vendor-examples.mjs",- "predev": "node scripts/vendor-examples.mjs",+ "vendor": "bun scripts/vendor-examples.mjs",+ "predev": "bun run vendor","dev": "next dev",- "prebuild": "node scripts/vendor-examples.mjs",+ "prebuild": "bun run vendor","build": "next build","preview": "bun run build && wrangler dev","deploy": "bun run build && wrangler deploy",- "lint": "eslint"+ "lint": "eslint",+ "media": "bun scripts/record-media.ts"},"dependencies": {"next": "16.4.3",@@ -26,18 +27,14 @@"@types/react-dom": "^19","eslint": "^9","eslint-config-next": "16.4.3",+ "playwright": "1.64.1","tailwindcss": "^4","typescript": "^5","wrangler": "^4.155.0"},"packageManager": "[email protected]",- "ignoreScripts": [- "sharp",- "unrs-resolver"- ],"trustedDependencies": ["esbuild",- "sharp","unrs-resolver","workerd"]diff --git a/site/public/examples/clerk-bento/assets/fonts/Geist-Variable.woff2 b/site/public/examples/clerk-bento/assets/fonts/Geist-Variable.woff2new file mode 100644index 0000000..9983e92Binary files /dev/null and b/site/public/examples/clerk-bento/assets/fonts/Geist-Variable.woff2 differdiff --git a/site/public/examples/clerk-bento/assets/fonts/GeistMono-Variable.woff2 b/site/public/examples/clerk-bento/assets/fonts/GeistMono-Variable.woff2new file mode 100644index 0000000..fb2f024Binary files /dev/null and b/site/public/examples/clerk-bento/assets/fonts/GeistMono-Variable.woff2 differdiff --git a/site/public/examples/clerk-bento/assets/fonts/LICENSE-geist.txt b/site/public/examples/clerk-bento/assets/fonts/LICENSE-geist.txtnew file mode 100644index 0000000..8d003fe--- /dev/null+++ b/site/public/examples/clerk-bento/assets/fonts/LICENSE-geist.txt@@ -0,0 +1,92 @@+Copyright (c) 2023 Vercel, in collaboration with basement.studio++This Font Software is licensed under the SIL Open Font License, Version 1.1.+This license is copied below, and is also available with a FAQ at:+http://scripts.sil.org/OFL++-----------------------------------------------------------+SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007+-----------------------------------------------------------++PREAMBLE+The goals of the Open Font License (OFL) are to stimulate worldwide+development of collaborative font projects, to support the font creation+efforts of academic and linguistic communities, and to provide a free and+open framework in which fonts may be shared and improved in partnership+with others.++The OFL allows the licensed fonts to be used, studied, modified and+redistributed freely as long as they are not sold by themselves. The+fonts, including any derivative works, can be bundled, embedded,+redistributed and/or sold with any software provided that any reserved+names are not used by derivative works. The fonts and derivatives,+however, cannot be released under any other type of license. The+requirement for fonts to remain under this license does not apply+to any document created using the fonts or their derivatives.++DEFINITIONS+"Font Software" refers to the set of files released by the Copyright+Holder(s) under this license and clearly marked as such. This may+include source files, build scripts and documentation.++"Reserved Font Name" refers to any names specified as such after the+copyright statement(s).++"Original Version" refers to the collection of Font Software components as+distributed by the Copyright Holder(s).++"Modified Version" refers to any derivative made by adding to, deleting,+or substituting -- in part or in whole -- any of the components of the+Original Version, by changing formats or by porting the Font Software to a+new environment.++"Author" refers to any designer, engineer, programmer, technical+writer or other person who contributed to the Font Software.++PERMISSION AND CONDITIONS+Permission is hereby granted, free of charge, to any person obtaining+a copy of the Font Software, to use, study, copy, merge, embed, modify,+redistribute, and sell modified and unmodified copies of the Font+Software, subject to the following conditions:++1) Neither the Font Software nor any of its individual components,+in Original or Modified Versions, may be sold by itself.++2) Original or Modified Versions of the Font Software may be bundled,+redistributed and/or sold with any software, provided that each copy+contains the above copyright notice and this license. These can be+included either as stand-alone text files, human-readable headers or+in the appropriate machine-readable metadata fields within text or+binary files as long as those fields can be easily viewed by the user.++3) No Modified Version of the Font Software may use the Reserved Font+Name(s) unless explicit written permission is granted by the corresponding+Copyright Holder. This restriction only applies to the primary font name as+presented to the users.++4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font+Software shall not be used to promote, endorse or advertise any+Modified Version, except to acknowledge the contribution(s) of the+Copyright Holder(s) and the Author(s) or with their explicit written+permission.++5) The Font Software, modified or unmodified, in part or in whole,+must be distributed entirely under this license, and must not be+distributed under any other license. The requirement for fonts to+remain under this license does not apply to any document created+using the Font Software.++TERMINATION+This license becomes null and void if any of the above conditions are+not met.++DISCLAIMER+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM+OTHER DEALINGS IN THE FONT SOFTWARE.diff --git a/site/public/examples/clerk-bento/assets/shell/glow-bento.avif b/site/public/examples/clerk-bento/assets/shell/glow-bento.avifnew file mode 100644index 0000000..5c542e8Binary files /dev/null and b/site/public/examples/clerk-bento/assets/shell/glow-bento.avif differdiff --git a/site/public/examples/clerk-bento/index.html b/site/public/examples/clerk-bento/index.htmlnew file mode 100644index 0000000..6eafdfd--- /dev/null+++ b/site/public/examples/clerk-bento/index.html@@ -0,0 +1,127 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <title>clerk.com feature cards, rebuilt with motion-clone</title>+ <meta name="robots" content="noindex">+ <link rel="preload" href="./assets/fonts/Geist-Variable.woff2" as="font" type="font/woff2" crossorigin>+ <link rel="stylesheet" href="./src/bento.css">+ <script>+ // ?card=<slug> shows a single card (mfa, session-management, otp, fraud, magic-links, social-sign-on,+ // advanced-security, bot-detection, passwords, api-keys, clerk-cli); with &embed, closely framed for an iframe+ const params = new URLSearchParams(location.search);+ const card = params.get("card");+ if (card) document.documentElement.dataset.card = card;+ if (card && params.has("embed")) document.documentElement.dataset.embed = "";+ </script>+ <script type="module" src="./src/bento.js"></script>+</head>+<body>++ <main class="clerk-bento">+ <div class="clerk-bento__container">+ <div class="clerk-bento__stack">++ <div class="clerk-bento__grid">+ <div class="clerk-card clerk-card--mfa clerk-card--text-bottom" data-card="mfa">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Multifactor Authentication</h3></div>+ <div class="clerk-card__desc"><div>Each user's self-serve multifactor settings are enforced automatically during sign-in.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="mfa" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--fraud clerk-card--large clerk-card--text-top" data-card="fraud">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Fraud and Abuse Prevention</h3></div>+ <div class="clerk-card__desc"><div>Reduce fraudulent sign-ups and free trial abuse by blocking high-risk disposable email domains and restricting the use of email subaddresses with the “+” separator.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="fraud" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--advanced-security clerk-card--text-bottom" data-card="advanced-security">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Advanced security</h3></div>+ <div class="clerk-card__desc"><div>Clerk is SOC 2 type 2 compliant and CCPA compliant. We conduct regular third-party audits and penetration tests.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="advanced-security" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--session-management clerk-card--large clerk-card--text-top" data-card="session-management">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Session Management</h3></div>+ <div class="clerk-card__desc"><div>Clerk manages the full session lifecycle, including critical security functionality like active device monitoring and session revocation.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="session-management" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--social-sign-on clerk-card--text-bottom" data-card="social-sign-on">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Social Sign-On</h3></div>+ <div class="clerk-card__desc"><div>Add high-conversion Social Sign-on (SSO) to your application in minutes. 20+ options and growing.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="social-sign-on" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--bot-detection clerk-card--text-bottom" data-card="bot-detection">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Bot Detection</h3></div>+ <div class="clerk-card__desc"><div>Dramatically reduce fraudulent sign-ups with built-in, continually updated machine learning.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="bot-detection" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--otp clerk-card--text-bottom" data-card="otp">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Email and SMS one-time passcodes</h3></div>+ <div class="clerk-card__desc"><div>Fast and reliable one-time passcode delivery with built-in brute force prevention.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="otp" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--magic-links clerk-card--large clerk-card--text-top" data-card="magic-links">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Magic Links</h3></div>+ <div class="clerk-card__desc"><div>Improve sign-up conversion rates and filter out spam/fraud with Magic Links.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="magic-links" aria-hidden="true"></div>+ </div>++ <div class="clerk-card clerk-card--passwords clerk-card--text-bottom" data-card="passwords">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Passwords</h3></div>+ <div class="clerk-card__desc"><div>Simple and secure password authentication, complete with breach detection and recovery options.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="passwords" aria-hidden="true"></div>+ </div>+ </div>++ <div class="clerk-bento__row">+ <div class="clerk-bento__cell clerk-bento__cell--wide">+ <div class="clerk-card clerk-card--api-keys clerk-card--text-top clerk-card--padded" data-card="api-keys">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">API Keys</h3></div>+ <div class="clerk-card__desc"><div>Give every user secure, production-ready API keys without <br> building any of the underlying boilerplate code or UI.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="api-keys" aria-hidden="true"></div>+ </div>+ </div>+ <div class="clerk-bento__cell">+ <div class="clerk-card clerk-card--clerk-cli clerk-card--text-top clerk-card--padded" data-card="clerk-cli">+ <div class="clerk-card__text">+ <div class="clerk-card__heading"><h3 class="clerk-card__title">Clerk CLI</h3></div>+ <div class="clerk-card__desc"><div>Empower your AI agents to set up Clerk with the CLI. No need to leave your terminal or copy and paste API keys.</div></div>+ </div>+ <div class="clerk-card__visual" data-widget="clerk-cli" aria-hidden="true"></div>+ </div>+ </div>+ </div>++ <!-- clerk.com lays a white diagonal glow over the whole section with mix-blend-mode: overlay -->+ <div class="clerk-bento__glow" aria-hidden="true"><img src="./assets/shell/glow-bento.avif" alt="" width="2640" height="2640" decoding="async"></div>+ </div>+ </div>+ </main>+</body>+</html>diff --git a/site/public/examples/clerk-bento/src/bento.css b/site/public/examples/clerk-bento/src/bento.cssnew file mode 100644index 0000000..91cd354--- /dev/null+++ b/site/public/examples/clerk-bento/src/bento.css@@ -0,0 +1,257 @@+/* clerk.com "Auth that keeps evolving" feature grid: page background, grid, card frames and text.+ Values are clerk.com's resolved Tailwind tokens at the xl breakpoint (1440x900 reference viewport).+ The animated visuals live in src/widgets/<slug>.{html,css,js}, mounted into .clerk-card__visual by bento.js. */++/* clerk.com sets text in Suisse Int'l (commercial, Swiss Typefaces) with Geist for digits ("geistNumbers").+ This build self-hosts Geist 1.3.1 (SIL OFL): the digits are the very same glyphs clerk.com uses, and+ Geist also stands in for Suisse Int'l (closest open match in advance widths). Söhne Mono (commercial,+ Klim), used inside some visuals, maps to Geist Mono (same 600-unit advance). */+@font-face {+ font-family: "Geist Numbers";+ src: url(../assets/fonts/Geist-Variable.woff2) format("woff2");+ font-display: block;+ unicode-range: U+0030-0039;+}+@font-face {+ font-family: "Geist";+ src: url(../assets/fonts/Geist-Variable.woff2) format("woff2");+ font-weight: 100 900;+ font-style: normal;+ font-display: block;+}+@font-face {+ font-family: "Geist Mono";+ src: url(../assets/fonts/GeistMono-Variable.woff2) format("woff2");+ font-weight: 100 900;+ font-style: normal;+ font-display: block;+}++:root {+ --font-sans: "Geist Numbers", "Geist", ui-sans-serif, system-ui, sans-serif;+ --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;+ /* clerk.com's gray scale (Tailwind theme) */+ --color-gray-25: #fafafb;+ --color-gray-50: #f7f7f8;+ --color-gray-100: #eeeef0;+ --color-gray-200: #d9d9de;+ --color-gray-300: #b7b8c2;+ --color-gray-400: #9394a1;+ --color-gray-500: #747686;+ --color-gray-600: #5e5f6e;+ --color-gray-700: #42434d;+ --color-gray-800: #2f3037;+ --color-gray-850: #27272d;+ --color-gray-900: #212126;+ --color-gray-950: #131316;+}++/* Tailwind v4 preflight, as on clerk.com (widget markup copied from clerk.com relies on it) */+*, ::before, ::after, ::backdrop {+ box-sizing: border-box;+ margin: 0;+ padding: 0;+ border: 0 solid var(--color-gray-200);+}+html {+ line-height: 1.5;+ -webkit-text-size-adjust: 100%;+ tab-size: 4;+ font-family: var(--font-sans);+ font-synthesis-weight: none;+ -webkit-font-smoothing: antialiased;+ -moz-osx-font-smoothing: grayscale;+ -webkit-tap-highlight-color: transparent;+ background: var(--color-gray-950);+ scroll-padding-top: 4rem; /* as clerk.com: scrollIntoView centres a card 32px lower than the viewport centre */+}+body { line-height: inherit; background: var(--color-gray-950); }+h1, h2, h3, h4, h5, h6 { font-size: inherit; font-weight: inherit; }+a { color: inherit; text-decoration: inherit; }+b, strong { font-weight: bolder; }+code, kbd, samp, pre { font-family: var(--font-mono); font-size: 1em; }+ol, ul, menu { list-style: none; }+img, svg, video, canvas, audio, iframe, embed, object { display: block; vertical-align: middle; }+img, video { max-width: 100%; height: auto; }+button, input, select, textarea { font: inherit; color: inherit; background-color: transparent; border-radius: 0; }++/* ---------- page and grid ---------- */++/* The cards start 112px (+ clerk.com's 26/64px sub-pixel offset) below the top of the page.+ overflow: clip keeps the 2640px glow layer from adding scrollable overflow (it is no stacking context). */+.clerk-bento {+ position: relative;+ overflow: clip;+ padding: 112.40625px 0 112px;+}+.clerk-bento__container {+ position: relative;+ width: 100%;+ max-width: 79rem;+ margin: 0 auto;+ padding: 0 2rem;+}+.clerk-bento__stack {+ position: relative;+ display: flex;+ flex-direction: column;+ gap: 8px;+}+/* 3 columns x 4 rows of 260px, filled column by column (xl:grid-flow-col); large cards span 2 rows */+.clerk-bento__grid {+ display: grid;+ grid-template-columns: repeat(3, minmax(0, 1fr));+ grid-template-rows: repeat(4, 260px);+ grid-auto-flow: column;+ gap: 8px;+}+/* API Keys (8 of 12 columns) and Clerk CLI (4 of 12) share a 280px row */+.clerk-bento__row {+ display: grid;+ grid-template-columns: repeat(12, minmax(0, 1fr));+ grid-template-rows: 280px;+ gap: 8px;+}+.clerk-bento__cell { grid-column: span 4; }+.clerk-bento__cell--wide { grid-column: span 8; }+.clerk-bento__cell > .clerk-card { height: 100%; }++/* clerk.com lays a white diagonal glow over the whole section (cards included) with mix-blend-mode: overlay.+ The layer is placed relative to the grid's top-left corner exactly as on clerk.com; in ?card= mode it is+ shifted by the card's grid position so every card sees the same part of the glow it has on clerk.com. */+.clerk-bento__glow {+ position: absolute;+ z-index: 10;+ left: calc(-120px - var(--card-x, 0px));+ top: calc(-425px - var(--card-y, 0px));+ width: 1440px;+ height: 2011px;+ overflow: hidden;+ mix-blend-mode: overlay;+ pointer-events: none;+}+.clerk-bento__glow img {+ position: absolute;+ left: -261px;+ top: -629px;+ width: 2640px;+ height: 2640px;+ max-width: none;+}++/* ---------- card frame ---------- */++.clerk-card {+ position: relative;+ isolation: isolate;+ display: flex;+ flex-direction: column;+ border-radius: 16px;+ background-color: var(--color-gray-900);+ box-shadow: inset 0 1px rgb(255 255 255 / 0.025), inset 0 0 0 1px rgb(255 255 255 / 0.025);+ overflow: hidden;+}+.clerk-card--large { grid-row: span 2; }+/* the OTP card is the only one clerk.com renders without overflow clipping (clip={false}) */+.clerk-card--otp { overflow: visible; }++/* title + description: at the bottom of the small cards, at the top of the large ones and of the last row */+.clerk-card__text {+ position: relative;+ z-index: 20;+ flex: 1 1 auto;+ min-height: 0;+}+.clerk-card--text-bottom .clerk-card__text { order: 9999; padding: 0 24px 24px; }+.clerk-card--text-top .clerk-card__text { padding: 24px 24px 0; }+.clerk-card--padded .clerk-card__text { padding: 24px; }+.clerk-card__heading {+ display: flex;+ flex-wrap: wrap;+ align-items: center;+ gap: 8px;+}+.clerk-card__title {+ font-size: 13px;+ line-height: 24px;+ font-weight: 500;+ color: #fff;+}+.clerk-card__desc {+ margin-top: 8px;+ max-width: 376px;+ font-size: 13px;+ line-height: 20px;+ font-weight: 400;+ color: var(--color-gray-400);+ text-wrap: pretty;+}++/* ---------- visual slot ----------+ Same box, stacking and layout as clerk.com's visual container (the card's aria-hidden flex child):+ full card width, z-index 10 under the text's 20, overflow visible (the card clips), no pointer events.+ Its height is pinned to clerk.com's so the slot never depends on how the text wraps. */+.clerk-card__visual {+ position: relative;+ z-index: 10;+ flex: none;+ height: var(--visual-h);+ pointer-events: none;+ user-select: none;+ -webkit-user-select: none;+}+.clerk-card { --visual-h: 164px; }+.clerk-card--fraud { --visual-h: 392px; }+.clerk-card--session-management { --visual-h: 412px; }+.clerk-card--magic-links { --visual-h: 432px; }+.clerk-card--api-keys,+.clerk-card--clerk-cli { --visual-h: 160px; }+.clerk-card--magic-links .clerk-card__visual,+.clerk-card--advanced-security .clerk-card__visual,+.clerk-card--passwords .clerk-card__visual { isolation: isolate; }+.clerk-card--api-keys .clerk-card__visual { z-index: 20; display: flex; flex-direction: column; justify-content: flex-end; }+.clerk-card--clerk-cli .clerk-card__visual { display: flex; flex-direction: column; justify-content: flex-end; }++/* ---------- ?card=<slug>: one card at its normal size, centred, 112.40625px from the top ----------+ --card-w/h: its size on clerk.com; --card-x/y: its offset in the grid (for the glow);+ --card-sub: added to the centred left edge (rounded down to an even px) so that the card keeps the sub-pixel+ x and the even/odd pixel column it has on clerk.com at 1440px: edges and text rasterise the same, and+ video crops (ffmpeg rounds crop offsets to even px) line up with crops of clerk.com. */+html[data-card] .clerk-bento__container { max-width: none; padding: 0; }+html[data-card] .clerk-bento__stack {+ display: block;+ width: var(--card-w);+ height: var(--card-h);+ margin-left: calc(round(down, (100% - var(--card-w)) / 2, 2px) + var(--card-sub, 0px));+}+html[data-card] .clerk-bento__grid,+html[data-card] .clerk-bento__row,+html[data-card] .clerk-bento__cell { display: contents; }+html[data-card] .clerk-card { display: none; }+html[data-card="mfa"] .clerk-card--mfa,+html[data-card="session-management"] .clerk-card--session-management,+html[data-card="otp"] .clerk-card--otp,+html[data-card="fraud"] .clerk-card--fraud,+html[data-card="magic-links"] .clerk-card--magic-links,+html[data-card="social-sign-on"] .clerk-card--social-sign-on,+html[data-card="advanced-security"] .clerk-card--advanced-security,+html[data-card="bot-detection"] .clerk-card--bot-detection,+html[data-card="passwords"] .clerk-card--passwords,+html[data-card="api-keys"] .clerk-card--api-keys,+html[data-card="clerk-cli"] .clerk-card--clerk-cli { display: flex; height: 100%; }++/* ?card=<slug>&embed: the card 24px from every edge, no scrolling (the motion-clone site shows it in an iframe) */+html[data-embed] { overflow: hidden; }+html[data-embed] .clerk-bento { padding: 24px 0; }++html[data-card="mfa"] { --card-w: 394.65625px; --card-h: 260px; --card-x: 0px; --card-y: 0px; --card-sub: 0px; }+html[data-card="fraud"] { --card-w: 394.65625px; --card-h: 528px; --card-x: 0px; --card-y: 268px; --card-sub: 0px; }+html[data-card="advanced-security"] { --card-w: 394.65625px; --card-h: 260px; --card-x: 0px; --card-y: 804px; --card-sub: 0px; }+html[data-card="session-management"] { --card-w: 394.671875px; --card-h: 528px; --card-x: 402.65625px; --card-y: 0px; --card-sub: 0.65625px; }+html[data-card="social-sign-on"] { --card-w: 394.671875px; --card-h: 260px; --card-x: 402.65625px; --card-y: 536px; --card-sub: 0.65625px; }+html[data-card="bot-detection"] { --card-w: 394.671875px; --card-h: 260px; --card-x: 402.65625px; --card-y: 804px; --card-sub: 0.65625px; }+html[data-card="otp"] { --card-w: 394.65625px; --card-h: 260px; --card-x: 805.328125px; --card-y: 0px; --card-sub: 1.328125px; }+html[data-card="magic-links"] { --card-w: 394.65625px; --card-h: 528px; --card-x: 805.328125px; --card-y: 268px; --card-sub: 1.328125px; }+html[data-card="passwords"] { --card-w: 394.65625px; --card-h: 260px; --card-x: 805.328125px; --card-y: 804px; --card-sub: 1.328125px; }+html[data-card="api-keys"] { --card-w: 797.328125px; --card-h: 280px; --card-x: 0px; --card-y: 1072px; --card-sub: 2px; }+html[data-card="clerk-cli"] { --card-w: 394.65625px; --card-h: 280px; --card-x: 805.328125px; --card-y: 1072px; --card-sub: 1.328125px; }diff --git a/site/public/examples/clerk-bento/src/bento.js b/site/public/examples/clerk-bento/src/bento.jsnew file mode 100644index 0000000..2217008--- /dev/null+++ b/site/public/examples/clerk-bento/src/bento.js@@ -0,0 +1,79 @@+// clerk.com feature grid shell: mounts each card's widget into its visual slot.+//+// For every [data-widget="<slug>"] slot, in parallel:+// 1. fetch ./widgets/<slug>.html → slot.innerHTML (only on HTTP 200)+// 2. <link rel="stylesheet" href="./widgets/<slug>.css"> in <head> (a 404 just fires "error")+// 3. import("./widgets/<slug>.js") → mount(slot, card), card being the slot's .clerk-card+// A widget mounts as soon as its own three files have settled; missing files are skipped silently.+// Paths resolve against this module, i.e. src/widgets/ next to src/bento.js.+//+// With ?card=<slug> only that card's widget is mounted.+// Progress for recorders: each slot gets data-widget-state="loading" → "mounted" | "static" | "empty" |+// "error"; when every slot has settled, <html data-widgets="ready"> and window.clerkBento.ready resolves.++const WIDGETS = new URL("./widgets/", import.meta.url);++async function loadHtml(slug) {+ try {+ const res = await fetch(new URL(`${slug}.html`, WIDGETS), { cache: "no-cache" });+ return res.ok ? await res.text() : null;+ } catch {+ return null;+ }+}++function loadCss(slug) {+ return new Promise((resolve) => {+ const link = document.createElement("link");+ link.rel = "stylesheet";+ link.href = new URL(`${slug}.css`, WIDGETS).href;+ link.dataset.widget = slug;+ link.onload = () => resolve(true);+ link.onerror = () => {+ link.remove();+ resolve(false);+ };+ document.head.append(link);+ });+}++async function loadJs(slug) {+ try {+ return await import(new URL(`${slug}.js`, WIDGETS).href);+ } catch (err) {+ // a missing module is expected while widgets are added one by one; anything else is a bug worth seeing+ const missing = /failed to fetch dynamically imported module|error loading dynamically imported module|importing a module script failed/i;+ if (!missing.test(String(err?.message))) console.error(`[clerk-bento] ${slug}.js failed to load`, err);+ return null;+ }+}++async function mountWidget(slot) {+ const slug = slot.dataset.widget;+ const card = slot.closest(".clerk-card");+ slot.dataset.widgetState = "loading";+ const htmlP = loadHtml(slug).then((html) => {+ if (html !== null) slot.innerHTML = html;+ return html !== null;+ });+ const [hasHtml, hasCss, mod] = await Promise.all([htmlP, loadCss(slug), loadJs(slug)]);+ try {+ if (typeof mod?.mount === "function") {+ await mod.mount(slot, card);+ slot.dataset.widgetState = "mounted";+ } else {+ slot.dataset.widgetState = hasHtml || hasCss ? "static" : "empty";+ }+ } catch (err) {+ slot.dataset.widgetState = "error";+ console.error(`[clerk-bento] mount() of ${slug} threw`, err);+ }+}++// ?card=<slug> only shows (and so only mounts) that card's widget+const only = document.documentElement.dataset.card;+const slots = [...document.querySelectorAll("[data-widget]")].filter((s) => !only || s.dataset.widget === only);+const ready = Promise.allSettled(slots.map(mountWidget)).then(() => {+ document.documentElement.dataset.widgets = "ready";+});+window.clerkBento = { ready };diff --git a/site/public/examples/clerk-bento/src/shared/meteor.js b/site/public/examples/clerk-bento/src/shared/meteor.jsnew file mode 100644index 0000000..5cbf554--- /dev/null+++ b/site/public/examples/clerk-bento/src/shared/meteor.js@@ -0,0 +1,441 @@+// Meteor: clerk.com's shared light-streak canvas, ported to a plain ES module.+//+// A faithful port of clerk.com's React <Meteor> (turbopack module 242116, used by the session-management,+// fraud, social-sign-on, api-keys and clerk-cli cards). Same options, same defaults, same drawing calls in the+// same order, same clock, so a capture of this canvas matches clerk.com's pixel for pixel. No randomness.+//+// What it draws: each meteor is `segments` small squares (default 20 × 1.25 px, 2.5 px apart: 72.5 px long)+// that travel along an SVG path at `speed` px/ms (default 0.3) in a straight-line, linear motion. Each square+// is stroked with a colour taken from the `stops` ramp (tail = 0 → head = 1, channels mixed as+// sqrt(a²(1-p)+b²p), alpha linear, like popmotion's mixColor), over a faint 2.5 px glow blob (a 10×10 PNG,+// recoloured with a tail→head canvas gradient through "source-atop").+//+// ---------------------------------------------------------------------------------------------------------+// API+//+// import { createMeteor } from "../shared/meteor.js"; // from src/widgets/<slug>.js+//+// const meteor = createMeteor(container, {+// meteors: [{ width: 600, height: 87, path: "M0 86h136…H600", repeat: 2000 }],+// stops: "dark",+// });+// …+// meteor.exit().then(…) // fade out (0.3 s, as clerk.com's AnimatePresence exit) and destroy+// meteor.destroy() // or remove at once+//+// createMeteor(container, options) appends, like clerk.com's markup,+// <div data-meteor> ← wrapper (static block; clerk.com's motion.div exit wrapper)+// <canvas aria-hidden> ← position:absolute; inset:0; width:100%; height:100%+// <svg width=0 height=0 aria-hidden><path d=…></svg> ← one per meteor, used for getPointAtLength()+// </div>+// to `container`. The canvas fills the nearest positioned ancestor (normally `container`: give it+// position:relative/absolute and the meteor's width × height, as clerk.com does). The backing store is+// offsetWidth × offsetHeight × clamp(devicePixelRatio, 1, 2), measured once at creation (and on refresh()).+//+// options (all as clerk.com's props; defaults in brackets):+// meteors required. Array of { width, height, path, delay [0], repeat, direction, onBegin, onEnd }:+// width, height the coordinate box of `path` (the path is scaled by canvas CSS size / width,+// height; only absolute M, L, H, V, C numbers are scaled, exactly as clerk.com)+// path SVG path data the meteor follows (from its start to its end)+// delay ms after the clock start before the first run+// repeat ms period: the run restarts every `repeat` ms (a hard wrap, even mid-flight).+// Without it the meteor runs once.+// direction "reverse" runs the path end → start (colours flip too)+// onBegin() called on the first drawn frame of each run. Returning `false` stops the+// whole loop at once (clerk.com's social-sign-on uses this to finish its exit).+// onEnd() called when the tail has passed the end of the path+// skip [0] px along the path where each run starts (the meteor is already `skip` px in)+// segments [20] squares per meteor+// minSize [1.25] square size and line width at the tail (px)+// maxSize [1.25] … at the head (interpolated in between)+// gap [2.5] px between squares+// stops ["light"] "light" (cyan tail → purple head), "dark" (purple tail → cyan head), or a custom+// list [[cssColor, offset 0..1], …] e.g. fraud's+// [["rgb(185 28 28 / 0)", 0], ["rgb(185 28 28)", .5], ["rgb(243 107 22)", 1]]+// (hex, rgb()/rgba(), hsl()/hsla() as popmotion parses them)+// wait [false] idle (draw nothing, clock not started) until start() is called+// speed [0.3] px per ms+// style inline style for the <canvas> (object or cssText string), as the React prop+// className class for the wrapper <div>+//+// handle = createMeteor(…):+// handle.el the wrapper <div>; handle.canvas the <canvas>+// handle.start() clerk.com's ref.start(): restart the clock on the next frame, every run from the+// beginning, and release `wait`. Also restarts the loop if it was stopped.+// handle.stop() stop the rAF loop (the canvas keeps its last frame)+// handle.refresh() what a re-render of clerk.com's <Meteor> does (its effect depends on inline props):+// re-measure the canvas, reset each meteor's `playing` flag (so onBegin fires again for a+// meteor in flight) and restart the loop on the next frame, keeping the clock+// handle.exit({ duration = 300, easing = "cubic-bezier(.25,.1,.35,1)" } = {}) → Promise+// fade the wrapper to opacity 0 (Motion's default 0.3 s exit tween, the+// AnimatePresence `exit:{opacity:0}` wrapper the five cards use), keep drawing meanwhile,+// then destroy(). Resolves true when removed, false if revive() interrupted it.+// handle.revive() cancel a running exit: fade back to opacity 1 (same default tween), clock continues+// (clerk.com: re-hovering during the exit revives the same instance)+// handle.destroy() stop and remove the wrapper (idempotent)+// handle.time ms on the meteor clock (0 before the first frame); handle.running loop active?+// handle.exiting true during exit()+//+// Clock and loop (as clerk.com): the loop starts when the glow image has loaded (about one frame after+// creation); the clock origin is the first frame's performance.now(). Each frame: clearRect, then per meteor+// y = (time − delay) % repeat (or time − delay without repeat); nothing drawn while y ≤ 0; tail position+// = skip − length + y·speed. clerk.com does not pause the loop off screen (the canvas only exists while the+// card is hovered), and neither does this port.+// ---------------------------------------------------------------------------------------------------------++export const METEOR_STOPS = {+ light: [["rgb(93 227 255 / 0)", 0], ["rgb(93 227 255)", 0.5], ["rgb(108 71 255)", 1]],+ dark: [["rgb(108 71 255 / 0)", 0], ["rgb(108 71 255)", 0.5], ["rgb(93 227 255)", 1]],+};++// clerk.com's embedded 10×10 glow blob (faint cyan, peak alpha 19/255)+const GLOW_PNG =+ "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAMAAAC67D+PAAAAAXNSR0IArs4c6QAAAEhQTFRFAAAA////AP//AAD/AP//gID/AP//AKr/AL//ANX/AKr/ALb/AN//AL//AMb/AMbjAMz/ANH/ALnoANj/AMj/AMjtANX/AMn/G8447gAAABh0Uk5TAAEBAQICAwMEBgYHCAgJCQoLCw0ODhITA3IuUQAAAEdJREFUeNoNycENwzAMBMFdkgmQ/qs1IPHi+Q4qIioMnfXQNdPfD5KJ/op+cgrHeg8rRONSI3vI7t321i7Pngh21blEDCDwB0UUHis/7NTIAAAAAElFTkSuQmCC";++// ---------- colour parsing and mixing (popmotion / style-value-types, as bundled by clerk.com) ----------++const clamp = (min, max) => (v) => Math.max(Math.min(v, max), min);+const sanitize = (v) => (v % 1 ? Number(v.toFixed(5)) : v);+const floatRegex = /(-)?([\d]*\.?[\d])+/g;+const colorRegex =+ /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;+const isString = (v) => typeof v === "string";+const alpha01 = clamp(0, 1);+const percent = { transform: (v) => `${v}%` };+const isColorString = (type, key) => (v) =>+ !!((isString(v) && colorRegex.test(v) && v.startsWith(type)) || (key && Object.prototype.hasOwnProperty.call(v, key)));+const splitColor = (a, b, c) => (v) => {+ if (!isString(v)) return v;+ const [x, y, z, alpha] = v.match(floatRegex);+ return { [a]: parseFloat(x), [b]: parseFloat(y), [c]: parseFloat(z), alpha: alpha !== undefined ? parseFloat(alpha) : 1 };+};+const hsla = {+ test: isColorString("hsl", "hue"),+ parse: splitColor("hue", "saturation", "lightness"),+ transform: ({ hue, saturation, lightness, alpha = 1 }) =>+ "hsla(" + Math.round(hue) + ", " + percent.transform(sanitize(saturation)) + ", " ++ percent.transform(sanitize(lightness)) + ", " + sanitize(alpha01(alpha)) + ")",+};+const clamp255 = clamp(0, 255);+const rgbUnit = { transform: (v) => Math.round(clamp255(v)) };+const rgba = {+ test: isColorString("rgb", "red"),+ parse: splitColor("red", "green", "blue"),+ transform: ({ red, green, blue, alpha = 1 }) =>+ "rgba(" + rgbUnit.transform(red) + ", " + rgbUnit.transform(green) + ", " + rgbUnit.transform(blue) + ", " ++ sanitize(alpha01(alpha)) + ")",+};+const hex = {+ test: isColorString("#"),+ parse(v) {+ let r = "", g = "", b = "", a = "";+ if (v.length > 5) { r = v.substr(1, 2); g = v.substr(3, 2); b = v.substr(5, 2); a = v.substr(7, 2); }+ else { r = v.substr(1, 1); g = v.substr(2, 1); b = v.substr(3, 1); a = v.substr(4, 1); r += r; g += g; b += b; a += a; }+ return { red: parseInt(r, 16), green: parseInt(g, 16), blue: parseInt(b, 16), alpha: a ? parseInt(a, 16) / 255 : 1 };+ },+ transform: rgba.transform,+};+function hueToRgb(p, q, t) {+ if (t < 0) t += 1;+ if (t > 1) t -= 1;+ if (t < 1 / 6) return p + (q - p) * 6 * t;+ if (t < 1 / 2) return q;+ if (t < 2 / 3) return p + (q - p) * (2 / 3 - t) * 6;+ return p;+}+function hslaToRgba({ hue, saturation, lightness, alpha }) {+ hue /= 360; saturation /= 100; lightness /= 100;+ let red = 0, green = 0, blue = 0;+ if (!saturation) red = green = blue = lightness;+ else {+ const q = lightness < 0.5 ? lightness * (1 + saturation) : lightness + saturation - lightness * saturation;+ const p = 2 * lightness - q;+ red = hueToRgb(p, q, hue + 1 / 3); green = hueToRgb(p, q, hue); blue = hueToRgb(p, q, hue - 1 / 3);+ }+ return { red: Math.round(red * 255), green: Math.round(green * 255), blue: Math.round(blue * 255), alpha };+}+const mixLinearColor = (from, to, v) => {+ const fromExpo = from * from;+ return Math.sqrt(Math.max(0, v * (to * to - fromExpo) + fromExpo));+};+const colorTypes = [hex, rgba, hsla];+const getColorType = (v) => colorTypes.find((type) => type.test(v));+function mixColor(from, to) {+ let fromType = getColorType(from), toType = getColorType(to);+ if (!fromType || !toType) throw new Error(`[meteor] '${!fromType ? from : to}' is not an animatable color`);+ let fromColor = fromType.parse(from), toColor = toType.parse(to);+ if (fromType === hsla) { fromColor = hslaToRgba(fromColor); fromType = rgba; }+ if (toType === hsla) { toColor = hslaToRgba(toColor); toType = rgba; }+ const blended = Object.assign({}, fromColor);+ return (v) => {+ for (const key in blended) if (key !== "alpha") blended[key] = mixLinearColor(fromColor[key], toColor[key], v);+ blended.alpha = -v * fromColor.alpha + v * toColor.alpha + fromColor.alpha;+ return fromType.transform(blended);+ };+}+/** colour at h (0 = tail … 1 = head) of a stops list, as clerk.com's ramp (undefined outside the stops) */+export function stopsColor(stops) {+ const segs = stops.slice(0, -1).map((stop, i) => [mixColor(stop[0], stops[i + 1][0]), stop[1], stops[i + 1][1]]);+ return (h) => {+ for (const [mix, a, b] of segs) if (h >= a && h <= b) return mix((h - a) / (b - a));+ };+}++/** length in px of the first `count` squares and the gaps between them (count defaults to all: the meteor length) */+export function meteorLength(segments, minSize, maxSize, gap, count) {+ let len = 0;+ for (let k = 0; k < (count ?? segments); k++) len += minSize + (k / (segments - 1)) * (maxSize - minSize);+ return len + gap * ((count ?? segments) - 1);+}++const SVG_NS = "http://www.w3.org/2000/svg";++export function createMeteor(container, options = {}) {+ const {+ meteors,+ style,+ className,+ skip = 0,+ segments = 20,+ minSize = 1.25,+ maxSize = 1.25,+ gap = 2.5,+ stops: stopsOpt = "light",+ wait = false,+ speed = 0.3,+ } = options;+ if (!Array.isArray(meteors)) throw new Error("[meteor] options.meteors (array) is required");+ const stops = typeof stopsOpt === "string" ? METEOR_STOPS[stopsOpt] : stopsOpt;+ if (!stops) throw new Error(`[meteor] unknown stops preset "${stopsOpt}"`);+ const colorAt = stopsColor(stops);++ // DOM, as clerk.com renders it (inside its AnimatePresence motion.div)+ const el = document.createElement("div");+ el.dataset.meteor = "";+ if (className) el.className = className;+ const canvas = document.createElement("canvas");+ canvas.setAttribute("aria-hidden", "true");+ canvas.style.cssText = "position:absolute;inset:0;width:100%;height:100%;display:block;";+ if (typeof style === "string") canvas.style.cssText += style;+ else if (style) Object.assign(canvas.style, style);+ el.append(canvas);+ const paths = meteors.map((m) => {+ const svg = document.createElementNS(SVG_NS, "svg");+ svg.setAttribute("width", "0");+ svg.setAttribute("height", "0");+ svg.setAttribute("aria-hidden", "true");+ svg.style.cssText = "position:absolute;width:0;height:0;overflow:hidden;"; // keeps it out of any layout+ const path = document.createElementNS(SVG_NS, "path");+ path.setAttribute("d", m.path);+ svg.append(path);+ el.append(svg);+ return path;+ });+ container.append(el);++ // refs (persist across refresh(), as React refs persist across effect runs)+ let origin = null; // clock origin (performance.now of the first frame)+ let elapsed = 0;+ let waiting = wait;+ const state = []; // per meteor: { path, meteorLength, d, totalLength, w, h, playing }+ let destroyed = false;+ let teardown = null; // cleanup of the current "effect" run+ let running = false;+ let exitAnim = null;++ // one run of clerk.com's useEffect+ function setup() {+ let raf;+ const dpr = Math.max(1, Math.min(window.devicePixelRatio, 2));+ let ctx = canvas.getContext("2d");+ if (!ctx) return () => {};+ const W = canvas.offsetWidth * dpr;+ const H = canvas.offsetHeight * dpr;+ canvas.width = W;+ canvas.height = H;+ ctx.scale(dpr, dpr);+ if (state.length === 0)+ for (let e = 0; e < meteors.length; e++) {+ const m = meteors[e];+ const len = meteorLength(segments, minSize, maxSize, gap);+ const d = -len * (canvas.width / m.width / dpr);+ let total = paths[e].getTotalLength();+ total = (total * (canvas.width / m.width)) / dpr;+ const sx = W / m.width / dpr, sy = H / m.height / dpr;+ const path2d = new window.Path2D(+ m.path+ .replace(/H\s*([\d.]+)/g, (_, x) => `H${parseFloat(x) * sx}`)+ .replace(/V\s*([\d.]+)/g, (_, y) => `V${parseFloat(y) * sy}`)+ .replace(/(M|L)\s*([\d.]+)\s+([\d.]+)/g, (_, c, x, y) => `${c}${parseFloat(x) * sx} ${parseFloat(y) * sy}`)+ .replace(+ /C\s*([\d.]+)\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)\s+([\d.]+)/g,+ (_, a, b, c, d2, e2, f) =>+ `C${parseFloat(a) * sx} ${parseFloat(b) * sy} ${parseFloat(c) * sx} ${parseFloat(d2) * sy} ${parseFloat(e2) * sx} ${parseFloat(f) * sy}`,+ ),+ );+ state[e] = { path: path2d, meteorLength: len, d, totalLength: total, w: W, h: H, playing: false };+ }+ const img = new Image();++ function frame() {+ if (waiting) {+ raf = window.requestAnimationFrame(frame);+ return;+ }+ if (!canvas || !ctx) return;+ const now = performance.now();+ if (origin === null) origin = now;+ elapsed = now - origin;+ ctx.clearRect(0, 0, W, H);+ for (let e = 0; e < state.length; e++) {+ if (!paths[e]) continue;+ const { delay = 0, repeat, width, direction } = meteors[e];+ const reverse = direction === "reverse";+ const s = state[e];+ const len = meteorLength(segments, minSize, maxSize, gap);+ let y = typeof repeat === "number" ? (elapsed - delay) % repeat : elapsed - delay;+ if ((y = Math.max(0, y)) <= 0) continue;+ const N = (skip * (canvas.width / width)) / dpr + (-len + (y * speed * (canvas.width / width)) / dpr);+ s.d = reverse ? s.totalLength - N - len : N;+ if (s.d > s.totalLength) {+ if (s.playing) {+ s.playing = false;+ meteors[e].onEnd?.();+ if (!ctx) return; // destroyed/stopped from the callback+ }+ continue;+ }+ if (!s.playing && ((s.playing = true), meteors[e].onBegin?.() === false)) {+ running = false;+ return;+ }+ if (!ctx) return; // destroyed/stopped from onBegin+ // glow blobs, recoloured by a tail → head gradient+ ctx.beginPath();+ ctx.globalAlpha = 100; // sic (out of range, ignored by canvas: alpha stays 1), as clerk.com+ for (let t = 0; t < segments; t++) {+ const r = meteorLength(segments, minSize, maxSize, gap, t + 1) + s.d;+ if (r < 0 || r > s.totalLength) continue;+ const n = (t + 1) / segments;+ const size = minSize + (reverse ? 1 - n : n) * (maxSize - minSize);+ const p = paths[e].getPointAtLength(r + size / 2);+ const u = 2 * size;+ ctx.drawImage(img, p.x - u / 2, p.y - u / 2, u, u);+ }+ ctx.globalAlpha = 1;+ const L = paths[e].getPointAtLength(s.d);+ const M = paths[e].getPointAtLength(s.d + len);+ const x0 = Math.min(L.x, M.x), x1 = Math.max(L.x, M.x), y0 = Math.min(L.y, M.y), y1 = Math.max(L.y, M.y);+ ctx.rect(x0 - 16, y0 - 16, x1 - x0 + 32, y1 - y0 + 32);+ const grad = reverse ? ctx.createLinearGradient(M.x, M.y, L.x, L.y) : ctx.createLinearGradient(L.x, L.y, M.x, M.y);+ for (const stop of stops) grad.addColorStop(stop[1], stop[0]);+ ctx.globalCompositeOperation = "source-atop";+ ctx.fillStyle = grad;+ ctx.fill();+ ctx.globalCompositeOperation = "source-over";+ // the squares: one dash of the full path each+ for (let t = 0; t < segments; t++) {+ const at = meteorLength(segments, minSize, maxSize, gap, t + 1) + s.d;+ if (at < 0 || at > s.totalLength) continue;+ const n = (t + 1) / segments;+ const size = minSize + (reverse ? 1 - n : n) * (maxSize - minSize);+ const h = reverse ? 1 - n : n;+ ctx.lineWidth = (size * (canvas.width / width)) / dpr;+ ctx.strokeStyle = colorAt(h);+ ctx.setLineDash([0, at, size, 999999]);+ ctx.stroke(s.path);+ }+ }+ raf = window.requestAnimationFrame(frame);+ }++ img.onload = () => {+ raf = window.requestAnimationFrame(frame);+ };+ img.src = GLOW_PNG;+ running = true;+ return () => {+ img.onload = null;+ window.cancelAnimationFrame(raf);+ ctx = null;+ state.length = 0;+ running = false;+ };+ }++ teardown = setup();++ const handle = {+ el,+ canvas,+ get time() {+ return elapsed;+ },+ get running() {+ return running;+ },+ get exiting() {+ return !!exitAnim;+ },+ start() {+ if (destroyed) return;+ origin = null;+ for (const s of state) s.d = 0;+ waiting = false;+ if (!running) {+ teardown?.();+ teardown = setup();+ }+ },+ stop() {+ if (destroyed || !running) return;+ // keep the pixels: cancel the loop without clearing+ teardown?.();+ teardown = null;+ },+ refresh() {+ if (destroyed) return;+ teardown?.();+ teardown = setup();+ },+ exit({ duration = 300, easing = "cubic-bezier(.25,.1,.35,1)" } = {}) {+ if (destroyed) return Promise.resolve(true);+ exitAnim?.cancel();+ const from = getComputedStyle(el).opacity;+ const anim = el.animate({ opacity: [from, 0] }, { duration, easing, fill: "both" });+ exitAnim = anim;+ return anim.finished.then(+ () => {+ if (exitAnim !== anim) return false;+ exitAnim = null;+ handle.destroy();+ return true;+ },+ () => false,+ );+ },+ revive({ duration = 300, easing = "cubic-bezier(.25,.1,.35,1)" } = {}) {+ if (destroyed || !exitAnim) return;+ const from = getComputedStyle(el).opacity;+ exitAnim.cancel();+ exitAnim = null;+ const anim = el.animate({ opacity: [from, 1] }, { duration, easing, fill: "both" });+ anim.finished.then(() => {+ if (!destroyed && !exitAnim) {+ el.style.opacity = "";+ anim.cancel();+ }+ }, () => {});+ },+ destroy() {+ if (destroyed) return;+ teardown?.();+ teardown = null;+ exitAnim?.cancel();+ exitAnim = null;+ destroyed = true;+ el.remove();+ },+ };+ return handle;+}diff --git a/site/public/examples/clerk-bento/src/widgets/README.md b/site/public/examples/clerk-bento/src/widgets/README.mdnew file mode 100644index 0000000..a6d9f1d--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/README.md@@ -0,0 +1,70 @@+# Widgets: one per card++`src/bento.js` fills every `<div class="clerk-card__visual" data-widget="<slug>">` in `index.html`+from up to three files here. Each one is optional and a missing one is skipped silently:++| file | what bento.js does with it |+|---|---|+| `<slug>.html` | fetched; on HTTP 200 it becomes the slot's `innerHTML` |+| `<slug>.css` | linked in `<head>` (`<link rel="stylesheet">`) |+| `<slug>.js` | `import()`ed as an ES module; its export `mount(slot, card)` is called |++- All three load in parallel. `mount` runs once the widget's own HTML is in the slot and its CSS has+ loaded (or failed), independently of the other widgets. It may be `async`.+- `slot` is the visual slot, `card` the `.clerk-card` around it. Hover is driven from the card, as on+ clerk.com (react-aria `useHover` on the card root): `card.addEventListener("pointerenter" | "pointerleave", …)`.+ The slot itself has `pointer-events: none`.+- Slugs: `mfa`, `session-management`, `otp`, `fraud`, `magic-links`, `social-sign-on`,+ `advanced-security`, `bot-detection`, `passwords`, `api-keys`, `clerk-cli`.+- Assets (SVG, images, data) go in `assets/<slug>/` at the example root; from CSS that is+ `url(../../assets/<slug>/…)`, from JS `new URL("../../assets/<slug>/…", import.meta.url)`, and from the+ HTML fragment (resolved against `index.html`) `./assets/<slug>/…`. Nothing may be loaded from other origins.+- Scope CSS to the card: `.clerk-card--<slug> …` or class names prefixed with the slug.+- Fonts are already loaded by `src/bento.css`: `var(--font-sans)` (Geist for clerk.com's Suisse Int'l,+ Geist digits as on clerk.com) and `var(--font-mono)` (Geist Mono for clerk.com's Söhne Mono). clerk.com's gray+ scale is available as `--color-gray-25` … `--color-gray-950`. Tailwind's preflight is applied globally.++The slot reproduces clerk.com's visual container (the card's `aria-hidden` flex child): full card width,+`position: relative`, `z-index: 10` (text is `z-index: 20`; `api-keys` is `20`), overflow visible (the card+clips with `overflow: hidden` + 16px radius, except `otp`), `isolation: isolate` for `magic-links`,+`advanced-security`, `passwords`, and `display: flex; flex-direction: column; justify-content: flex-end` for+`api-keys` and `clerk-cli`. Its height is clerk.com's: 164px on the 260px cards, `fraud` 392, `session-management`+412, `magic-links` 432, `api-keys` and `clerk-cli` 160.++Viewing and recording: `index.html?card=<slug>` shows one card at its clerk.com size, centred, 112.40625px from+the top (clerk.com's sub-pixel offset kept), and mounts only that card's widget. It also survives a padded body+(`document.body.style.padding = "1800px 0 900px"`): `scrollIntoView` then lands the card on the same viewport y+as on clerk.com, which has the same `scroll-padding-top: 4rem`. Each slot gets `data-widget-state` (`loading`, `mounted`, `static`,+`empty`, `error`); `<html data-widgets="ready">` and `await window.clerkBento.ready` mark the end of loading.+Recon notes, the cards' clerk.com DOM, CSS and source: `.motion-clone/clerk-bento/` (`cards.md`).++## Shared modules++`src/shared/` holds code several widgets use. Import it, don't copy or edit it.++### `src/shared/meteor.js`: clerk.com's light-streak canvas ("Meteor", module 242116)++A faithful port of the React `<Meteor>` used by session-management, fraud, social-sign-on, api-keys and+clerk-cli: same options and defaults, same canvas calls, same clock, no randomness. Full documentation is in+the file's header comment.++```js+import { createMeteor } from "../shared/meteor.js";++// on hover-in (clerk.com mounts it inside AnimatePresence while the card is hovered)+const meteor = createMeteor(trackEl, { // trackEl: positioned, meteor width × height+ stops: "dark", // "light" (default) | "dark" | [[cssColor, offset], …]+ meteors: [{ width: 600, height: 87, path: "M0 86h…", delay: 0, repeat: 2000 }],+ // also: direction: "reverse", onBegin() (return false stops the loop), onEnd(); and at the top level+ // skip, segments, minSize, maxSize, gap, speed, wait (+ meteor.start()), style, className+});+// on hover-out: clerk.com's AnimatePresence exit {opacity: 0} (0.3 s, cubic-bezier(.25,.1,.35,1)), then unmount+meteor.exit();+// on re-hover while it is still fading out: meteor.revive() (same instance, clock continues)+```++Handle: `el`, `canvas`, `start()` (clerk.com's `ref.start()`), `stop()`, `refresh()` (what a React re-render+of `<Meteor>` does: re-measure, `onBegin` fires again for meteors in flight, clock kept), `exit()`, `revive()`,+`destroy()`, `time`, `running`, `exiting`. Also exported: `METEOR_STOPS`, `meteorLength()`, `stopsColor()`.+The canvas is sized once at creation to the nearest positioned ancestor × clamp(devicePixelRatio, 1, 2). Like+clerk.com, it does not pause off screen.diff --git a/site/public/examples/clerk-bento/src/widgets/advanced-security.css b/site/public/examples/clerk-bento/src/widgets/advanced-security.cssnew file mode 100644index 0000000..198831a--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/advanced-security.css@@ -0,0 +1,204 @@+/* "Advanced security" card visual: a round fingerprint button between two notched side panels, under a+ top-down radial vignette; on hover a WebGL2 dot field and a glow ring are mounted (advanced-security.js).+ Every value is clerk.com's resolved Tailwind (module 561502, .motion-clone/clerk-bento/dom/advanced-security.html);+ colours with alpha use the same color-mix()/lab() as clerk.com's @supports branches, gradients the same+ "in oklab" interpolation. Stacking is clerk.com's: the slot is isolated, the panels and the dot field are+ z-auto (under the z-10 vignette), the button layers are z-10 (over it). */++.clerk-card--advanced-security {+ --as-sky-100: #ccf9ff;+ --as-sky-300: #5de3ff;+ --as-sky-600: #0089be;+ --as-gray-750: #373840;+}++/* absolute inset-0 -bottom-5 z-10: radial vignette over the visual and 20px below it */+.clerk-card--advanced-security .as-vignette {+ position: absolute;+ inset: 0;+ bottom: -20px;+ z-index: 10;+ background-image: radial-gradient(50% 100% at top, #0000, #212126ad 61.5%, #212126);+}++/* absolute inset-x-0 top-full z-10 mt-5 h-12 bg-gray-900: hides the panels behind the card text */+.clerk-card--advanced-security .as-blocker {+ position: absolute;+ inset-inline: 0;+ top: 100%;+ z-index: 10;+ margin-top: 20px;+ height: 48px;+ background-color: var(--color-gray-900);+}++/* relative flex h-full items-center justify-center */+.clerk-card--advanced-security .as-stage {+ position: relative;+ display: flex;+ height: 100%;+ align-items: center;+ justify-content: center;+}++/* hover only: absolute top-1/2 left-1/2 -mt/-ml-[100px] w-[200px] aspect-square, radial alpha mask */+.clerk-card--advanced-security .as-dots {+ position: absolute;+ top: 50%;+ left: 50%;+ margin-top: -6.25rem;+ margin-left: -6.25rem;+ aspect-ratio: 1;+ width: 12.5rem;+ -webkit-mask: radial-gradient(50% 50%, #fff, #0000);+ mask: radial-gradient(50% 50%, #fff, #0000);+}+.clerk-card--advanced-security .as-dots canvas {+ position: absolute;+ inset: 0;+ height: 100%;+ width: 100%;+}++/* relative h-[4.5rem] w-[4.5rem] */+.clerk-card--advanced-security .as-button {+ position: relative;+ height: 4.5rem;+ width: 4.5rem;+}++/* side panels: absolute top-1/2 right-full|left-full -mt-[140px] mr-12|ml-12, x animated (inline transform) */+.clerk-card--advanced-security .as-panel {+ position: absolute;+ top: 50%;+ margin-top: -8.75rem;+}+.clerk-card--advanced-security .as-panel--l { right: 100%; margin-right: 3rem; }+.clerk-card--advanced-security .as-panel--r { left: 100%; margin-left: 3rem; }+/* relative aspect-224/280 w-[224px] (-scale-x-100 on the left one) */+.clerk-card--advanced-security .as-panel__box {+ position: relative;+ aspect-ratio: 224 / 280;+ width: 14rem;+}+.clerk-card--advanced-security .as-panel__box--flip { scale: -100% 1; }+.clerk-card--advanced-security .as-panel__box svg {+ position: absolute;+ inset: 0;+ height: 100%;+ width: 100%;+ overflow: visible;+}+/* notch glow: absolute top-1/2 left-4 -mt-7 flex h-14 w-5 items-center overflow-hidden >+ -ml-4 h-10 w-5 rounded-[50%] bg-sky-300/20 blur */+.clerk-card--advanced-security .as-panel__glow {+ position: absolute;+ top: 50%;+ left: 1rem;+ margin-top: -1.75rem;+ display: flex;+ height: 3.5rem;+ width: 1.25rem;+ align-items: center;+ overflow: hidden;+}+.clerk-card--advanced-security .as-panel__glow > div {+ margin-left: -1rem;+ height: 2.5rem;+ width: 1.25rem;+ flex: none;+ border-radius: 50%;+ background-color: color-mix(in oklab, var(--as-sky-300) 20%, transparent);+ filter: blur(8px);+}++/* the button: well, raised disc, cyan tint, face, fingerprint, sheen, (hover) ring: all z-10 */+.clerk-card--advanced-security .as-well,+.clerk-card--advanced-security .as-disc,+.clerk-card--advanced-security .as-tint,+.clerk-card--advanced-security .as-face,+.clerk-card--advanced-security .as-sheen {+ position: absolute;+ z-index: 10;+ border-radius: 2147483647px;+}+/* absolute inset-0 z-10 rounded-full bg-gray-950/60 shadow-[0_1px_white/0.03] */+.clerk-card--advanced-security .as-well {+ inset: 0;+ background-color: color-mix(in oklab, var(--color-gray-950) 60%, transparent);+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 1px color-mix(in oklab, #fff 3%, transparent);+}+/* absolute inset-1 z-10 rounded-full bg-gray-800 bg-linear-to-tr from-white/0 via-white/0 to-white/10+ shadow-[0_2px_12px_black/0.5] */+.clerk-card--advanced-security .as-disc {+ inset: 4px;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to top right in oklab,+ color-mix(in oklab, #fff 0%, transparent) 0%,+ color-mix(in oklab, #fff 0%, transparent) 50%,+ color-mix(in oklab, #fff 10%, transparent) 100%);+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 2px 12px color-mix(in oklab, #000 50%, transparent);+}+/* absolute inset-1 z-10 rounded-full bg-linear-to-tr from-[#64E5FF]/20 via-[#64E5FF]/0 to-[#64E5FF]/0 */+.clerk-card--advanced-security .as-tint {+ inset: 4px;+ background-image: linear-gradient(to top right in oklab,+ lab(84.5189% -31.4667 -23.9754 / .2) 0%, lab(0% 0 0 / 0) 50%, lab(0% 0 0 / 0) 100%);+}+/* from-gray-850 to-gray-750 absolute inset-[calc(4px+1px)] z-10 rounded-full bg-linear-to-b */+.clerk-card--advanced-security .as-face {+ inset: 5px;+ background-image: linear-gradient(to bottom in oklab, var(--color-gray-850) 0%, var(--as-gray-750) 100%);+}+/* absolute top-1/2 left-1/2 z-10 -mt/-ml-[22px] h-11 w-11 */+.clerk-card--advanced-security .as-print {+ position: absolute;+ top: 50%;+ left: 50%;+ z-index: 10;+ margin-top: -22px;+ margin-left: -22px;+ height: 2.75rem;+ width: 2.75rem;+}+/* absolute inset-1 z-10 rounded-full mix-blend-overlay [clip-path:circle(50%)] >+ absolute inset-0 bg-linear-to-br from-white/0 from-30% via-sky-100/70 to-white/0 to-70% */+.clerk-card--advanced-security .as-sheen {+ inset: 4px;+ mix-blend-mode: overlay;+ clip-path: circle(50%);+}+.clerk-card--advanced-security .as-sheen__band {+ position: absolute;+ inset: 0;+ background-image: linear-gradient(to bottom right in oklab,+ color-mix(in oklab, #fff 0%, transparent) 30%,+ color-mix(in oklab, var(--as-sky-100) 70%, transparent) 50%,+ color-mix(in oklab, #fff 0%, transparent) 70%);+}++/* hover only: absolute inset-0 (opacity fade) > absolute inset-0 z-10 (opacity pulse) > two rings */+.clerk-card--advanced-security .as-ring,+.clerk-card--advanced-security .as-ring__pulse { position: absolute; inset: 0; }+.clerk-card--advanced-security .as-ring__pulse { z-index: 10; }+/* absolute -inset-0.5 rounded-full border border-sky-300/50+ shadow-[0_0_1px_1px,0_0_2px_2px,0_0_4px_4px,0_0_8px_8px,0_0_16px_16px,0_0_32px_32px] shadow-sky-300/4 */+.clerk-card--advanced-security .as-ring__outer {+ --as-glow: color-mix(in oklab, color-mix(in oklab, var(--as-sky-300) 4%, transparent) 100%, transparent);+ position: absolute;+ inset: -2px;+ border-radius: 2147483647px;+ border: 1px solid color-mix(in oklab, var(--as-sky-300) 50%, transparent);+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000,+ 0 0 1px 1px var(--as-glow), 0 0 2px 2px var(--as-glow), 0 0 4px 4px var(--as-glow),+ 0 0 8px 8px var(--as-glow), 0 0 16px 16px var(--as-glow), 0 0 32px 32px var(--as-glow);+}+/* absolute inset-1 rounded-full border border-sky-300/15 shadow-[inset_0_0_4px_2px] shadow-sky-600/15 */+.clerk-card--advanced-security .as-ring__inner {+ position: absolute;+ inset: 4px;+ border-radius: 2147483647px;+ border: 1px solid color-mix(in oklab, var(--as-sky-300) 15%, transparent);+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000,+ inset 0 0 4px 2px color-mix(in oklab, color-mix(in oklab, var(--as-sky-600) 15%, transparent) 100%, transparent);+}diff --git a/site/public/examples/clerk-bento/src/widgets/advanced-security.html b/site/public/examples/clerk-bento/src/widgets/advanced-security.htmlnew file mode 100644index 0000000..c68e541--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/advanced-security.html@@ -0,0 +1,17 @@+<!-- "Advanced security" card visual: clerk.com's markup (module 561502), Tailwind classes resolved in+ advanced-security.css. Inline styles hold the rest state; advanced-security.js animates them and mounts the+ hover-only layers (the WebGL2 dot field before .as-button, the glow ring at the end of .as-button). -->+<div class="as-vignette"></div>+<div class="as-blocker"></div>+<div class="as-stage">+ <div class="as-button">+ <div class="as-panel as-panel--l" style="transform: translateX(5.1875rem)"><div class="as-panel__box as-panel__box--flip"><svg viewBox="0 0 224 280" height="280" fill="none" aria-hidden="true"><path fill="#fff" fill-opacity="0.05" d="M8 .25a8 8 0 0 0-8 8v91.704c0 2.258.954 4.411 2.628 5.927l10.744 9.738A7.998 7.998 0 0 1 16 121.546v36.408a7.998 7.998 0 0 1-2.628 5.927l-10.744 9.738A7.998 7.998 0 0 0 0 179.546v92.204a8 8 0 0 0 8 8h308a8 8 0 0 0 8-8V8.25a8 8 0 0 0-8-8H8Z"></path><path stroke="#fff" stroke-opacity="0.05" d="M.5 99.954V8.25A7.5 7.5 0 0 1 8 .75h308a7.5 7.5 0 0 1 7.5 7.5v263.5a7.5 7.5 0 0 1-7.5 7.5H8a7.5 7.5 0 0 1-7.5-7.5v-92.204a7.5 7.5 0 0 1 2.464-5.557l10.744-9.737a8.5 8.5 0 0 0 2.792-6.298v-36.408a8.5 8.5 0 0 0-2.792-6.298l-10.744-9.737A7.5 7.5 0 0 1 .5 99.954Z"></path></svg><div class="as-panel__glow"><div></div></div></div></div>+ <div class="as-panel as-panel--r" style="transform: translateX(-5.1875rem)"><div class="as-panel__box"><svg viewBox="0 0 224 280" height="280" fill="none" aria-hidden="true"><path fill="#fff" fill-opacity="0.05" d="M8 .25a8 8 0 0 0-8 8v91.704c0 2.258.954 4.411 2.628 5.927l10.744 9.738A7.998 7.998 0 0 1 16 121.546v36.408a7.998 7.998 0 0 1-2.628 5.927l-10.744 9.738A7.998 7.998 0 0 0 0 179.546v92.204a8 8 0 0 0 8 8h308a8 8 0 0 0 8-8V8.25a8 8 0 0 0-8-8H8Z"></path><path stroke="#fff" stroke-opacity="0.05" d="M.5 99.954V8.25A7.5 7.5 0 0 1 8 .75h308a7.5 7.5 0 0 1 7.5 7.5v263.5a7.5 7.5 0 0 1-7.5 7.5H8a7.5 7.5 0 0 1-7.5-7.5v-92.204a7.5 7.5 0 0 1 2.464-5.557l10.744-9.737a8.5 8.5 0 0 0 2.792-6.298v-36.408a8.5 8.5 0 0 0-2.792-6.298l-10.744-9.737A7.5 7.5 0 0 1 .5 99.954Z"></path></svg><div class="as-panel__glow"><div></div></div></div></div>+ <div class="as-well"></div>+ <div class="as-disc"></div>+ <div class="as-tint" style="opacity: 0"></div>+ <div class="as-face"></div>+ <svg viewBox="0 0 44 44" fill="none" aria-hidden="true" class="as-print"><g filter="url(#as-print-engrave)"><path stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-opacity=".25" stroke-width="1.5" d="M32.147 27.52c0-5.471-4.543-9.908-10.147-9.908s-10.147 4.437-10.147 9.909c0 3.744 1.329 7.184 3.551 9.897a16.152 16.152 0 0 0 2.549 2.488m21.297-22.83C35.67 11.45 29.283 7.704 22 7.704c-7.283 0-13.67 3.746-17.25 9.372M34.176 5.785A25.735 25.735 0 0 0 22 2.75c-4.413 0-8.562 1.1-12.176 3.035M28.088 40.25c-6.322-.953-11.162-6.29-11.162-12.73 0-2.735 2.272-4.953 5.074-4.953s5.073 2.218 5.073 4.954c0 2.736 2.272 4.954 5.074 4.954s5.074-2.218 5.074-4.954c0-8.209-6.815-14.863-15.221-14.863-8.406 0-15.22 6.654-15.22 14.863 0 2.505.634 4.865 1.755 6.935M22 26.53c0 5.472 4.543 9.908 10.147 9.908.695 0 1.374-.068 2.03-.198" shape-rendering="crispEdges"></path></g><path class="as-cyan" stroke="#5DE3FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" pathLength="1" d="M39.25 17.076C35.67 11.45 29.283 7.704 22 7.704c-7.283 0-13.67 3.746-17.25 9.372" opacity="0" stroke-dasharray="0 2"></path><path class="as-cyan" stroke="#5DE3FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" pathLength="1" d="M34.177 5.785A25.735 25.735 0 0 0 22.001 2.75c-4.413 0-8.562 1.1-12.177 3.035" opacity="0" stroke-dasharray="0 2"></path><path class="as-cyan" stroke="#5DE3FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" pathLength="1" d="M32.148 27.52c0-5.471-4.543-9.908-10.147-9.908-5.605 0-10.148 4.437-10.148 9.909 0 3.744 1.33 7.184 3.552 9.897a16.152 16.152 0 0 0 2.548 2.488" opacity="0" stroke-dasharray="0 2"></path><path class="as-cyan" stroke="#5DE3FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" pathLength="1" d="M22 26.53c0 5.472 4.543 9.908 10.147 9.908.695 0 1.374-.068 2.03-.198" opacity="0" stroke-dasharray="0 2"></path><path class="as-cyan as-cyan--spiral" stroke="#5DE3FF" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" pathLength="1" d="M28.088 40.25c-6.322-.953-11.162-6.29-11.162-12.73 0-2.735 2.272-4.953 5.074-4.953s5.073 2.218 5.073 4.954c0 2.736 2.272 4.954 5.074 4.954s5.074-2.218 5.074-4.954c0-8.209-6.815-14.863-15.221-14.863-8.406 0-15.22 6.654-15.22 14.863 0 2.505.634 4.865 1.755 6.935" opacity="0" stroke-dasharray="0 0.5 0 0.5 2"></path><defs><filter id="as-print-engrave" width="36" height="40" x="4" y="2" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend in2="BackgroundImageFix" mode="color-dodge" result="effect1_dropShadow_145_93"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_145_93" result="shape"></feBlend></filter></defs></svg>+ <div class="as-sheen"><div class="as-sheen__band" style="transform: translate(-2.75rem, -2.75rem)"></div></div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/advanced-security.js b/site/public/examples/clerk-bento/src/widgets/advanced-security.jsnew file mode 100644index 0000000..9e41ea1--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/advanced-security.js@@ -0,0 +1,450 @@+// "Advanced security" card: hover the card and the fingerprint draws itself in cyan, a sheen sweeps the button,+// a glow ring fades in and pulses, a WebGL2 dot field ripples out from the button, and after 0.8 s the two side+// panels slide outward. Nothing moves at rest; leaving the card reverses everything.+//+// clerk.com builds it with Motion for React (module 561502) and its own WebGL2 <Shader> runtime (modules 37288 ++// 728107). This file reproduces both without libraries:+// - Motion's declarative animations on opacity/transform run as WAAPI (`fill: "both"`, native cubic-bezier+// easing); on finish the final value is written to the style and the animation cancelled, as Motion does. An+// interrupted animation restarts from the value sampled with the JS easing at its current time.+// - Motion's JS animations (the stroke-draw motion value, the panels' `x`, eased with a JS easeOutExpo) run on+// one requestAnimationFrame loop with performance.now() timestamps, like Motion's frameloop.+// - AnimatePresence children (dot field, ring) are mounted on hover and fade out (opacity → 0, 0.3 s) before+// being removed; hovering again while they fade brings the same instance back.+// - The dot field is clerk.com's shader verbatim (same GLSL, uniforms, blending, DPR rule and 30 fps throttle,+// u_time = seconds since its first animation frame). Its "randomness" is a GLSL hash of the cell position, so+// it is identical on every hover and every load; Math.random is not used anywhere.++// ---------- easing (Motion's cubicBezier: binary subdivision, 12 iterations) ----------++function cubicBezier(x1, y1, x2, y2) {+ const calc = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;+ const tForX = (x) => {+ let lo = 0, hi = 1, t, cx, i = 0;+ do {+ t = lo + (hi - lo) / 2;+ cx = calc(t, x1, x2) - x;+ if (cx > 0) hi = t; else lo = t;+ } while (Math.abs(cx) > 1e-7 && ++i < 12);+ return t;+ };+ const fn = (t) => (t === 0 || t === 1 ? t : calc(tForX(t), y1, y2));+ fn.css = `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`;+ return fn;+}+const linear = (t) => t;+linear.css = "linear";+// clerk.com module 275921 `u`: a JS function, so Motion runs it on the main thread+const easeOutExpo = (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t));++// Motion's default tween when a transition gives none (0.3 s), and the card's own transitions+const DEFAULT = { duration: 300, ease: cubicBezier(0.25, 0.1, 0.35, 1) };+const DRAW_IN = { duration: 750, ease: cubicBezier(0.25, 0.75, 0, 1) };+const SHEEN_IN = { duration: 500, ease: cubicBezier(0, 0.4, 0.2, 1) };+const PANELS_IN = { duration: 800, delay: 800, ease: easeOutExpo };+const PANELS_OUT = { duration: 600, ease: easeOutExpo };+const RING_IN = { duration: 800, ease: linear };+const PULSE_EASE = "cubic-bezier(0.7, 0, 0.3, 1)";+const PANEL_X = 5.1875; // rem (83 px): the panels' rest offset, tucked in towards the button++const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)");+const lerp = (from, to, p) => from.map((f, i) => f + (to[i] - f) * p);+const same = (a, b) => a.every((v, i) => v === b[i]);++// ---------- WAAPI value (Motion's accelerated opacity / transform) ----------++class WaapiValue {+ constructor(el, prop, format, initial) {+ Object.assign(this, { el, prop, format, v: initial, run: null });+ }+ current() {+ const r = this.run;+ if (!r) return this.v;+ const t = (Number(r.anim.currentTime) || 0) - r.delay;+ if (t <= 0) return r.from;+ return lerp(r.from, r.to, r.ease(Math.min(t / r.duration, 1)));+ }+ set(v) {+ this.v = v;+ this.el.style[this.prop] = this.format(v);+ }+ stop() {+ const from = this.current();+ if (this.run) {+ this.run.anim.cancel();+ this.run = null;+ }+ this.set(from);+ return from;+ }+ to(target, { duration, delay = 0, ease }, onDone) {+ const from = this.stop();+ if (same(from, target) || reducedMotion?.matches) {+ this.set(target);+ onDone?.();+ return;+ }+ const anim = this.el.animate(+ { [this.prop]: [this.format(from), this.format(target)] },+ { duration, delay, easing: ease.css, fill: "both" },+ );+ const run = { anim, from, to: target, delay, duration, ease };+ this.run = run;+ anim.onfinish = () => {+ if (this.run !== run) return;+ this.run = null;+ this.set(target); // Motion commits the final keyframe to the style and cancels the animation+ anim.cancel();+ onDone?.();+ };+ }+}++// ---------- JS values on one rAF loop (Motion's frameloop + JSAnimation) ----------++const ticking = new Set();+let rafId = 0;+function tick() {+ const now = performance.now();+ for (const f of [...ticking]) f(now);+ rafId = ticking.size ? requestAnimationFrame(tick) : 0;+}+function onFrame(f) {+ ticking.add(f);+ if (!rafId) rafId = requestAnimationFrame(tick);+ return () => ticking.delete(f);+}++class JsValue {+ constructor(initial, render) {+ Object.assign(this, { v: initial, render, run: null });+ render(initial);+ }+ sample(r, now) {+ const t = now - r.start - r.delay;+ if (t <= 0) return r.from;+ return r.from + (r.to - r.from) * r.ease(Math.min(t / r.duration, 1));+ }+ to(target, { duration, delay = 0, ease }) {+ const now = performance.now();+ if (this.run) {+ this.v = this.sample(this.run, now);+ this.run.off();+ this.run = null;+ }+ if (this.v === target || reducedMotion?.matches) {+ this.v = target;+ this.render(target);+ return;+ }+ const run = { from: this.v, to: target, start: now, delay, duration, ease };+ run.off = onFrame((t) => {+ this.v = this.sample(run, t);+ this.render(this.v);+ if (t - run.start - run.delay >= run.duration) {+ run.off();+ if (this.run === run) this.run = null;+ }+ });+ this.run = run;+ }+}++// ---------- the WebGL2 dot field (clerk.com modules 37288 "DotMatrix" + 728107 "Shader") ----------++const VERTEX = `#version 300 es+precision mediump float;+in vec2 coordinates;++uniform vec2 u_resolution;++out vec2 fragCoord;++void main(void) {+ gl_Position = vec4(coordinates, 0.0, 1.0);+ fragCoord = (coordinates + 1.0) * 0.5 * u_resolution;+ fragCoord.y = u_resolution.y - fragCoord.y;+}+`;++// DotMatrix's source({ init, shader, center: ["x", "y"] }) with advanced-security's `shader` injection+const INTRO = `+ float intro_offset = 0.5 + distance(u_resolution / 2.0 / u_total_size, st2) * 0.02 + (random(st2) * 0.3);+ opacity *= step(intro_offset, u_time);+ `;+const FRAGMENT = `#version 300 es+precision mediump float;++in vec2 fragCoord;++uniform float u_time;+uniform float u_opacities[10];+uniform vec3 u_colors[6];+uniform float u_total_size;+uniform float u_dot_size;+uniform vec2 u_resolution;+++out vec4 fragColor;++// https://stackoverflow.com/a/28095165+float PHI = 1.61803398874989484820459;+float random(vec2 xy) {+ return fract(tan(distance(xy * PHI, xy) * 0.5) * xy.x);+}++float map(float value, float min1, float max1, float min2, float max2) {+ return min2 + (value - min1) * (max2 - min2) / (max1 - min1);+}++float map_clamp(float value, float min1, float max1, float min2, float max2) {+ return clamp(map(value, min1, max1, min2, max2), min(min2, max2), max(min2, max2));+}++void main() {+ vec2 st = fragCoord.xy;++ // Center dots on canvas+ // Remove the 'floor' to allow subpixel positioning+ st.x -= abs(floor((mod(u_resolution.x, u_total_size) - u_dot_size) * 0.5));+ st.y -= abs(floor((mod(u_resolution.y, u_total_size) - u_dot_size) * 0.5));++ float opacity = step(0.0, st.x);+ opacity *= step(0.0, st.y);++ vec2 st2 = vec2(int(st.x / u_total_size), int(st.y / u_total_size));++ float frequency = 5.0;+ float show_offset = random(st2);+ // Without the +1.0 the first column is all the same opacity+ float rand = random(st2 * floor((u_time / frequency) + show_offset + frequency) + 1.0);+ opacity *= u_opacities[int(rand * 10.0)];+ opacity *= 1.0 - step(u_dot_size / u_total_size, fract(st.x / u_total_size));+ opacity *= 1.0 - step(u_dot_size / u_total_size, fract(st.y / u_total_size));++ vec3 color = u_colors[int(show_offset * 6.0)];++ ${INTRO}++ fragColor = vec4(color, opacity);+ fragColor.rgb *= fragColor.a;+}+`;++// <DotMatrix colors={[[93,227,255]]} dotSize={1} totalSize={3} opacities={[.4,.4,.6,.6,.6,.8,.8,.8,.8,1]} />+// (maxFps defaults to 30); one colour fills all six u_colors slots+const SKY = [93 / 255, 227 / 255, 255 / 255];+const UNIFORMS = [+ ["u_colors", "uniform3fv", [SKY, SKY, SKY, SKY, SKY, SKY].flat()],+ ["u_opacities", "uniform1fv", [0.4, 0.4, 0.6, 0.6, 0.6, 0.8, 0.8, 0.8, 0.8, 1]],+ ["u_total_size", "uniform1f", 3],+ ["u_dot_size", "uniform1f", 1],+];+const MAX_FPS = 30;++function compile(gl, type, src) {+ const s = gl.createShader(type);+ gl.shaderSource(s, src);+ gl.compileShader(s);+ if (gl.getShaderParameter(s, gl.COMPILE_STATUS)) return s;+ console.error("advanced-security: shader error: " + gl.getShaderInfoLog(s));+ gl.deleteShader(s);+ return null;+}++// Mounts the canvas into `host` (positioned, 200x200) and starts drawing on the next animation frame.+function startDotField(host, { still = false } = {}) {+ const canvas = document.createElement("canvas");+ canvas.setAttribute("aria-hidden", "true");+ host.append(canvas);+ const p = Math.round(Math.max(1, Math.min(window.devicePixelRatio ?? 1, 2)));+ canvas.width = canvas.offsetWidth * p;+ canvas.height = canvas.offsetHeight * p;+ let gl = canvas.getContext("webgl2");+ if (!gl) return { destroy() {} };+ const vs = compile(gl, gl.VERTEX_SHADER, VERTEX);+ const fs = compile(gl, gl.FRAGMENT_SHADER, FRAGMENT);+ if (!vs || !fs) return { destroy() {} };+ const prog = gl.createProgram();+ gl.attachShader(prog, vs);+ gl.attachShader(prog, fs);+ gl.linkProgram(prog);+ if (!gl.getProgramParameter(prog, gl.LINK_STATUS)) {+ console.error("advanced-security: link error: " + gl.getProgramInfoLog(prog));+ return { destroy() {} };+ }+ gl.useProgram(prog);+ const buf = gl.createBuffer();+ gl.bindBuffer(gl.ARRAY_BUFFER, buf);+ gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([-1, -1, 1, -1, -1, 1, 1, 1]), gl.STATIC_DRAW);+ const loc = gl.getAttribLocation(prog, "coordinates");+ gl.enableVertexAttribArray(loc);+ gl.vertexAttribPointer(loc, 2, gl.FLOAT, false, 0, 0);+ const uRes = gl.getUniformLocation(prog, "u_resolution");+ const uTime = gl.getUniformLocation(prog, "u_time");+ const locs = UNIFORMS.map(([name]) => gl.getUniformLocation(prog, name));+ gl.uniform2f(uRes, canvas.width / p, canvas.height / p);+ gl.enable(gl.BLEND);+ gl.blendFunc(gl.SRC_ALPHA, gl.ONE); // the fragment writes (c·a, a): on screen the dot alpha is a²+ gl.disable(gl.DEPTH_TEST);++ const draw = (seconds) => {+ gl.viewport(0, 0, gl.canvas.width, gl.canvas.height);+ gl.uniform1f(uTime, seconds);+ UNIFORMS.forEach(([, type, value], i) => gl[type](locs[i], value));+ gl.clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT);+ gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4);+ };++ // useAnimationFrame: elapsed ms since the first frame; the Shader skips frames closer than 1000/maxFps to+ // the last drawn one (the first frame, elapsed 0, is skipped too)+ let first = null;+ let last = 0;+ const off = still+ ? (draw(2), () => {})+ : onFrame((now) => {+ if (first === null) first = now;+ const e = now - first;+ if (e - last < 1000 / MAX_FPS) return;+ last = e;+ draw(e / 1000);+ });+ const ro = new ResizeObserver(() => {+ canvas.width = canvas.offsetWidth * p;+ canvas.height = canvas.offsetHeight * p;+ gl?.uniform2f(uRes, canvas.width / p, canvas.height / p);+ if (still) draw(2);+ });+ ro.observe(canvas);+ return {+ destroy() {+ off();+ ro.disconnect();+ if (!gl) return;+ gl.deleteShader(vs);+ gl.deleteShader(fs);+ gl.deleteProgram(prog);+ gl.deleteBuffer(buf);+ gl.getExtension("WEBGL_lose_context")?.loseContext();+ gl = null;+ },+ };+}++// ---------- AnimatePresence children ----------++// A hover-only layer: mounted on hover, exit {opacity: 0} with the default 0.3 s tween, then removed.+class Presence {+ constructor(build) {+ this.build = build; // () => { el, opacity: WaapiValue, enter(), destroy() }+ this.node = null;+ this.exiting = false;+ }+ show() {+ if (this.node && this.exiting) {+ // same key back while exiting: the instance stays and animates back to its target+ this.exiting = false;+ this.node.revive();+ return;+ }+ if (this.node) return;+ this.node = this.build();+ this.exiting = false;+ }+ hide() {+ if (!this.node || this.exiting) return;+ this.exiting = true;+ const node = this.node;+ node.opacity.to([0], DEFAULT, () => {+ if (this.node !== node || !this.exiting) return;+ node.destroy();+ node.el.remove();+ this.node = null;+ this.exiting = false;+ });+ }+}++const opacityFmt = ([o]) => String(o);++export function mount(slot, card) {+ const q = (s) => slot.querySelector(s);+ const stage = q(".as-stage");+ const button = q(".as-button");+ if (!stage || !button) return;++ // 1. fingerprint: length 0 → 1 drives every cyan path's stroke-dasharray (pathLength = 1)+ const arcs = [...slot.querySelectorAll(".as-cyan:not(.as-cyan--spiral)")];+ const spiral = q(".as-cyan--spiral");+ const length = new JsValue(0, (l) => {+ for (const a of arcs) {+ a.setAttribute("stroke-dasharray", `${l} 2`);+ a.setAttribute("opacity", String(+(l > 0)));+ }+ // spiral: three dashes (from the start, around the middle, from the end) meeting at length 1+ const t = Math.min(Math.max(l, 0), 1) / 3;+ const gap = (1 - 3 * t) / 2;+ spiral.setAttribute("stroke-dasharray", `${t} ${gap} ${t} ${gap} 2`);+ spiral.setAttribute("opacity", String(+(t > 0)));+ });++ // 2. button tint, 3. sheen (translate in rem), 4. side panels (x in rem, JS-eased)+ const tint = new WaapiValue(q(".as-tint"), "opacity", opacityFmt, [0]);+ const sheen = new WaapiValue(q(".as-sheen__band"), "transform", ([x, y]) => `translate(${x}rem, ${y}rem)`, [-2.75, -2.75]);+ const panelFmt = (el) => (x) => { el.style.transform = x === 0 ? "none" : `translateX(${x}rem)`; };+ const panelL = new JsValue(PANEL_X, panelFmt(q(".as-panel--l")));+ const panelR = new JsValue(-PANEL_X, panelFmt(q(".as-panel--r")));++ // 5. dot field (first child of the stage, under the button)+ const dots = new Presence(() => {+ const el = document.createElement("div");+ el.className = "as-dots";+ stage.prepend(el);+ const opacity = new WaapiValue(el, "opacity", opacityFmt, [1]);+ const field = startDotField(el, { still: !!reducedMotion?.matches });+ return { el, opacity, revive: () => opacity.to([1], DEFAULT), destroy: () => field.destroy() };+ });++ // 6. glow ring (last child of the button): fades in over 0.8 s (linear), pulses .6 → 1 → .6 every 2 s+ const ring = new Presence(() => {+ const el = document.createElement("div");+ el.className = "as-ring";+ el.style.opacity = "0";+ el.innerHTML = '<div class="as-ring__pulse"><div class="as-ring__outer"></div><div class="as-ring__inner"></div></div>';+ button.append(el);+ const pulseEl = el.firstChild;+ const pulse = reducedMotion?.matches+ ? null+ : pulseEl.animate({ opacity: ["0.6", "1", "0.6"] }, { duration: 2000, easing: PULSE_EASE, iterations: Infinity, fill: "both" });+ const opacity = new WaapiValue(el, "opacity", opacityFmt, [0]);+ opacity.to([1], RING_IN);+ return { el, opacity, revive: () => opacity.to([1], RING_IN), destroy: () => pulse?.cancel() };+ });++ let hovered = false;+ function setHovered(on) {+ if (on === hovered) return;+ hovered = on;+ if (on) {+ dots.show();+ ring.show();+ length.to(1, DRAW_IN);+ tint.to([1], DEFAULT);+ sheen.to([0, 0], SHEEN_IN);+ panelL.to(0, PANELS_IN);+ panelR.to(0, PANELS_IN);+ } else {+ length.to(0, DEFAULT);+ tint.to([0], DEFAULT);+ sheen.to([-2.75, -2.75], DEFAULT);+ panelL.to(PANEL_X, PANELS_OUT);+ panelR.to(-PANEL_X, PANELS_OUT);+ ring.hide();+ dots.hide();+ }+ }++ // react-aria useHover on the card root: pointer enter/leave, touch ignored+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") setHovered(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") setHovered(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/api-keys.css b/site/public/examples/clerk-bento/src/widgets/api-keys.cssnew file mode 100644index 0000000..08747c4--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/api-keys.css@@ -0,0 +1,250 @@+/* API Keys card visual: clerk.com's markup (module 844723) with its Tailwind classes resolved to plain CSS+ (values as computed on clerk.com at 1440x900; Tailwind v4 gradients interpolate in oklab).+ Card-relative boxes on clerk.com: stage 808 x 140 at (2.656, 140); lines / meteor boxes 410 x 91 at (186.656, 168);+ laptop base 116 x 6 scaled 1.3 at (44.256, 272.2); pill 164.2 x 36 at (324.555, 175); rack 223 x 139 at (563.656, 141).+ Motion: src/widgets/api-keys.js (the Motion-for-React parts) + the :hover transitions at the end of this file+ (clerk.com's Tailwind group-hover parts, which are plain CSS :hover on the card there too). */++.clerk-card--api-keys .ak-root { position: relative; width: 100%; }+.clerk-card--api-keys .ak-frame { position: relative; height: 140px; width: 100%; }+.clerk-card--api-keys .ak-stage {+ position: absolute;+ top: 0;+ left: 50%;+ height: 140px;+ width: 808px;+ translate: calc((50% - 8px) * -1) 0;+}++/* ---------- circuit lines and the four meteor boxes (same box) ---------- */+.clerk-card--api-keys .ak-lines,+.clerk-card--api-keys .ak-meteor {+ position: absolute;+ top: 50%;+ left: 50%;+ height: 91px;+ width: 410px;+ translate: -220px -42px;+}+.clerk-card--api-keys .ak-lines { z-index: 1; }+.clerk-card--api-keys .ak-lines > svg { height: 100%; width: 100%; }+.clerk-card--api-keys .ak-meteor { z-index: 2; pointer-events: none; }+/* clerk.com's AnimatePresence wrapper (motion.div.absolute.inset-0.will-change-[opacity]) around each canvas */+.clerk-card--api-keys .ak-meteor > [data-meteor] { position: absolute; inset: 0; will-change: opacity; }++/* ---------- laptop ---------- */+.clerk-card--api-keys .ak-laptop-pos {+ position: absolute;+ bottom: 0;+ z-index: 100;+ transform-origin: 0 100%;+ scale: 1.3;+ padding-left: 2rem;+}+/* y is animated from JS (rest: translateY(-50px) inline) */+.clerk-card--api-keys .ak-laptop { transform: translateZ(0); will-change: transform; }+.clerk-card--api-keys .ak-device { position: relative; isolation: isolate; perspective: 1000px; }+/* lid: transform and background are animated from JS (rest state inline in the HTML) */+.clerk-card--api-keys .ak-lid {+ --ak-screen-off-color: var(--color-gray-900);+ --ak-screen-on-color: var(--color-gray-600);+ position: absolute;+ bottom: calc(100% - 0.0625rem);+ left: 50%;+ z-index: 20;+ display: flex;+ height: 4.25rem;+ width: 6.5rem;+ transform-origin: bottom;+ transform: translateZ(0);+ align-items: center;+ justify-content: center;+ border-top-left-radius: 0.25rem;+ border-top-right-radius: 0.25rem;+ border: 1px solid var(--color-gray-600);+ box-shadow: inset 0 0 0 2px oklab(0 0 0 / 0.75);+ will-change: transform;+ transform-style: preserve-3d;+ perspective: 60px;+}+/* dark cover over the screen (group-hover: fades out in 500 ms, back in over 1000 ms) */+.clerk-card--api-keys .ak-lid::before {+ content: "";+ position: absolute;+ inset: -0.0625rem;+ z-index: 10;+ border-radius: inherit;+ background-image: linear-gradient(to bottom in oklab, oklab(0 0 0 / 0.4) 0.0625rem, oklab(0 0 0 / 0.8) 100%);+ transition-property: opacity;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 1s;+}+/* lid top edge (its thickness, seen while the lid is folded) */+.clerk-card--api-keys .ak-lid::after {+ content: "";+ position: absolute;+ inset-inline: -1px;+ top: 0;+ z-index: -10;+ height: 0.125rem;+ transform: rotateX(90deg) translateY(-1px);+ border-top-left-radius: 2147483647px;+ border-top-right-radius: 2147483647px;+ background-color: var(--color-gray-500);+}+.clerk-card--api-keys .ak-glare {+ position: absolute;+ inset-inline: 0;+ top: 0.125rem;+ height: 1.25rem;+ transform-origin: top;+ transform: translateZ(0);+ background-image: linear-gradient(to bottom in oklab, oklab(0.999994 0.0000455678 0.0000200868 / 0.15) 0%, transparent 100%);+ filter: blur(8px);+ will-change: transform;+}+/* diagonal glass reflection (group-hover: in over 1000 ms, out over 500 ms) */+.clerk-card--api-keys .ak-sheen {+ position: absolute;+ inset: 0;+ z-index: 30;+ overflow: hidden;+ border-radius: inherit;+ opacity: 0;+ transition-property: opacity;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.5s;+ will-change: opacity;+}+.clerk-card--api-keys .ak-sheen__shine {+ position: absolute;+ width: 125%;+ height: 125%;+ translate: -2.5rem -50%;+ rotate: -45deg;+ transform: translateZ(0);+ background-image: linear-gradient(to left in oklab, oklab(0.999994 0.0000455678 0.0000200868 / 0.08) 0%, rgba(0, 0, 0, 0) 100%);+}+/* screen content: opacity animated from JS (0 at rest, inline) */+.clerk-card--api-keys .ak-screen {+ position: relative;+ height: 3.25rem;+ width: 5.375rem;+ overflow: hidden;+ border-radius: 0.1875rem;+ will-change: opacity;+}+.clerk-card--api-keys .ak-avatar {+ z-index: 50;+ display: flex;+ transform-origin: center;+ translate: 0 7px;+ scale: 0.7;+ transform: translateZ(0);+ justify-content: center;+}+.clerk-card--api-keys .ak-progress {+ position: absolute;+ inset-inline: 0;+ bottom: 0.625rem;+ margin-inline: auto;+ height: 0.375rem;+ width: 1.875rem;+ overflow: hidden;+ border-radius: 0.125rem;+ background-color: #131316;+ box-shadow: 0 1px 0 rgb(255 255 255 / 0.06), inset 0 2px 5px rgb(0 0 0 / 0.15);+}+/* width animated from JS (0rem at rest, inline) */+.clerk-card--api-keys .ak-bar {+ position: absolute;+ top: 50%;+ left: 0.125rem;+ height: 0.125rem;+ translate: 0 -50%;+ border-radius: 2147483647px;+ background-color: #5de3ff;+ box-shadow: 0 0 9px rgb(107 231 255 / 0.3);+ will-change: width;+}+.clerk-card--api-keys .ak-base {+ position: relative;+ z-index: 10;+ height: 0.375rem;+ width: 7.25rem;+ border-radius: 0.25rem 0.25rem 0.375rem 0.375rem;+ background-image: linear-gradient(to bottom in oklab, var(--color-gray-600) 65%, var(--color-gray-700) 100%);+ box-shadow: inset 0 1px 0 oklab(0.999994 0.0000455678 0.0000200868 / 0.1);+}+/* the notch */+.clerk-card--api-keys .ak-base::before {+ content: "";+ position: absolute;+ top: 0;+ left: 50%;+ height: 0.125rem;+ width: 1.25rem;+ translate: -50% 0;+ border-bottom-right-radius: 2147483647px;+ border-bottom-left-radius: 2147483647px;+ background-color: var(--color-gray-700);+ box-shadow: inset 2px 0 1px -2px oklab(0 0 0 / 0.5), inset -2px 0 1px -2px oklab(0 0 0 / 0.5),+ 0 1px 0 oklab(0.999994 0.0000455678 0.0000200868 / 0.1);+}++/* ---------- "Authenticating..." pill ---------- */+.clerk-card--api-keys .ak-pill-pos {+ position: absolute;+ top: 50%;+ left: 50%;+ z-index: 10;+ translate: -50% -35px;+}+.clerk-card--api-keys .ak-pill {+ display: flex;+ min-width: 0;+ align-items: center;+ gap: 0.75rem;+ border-radius: 0.375rem;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom right in oklab, oklab(0.999994 0.0000455678 0.0000200868 / 0.05) 0%, rgba(0, 0, 0, 0) 65%);+ padding: 0.625rem 0.75rem;+ box-shadow: 0 0 0 4px oklab(0.188081 0.0016512 -0.00579907 / 0.5);+}+/* rotate animated from JS ("none" at rest, inline) */+.clerk-card--api-keys .ak-spinner { flex-shrink: 0; transform: translateZ(0); will-change: transform; }+.clerk-card--api-keys .ak-spinner > svg { width: 1rem; height: 1rem; }+/* group-hover: white, 500 ms both ways (Tailwind `transition duration-500`) */+.clerk-card--api-keys .ak-pill__text {+ font-family: var(--font-mono);+ font-size: 0.6875rem;+ line-height: 1rem;+ color: var(--color-gray-500);+ transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, opacity,+ box-shadow, transform, translate, scale, rotate, filter;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.5s;+}++/* ---------- server rack ---------- */+.clerk-card--api-keys .ak-rack-pos {+ position: absolute;+ right: 0;+ bottom: 0;+ z-index: 3;+ padding-right: 1.5rem;+}+.clerk-card--api-keys .ak-rack {+ border-radius: 0.375rem;+ background-color: #13131680;+ padding: 0.125rem;+ -webkit-mask-image: linear-gradient(#000 0% 60%, #0009 75%, #0003 90%, #0000 100%);+ mask-image: linear-gradient(#000 0% 60%, #0009 75%, #0003 90%, #0000 100%);+}++/* ---------- hover (clerk.com: Tailwind group-hover, inside @media (hover: hover)) ---------- */+@media (hover: hover) {+ .clerk-card--api-keys:hover .ak-lid::before { opacity: 0; transition-duration: 0.5s; }+ .clerk-card--api-keys:hover .ak-sheen { opacity: 1; transition-duration: 1s; }+ .clerk-card--api-keys:hover .ak-pill__text { color: #fff; }+}diff --git a/site/public/examples/clerk-bento/src/widgets/api-keys.html b/site/public/examples/clerk-bento/src/widgets/api-keys.htmlnew file mode 100644index 0000000..ac5f948--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/api-keys.html@@ -0,0 +1,40 @@+<!-- API Keys card visual: clerk.com's markup (module 844723) with its Tailwind classes resolved in api-keys.css.+ Stage 808x140, bottom-aligned in the 160px slot, centred +8px. Lines/meteor boxes 410x91; laptop (scale 1.3);+ "Authenticating..." pill; server rack (clerk.com's Figma SVG, unused Figma filters removed, ids prefixed). -->+<div class="ak-root">+ <div class="ak-frame">+ <div class="ak-stage">+ <div class="ak-lines"><svg viewBox="0 0 410 91" fill="none" preserveAspectRatio="none"><path d="M161 27.2506L43.1043 27.2506L31.6449 27.2506L0 27.2506" stroke="white" stroke-opacity="0.05"></path><path d="M289 23.5L349.401 23.5C352.085 23.5 354.59 22.1543 356.071 19.9166L366.555 4.08336C368.037 1.84567 370.542 0.499992 373.225 0.499992L394.599 0.49999" stroke="white" stroke-opacity="0.05"></path><path d="M289 27.5L334.757 27.5C337.408 27.5 339.887 28.8132 341.376 31.0065L352.23 46.9935C353.719 49.1868 356.198 50.5 358.848 50.5L393.599 50.5" stroke="white" stroke-opacity="0.05"></path><path d="M289 31.5L321.643 31.5C324.278 31.5 326.745 32.798 328.237 34.9703L363.999 87.0297C365.491 89.202 367.957 90.5 370.593 90.5L375 90.5" stroke="white" stroke-opacity="0.05"></path></svg></div>+ <div class="ak-meteor"></div>+ <div class="ak-meteor"></div>+ <div class="ak-meteor"></div>+ <div class="ak-meteor"></div>+ <div class="ak-laptop-pos">+ <div class="ak-laptop" style="transform: translateY(-50px);">+ <div class="ak-device">+ <div class="ak-lid" style="transform: rotateX(-75deg) translateX(-50%); background: var(--ak-screen-on-color);">+ <div class="ak-glare" style="transform: none;"></div>+ <div class="ak-sheen"><div class="ak-sheen__shine"></div></div>+ <div class="ak-screen" style="opacity: 0;">+ <div class="ak-avatar"><svg width="27" height="29" viewBox="0 0 27 29" fill="none"><g filter="url(#ak-avatar-filter)"><path d="M20.1026 6.70086C20.1026 10.4016 17.1025 14.7419 13.4017 14.7419C9.70093 14.7419 6.70085 10.4016 6.70085 6.70086C6.70085 3.00008 9.70093 0 13.4017 0C17.1025 0 20.1026 3.00008 20.1026 6.70086Z" fill="#212126"></path><path d="M0 25.6573C0 23.6949 0.2951 21.2181 1.95972 19.1519C3.34357 17.4342 4.98555 16.4046 6.70085 16.0821C9.32355 15.5888 10.733 17.4222 13.4017 17.4222C16.0704 17.4222 17.4799 15.5888 20.1026 16.0821C21.8179 16.4046 23.4598 17.4342 24.8437 19.1519C26.5083 21.2181 26.8034 23.6949 26.8034 25.6573C26.8034 26.9511 25.7571 28 24.4632 28C21.6528 28 16.8827 28 13.4017 28C9.92071 28 5.15065 28 2.3402 28C1.04635 28 0 26.9511 0 25.6573Z" fill="#212126"></path></g><defs><filter id="ak-avatar-filter" x="0" y="0" width="26.8035" height="30" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend mode="color-dodge" in2="BackgroundImageFix" result="effect1_dropShadow_40_8"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_40_8" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.18 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_40_8"></feBlend></filter></defs></svg></div>+ <div class="ak-progress"><div class="ak-bar" style="width: 0rem;"></div></div>+ </div>+ </div>+ <div class="ak-base"></div>+ </div>+ </div>+ </div>+ <div class="ak-pill-pos">+ <div class="ak-pill">+ <div class="ak-spinner" style="transform: none;"><svg viewBox="0 0 16 16" fill="none"><path stroke="url(#ak-spinner-grad)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="M8 1.75v1.042m0 10.416v1.042m3.125-11.663-.521.902m-5.208 9.022-.521.902m8.537-8.538-.902.52m-9.02 5.21-.903.52M14.25 8h-1.042M2.792 8H1.75m11.662 3.125-.902-.52m-9.02-5.21-.903-.52m8.538 8.538-.52-.902m-5.21-9.022-.52-.902"></path><defs><radialGradient id="ak-spinner-grad" cx="0" cy="0" r="1" gradientTransform="rotate(102.529 4.047 5.711) scale(11.5244)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity=".2"></stop></radialGradient></defs></svg></div>+ <span class="ak-pill__text">Authenticating...</span>+ </div>+ </div>+ <div class="ak-rack-pos">+ <div class="ak-rack">+<svg class="ak-rack__svg" width="219" height="135" viewBox="0 0 219 135" fill="none"><g><g><g filter="url(#ak-filter0_di_21_444)"><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 0.5)" fill="#2F3037"></rect><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 0.5)" fill="url(#ak-paint0_linear_21_444)" fill-opacity="0.5"></rect></g><g filter="url(#ak-filter1_di_21_444)"><rect width="24" height="24" rx="4.5" transform="matrix(-1 0 0 1 197.5 9.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--dots"><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 13.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 16.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 19.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 22.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 25.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 28.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle></g><g filter="url(#ak-filter38_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 4.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter39_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 35.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter40_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 7.5 12.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter41_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 4.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter42_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 35.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter43_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 213.5 12.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--bars"><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 17.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 17.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 17.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 21.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 25.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 21.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 25.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 21.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 25.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 59.5 17.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 49.5 17.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 69.5 25.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect></g><g filter="url(#ak-filter53_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 81.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter54_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 84.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter55_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 87.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter56_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 90.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter57_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 93.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter58_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 96.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter59_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 99.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter60_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 102.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter61_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 105.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter62_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 108.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter63_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 111.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter64_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 114.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter65_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 117.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter66_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 120.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter67_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 123.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter68_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 126.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter69_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 129.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter70_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 132.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter71_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 135.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter72_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 138.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter73_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 141.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter74_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 144.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter75_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 147.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter76_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 150.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter77_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 153.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter78_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 156.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter79_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 159.5 16.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter80_di_21_444)"><circle cx="8" cy="8" r="9.5" transform="matrix(-1 0 0 1 31.5 13.5)" stroke="#131316" stroke-opacity="0.5" stroke-width="3" shape-rendering="crispEdges"></circle></g></g><g><g filter="url(#ak-filter81_di_21_444)"><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 92.5)" fill="#2F3037"></rect><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 92.5)" fill="url(#ak-paint1_linear_21_444)" fill-opacity="0.5"></rect></g><g filter="url(#ak-filter82_di_21_444)"><rect width="24" height="24" rx="4.5" transform="matrix(-1 0 0 1 197.5 101.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--dots"><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 105.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 108.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 111.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 114.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 117.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 120.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle></g><g filter="url(#ak-filter119_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 96.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter120_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 127.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter121_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 7.5 104.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter122_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 96.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter123_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 127.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter124_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 213.5 104.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--bars"><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 109.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 109.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 109.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 113.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 117.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 113.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 117.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 113.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 117.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 59.5 109.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 49.5 109.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 69.5 117.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect></g><g filter="url(#ak-filter134_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 81.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter135_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 84.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter136_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 87.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter137_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 90.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter138_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 93.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter139_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 96.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter140_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 99.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter141_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 102.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter142_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 105.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter143_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 108.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter144_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 111.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter145_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 114.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter146_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 117.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter147_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 120.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter148_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 123.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter149_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 126.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter150_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 129.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter151_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 132.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter152_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 135.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter153_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 138.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter154_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 141.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter155_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 144.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter156_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 147.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter157_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 150.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter158_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 153.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter159_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 156.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter160_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 159.5 108.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter161_di_21_444)"><circle cx="8" cy="8" r="9.5" transform="matrix(-1 0 0 1 31.5 105.5)" stroke="#131316" stroke-opacity="0.5" stroke-width="3" shape-rendering="crispEdges"></circle></g></g><g><g filter="url(#ak-filter162_di_21_444)"><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 46.5)" fill="#2F3037"></rect><rect width="218" height="42" rx="6" transform="matrix(-1 0 0 1 218.5 46.5)" fill="url(#ak-paint2_linear_21_444)" fill-opacity="0.5"></rect></g><g filter="url(#ak-filter163_di_21_444)"><rect width="24" height="24" rx="4.5" transform="matrix(-1 0 0 1 197.5 55.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--dots"><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 59.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 62.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 65.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 68.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 71.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 193.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 190.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 187.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 184.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 181.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle><circle cx="0.75" cy="0.75" r="0.75" transform="matrix(-1 0 0 1 178.75 74.25)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></circle></g><g filter="url(#ak-filter200_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 50.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter201_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 8.5 81.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter202_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 7.5 58.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter203_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 50.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter204_di_21_444)"><circle cx="2" cy="2" r="2" transform="matrix(-1 0 0 1 214.5 81.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></circle></g><g filter="url(#ak-filter205_di_21_444)"><rect width="2" height="19" rx="1" transform="matrix(-1 0 0 1 213.5 58.5)" fill="#131316" fill-opacity="0.5" shape-rendering="crispEdges"></rect></g><g class="ak-leds ak-leds--bars"><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 63.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 63.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 63.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 67.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 61.5 71.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 67.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 51.5 71.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 67.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="1" height="8" rx="0.25" transform="matrix(4.37114e-08 1 1 -4.37114e-08 41.5 71.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 59.5 63.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 49.5 63.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect><rect width="8" height="1" rx="0.25" transform="matrix(-1 0 0 1 69.5 71.5)" fill="#131316" fill-opacity="0.5" style="shape-rendering:crispEdges"></rect></g><g filter="url(#ak-filter215_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 81.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter216_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 84.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter217_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 87.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter218_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 90.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter219_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 93.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter220_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 96.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter221_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 99.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter222_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 102.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter223_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 105.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter224_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 108.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter225_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 111.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter226_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 114.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter227_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 117.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter228_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 120.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter229_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 123.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter230_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 126.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter231_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 129.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter232_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 132.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter233_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 135.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter234_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 138.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter235_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 141.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter236_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 144.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter237_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 147.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter238_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 150.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter239_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 153.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter240_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 156.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter241_di_21_444)"><rect width="2" height="11" rx="0.5" transform="matrix(-1 0 0 1 159.5 62.5)" fill="#131316" fill-opacity="0.7" shape-rendering="crispEdges"></rect></g><g filter="url(#ak-filter242_di_21_444)"><circle cx="8" cy="8" r="9.5" transform="matrix(-1 0 0 1 31.5 59.5)" stroke="#131316" stroke-opacity="0.5" stroke-width="3" shape-rendering="crispEdges"></circle></g></g></g><defs><filter id="ak-glow" x="-50%" y="-50%" width="200%" height="200%"><feDropShadow dx="0" dy="0" stdDeviation="1.5" flood-color="#5DE3FF" flood-opacity="0.8"></feDropShadow></filter><filter id="ak-filter0_di_21_444" x="0" y="0" width="219" height="43.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feMorphology radius="0.5" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_21_444"></feMorphology><feOffset></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.0745098 0 0 0 0 0.0862745 0 0 0 1 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter1_di_21_444" x="173.5" y="9.5" width="24" height="25.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.75"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1.5"></feOffset><feGaussianBlur stdDeviation="1.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter38_di_21_444" x="4.5" y="4.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter39_di_21_444" x="4.5" y="35.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter40_di_21_444" x="5.5" y="12.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter41_di_21_444" x="210.5" y="4.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter42_di_21_444" x="210.5" y="35.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter43_di_21_444" x="211.5" y="12.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter53_di_21_444" x="79.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter54_di_21_444" x="82.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter55_di_21_444" x="85.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter56_di_21_444" x="88.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter57_di_21_444" x="91.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter58_di_21_444" x="94.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter59_di_21_444" x="97.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter60_di_21_444" x="100.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter61_di_21_444" x="103.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter62_di_21_444" x="106.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter63_di_21_444" x="109.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter64_di_21_444" x="112.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter65_di_21_444" x="115.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter66_di_21_444" x="118.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter67_di_21_444" x="121.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter68_di_21_444" x="124.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter69_di_21_444" x="127.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter70_di_21_444" x="130.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter71_di_21_444" x="133.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter72_di_21_444" x="136.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter73_di_21_444" x="139.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter74_di_21_444" x="142.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter75_di_21_444" x="145.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter76_di_21_444" x="148.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter77_di_21_444" x="151.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter78_di_21_444" x="154.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter79_di_21_444" x="157.5" y="16.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter80_di_21_444" x="12.5" y="10.5" width="22" height="23" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter81_di_21_444" x="0" y="92" width="219" height="43.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feMorphology radius="0.5" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_21_444"></feMorphology><feOffset></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.0745098 0 0 0 0 0.0862745 0 0 0 1 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter82_di_21_444" x="173.5" y="101.5" width="24" height="25.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.75"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1.5"></feOffset><feGaussianBlur stdDeviation="1.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter119_di_21_444" x="4.5" y="96.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter120_di_21_444" x="4.5" y="127.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter121_di_21_444" x="5.5" y="104.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter122_di_21_444" x="210.5" y="96.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter123_di_21_444" x="210.5" y="127.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter124_di_21_444" x="211.5" y="104.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter134_di_21_444" x="79.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter135_di_21_444" x="82.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter136_di_21_444" x="85.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter137_di_21_444" x="88.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter138_di_21_444" x="91.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter139_di_21_444" x="94.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter140_di_21_444" x="97.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter141_di_21_444" x="100.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter142_di_21_444" x="103.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter143_di_21_444" x="106.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter144_di_21_444" x="109.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter145_di_21_444" x="112.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter146_di_21_444" x="115.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter147_di_21_444" x="118.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter148_di_21_444" x="121.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter149_di_21_444" x="124.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter150_di_21_444" x="127.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter151_di_21_444" x="130.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter152_di_21_444" x="133.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter153_di_21_444" x="136.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter154_di_21_444" x="139.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter155_di_21_444" x="142.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter156_di_21_444" x="145.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter157_di_21_444" x="148.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter158_di_21_444" x="151.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter159_di_21_444" x="154.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter160_di_21_444" x="157.5" y="108.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter161_di_21_444" x="12.5" y="102.5" width="22" height="23" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter162_di_21_444" x="0" y="46" width="219" height="43.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feMorphology radius="0.5" operator="dilate" in="SourceAlpha" result="effect1_dropShadow_21_444"></feMorphology><feOffset></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.0745098 0 0 0 0 0.0862745 0 0 0 1 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter163_di_21_444" x="173.5" y="55.5" width="24" height="25.5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.75"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1.5"></feOffset><feGaussianBlur stdDeviation="1.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter200_di_21_444" x="4.5" y="50.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter201_di_21_444" x="4.5" y="81.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter202_di_21_444" x="5.5" y="58.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter203_di_21_444" x="210.5" y="50.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter204_di_21_444" x="210.5" y="81.5" width="4" height="5" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter205_di_21_444" x="211.5" y="58.5" width="2" height="20" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter215_di_21_444" x="79.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter216_di_21_444" x="82.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter217_di_21_444" x="85.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter218_di_21_444" x="88.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter219_di_21_444" x="91.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter220_di_21_444" x="94.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter221_di_21_444" x="97.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter222_di_21_444" x="100.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter223_di_21_444" x="103.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter224_di_21_444" x="106.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter225_di_21_444" x="109.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter226_di_21_444" x="112.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter227_di_21_444" x="115.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter228_di_21_444" x="118.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter229_di_21_444" x="121.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter230_di_21_444" x="124.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter231_di_21_444" x="127.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter232_di_21_444" x="130.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter233_di_21_444" x="133.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter234_di_21_444" x="136.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter235_di_21_444" x="139.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter236_di_21_444" x="142.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter237_di_21_444" x="145.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter238_di_21_444" x="148.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter239_di_21_444" x="151.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter240_di_21_444" x="154.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter241_di_21_444" x="157.5" y="62.5" width="2" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><filter id="ak-filter242_di_21_444" x="12.5" y="56.5" width="22" height="23" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="0.5"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.03 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_21_444"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_21_444" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_21_444"></feBlend></filter><linearGradient id="ak-paint0_linear_21_444" x1="0" y1="0" x2="15.6043" y2="80.9937" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.1"></stop><stop offset="0.632812" stop-opacity="0"></stop></linearGradient><linearGradient id="ak-paint1_linear_21_444" x1="0" y1="0" x2="15.6043" y2="80.9937" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.1"></stop><stop offset="0.632812" stop-opacity="0"></stop></linearGradient><linearGradient id="ak-paint2_linear_21_444" x1="0" y1="0" x2="15.6043" y2="80.9937" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.1"></stop><stop offset="0.632812" stop-opacity="0"></stop></linearGradient></defs></svg>+ </div>+ </div>+ </div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/api-keys.js b/site/public/examples/clerk-bento/src/widgets/api-keys.jsnew file mode 100644index 0000000..1edf1a9--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/api-keys.js@@ -0,0 +1,390 @@+// API Keys card (clerk.com module 844723, "ApiKeys"), without Motion for React.+//+// On hover of the card: the laptop sinks (y −50 → −30 px before its 1.3 scale, 0.4 s) and its lid swings open+// (rotateX −75° → 20°, 1 s), the screen darkens and the avatar + progress track fade in (0.7 s after 0.45 s); the+// progress bar fills to 0.95rem over 2.2 s; four purple→cyan light streaks run along the circuit lines, laptop → pill+// at 0.2 s, then pill → each server at 0.75 / 0.8 / 0.85 s, every 2 s (src/shared/meteor.js); the spinner in the+// "Authenticating..." pill turns (one turn per 2 s) and its text turns white; and the 144 lights of the server rack+// (108 dots, 36 bars) blink at random. On hover-out every value goes back with clerk.com's "rest" transitions, the+// lights go dark, the spinner turns back to 0° (0.5 s) and the streaks fade out (0.3 s) and are removed. The lid's+// dark cover, glass sheen and the pill text are CSS :hover transitions (api-keys.css), as clerk.com's group-hover.+//+// The lights (clerk.com components `c` and `u`): each one draws four random constants once, in a React useState+// initialiser, in DOM order (per server: 36 dots, then 12 bars):+// dot: duration .3+.1r s, blinkDurationMs .3i+200r, intervalMs .3i+3500r, firstDelayMs 1800r+// bar: duration .5+.1r s, blinkDurationMs 1050+200r, intervalMs .3i+500+1500r, firstDelayMs 1600r+// (r = Math.random(), i = index in its group; the .3i ms terms are clerk.com's). While hovered each light runs+// wait firstDelayMs → lit → wait blinkDurationMs → unlit → wait intervalMs → lit …; hover-out clears its timer and+// unlights it. Lit = fill #5DE3FF at opacity 1 (unlit #131316 at .5), tweened over `duration` with clerk.com's soft+// easeInOutExpo, plus a cyan drop-shadow filter that switches at once. Same Math.random sequence, same blinking.+// clerk.com draws the constants at page load (hydration); here they are drawn at the first hover, which is+// indistinguishable (they are fixed per page load either way) and lets a capture pin Math.random beforehand.+//+// How clerk.com runs each value, reproduced here so that frames match:+// - transform (the lid) and opacity (glare, screen): Motion hands them to WAAPI, function easings sampled into CSS+// linear() (one point per 10 ms); on finish the end value is written to the style. Hover-in animations are+// back-dated to the pointer event (Motion sets animation.startTime).+// - y, rotateX, width, background and the lights' SVG fill: Motion's JS loop, one value per animation frame, timed+// from the change (the pointer event, or a light's state change; Motion back-dates them) and drawn from the next+// frame; the spinner's rotate starts on the frame after its mouseenter/leave. Colours mixed as sqrt(a²(1−p)+b²p)+// per channel; at the end the target is written as given (lights: "var(--brand-secondary, #5DE3FF)" / 1,+// "#131316" / 0.5).+// - The glare has no `initial` on clerk.com, so after page load it turns 0° → 90° (its rest transition) once.+// - Motion defaults: a transition without `ease` uses easeOut = cubic-bezier(0,0,.58,1); one with only a delay uses+// the default tween (0.3 s, cubic-bezier(.25,.1,.35,1)). clerk.com's `o.H` / `o.u` here are Motion's easeInOut+// cubic-bezier(.42,0,.58,1) / easeOut, `x.H` (lights) is its soft easeInOutExpo.+// - The streaks mount on the frame after the pointer event (their clock starts on the frame after that); the+// lights' timers start at the pointer event; on hover-out the WAAPI values, the streaks' fade and the lights+// going dark start on the next frame. Interrupted animations continue from their current value.+// Timing measured on clerk.com with virtual-clock captures: .motion-clone/clerk-bento/api-keys/ (spec.md).+// - The spinner follows mouseenter/mouseleave (clerk.com's separate isPointerOver state), the rest follows+// pointerenter/pointerleave with touch ignored (react-aria useHover).++import { createMeteor } from "../shared/meteor.js";++// ---------- easings ----------+function cubicBezier(x1, y1, x2, y2) {+ const bez = (t, a, b) => (((1 - 3 * b + 3 * a) * t + (3 * b - 6 * a)) * t + 3 * a) * t;+ return (x) => {+ if (x <= 0 || x >= 1) return x <= 0 ? 0 : 1;+ let lo = 0, hi = 1, t = x;+ for (let i = 0; i < 24; i++) {+ t = (lo + hi) / 2;+ if (bez(t, x1, x2) < x) lo = t;+ else hi = t;+ }+ return bez(t, y1, y2);+ };+}+const easeInOut = cubicBezier(0.42, 0, 0.58, 1); // clerk.com o.H (Motion's easeInOut)+const easeOut = cubicBezier(0, 0, 0.58, 1); // clerk.com o.u, and Motion's default "easeOut"+const easeDefault = cubicBezier(0.25, 0.1, 0.35, 1); // Motion's default tween+const easeExpoH = (t) => (t < 0.5 ? 0.5 * Math.pow(2, 16 * t - 8) : -0.5 * Math.pow(2, -16 * t + 8) + 1); // clerk.com x.H+const linear = (t) => t;+// Motion's generateLinearEasing: max(round(duration / 10), 2) points, 4 decimals+function linearEasing(fn, duration) {+ const n = Math.max(Math.round(duration / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(Math.round(1e4 * fn(i / (n - 1))) / 1e4);+ return `linear(${pts.join(", ")})`;+}+// named easings go to WAAPI as CSS keywords, functions as linear()+const EASE_OUT_NAMED = { fn: easeOut, css: "ease-out" };++// ---------- a numeric value rendered into one CSS property through WAAPI (Motion's accelerated path) ----------+class WaapiValue {+ constructor(el, prop, value, render) {+ Object.assign(this, { el, prop, value, render, anim: null, opts: null, from: value, to: value });+ }+ current() {+ const { anim, opts } = this;+ if (!anim) return this.value;+ const local = anim.currentTime ?? 0;+ const p = Math.min(1, Math.max(0, (local - opts.delay) / opts.duration));+ return this.from + (this.to - this.from) * opts.ease.fn(p);+ }+ animate(to, { duration, delay = 0, ease = EASE_OUT_NAMED, startTime }) {+ const from = this.current();+ this.anim?.cancel();+ const e = typeof ease === "function" ? { fn: ease, css: linearEasing(ease, duration) } : ease;+ const anim = this.el.animate(+ { [this.prop]: [this.render(from), this.render(to)] },+ { duration, delay, easing: e.css, fill: "both" },+ );+ if (startTime != null) anim.startTime = startTime; // Motion back-dates to the state change+ Object.assign(this, { anim, from, to, value: from, opts: { duration, delay, ease: e } });+ anim.onfinish = () => {+ if (this.anim !== anim) return;+ this.el.style[this.prop] = this.render(to);+ this.value = to;+ this.anim = null;+ anim.cancel();+ };+ }+}++// ---------- values driven per animation frame (Motion's JS path) ----------+const jsValues = new Set();+let ticking = false;+function tick() {+ const now = performance.now();+ for (const v of jsValues) v.step(now);+ ticking = jsValues.size > 0;+ if (ticking) requestAnimationFrame(tick);+}+function startTicking() {+ if (!ticking) {+ ticking = true;+ requestAnimationFrame(tick);+ }+}+// `mix(from, to, p)` interpolates; `apply(value, done)` renders (done: the tween has ended, Motion then writes the+// target itself, not the eased value). repeat: Motion's repeat: Infinity (each run from → to).+class JsValue {+ constructor(value, mix, apply) {+ Object.assign(this, { value, mix, apply, tween: null });+ }+ // the value at time `now` (an interrupted tween is sampled at the moment of the interruption, as Motion does)+ valueAt(now) {+ const tw = this.tween;+ if (!tw || tw.repeat) return this.value;+ const t = now - tw.start - tw.delay;+ if (t <= 0) return tw.from; // Motion holds the first keyframe until the delay has passed+ const p = Math.min(1, t / tw.duration);+ return p >= 1 ? tw.to : this.mix(tw.from, tw.to, tw.ease(p));+ }+ // start: the tween's time origin (default now); it is first rendered on the next animation frame+ animate(to, { duration, delay = 0, ease = easeOut, repeat = false, start = performance.now(), from = this.valueAt(start) }) {+ this.tween = { from, to, duration, delay, ease, repeat, start };+ jsValues.add(this);+ startTicking();+ }+ step(now) {+ const tw = this.tween;+ if (!tw) return jsValues.delete(this);+ const t = now - tw.start - tw.delay;+ let p;+ if (tw.repeat) {+ p = t <= 0 ? 0 : (t % tw.duration) / tw.duration;+ if (p === 0 && t > 0) p = 1;+ } else p = Math.min(1, Math.max(0, t / tw.duration));+ const done = !tw.repeat && p >= 1;+ this.value = done ? tw.to : t < 0 ? tw.from : this.mix(tw.from, tw.to, tw.ease(p));+ this.apply(this.value, done);+ if (done) {+ this.tween = null;+ jsValues.delete(this);+ }+ }+}+const mixNumber = (a, b, p) => a + (b - a) * p;+// Motion's mixColor for opaque colours: sqrt mix per channel, rendered "rgba(r, g, b, 1)"+const hexRgb = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));+const mixRgb = (a, b, p) => a.map((c, i) => Math.sqrt(Math.max(0, p * (b[i] * b[i] - c * c) + c * c)));+const rgbString = (c) => `rgba(${c.map((v) => Math.round(Math.max(0, Math.min(255, v)))).join(", ")}, 1)`;++// ---------- the circuit lines (paths in the 410 × 91 box) and their streaks ----------+const PATH_LAPTOP = "M161 27.2506L43.1043 27.2506L31.6449 27.2506L0 27.2506";+const PATH_TOP =+ "M289 23.5L349.401 23.5C352.085 23.5 354.59 22.1543 356.071 19.9166L366.555 4.08336C368.037 1.84567 370.542 0.499992 373.225 0.499992L394.599 0.49999";+const PATH_MIDDLE =+ "M289 27.5L334.757 27.5C337.408 27.5 339.887 28.8132 341.376 31.0065L352.23 46.9935C353.719 49.1868 356.198 50.5 358.848 50.5L393.599 50.5";+const PATH_BOTTOM =+ "M289 31.5L321.643 31.5C324.278 31.5 326.745 32.798 328.237 34.9703L363.999 87.0297C365.491 89.202 367.957 90.5 370.593 90.5L375 90.5";+const STREAKS = [+ { path: PATH_LAPTOP, delay: 200, direction: "reverse" }, // laptop → pill+ { path: PATH_TOP, delay: 750 }, // pill → top server+ { path: PATH_MIDDLE, delay: 800 }, // pill → middle server+ { path: PATH_BOTTOM, delay: 850 }, // pill → bottom server+];++// ---------- server lights ----------+const LIT_ATTR = "var(--brand-secondary, #5DE3FF)"; // clerk.com's lit colour; the variable is not defined+const UNLIT_ATTR = "#131316";+const LIT = hexRgb("#5DE3FF");+const UNLIT = hexRgb(UNLIT_ATTR);++class Light {+ constructor(el, index, kind) {+ Object.assign(this, { el, index, kind, k: null, lit: false, timer: 0 });+ // at the end of a tween Motion writes the target as given (clerk.com: the CSS variable string, 1 / 0.5)+ this.fill = new JsValue(UNLIT, mixRgb, (c, done) =>+ el.setAttribute("fill", done ? (c === LIT ? LIT_ATTR : UNLIT_ATTR) : rgbString(c)),+ );+ this.opacity = new JsValue(0.5, mixNumber, (v) => el.setAttribute("fill-opacity", String(v)));+ }+ // clerk.com's useState initialisers (same formulas, same order of Math.random calls)+ draw() {+ const i = this.index;+ this.k =+ this.kind === "dot"+ ? {+ duration: 0.3 + 0.1 * Math.random(),+ blinkDurationMs: 0.3 * i + 200 * Math.random(),+ intervalMs: 0.3 * i + 3500 * Math.random(),+ firstDelayMs: 1800 * Math.random(),+ }+ : {+ duration: 0.5 + 0.1 * Math.random(),+ blinkDurationMs: 1050 + 200 * Math.random(),+ intervalMs: 0.3 * i + 500 + 1500 * Math.random(),+ firstDelayMs: 1600 * Math.random(),+ };+ }+ setLit(lit) {+ if (lit === this.lit) return;+ this.lit = lit;+ // the glow filter is a plain attribute on clerk.com: it switches at once; fill and opacity are tweened by Motion+ if (lit) this.el.setAttribute("filter", "url(#ak-glow)");+ else this.el.removeAttribute("filter");+ // Motion's tween is timed from the state change (it resolves the CSS-variable colour on the next frame and+ // back-dates the start), first drawn on the next frame; an interrupted tween continues from its value now+ const now = performance.now();+ const t = { duration: this.k.duration * 1000, ease: easeExpoH, start: now };+ this.fill.animate(lit ? LIT : UNLIT, { ...t, from: this.fill.valueAt(now) });+ this.opacity.animate(lit ? 1 : 0.5, { ...t, from: this.opacity.valueAt(now) });+ }+ start() {+ const { k } = this;+ const run = () => {+ this.setLit(true);+ this.timer = setTimeout(() => {+ this.setLit(false);+ this.timer = setTimeout(run, k.intervalMs);+ }, k.blinkDurationMs);+ };+ this.timer = setTimeout(run, k.firstDelayMs);+ }+ stop() {+ clearTimeout(this.timer);+ }+}+export function mount(slot, card) {+ const $ = (s) => slot.querySelector(s);+ const laptop = $(".ak-laptop");+ const lid = $(".ak-lid");+ const glare = $(".ak-glare");+ const screen = $(".ak-screen");+ const bar = $(".ak-bar");+ const spinnerEl = $(".ak-spinner");+ const meteorBoxes = [...slot.querySelectorAll(".ak-meteor")];+ // DOM order = clerk.com's render order (server, server_2, server_3; dots then bars in each)+ const lights = [...slot.querySelectorAll(".ak-leds")].flatMap((g) =>+ [...g.children].map((el, i) => new Light(el, i, g.classList.contains("ak-leds--dots") ? "dot" : "bar")),+ );++ const cs = getComputedStyle(lid);+ const screenOn = hexRgb(cs.getPropertyValue("--ak-screen-on-color").trim() || "#5e5f6e"); // gray-600+ const screenOff = hexRgb(cs.getPropertyValue("--ak-screen-off-color").trim() || "#212126"); // gray-900++ // rest values (clerk.com's SSR / post-hydration inline styles)+ const laptopY = new JsValue(-50, mixNumber, (v) => (laptop.style.transform = v === 0 ? "none" : `translateY(${v}px)`));+ const lidRot = new WaapiValue(lid, "transform", -75, (v) => `rotateX(${v}deg) translateX(-50%)`);+ const lidBg = new JsValue(screenOn, mixRgb, (c, done) => {+ lid.style.background = done ? `var(--ak-screen-${c === screenOff ? "off" : "on"}-color)` : rgbString(c);+ });+ const glareRot = new JsValue(0, mixNumber, (v) => (glare.style.transform = v === 0 ? "none" : `rotateX(${v}deg)`));+ const glareOpacity = new WaapiValue(glare, "opacity", 1, String);+ const screenOpacity = new WaapiValue(screen, "opacity", 0, String);+ const barWidth = new JsValue(0, mixNumber, (v) => (bar.style.width = `${v}rem`));+ const spinner = new JsValue(0, mixNumber, (v) => (spinnerEl.style.transform = v === 0 ? "none" : `rotate(${v}deg)`));++ // the glare has no `initial` on clerk.com: after hydration it turns 0° → 90° with its rest transition+ // (measured on clerk.com: easeOut, 2 s after 0.4 s, from the first frame)+ glareRot.animate(90, { duration: 2000, delay: 400, ease: easeOut });++ // Motion's WAAPI values (transform, opacity); startTime: the time origin (hover-in: back-dated to the event)+ function animateWaapi(hovered, startTime) {+ if (hovered) {+ lidRot.animate(20, { duration: 1000, ease: easeInOut, startTime });+ glareOpacity.animate(0, { duration: 1000, startTime }); // {duration:1} → "easeOut"+ screenOpacity.animate(1, { duration: 700, delay: 450, ease: easeOut, startTime });+ } else {+ lidRot.animate(-75, { duration: 1000, ease: easeInOut, startTime });+ glareOpacity.animate(1, { duration: 2000, delay: 400, ease: easeOut, startTime }); // dropped key → rest transition+ screenOpacity.animate(0, { duration: 250, ease: easeOut, startTime });+ }+ }+ // Motion's JS-driven values (frame loop), timed from the pointer event, first drawn on the next frame+ function animateJs(hovered, start) {+ laptopY.animate(hovered ? -30 : -50, { duration: 400, ease: easeOut, start });+ if (hovered) {+ lidBg.animate(screenOff, { duration: 500, start }); // {duration:.5} → easeOut+ glareRot.animate(0, { duration: 1000, start }); // {duration:1} → easeOut+ barWidth.animate(0.95, { duration: 2200, ease: easeInOut, start });+ } else {+ lidBg.animate(screenOn, { duration: 300, delay: 300, ease: easeDefault, start }); // {delay:.3} → default tween+ glareRot.animate(90, { duration: 2000, delay: 400, ease: easeOut, start });+ barWidth.animate(0, { duration: 200, start }); // {duration:.2} → easeOut+ }+ }++ // ---------- hover ----------+ // react-aria useHover on the card (pointerenter/leave, touch ignored) drives everything but the spinner, which+ // follows clerk.com's separate isPointerOver state (mouseenter/leave). Timing measured on clerk.com+ // (virtual-clock captures, see .motion-clone/clerk-bento/api-keys/): the JS values are timed from the pointer+ // event both ways, the WAAPI values from the event on hover-in and from the next frame on hover-out; the+ // lights' timers start at the event; the spinner, the streaks and the lights going dark follow on the next frame.+ let hovered = false;+ let pointerOver = false;+ let spinOn = false;+ let streaksOn = false;+ let darken = false;+ let pending = false;+ let meteors = [];+ let drawn = false;+ let waapiOn = false;+ const sync = () => {+ pending = false;+ const now = performance.now();+ if (!hovered && waapiOn) {+ waapiOn = false;+ animateWaapi(false, now);+ }+ if (pointerOver !== spinOn) {+ spinOn = pointerOver;+ if (spinOn) spinner.animate(360, { duration: 2000, ease: linear, repeat: true });+ else spinner.animate(0, { duration: 500, ease: easeOut });+ }+ if (darken) {+ darken = false;+ for (const l of lights) l.setLit(false);+ }+ if (hovered !== streaksOn) {+ streaksOn = hovered;+ if (hovered) {+ // AnimatePresence: mount the streaks, or revive the ones still fading out (their clocks continue)+ if (meteors.length && meteors[0].el.isConnected) {+ for (const m of meteors) if (m.exiting) m.revive();+ } else {+ meteors = STREAKS.map((s, i) =>+ createMeteor(meteorBoxes[i], {+ stops: "dark",+ meteors: [{ width: 410, height: 91, path: s.path, delay: s.delay, repeat: 2000, direction: s.direction }],+ }),+ );+ }+ } else for (const m of meteors) m.exit();+ }+ };+ const schedule = () => {+ if (!pending) {+ pending = true;+ requestAnimationFrame(sync);+ }+ };++ card.addEventListener("pointerenter", (e) => {+ if (e.pointerType === "touch" || hovered) return;+ hovered = true;+ const now = performance.now();+ if (!waapiOn) {+ waapiOn = true;+ animateWaapi(true, now);+ }+ animateJs(true, now);+ // the lights' random constants: drawn once, at the first hover (clerk.com: at page load)+ if (!drawn) {+ drawn = true;+ for (const l of lights) l.draw();+ }+ for (const l of lights) l.start();+ schedule();+ });+ card.addEventListener("pointerleave", (e) => {+ if (e.pointerType === "touch" || !hovered) return;+ hovered = false;+ animateJs(false, performance.now());+ for (const l of lights) l.stop();+ darken = true;+ schedule();+ });+ card.addEventListener("mouseenter", () => {+ pointerOver = true;+ schedule();+ });+ card.addEventListener("mouseleave", () => {+ pointerOver = false;+ schedule();+ });+}diff --git a/site/public/examples/clerk-bento/src/widgets/bot-detection.css b/site/public/examples/clerk-bento/src/widgets/bot-detection.cssnew file mode 100644index 0000000..30916f1--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/bot-detection.css@@ -0,0 +1,137 @@+/* clerk.com "Bot Detection" card visual (module 647283), Tailwind classes resolved to plain CSS.+ Structure, sizes and colours copied from clerk.com's markup (.motion-clone/clerk-bento/dom/bot-detection.html). */++.clerk-card--bot-detection .bd-root {+ position: absolute;+ inset-inline: 0;+ top: 0;+ height: calc(172 / 16 * 1rem);+ overflow: hidden;+ border-top-left-radius: 1rem;+ border-top-right-radius: 1rem;+ background-color: var(--color-gray-900);+}+.clerk-card--bot-detection .bd-isolate { isolation: isolate; }++/* four concentric discs centred on the top edge, smallest on top */+.clerk-card--bot-detection .bd-radar {+ position: absolute;+ top: 0;+ left: 50%;+ aspect-ratio: 1;+ translate: -50% -50%;+ border-radius: 2147483647px;+}+.clerk-card--bot-detection .bd-radar--1 { z-index: 40; width: 8rem; background-color: #313136; }+.clerk-card--bot-detection .bd-radar--2 { z-index: 30; width: 12rem; background-color: #2d2d32; }+.clerk-card--bot-detection .bd-radar--3 { z-index: 20; width: 16rem; background-color: #29292e; }+.clerk-card--bot-detection .bd-radar--4 { z-index: 10; width: 20rem; background-color: #25252a; }++/* dotted rings on the disc edges (only the lower halves are inside the svg) */+.clerk-card--bot-detection .bd-rings {+ position: absolute;+ top: 0;+ left: 50%;+ z-index: 50;+ margin-left: -10rem;+ width: 20rem;+}++.clerk-card--bot-detection .bd-dot {+ position: absolute;+ margin-top: -0.125rem;+ margin-left: -0.125rem;+ width: 0.25rem;+ height: 0.25rem;+ border-radius: 2147483647px;+ background-color: var(--color-gray-600);+ box-shadow: 0 1px 2px rgb(0 0 0 / 0.25), 0 1px rgb(255 255 255 / 0.1) inset;+}++/* two blurred triangles that hide everything outside a 90° cone below the top centre */+.clerk-card--bot-detection .bd-sidemask {+ position: absolute;+ top: -2rem;+ left: 50%;+ width: calc(500 / 16 * 1rem);+ margin-left: calc(500 / -2 / 16 * 1rem);+ /* clerk.com adds transform-gpu (translateZ(0)) here. Left out: with the overlay-blended beam painted after it,+ the extra compositor layer made the first frame after scrolling to the card render without the card's+ content in headless Chromium captures. Same pixels without it (compare-1). */+ fill: var(--color-gray-900);+ filter: blur(16px);+}++/* the beam: rotated about a pivot 76px above the top centre to point at the target */+.clerk-card--bot-detection .bd-spotlight {+ position: absolute;+ top: -0.6875rem;+ left: 50%;+ width: calc(232 / 16 * 1rem);+ margin-left: calc(232 / -2 / 16 * 1rem);+ transform-origin: 50% -4.0625rem;+ mix-blend-mode: overlay;+ filter: blur(16px);+}++.clerk-card--bot-detection .bd-vignette {+ position: absolute;+ inset: 0;+ background-image: radial-gradient(circle at 50% 1.375rem, rgb(33 33 38 / 0), rgb(33 33 38));+}++.clerk-card--bot-detection .bd-crosshair {+ position: absolute;+ top: 0;+ left: 50%;+ z-index: 20;+ margin-top: -0.75rem;+ margin-left: -0.75rem;+ width: 1.5rem;+ height: 1.5rem;+}+.clerk-card--bot-detection .bd-crosshair svg { width: 1.5rem; height: 1.5rem; }++.clerk-card--bot-detection .bd-ring {+ position: absolute;+ top: 0;+ left: 50%;+ margin-top: -0.625rem;+ margin-left: -0.625rem;+ display: flex;+ align-items: center;+ justify-content: center;+ width: 1.25rem;+ height: 1.25rem;+ border-radius: 2147483647px;+ background-color: #13131680;+ box-shadow: 0 0 0 1px #ffffff12, 0 4px 4px #00000026;+}+/* clerk.com's [data-pulse]: never animated, so never visible */+.clerk-card--bot-detection .bd-pulse {+ position: absolute;+ top: 50%;+ left: 50%;+ margin-top: -1rem;+ margin-left: -1rem;+ width: 2rem;+ height: 2rem;+ scale: 75% 75%;+ border-radius: 2147483647px;+ opacity: 0;+ box-shadow: 0 0 0 1px var(--pulse-color) inset, 0 0 10px 2px var(--pulse-color);+}++.clerk-card--bot-detection .bd-active-dot {+ position: absolute;+ top: 0;+ left: 50%;+ z-index: 20;+ margin-top: -0.1875rem;+ margin-left: -0.1875rem;+ width: 0.375rem;+ height: 0.375rem;+ border-radius: 0.25rem;+ background-color: var(--color);+ box-shadow: 0 0 8px 1px rgb(107 231 255 / 0.3), 0 1px rgb(255 255 255 / 0.2) inset;+}diff --git a/site/public/examples/clerk-bento/src/widgets/bot-detection.html b/site/public/examples/clerk-bento/src/widgets/bot-detection.htmlnew file mode 100644index 0000000..0488e2b--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/bot-detection.html@@ -0,0 +1 @@+<div class="bd-root" style="--color:#747686;--stroke-color:#5DE3FF;--pulse-color:#ef44441f"><div class="bd-isolate"><div data-radar class="bd-radar bd-radar--1" style="opacity:1"></div><div data-radar class="bd-radar bd-radar--2" style="opacity:1"></div><div data-radar class="bd-radar bd-radar--3" style="opacity:1"></div><div data-radar class="bd-radar bd-radar--4" style="opacity:1"></div><svg viewBox="0 0 320 320" aria-hidden="true" class="bd-rings" fill="none" stroke="white" stroke-opacity="0.08" stroke-linecap="round" stroke-dasharray="0.25 4"><circle cx="160" cy="0" r="64"></circle><circle cx="160" cy="0" r="96"></circle><circle cx="160" cy="0" r="128"></circle><circle cx="160" cy="0" r="160"></circle></svg></div><div data-dot="0" class="bd-dot" style="top:4rem;left:calc(50% + -0.125rem)"></div><div data-dot="1" class="bd-dot" style="top:5.0625rem;left:calc(50% + 3.25rem)"></div><div data-dot="2" class="bd-dot" style="top:4.25rem;left:calc(50% + -4.25rem)"></div><div data-dot="3" class="bd-dot" style="top:4.9375rem;left:calc(50% + 6.375rem)"></div><div data-dot="4" class="bd-dot" style="top:7.625rem;left:calc(50% + 2.4375rem)"></div><div data-dot="5" class="bd-dot" style="top:7.3125rem;left:calc(50% + -3.25rem)"></div><div data-dot="6" class="bd-dot" style="top:9.9375rem;left:calc(50% + -1.25rem)"></div><div data-dot="7" class="bd-dot" style="top:7.5625rem;left:calc(50% + -6.5625rem)"></div><svg viewBox="0 0 500 250" aria-hidden="true" class="bd-sidemask"><path d="M 250 0 H 500 V 250 Z"></path><path d="M 250 0 H 0 V 250 Z"></path></svg><svg data-spotlight viewBox="0 0 232 168" aria-hidden="true" class="bd-spotlight"><path fill="url(#bd-spotlight-gradient)" d="M85-11h62l85 179H0L85-11Z"></path><defs><linearGradient id="bd-spotlight-gradient" x1="116" x2="116" y1="5" y2="168" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity="0"></stop></linearGradient></defs></svg><div class="bd-vignette"></div><div class="bd-crosshair" style="transform:translate(-0.125rem, 4rem)" data-transform><svg data-crosshair viewBox="0 0 24 24" aria-hidden="true"><circle cx="12" cy="12" fill="none" style="stroke:var(--color)" r="7" stroke-dasharray="8.995574287564276 2 8.995574287564276 2 8.995574287564276 2 8.995574287564276 2" stroke-dashoffset="-1"></circle></svg></div><div data-transform class="bd-ring" style="transform:translate(-0.125rem, 4rem)"><div data-pulse class="bd-pulse"></div></div><div data-active-dot class="bd-active-dot" style="opacity:1;transform:translate(-0.125rem, 4rem)"></div></div>diff --git a/site/public/examples/clerk-bento/src/widgets/bot-detection.js b/site/public/examples/clerk-bento/src/widgets/bot-detection.jsnew file mode 100644index 0000000..993dead--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/bot-detection.js@@ -0,0 +1,441 @@+// clerk.com "Bot Detection" card (BotDetection, module 647283), rebuilt without React/Motion.+//+// While the card is hovered, an async loop runs passes of ~2.3 s:+// fade (1.0 s) radar discs dim to 0.2 and the 8 grey dots fade out; --color tweens grey → cyan (0.3 s)+// scan (1.3 s) the dots jump to the other of two layouts and fade back in row by row (delays 0/.1/.2/.3 s),+// the discs re-brighten from the centre out (stagger 0.1 s), the crosshair + ring and the beam+// swing to a random dot of the new layout (0.8 s, cubic-bezier(.7,0,.3,1)), the cyan dot blinks+// out and reappears on the target+// lock-on 1 s into the scan: crosshair radius 7 → 10.5 with its four gaps closing (0.3 s), hold 0.4 s,+// back (0.3 s); it overlaps the next pass's fade+// Hover-out does not interrupt: the current pass finishes its scan, waits for its lock-on, then --color tweens+// back to grey (0.3 s). Nothing is reset: dots, crosshair and beam stay on the last layout and target, and the+// layout alternation carries over to the next hover.+// Random: the target, Math.floor(8 * Math.random()), one call per pass, as on clerk.com.+//+// clerk.com runs this with Motion's useAnimate sequences. `animate()` below re-implements the parts of Motion+// they use, so the sequences are copied verbatim from clerk.com's source:+// - createAnimationsFromSequence: `at` ("<", "+0.4", "-0.6"), per-value transitions, default duration 0.3 s and+// ease "easeOut", function delays (stagger), `null` = current value, one keyframe track per element and value+// spanning the whole sequence, "easeInOut" filler before a value's first segment;+// - opacity/transform of HTML elements run as Web Animations (fill both, per-keyframe easing); everything else+// (the <svg> beam's transform, the --color variable, top/left, the crosshair's motion values) from JS on each+// animation frame, sampled in whole ms like Motion's JS animations;+// - keyframes are resolved on the next animation frame and the animation is backdated to its creation time+// (Motion: `startTime = createdAt`, unless resolving took > 40 ms);+// - Web Animations commit their last keyframe to the inline style on `finish` and are cancelled; a sequence's+// promise resolves when all its animations have finished;+// - colours mix in squared RGB, strings with numbers mix number by number (5 decimals), values whose+// keyframes are all equal are set at once.++// [x offset from the centre (px), top (px), fade-in delay (s)] for the 8 dots, two layouts+const SCENES = [+ [[-2, 64, 0], [52, 81, 0.1], [-68, 68, 0.1], [102, 79, 0.2], [39, 122, 0.2], [-52, 117, 0.2], [-20, 159, 0.3], [-105, 121, 0.3]],+ [[-42, 48, 0], [30, 57, 0], [70, 66, 0.1], [-21, 94, 0.1], [-78, 102, 0.2], [71, 107, 0.2], [-54, 151, 0.3], [43, 154, 0.3]],+];+const GREY = "#747686";+const CYAN = "#5DE3FF";++// ---------- easing (Motion's) ----------++function cubicBezier(x1, y1, x2, y2) {+ const calc = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;+ const tForX = (x) => {+ let lo = 0, hi = 1, t, cx, i = 0;+ do {+ t = lo + (hi - lo) / 2;+ cx = calc(t, x1, x2) - x;+ if (cx > 0) hi = t; else lo = t;+ } while (Math.abs(cx) > 1e-7 && ++i < 12);+ return t;+ };+ if (x1 === y1 && x2 === y2) return (t) => t;+ return (t) => (t === 0 || t === 1 ? t : calc(tForX(t), y1, y2));+}+const NAMED = { easeOut: [0, 0, 0.58, 1], easeInOut: [0.42, 0, 0.58, 1], linear: [0, 0, 1, 1] };+const NATIVE = { easeOut: "ease-out", easeInOut: "ease-in-out", linear: "linear" };+const easeCache = new Map();+function easeFn(e) {+ const b = Array.isArray(e) ? e : NAMED[e] || NAMED.easeOut;+ const key = b.join();+ if (!easeCache.has(key)) easeCache.set(key, cubicBezier(...b));+ return easeCache.get(key);+}+const easeCss = (e) => (Array.isArray(e) ? `cubic-bezier(${e.join(", ")})` : NATIVE[e] || "ease-out");+const isEasingArray = (e) => Array.isArray(e) && typeof e[0] !== "number";++// Motion's stagger(duration) with from: 0+const stagger = (step) => (i) => step * i;++// ---------- value mixing (Motion's mixers) ----------++const sanitize = (v) => Math.round(v * 1e5) / 1e5;+const clamp = (lo, hi, v) => Math.min(hi, Math.max(lo, v));+const NUM = /-?(?:\d+(?:\.\d+)?|\.\d+)/g;++function parseColor(s) {+ if (typeof s !== "string") return null;+ s = s.trim();+ let m = /^#([0-9a-f]{3,8})$/i.exec(s);+ if (m) {+ let h = m[1];+ if (h.length <= 4) h = [...h].map((c) => c + c).join("");+ return [0, 2, 4].map((i) => parseInt(h.slice(i, i + 2), 16)).concat(h.length === 8 ? parseInt(h.slice(6, 8), 16) / 255 : 1);+ }+ m = /^rgba?\(([^)]*)\)$/i.exec(s);+ if (m) {+ const p = m[1].split(/[\s,/]+/).filter(Boolean).map(Number);+ return [p[0], p[1], p[2], p.length > 3 ? p[3] : 1];+ }+ return null;+}+const sqMix = (a, b, p) => { const e = p * (b * b - a * a) + a * a; return e < 0 ? 0 : Math.sqrt(e); };++function mixer(a, b) {+ if (typeof a === "number" && typeof b === "number") return (p) => a + (b - a) * p;+ const ca = parseColor(a), cb = parseColor(b);+ if (ca && cb) {+ return (p) => {+ const c = [sqMix(ca[0], cb[0], p), sqMix(ca[1], cb[1], p), sqMix(ca[2], cb[2], p), ca[3] + (cb[3] - ca[3]) * p];+ return `rgba(${Math.round(clamp(0, 255, c[0]))}, ${Math.round(clamp(0, 255, c[1]))}, ${Math.round(clamp(0, 255, c[2]))}, ${sanitize(clamp(0, 1, c[3]))})`;+ };+ }+ // complex strings ("rotate(0.3rad)"): same template → number by number, otherwise switch at once+ const sa = String(a), sb = String(b);+ const na = sa.match(NUM) || [], nb = sb.match(NUM) || [];+ const parts = sb.split(NUM);+ if (na.length && na.length === nb.length && sa.split(NUM).join("|") === parts.join("|")) {+ return (p) => parts.reduce((out, s, i) => out + s + (i < nb.length ? sanitize(+na[i] + (+nb[i] - +na[i]) * p) : ""), "");+ }+ return (p) => (p > 0 ? b : a);+}++// Motion's interpolate(times, values, { ease: [...] }) with clamping+function interpolate(input, output, eases) {+ if (output.length === 2 && output[0] === output[1]) return () => output[1];+ const mixers = [];+ for (let i = 0; i < output.length - 1; i++) {+ const mix = mixer(output[i], output[i + 1]), ease = easeFn(eases[i] || "easeOut");+ mixers.push((p) => mix(ease(p)));+ }+ const zeroRange = input[0] === input[1];+ return (v) => {+ v = clamp(input[0], input[input.length - 1], v);+ if (zeroRange && v < input[0]) return output[0];+ let i = 0;+ if (mixers.length > 1) for (; i < input.length - 2; i++) if (v < input[i + 1]) break;+ const d = input[i + 1] - input[i];+ return mixers[i](d === 0 ? 1 : (v - input[i]) / d);+ };+}++// ---------- motion values and per-element values ----------++class MotionValue {+ constructor(v) { this.v = v; this.anim = null; this.subs = new Set(); }+ get() { return this.v; }+ set(v) { this.v = v; for (const f of this.subs) f(v); }+ current() { return this.v; }+}++// Motion keeps one MotionValue per element and style key; the first read comes from the computed style+const slots = new WeakMap();+function slotFor(el, key) {+ let m = slots.get(el);+ if (!m) slots.set(el, (m = new Map()));+ let s = m.get(key);+ if (!s) {+ s = new MotionValue(undefined);+ s.current = function () {+ if (this.v === undefined) {+ const cs = getComputedStyle(el);+ this.v = (key.startsWith("--") ? cs.getPropertyValue(key) : cs[key]).trim() || 0;+ }+ return this.v;+ };+ s.set = function (v) {+ this.v = v;+ if (key.startsWith("--")) el.style.setProperty(key, v);+ else el.style[key] = v;+ };+ m.set(key, s);+ }+ return s;+}++// ---------- animations ----------++const reduceMotion = matchMedia("(prefers-reduced-motion: reduce)");+const MAX_RESOLVE_DELAY = 40;+const toResolve = new Set();+const ticking = new Set();+let rafId = 0;+const schedule = () => { if (!rafId) rafId = requestAnimationFrame(frame); };+const timelineNow = () => document.timeline.currentTime ?? performance.now();++class Anim {+ // def: { el?, key, value (MotionValue or slot), keyframes, times, ease[], duration (s), delay (s) }+ constructor(def, createdAt) {+ Object.assign(this, def);+ this.createdAt = createdAt;+ this.state = "pending";+ this.finished = new Promise((r) => (this.resolveFinished = r));+ this.waapi = !!(def.el && def.el instanceof HTMLElement && (def.key === "opacity" || def.key === "transform"));+ }+ resolve(now) {+ if (this.state !== "pending") return;+ const value = this.value;+ const kf = this.keyframes.slice();+ if (kf[0] === null) kf[0] = value.current();+ for (let i = 1; i < kf.length; i++) if (kf[i] === null) kf[i] = kf[i - 1];+ // a "none" transform animates from the target's template with zeros ("rotate(0rad)")+ if (this.key === "transform" && kf[0] === "none") kf[0] = String(kf.find((v) => v !== "none") || "none").replace(NUM, "0");+ const startTime = now - this.createdAt > MAX_RESOLVE_DELAY ? now : this.createdAt;+ const final = kf[kf.length - 1];+ let dur = this.duration * 1000, delay = this.delay * 1000;+ if (reduceMotion.matches) dur = delay = 0;+ if (dur === 0 || kf.every((v) => v === kf[0])) {+ // not animatable or instant: set the final value now+ value.set(final);+ this.finish();+ return;+ }+ if (this.waapi) {+ const frames = kf.map((v, i) => ({ [this.key]: String(v), offset: this.times[i], easing: easeCss(this.ease[i % this.ease.length]) }));+ const wa = this.el.animate(frames, { duration: dur, delay, easing: "linear", fill: "both" });+ // Motion: animation.startTime = createdAt. If the timeline it is set against is not the one+ // document.timeline reports (a recorder's virtual clock), express it as elapsed time instead.+ wa.startTime = startTime;+ const elapsed = timelineNow() - startTime;+ if (wa.currentTime === null || Math.abs(wa.currentTime - elapsed) > 50) wa.currentTime = Math.max(0, elapsed);+ const onfinish = () => {+ if (this.state !== "running" || this.wa !== wa) return;+ value.set(final); // commit the last keyframe, then drop the animation (as Motion does)+ wa.cancel();+ this.finish();+ };+ // Motion continues on the `finish` event, which Chromium dispatches with the next rendered frame. A+ // recorder that advances page time without rendering (a virtual clock between screenshots) would hold the+ // loop until something renders; carry on after 3 animation frames without it. In a browser the event+ // always comes first: it is dispatched in the same frame as `finished` resolves.+ wa.onfinish = onfinish;+ wa.finished.then(() => {+ let n = 0;+ const check = () => { if (this.state === "running" && this.wa === wa) { if (++n < 3) requestAnimationFrame(check); else onfinish(); } };+ requestAnimationFrame(check);+ }, () => {});+ this.wa = wa;+ this.state = "running";+ } else {+ this.sample = interpolate(this.times.map((t) => t * dur), kf, this.ease);+ this.start = startTime;+ this.dur = dur;+ this.delayMs = delay;+ this.final = final;+ this.state = "running";+ ticking.add(this);+ }+ }+ tick(now) {+ const t = Math.round(now - this.start) - this.delayMs;+ if (t >= this.dur) {+ this.value.set(this.final);+ ticking.delete(this);+ this.finish();+ } else {+ this.value.set(this.sample(Math.max(0, t)));+ }+ }+ finish() {+ this.state = "finished";+ if (this.value.anim === this) this.value.anim = null;+ this.resolveFinished();+ }+ // interrupted by a newer animation of the same value: keep the value where it is+ stop() {+ if (this.state === "pending") toResolve.delete(this);+ if (this.state === "running") {+ if (this.wa) {+ try { this.wa.commitStyles(); } catch {}+ this.wa.onfinish = null;+ this.wa.cancel();+ this.value.v = this.el.style[this.key];+ } else {+ ticking.delete(this);+ }+ }+ this.state = "stopped";+ if (this.value.anim === this) this.value.anim = null;+ }+}++function frame() {+ rafId = 0;+ const now = performance.now();+ const pending = [...toResolve];+ toResolve.clear();+ for (const a of pending) a.resolve(now);+ for (const a of ticking) a.tick(now);+ for (const f of afterFrame) f();+ if (ticking.size || toResolve.size) schedule();+}+const afterFrame = new Set();++function defaultOffsets(n) {+ const o = [0];+ for (let i = 1; i < n; i++) o.push(i / (n - 1));+ return o;+}+function calcAt(current, at, prev) {+ if (typeof at === "number") return at;+ if (at.startsWith("-") || at.startsWith("+")) return Math.max(0, current + parseFloat(at));+ if (at === "<") return prev;+ return current;+}++// Motion's animate(sequence, { delay }) for [MotionValue | Element[], keyframes, transition] segments+function animate(sequence, { delay: seqDelay = 0 } = {}) {+ const defaultDuration = 0.3;+ const tracks = new Map(); // value → { el, key, entries }+ let current = 0, prev = 0, total = 0;+ for (const [subject, keyframes, transition = {}] of sequence) {+ if (transition.at !== undefined) current = calcAt(current, transition.at, prev);+ let maxDuration = 0;+ const add = (valueKeyframes, valueTransition, track, index, count) => {+ const list = [].concat(valueKeyframes);+ const { delay = 0, times = defaultOffsets(list.length), ease = "easeOut" } = valueTransition;+ const d = typeof delay === "function" ? delay(index, count) : delay;+ const duration = valueTransition.duration ?? defaultDuration;+ const start = current + d;+ if (times.length === 1 && times[0] === 0) times[1] = 1;+ if (list.length === 1) list.unshift(null);+ const end = start + duration;+ const entries = track.entries;+ for (let i = 0; i < entries.length; i++) if (entries[i].at > start && entries[i].at < end) entries.splice(i--, 1);+ for (let i = 0; i < list.length; i++) {+ entries.push({ value: list[i], at: start + (end - start) * times[i], easing: isEasingArray(ease) ? ease[i % ease.length] : ease });+ }+ maxDuration = Math.max(d + duration, maxDuration);+ total = Math.max(end, total);+ };+ const trackOf = (value, el, key) => {+ if (!tracks.has(value)) tracks.set(value, { el, key, entries: [] });+ return tracks.get(value);+ };+ if (subject instanceof MotionValue) {+ add(keyframes, transition, trackOf(subject, null, "default"), 0, 1);+ } else {+ const els = Array.isArray(subject) ? subject : [subject];+ els.forEach((el, i) => {+ for (const key of Object.keys(keyframes)) {+ const t = transition[key] ? { ...transition, ...transition[key] } : { ...transition };+ add(keyframes[key], t, trackOf(slotFor(el, key), el, key), i, els.length);+ }+ });+ }+ prev = current;+ current += maxDuration;+ }++ const createdAt = performance.now();+ const anims = [];+ for (const [value, { el, key, entries }] of tracks) {+ entries.sort((a, b) => (a.at !== b.at ? a.at - b.at : a.value === null ? 1 : b.value === null ? -1 : 0));+ const keyframes = [], times = [], ease = [];+ for (const e of entries) {+ keyframes.push(e.value);+ times.push(total ? e.at / total : 0);+ ease.push(e.easing || "easeOut");+ }+ if (times[0] !== 0) { times.unshift(0); keyframes.unshift(keyframes[0]); ease.unshift("easeInOut"); }+ if (times[times.length - 1] !== 1) { times.push(1); keyframes.push(null); }+ const a = new Anim({ el, key, value, keyframes, times, ease, duration: total, delay: seqDelay }, createdAt);+ if (value.anim) value.anim.stop(); // MotionValue.start() stops the running animation at once+ value.anim = a;+ anims.push(a);+ toResolve.add(a);+ }+ schedule();+ return Promise.all(anims.map((a) => a.finished));+}++// ---------- mount ----------++export function mount(slot, card) {+ const root = slot.querySelector(".bd-root");+ const $$ = (s) => [...root.querySelectorAll(s)];+ const circle = root.querySelector("[data-crosshair] circle");++ // crosshair: r = j, gap = y, strokeDasharray = `${g} ${y}` ×4 with g = 2πj/4 − y, strokeDashoffset = −y/2+ const j = new MotionValue(7);+ const y = new MotionValue(2);+ let dirty = false;+ j.subs.add(() => (dirty = true));+ y.subs.add(() => (dirty = true));+ afterFrame.add(() => {+ if (!dirty || !circle.isConnected) return;+ dirty = false;+ const r = j.get(), gap = y.get();+ const g = (2 * Math.PI * r) / 4 - gap;+ circle.setAttribute("r", String(r));+ circle.setAttribute("stroke-dasharray", `${g} ${gap} ${g} ${gap} ${g} ${gap} ${g} ${gap}`);+ circle.setAttribute("stroke-dashoffset", String(-(gap / 2)));+ });++ let k = 0; // layout index; the first pass uses layout 1, then they alternate (kept across hovers)+ let wanted = false; // hovered+ let running = false; // a pass is in progress++ // clerk.com's loop, verbatim apart from selectors → elements+ async function pass() {+ running = true;+ k++;+ if (k >= SCENES.length) k = 0;+ const r = SCENES[k][Math.floor(8 * Math.random())];+ const a = animate([+ [$$("[data-radar]"), { opacity: 0.2 }, { duration: 1 }],+ [$$("[data-dot]"), { opacity: 0 }, { duration: 1, at: "<" }],+ ]);+ animate([[root, { "--color": CYAN }]]);+ await a;+ const t = animate([+ ...Array.from({ length: 8 }, (_, i) => [+ $$(`[data-dot="${i}"]`),+ { top: `${SCENES[k][i][1] / 16}rem`, left: `calc(50% + ${SCENES[k][i][0] / 16}rem)`, opacity: 1 },+ { top: { duration: 0 }, left: { duration: 0 }, duration: 1, at: "<", delay: SCENES[k][i][2] },+ ]),+ [$$("[data-radar]"), { opacity: 1 }, { at: "<", duration: 1, delay: stagger(0.1) }],+ [$$("[data-transform]"), { transform: `translate(${r[0] / 16}rem, ${r[1] / 16}rem)` }, { at: "<", duration: 0.8, ease: [0.7, 0, 0.3, 1] }],+ [$$("[data-spotlight]"), { transform: `rotate(${-Math.atan(r[0] / (r[1] + 76))}rad)` }, { at: "<", duration: 0.8, ease: [0.7, 0, 0.3, 1] }],+ [$$("[data-active-dot]"), { opacity: 0 }, { at: "-0.6", duration: 0.15 }],+ [$$("[data-active-dot]"), { transform: `translate(${r[0] / 16}rem, ${r[1] / 16}rem)` }, { duration: 0.01 }],+ [$$("[data-active-dot]"), { opacity: 1 }, { at: "+0.2", duration: 0.15 }],+ ]);+ const i = animate([[j, 10.5], [y, 0, { at: "<" }], [j, 7, { at: "+0.4" }], [y, 2, { at: "<" }]], { delay: 1 });+ await t;+ if (wanted && !reduceMotion.matches) {+ pass();+ } else {+ running = false;+ await i;+ if (!wanted) animate([[root, { "--color": GREY }]]);+ }+ }++ // Hover as react-aria's useHover on the card root: pointerenter/leave, touch ignored.+ let hovered = false;+ const set = (on) => {+ if (on === hovered) return;+ hovered = on;+ if (on) {+ wanted = true;+ if (!running) pass();+ } else {+ wanted = false;+ // reduced motion (an addition): one instant pass per hover, so the grey has to come back here+ if (reduceMotion.matches && !running) animate([[root, { "--color": GREY }]]);+ }+ };+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") set(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") set(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/clerk-cli.css b/site/public/examples/clerk-bento/src/widgets/clerk-cli.cssnew file mode 100644index 0000000..ad6de19--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/clerk-cli.css@@ -0,0 +1,170 @@+/* "Clerk CLI" card visual: a glass terminal edge on the left, circuit lines into a round Clerk-logo button, and a+ ring of AI-tool logos on the right; on hover the logo lights up cyan, meteors run along the lines and the logos+ step round the ring (clerk-cli.js). Every value is clerk.com's resolved Tailwind at lg (module 731855,+ .motion-clone/clerk-bento/dom/clerk-cli.html); colours with alpha use the same color-mix()/lab() as clerk.com's+ @supports branches, gradients the same "in oklab" interpolation. Stacking is clerk.com's: inside the masked layer+ the meteor tracks and the carousel are z-auto (in that order), the lines z-5, the panel and the button z-10. */++/* pointer-events-none absolute inset-0 bg-[#212126] + bottom-fade mask: clips and fades everything */+.clerk-card--clerk-cli .cc-layer {+ pointer-events: none;+ position: absolute;+ inset: 0;+ background-color: #212126;+ -webkit-mask-image: linear-gradient(#000 0% 60%, #0009 75%, #0003 90%, #0000 100%);+ mask-image: linear-gradient(#000 0% 60%, #0009 75%, #0003 90%, #0000 100%);+}++/* absolute z-10 lg:top-[0rem]: the glass panel edge (svg 75x145) */+.clerk-card--clerk-cli .cc-panel {+ position: absolute;+ top: 0;+ z-index: 10;+}++/* absolute top-[1.5rem] left-[73px] z-5: the static circuit lines (svg 239x105) */+.clerk-card--clerk-cli .cc-lines {+ position: absolute;+ top: 1.5rem;+ left: 73px;+ z-index: 5;+}++/* meteor boxes: absolute left-[53px]|left-[73px] lg:top-[1.5rem] h-[105px] w-[239px] (z-auto, under the lines) */+.clerk-card--clerk-cli .cc-track {+ pointer-events: none;+ position: absolute;+ top: 1.5rem;+ height: 105px;+ width: 239px;+}+.clerk-card--clerk-cli .cc-track--m1 { left: 53px; }+.clerk-card--clerk-cli .cc-track--m2,+.clerk-card--clerk-cli .cc-track--m3 { left: 73px; }+/* AnimatePresence's motion.div.absolute.inset-0 around each canvas (the shared Meteor wrapper) */+.clerk-card--clerk-cli .cc-track > [data-meteor] {+ position: absolute;+ inset: 0;+}++/* absolute top-[2rem] left-1/2 z-10 -translate-x-1/2 > relative h-[90px] w-[90px] rounded-full */+.clerk-card--clerk-cli .cc-button-pos {+ position: absolute;+ top: 2rem;+ left: 50%;+ z-index: 10;+ translate: -50% 0;+}+.clerk-card--clerk-cli .cc-button {+ position: relative;+ height: 90px;+ width: 90px;+ border-radius: 2147483647px;+}+/* pointer-events-none absolute inset-0, clip-path: circle(32px at 45px 43px) (the button face) */+.clerk-card--clerk-cli .cc-clip {+ pointer-events: none;+ position: absolute;+ inset: 0;+ -webkit-clip-path: circle(32px at 45px 43px);+ clip-path: circle(32px at 45px 43px);+}+/* tint: absolute inset-0, opacity 0 at rest */+.clerk-card--clerk-cli .cc-tint {+ position: absolute;+ inset: 0;+ background-image: radial-gradient(111.72% 100% at 50% 0%, rgb(118 237 255 / 0.2), rgb(118 237 255 / 0) 53.91%);+ opacity: 0;+}+/* sheen: absolute -inset-4 bg-linear-to-br from-white/0 from-35% via-white/10 to-white/0 to-65% mix-blend-overlay,+ translate(-4rem, -4rem) at rest */+.clerk-card--clerk-cli .cc-sheen {+ position: absolute;+ inset: -1rem;+ background-image: linear-gradient(to bottom right in oklab,+ color-mix(in oklab, #fff 0%, transparent) 35%,+ color-mix(in oklab, #fff 10%, transparent) 50%,+ color-mix(in oklab, #fff 0%, transparent) 65%);+ mix-blend-mode: overlay;+ transform: translate(-4rem, -4rem);+}+/* the cyan logo: svg.absolute.inset-0.z-30 */+.clerk-card--clerk-cli .cc-icon {+ position: absolute;+ inset: 0;+ z-index: 30;+}++/* absolute lg:top-[1.6rem] lg:right-[-8.8rem] > relative h-[248px] w-[256px] overflow-visible */+.clerk-card--clerk-cli .cc-carousel-pos {+ position: absolute;+ top: 1.6rem;+ right: -8.8rem;+}+.clerk-card--clerk-cli .cc-carousel {+ position: relative;+ height: 248px;+ width: 256px;+ overflow: visible;+}+/* rounded-full bg-[#212126]: a 256x184 opaque stadium behind the ring; it hides the meteor beyond the ring edge */+.clerk-card--clerk-cli .cc-ring {+ border-radius: 2147483647px;+ background-color: #212126;+}+/* the logos' motion.div: initial opacity .7 */+.clerk-card--clerk-cli .cc-logos { opacity: 0.7; }+/* absolute top-0 left-0, inline transform translate(x, y) per slot */+.clerk-card--clerk-cli .cc-logo {+ position: absolute;+ top: 0;+ left: 0;+}+/* relative flex h-10 w-10 items-center justify-center rounded-full bg-gray-800 bg-linear-to-b from-white/5 to-67% shadow */+.clerk-card--clerk-cli .cc-bubble {+ position: relative;+ display: flex;+ height: 2.5rem;+ width: 2.5rem;+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom in oklab, color-mix(in oklab, #fff 5%, transparent) 0%, #0000 67%);+ box-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;+}+/* pointer-events-none absolute inset-0 rounded-full ring-1 ring-inset, masked to one side:+ white/5 fading to the right, #64E5FF/8 fading to the left */+.clerk-card--clerk-cli .cc-bubble__edge {+ pointer-events: none;+ position: absolute;+ inset: 0;+ border-radius: 2147483647px;+}+.clerk-card--clerk-cli .cc-bubble__edge--l {+ box-shadow: inset 0 0 0 1px color-mix(in oklab, #fff 5%, transparent);+ -webkit-mask-image: linear-gradient(90deg, #fff, #0000);+ mask-image: linear-gradient(90deg, #fff, #0000);+}+.clerk-card--clerk-cli .cc-bubble__edge--r {+ box-shadow: inset 0 0 0 1px lab(84.5189% -31.4667 -23.9754 / 0.08);+ -webkit-mask-image: linear-gradient(270deg, #fff, #0000);+ mask-image: linear-gradient(270deg, #fff, #0000);+}+/* relative z-10 flex h-full w-full items-center justify-center p-[10px] > svg.h-full.w-full.overflow-visible.fill-white */+.clerk-card--clerk-cli .cc-bubble__icon {+ position: relative;+ z-index: 10;+ display: flex;+ height: 100%;+ width: 100%;+ align-items: center;+ justify-content: center;+ padding: 10px;+}+.clerk-card--clerk-cli .cc-bubble__icon svg {+ height: 100%;+ width: 100%;+ overflow: visible;+ fill: #fff;+}diff --git a/site/public/examples/clerk-bento/src/widgets/clerk-cli.html b/site/public/examples/clerk-bento/src/widgets/clerk-cli.htmlnew file mode 100644index 0000000..6293a46--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/clerk-cli.html@@ -0,0 +1,4 @@+<!-- "Clerk CLI" card visual. Markup and SVGs copied from clerk.com (module 731855 "MCPServer", the card's rest DOM);+ Tailwind classes replaced by cc-* (clerk-cli.css), SVG ids prefixed with "cc-". The three .cc-track boxes get+ their meteor canvases on hover (clerk-cli.js). -->+<div class="cc-layer"><div class="cc-panel"><svg width="75" height="145" viewBox="0 0 75 145" fill="none" xmlns="http://www.w3.org/2000/svg"><foreignObject x="-23.0001" y="-6" width="104" height="178"><div style="backdrop-filter:blur(4px);clip-path:url(#cc-bgblur_0_2516_1006_clip_path);height:100%;width:100%"></div></foreignObject><g filter="url(#cc-filter0_d_2516_1006)" data-figma-bg-blur-radius="8"><path d="M71.1979 12.0569L65.3913 4.94183C63.872 3.08014 61.5963 2 59.1933 2L-7.00005 1.99999C-11.4183 1.99999 -15.0001 5.58172 -15.0001 9.99999L-15.0001 156C-15.0001 160.418 -11.4184 164 -7.00007 164L59.1933 164C61.5963 164 63.872 162.92 65.3913 161.058L71.1979 153.943C72.3634 152.515 72.9999 150.728 72.9999 148.885L73 17.1151C73 15.2718 72.3634 13.485 71.1979 12.0569Z" fill="white" fill-opacity="0.04" shape-rendering="crispEdges"></path><path d="M59.1933 163.5L-7.00006 163.5C-11.1422 163.5 -14.5001 160.142 -14.5001 156L-14.5 9.99999C-14.5 5.85786 -11.1422 2.49999 -7.00005 2.49999L59.1933 2.5C61.446 2.5 63.5795 3.51255 65.0039 5.25781L70.8105 12.373C71.9031 13.7119 72.5 15.3871 72.5 17.1152L72.4999 148.885C72.4999 150.613 71.9031 152.288 70.8105 153.627L65.0038 160.742C63.5795 162.487 61.446 163.5 59.1933 163.5Z" stroke="white" stroke-opacity="0.05" shape-rendering="crispEdges"></path></g><defs><filter id="cc-filter0_d_2516_1006" x="-23.0001" y="-6" width="104" height="178" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_2516_1006"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2516_1006" result="shape"></feBlend></filter><clipPath id="cc-bgblur_0_2516_1006_clip_path" transform="translate(23.0001 6)"><path d="M71.1979 12.0569L65.3913 4.94183C63.872 3.08014 61.5963 2 59.1933 2L-7.00005 1.99999C-11.4183 1.99999 -15.0001 5.58172 -15.0001 9.99999L-15.0001 156C-15.0001 160.418 -11.4184 164 -7.00007 164L59.1933 164C61.5963 164 63.872 162.92 65.3913 161.058L71.1979 153.943C72.3634 152.515 72.9999 150.728 72.9999 148.885L73 17.1151C73 15.2718 72.3634 13.485 71.1979 12.0569Z"></path></clipPath></defs></svg></div><div class="cc-lines"><svg width="239" height="105" viewBox="0 0 239 105" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#cc-clip0_29_7)"><path d="M109 52.92H225" stroke="white" stroke-opacity="0.06" stroke-dasharray="2 2"></path><path d="M99 47.46H81.8528C79.3577 47.46 77.0054 46.4821 75.4921 44.8156L37.579 3.06442C36.0657 1.39794 33.7134 0.42 31.2182 0.42H0" stroke="white" stroke-opacity="0.06"></path><path d="M99 57.54H81.8528C79.3577 57.54 77.0054 58.5179 75.4921 60.1844L37.579 101.936C36.0657 103.602 33.7134 104.58 31.2182 104.58H0" stroke="white" stroke-opacity="0.06"></path></g><defs><clipPath id="cc-clip0_29_7"><rect width="239" height="105" fill="white"></rect></clipPath></defs></svg></div><div class="cc-track cc-track--m1"></div><div class="cc-track cc-track--m2"></div><div class="cc-track cc-track--m3"></div><div class="cc-button-pos"><div class="cc-button"><svg width="90" height="90" viewBox="0 0 90 90" fill="none" xmlns="http://www.w3.org/2000/svg"><g transform="translate(13 11)" filter="url(#cc-filter0_iiii_1_3557)"><path d="M64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64C49.6731 64 64 49.6731 64 32Z" fill="#2F3037"></path><path d="M64 32C64 14.3269 49.6731 0 32 0C14.3269 0 0 14.3269 0 32C0 49.6731 14.3269 64 32 64C49.6731 64 64 49.6731 64 32Z" fill="url(#cc-paint0_linear_1_3557)" fill-opacity="0.5"></path></g><circle cx="45" cy="43" r="33.5" fill="none" stroke="#18181C" stroke-width="3"></circle><g transform="translate(29 27)"><g filter="url(#cc-filter0_di_2516_1018)"><circle cx="16" cy="16" r="5" fill="#212126"></circle></g><g filter="url(#cc-filter1_di_2516_1018)"><path d="M24.8929 2.697C25.3927 3.0318 25.4354 3.73609 25.01 4.16149L21.3561 7.81544C21.0258 8.14568 20.5135 8.19785 20.0979 7.98491C18.8688 7.35525 17.4759 6.99999 16 6.99999C11.0294 6.99999 6.99999 11.0294 6.99999 16C6.99999 17.4759 7.35525 18.8688 7.98491 20.0979C8.19785 20.5135 8.14568 21.0258 7.81544 21.3561L4.16149 25.01C3.73609 25.4354 3.0318 25.3927 2.697 24.8929C0.993528 22.3497 0 19.2909 0 16C0 7.16344 7.16344 0 16 0C19.2909 0 22.3497 0.993527 24.8929 2.697Z" fill="#212126"></path></g><g filter="url(#cc-filter2_di_2516_1018)"><path d="M25.01 27.8384C25.4354 28.2638 25.3927 28.9681 24.8928 29.3029C22.3496 31.0064 19.2908 31.9999 15.9999 31.9999C12.709 31.9999 9.65017 31.0064 7.10698 29.3029C6.60714 28.9681 6.56443 28.2638 6.98983 27.8384L10.6438 24.1845C10.974 23.8543 11.4863 23.8021 11.902 24.015C13.1311 24.6447 14.524 25 15.9999 25C17.4758 25 18.8687 24.6447 20.0978 24.015C20.5135 23.8021 21.0258 23.8542 21.356 24.1845L25.01 27.8384Z" fill="#212126"></path></g></g><defs><filter id="cc-filter0_iiii_1_3557" x="0" y="0" width="90" height="90" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="6.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect1_innerShadow_1_3557"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"></feColorMatrix><feBlend mode="normal" in2="effect1_innerShadow_1_3557" result="effect2_innerShadow_1_3557"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="2"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0.0745098 0 0 0 0 0.0745098 0 0 0 0 0.0862745 0 0 0 0.5 0"></feColorMatrix><feBlend mode="normal" in2="effect2_innerShadow_1_3557" result="effect3_innerShadow_1_3557"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="0.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0"></feColorMatrix><feBlend mode="normal" in2="effect3_innerShadow_1_3557" result="effect4_innerShadow_1_3557"></feBlend></filter><linearGradient id="cc-paint0_linear_1_3557" x1="0" y1="0" x2="64" y2="64" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0.1"></stop><stop offset="0.632812" stop-opacity="0"></stop></linearGradient><filter id="cc-filter0_di_2516_1018" x="11" y="11" width="10" height="12" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend mode="color-dodge" in2="BackgroundImageFix" result="effect1_dropShadow_2516_1018"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2516_1018" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_2516_1018"></feBlend></filter><filter id="cc-filter1_di_2516_1018" x="0" y="0" width="25.301" height="27.301" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend mode="color-dodge" in2="BackgroundImageFix" result="effect1_dropShadow_2516_1018"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2516_1018" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_2516_1018"></feBlend></filter><filter id="cc-filter2_di_2516_1018" x="6.69885" y="23.8876" width="18.6021" height="10.1124" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend mode="color-dodge" in2="BackgroundImageFix" result="effect1_dropShadow_2516_1018"></feBlend><feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_2516_1018" result="shape"></feBlend><feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="arithmetic" k2="-1" k3="1"></feComposite><feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend mode="normal" in2="shape" result="effect2_innerShadow_2516_1018"></feBlend></filter></defs></svg><div class="cc-clip"><div class="cc-tint"></div><div class="cc-sheen"></div></div><svg class="cc-icon" viewBox="0 0 90 90" fill="none" aria-hidden="true"><g filter="url(#cc-mcp-icon-active-filter)" opacity="0"><path d="M46 48C48.7614 48 51 45.7614 51 43C51 40.2386 48.7614 38 46 38C43.2386 38 41 40.2386 41 43C41 45.7614 43.2386 48 46 48Z" fill="#5DE3FF" fill-opacity="1" opacity="0"></path><path d="M46 48C48.7614 48 51 45.7614 51 43C51 40.2386 48.7614 38 46 38C43.2386 38 41 40.2386 41 43C41 45.7614 43.2386 48 46 48Z" fill="url(#cc-mcp-icon-active-overlay)" style="mix-blend-mode:overlay" opacity="0"></path><path d="M54.89 29.7C55.39 30.03 55.44 30.74 55.01 31.16L51.36 34.8199C51.03 35.1499 50.51 35.2 50.1 34.98C48.87 34.36 47.48 34 46 34C41.03 34 37 38.03 37 43C37 44.48 37.36 45.87 37.98 47.1C38.2 47.51 38.1499 48.03 37.8199 48.36L34.16 52.01C33.74 52.44 33.03 52.39 32.7 51.89C30.99 49.35 30 46.29 30 43C30 34.16 37.16 27 46 27C49.29 27 52.35 27.99 54.89 29.7Z" fill="#5DE3FF" fill-opacity="1" opacity="0"></path><path d="M54.89 29.7C55.39 30.03 55.44 30.74 55.01 31.16L51.36 34.8199C51.03 35.1499 50.51 35.2 50.1 34.98C48.87 34.36 47.48 34 46 34C41.03 34 37 38.03 37 43C37 44.48 37.36 45.87 37.98 47.1C38.2 47.51 38.1499 48.03 37.8199 48.36L34.16 52.01C33.74 52.44 33.03 52.39 32.7 51.89C30.99 49.35 30 46.29 30 43C30 34.16 37.16 27 46 27C49.29 27 52.35 27.99 54.89 29.7Z" fill="url(#cc-mcp-icon-active-overlay)" style="mix-blend-mode:overlay" opacity="0"></path><path d="M55.01 54.8399C55.44 55.2599 55.3901 55.97 54.8901 56.3C52.3501 58.01 49.29 59 46 59C42.71 59 39.65 58.01 37.11 56.3C36.61 55.97 36.56 55.2599 36.99 54.8399L40.6401 51.18C40.9701 50.85 41.4901 50.8 41.9001 51.02C43.1301 51.64 44.52 52 46 52C47.48 52 48.87 51.64 50.1 51.02C50.51 50.8 51.03 50.85 51.36 51.18L55.01 54.8399Z" fill="#5DE3FF" fill-opacity="1" opacity="0"></path><path d="M55.01 54.8399C55.44 55.2599 55.3901 55.97 54.8901 56.3C52.3501 58.01 49.29 59 46 59C42.71 59 39.65 58.01 37.11 56.3C36.61 55.97 36.56 55.2599 36.99 54.8399L40.6401 51.18C40.9701 50.85 41.4901 50.8 41.9001 51.02C43.1301 51.64 44.52 52 46 52C47.48 52 48.87 51.64 50.1 51.02C50.51 50.8 51.03 50.85 51.36 51.18L55.01 54.8399Z" fill="url(#cc-mcp-icon-active-overlay)" style="mix-blend-mode:overlay" opacity="0"></path></g><defs><linearGradient id="cc-mcp-icon-active-overlay" x1="46" y1="27" x2="46" y2="59" gradientUnits="userSpaceOnUse"><stop offset="0.529" stop-color="black"></stop><stop offset="1" stop-color="black" stop-opacity="0"></stop></linearGradient><filter id="cc-mcp-icon-active-filter" x="18" y="15" width="56" height="56" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="effect1_dropShadow_mcp_icon_active"></feMorphology><feOffset></feOffset><feGaussianBlur stdDeviation="4"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0.419608 0 0 0 0 0.905882 0 0 0 0 1 0 0 0 0.4 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_mcp_icon_active"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0"></feColorMatrix><feBlend in2="effect1_dropShadow_mcp_icon_active" result="effect2_dropShadow_mcp_icon_active"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation=".5"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0"></feColorMatrix><feBlend in2="effect2_dropShadow_mcp_icon_active" result="effect3_dropShadow_mcp_icon_active"></feBlend><feBlend in="SourceGraphic" in2="effect3_dropShadow_mcp_icon_active" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"></feColorMatrix><feBlend in2="shape" result="effect4_innerShadow_mcp_icon_active"></feBlend></filter></defs></svg></div></div><div class="cc-carousel-pos"><div class="cc-carousel"><div class="cc-ring"><svg xmlns="http://www.w3.org/2000/svg" width="184" height="184" viewBox="0 0 184 184" fill="none"><g opacity="0.5"><circle cx="92" cy="92" r="92" fill="url(#cc-paint0_linear_33_24)" fill-opacity="0.02"></circle><circle cx="92" cy="92" r="91.5" stroke="white" stroke-opacity="0.06"></circle><circle cx="92" cy="92" r="91.5" stroke="url(#cc-paint1_linear_33_24)" stroke-opacity="0.08"></circle><circle cx="92" cy="92" r="91.5" stroke="url(#cc-paint2_linear_33_24)" stroke-opacity="0.05"></circle></g><defs><linearGradient id="cc-paint0_linear_33_24" x1="184" y1="92" x2="0" y2="92" gradientUnits="userSpaceOnUse"><stop stop-color="white" stop-opacity="0"></stop><stop offset="1" stop-color="white"></stop></linearGradient><linearGradient id="cc-paint1_linear_33_24" x1="20.7" y1="184" x2="126.5" y2="57.5" gradientUnits="userSpaceOnUse"><stop stop-color="#64E5FF"></stop><stop offset="1" stop-color="#64E5FF" stop-opacity="0"></stop></linearGradient><linearGradient id="cc-paint2_linear_33_24" x1="163.3" y1="50.6" x2="59.8" y2="147.2" gradientUnits="userSpaceOnUse"><stop stop-color="white"></stop><stop offset="1" stop-color="white" stop-opacity="0"></stop></linearGradient></defs></svg></div><div class="cc-logos"><div class="cc-logo" data-logo-index="0" style="transform:translate(142px, 13px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M18.5662 8.18556C19.0199 6.82369 18.8637 5.33181 18.1381 4.09306C17.0468 2.19307 14.8531 1.21556 12.7106 1.67556C11.7574 0.601815 10.3881 -0.00880982 8.95245 -5.98234e-05C6.76244 -0.00505982 4.81932 1.40494 4.14557 3.48869C2.73869 3.77681 1.52432 4.65744 0.813694 5.90556C-0.285681 7.80056 -0.0350558 10.1893 1.43369 11.8143C0.979944 13.1762 1.13619 14.6681 1.86182 15.9068C2.95307 17.8068 5.14682 18.7843 7.28932 18.3243C8.24182 19.3981 9.61182 20.0087 11.0474 19.9993C13.2387 20.0049 15.1824 18.5937 15.8562 16.5081C17.2631 16.2199 18.4774 15.3393 19.1881 14.0912C20.2862 12.1962 20.0349 9.80931 18.5668 8.18431L18.5662 8.18556ZM11.0487 18.6924C10.1718 18.6937 9.32244 18.3868 8.64932 17.8249C8.67994 17.8087 8.73307 17.7793 8.76744 17.7581L12.7499 15.4581C12.9537 15.3424 13.0787 15.1256 13.0774 14.8912V9.27681L14.7606 10.2487C14.7787 10.2574 14.7906 10.2749 14.7931 10.2949V14.9443C14.7906 17.0118 13.1162 18.6881 11.0487 18.6924ZM2.99619 15.2531C2.55682 14.4943 2.39869 13.6049 2.54932 12.7418C2.57869 12.7593 2.63057 12.7912 2.66744 12.8124L6.64994 15.1124C6.85182 15.2306 7.10182 15.2306 7.30432 15.1124L12.1662 12.3049V14.2487C12.1674 14.2687 12.1581 14.2881 12.1424 14.3006L8.11682 16.6249C6.32369 17.6574 4.03307 17.0437 2.99619 15.2531ZM1.94807 6.55994C2.38557 5.79994 3.07619 5.21869 3.89869 4.91681C3.89869 4.95119 3.89682 5.01181 3.89682 5.05431V9.65494C3.89557 9.88869 4.02057 10.1056 4.22369 10.2212L9.08557 13.0281L7.40244 13.9999C7.38557 14.0112 7.36432 14.0131 7.34557 14.0049L3.31932 11.6787C1.52994 10.6424 0.916819 8.35244 1.94807 6.55994ZM15.7768 9.77806L10.9149 6.97056L12.5981 5.99931C12.6149 5.98806 12.6362 5.98619 12.6549 5.99431L16.6812 8.31869C18.4737 9.35431 19.0881 11.6474 18.0524 13.4399C17.6143 14.1987 16.9243 14.7799 16.1024 15.0824V10.3443C16.1043 10.1106 15.9793 9.89431 15.7768 9.77806ZM17.4518 7.25681C17.4224 7.23869 17.3706 7.20744 17.3337 7.18619L13.3512 4.88619C13.1493 4.76806 12.8993 4.76806 12.6968 4.88619L7.83494 7.69369V5.74994C7.83369 5.72994 7.84307 5.71056 7.85869 5.69806L11.8843 3.37556C13.6774 2.34119 15.9699 2.95682 17.0037 4.75056C17.4406 5.50806 17.5987 6.39494 17.4506 7.25681H17.4518ZM6.91994 10.7212L5.23619 9.74931C5.21807 9.74056 5.20619 9.72306 5.20369 9.70306V5.05369C5.20494 2.98369 6.88432 1.30619 8.95432 1.30744C9.82994 1.30744 10.6774 1.61494 11.3506 2.17494C11.3199 2.19119 11.2674 2.22056 11.2324 2.24181L7.24994 4.54181C7.04619 4.65744 6.92119 4.87369 6.92244 5.10806L6.91994 10.7199V10.7212ZM7.83432 8.74994L9.99994 7.49931L12.1656 8.74931V11.2499L9.99994 12.4999L7.83432 11.2499V8.74994Z"></path></svg></div></div></div><div class="cc-logo" data-logo-index="1" style="transform:translate(145px, 125px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.89933 13.2268L7.81074 11.0322L7.87651 10.8416L7.81074 10.7356H7.62013L6.96644 10.6953L4.73154 10.6349L2.79329 10.5544L0.915436 10.4537L0.442953 10.353L0 9.76913L0.0456381 9.47785L0.442953 9.21074L1.01208 9.2604L2.2698 9.34631L4.15705 9.47651L5.52617 9.55705L7.55436 9.76778H7.87651L7.92215 9.63758L7.81208 9.55705L7.72618 9.47651L5.77316 8.15302L3.65906 6.75436L2.55168 5.94899L1.95302 5.54094L1.65101 5.15839L1.52081 4.32349L2.06443 3.72483L2.79463 3.7745L2.98121 3.82416L3.72081 4.39329L5.30067 5.61611L7.36376 7.13557L7.66577 7.38658L7.78658 7.30067L7.80134 7.24027L7.66577 7.01342L6.54362 4.98524L5.34631 2.92215L4.81342 2.06711L4.67248 1.55436C4.62282 1.34362 4.58658 1.16644 4.58658 0.950336L5.20537 0.110067L5.54765 0L6.37316 0.110067L6.72081 0.412081L7.23356 1.58523L8.06443 3.43222L9.35302 5.94362L9.7302 6.68859L9.93154 7.37852L10.0067 7.58926H10.1369V7.46846L10.243 6.05369L10.4389 4.31678L10.6295 2.08188L10.6953 1.45235L11.0067 0.697986L11.6255 0.289933L12.1087 0.520805L12.506 1.08993L12.451 1.45772L12.2148 2.99329L11.7517 5.39866L11.4497 7.00939H11.6255L11.8268 6.80805L12.6416 5.72617L14.0107 4.01477L14.6148 3.33557L15.3195 2.58523L15.7718 2.22819H16.6268L17.2564 3.16376L16.9745 4.1302L16.094 5.24698L15.3638 6.19329L14.3168 7.60269L13.6631 8.7302L13.7235 8.82013L13.8792 8.80537L16.2443 8.30201L17.5222 8.07114L19.047 7.80939L19.7369 8.13154L19.8121 8.45906L19.5409 9.12886L17.9101 9.53154L15.9973 9.91409L13.149 10.5879L13.1141 10.6134L13.1544 10.6631L14.4376 10.7839L14.9866 10.8134H16.3302L18.8322 11L19.4859 11.4322L19.8779 11.9611L19.8121 12.3638L18.8054 12.8765L17.447 12.5544L14.2765 11.8L13.1893 11.5289H13.0389V11.6188L13.945 12.5047L15.6054 14.004L17.6846 15.9369L17.7906 16.4148L17.5235 16.7919L17.2416 16.7517L15.4148 15.3772L14.7101 14.7584L13.1141 13.4148H13.0081V13.5557L13.3758 14.094L15.3181 17.0134L15.4188 17.9087L15.2779 18.2L14.7745 18.3758L14.2215 18.2752L13.0846 16.6792L11.9114 14.8819L10.9651 13.2711L10.8497 13.3369L10.2913 19.3517L10.0295 19.6591L9.4255 19.8899L8.92215 19.5074L8.65503 18.8886L8.92215 17.6658L9.2443 16.0698L9.50604 14.8013L9.74228 13.2255L9.88322 12.702L9.87383 12.6671L9.75839 12.6819L8.57047 14.3128L6.76376 16.7544L5.33423 18.2846L4.99195 18.4201L4.39866 18.1128L4.45369 17.5638L4.78524 17.0752L6.76376 14.5584L7.95705 12.9987L8.72752 12.098L8.72215 11.9678H8.67651L3.42148 15.3799L2.48591 15.5007L2.08322 15.1235L2.13289 14.5047L2.32349 14.3034L3.90336 13.2161L3.89799 13.2215L3.89933 13.2268Z"></path></svg></div></div></div><div class="cc-logo" data-logo-index="2" style="transform:translate(68px, 161px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M18.4218 4.73348L10.4168 0.112643C10.2904 0.0396489 10.147 0.0012207 10.001 0.0012207C9.85503 0.0012207 9.71161 0.0396489 9.58518 0.112643L1.57768 4.73348C1.4716 4.79492 1.38352 4.88314 1.32224 4.98931C1.26096 5.09548 1.22864 5.21589 1.22852 5.33848V14.6601C1.22852 14.9101 1.36185 15.141 1.57852 15.266L9.58435 19.8885C9.71081 19.9614 9.85421 19.9998 10.0002 19.9998C10.1462 19.9998 10.2896 19.9614 10.416 19.8885L18.4227 15.266C18.529 15.2046 18.6174 15.1163 18.6788 15.0099C18.7402 14.9036 18.7726 14.783 18.7727 14.6601V5.33931C18.7725 5.21664 18.74 5.09618 18.6786 4.99C18.6172 4.88382 18.5289 4.79564 18.4227 4.73431L18.4218 4.73348ZM17.9193 5.71348L10.1902 19.1001C10.1377 19.1901 10.0002 19.1535 10.0002 19.0493V10.2835C10 10.1973 9.97726 10.1127 9.93411 10.0381C9.89097 9.9635 9.82898 9.90156 9.75435 9.85848L2.16268 5.47514C2.07352 5.42348 2.11018 5.28514 2.21435 5.28514H17.6727C17.8927 5.28514 18.0293 5.52348 17.9193 5.71348Z"></path></svg></div></div></div><div class="cc-logo" data-logo-index="3" style="transform:translate(-13px, 104px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M18.5662 8.18556C19.0199 6.82369 18.8637 5.33181 18.1381 4.09306C17.0468 2.19307 14.8531 1.21556 12.7106 1.67556C11.7574 0.601815 10.3881 -0.00880982 8.95245 -5.98234e-05C6.76244 -0.00505982 4.81932 1.40494 4.14557 3.48869C2.73869 3.77681 1.52432 4.65744 0.813694 5.90556C-0.285681 7.80056 -0.0350558 10.1893 1.43369 11.8143C0.979944 13.1762 1.13619 14.6681 1.86182 15.9068C2.95307 17.8068 5.14682 18.7843 7.28932 18.3243C8.24182 19.3981 9.61182 20.0087 11.0474 19.9993C13.2387 20.0049 15.1824 18.5937 15.8562 16.5081C17.2631 16.2199 18.4774 15.3393 19.1881 14.0912C20.2862 12.1962 20.0349 9.80931 18.5668 8.18431L18.5662 8.18556ZM11.0487 18.6924C10.1718 18.6937 9.32244 18.3868 8.64932 17.8249C8.67994 17.8087 8.73307 17.7793 8.76744 17.7581L12.7499 15.4581C12.9537 15.3424 13.0787 15.1256 13.0774 14.8912V9.27681L14.7606 10.2487C14.7787 10.2574 14.7906 10.2749 14.7931 10.2949V14.9443C14.7906 17.0118 13.1162 18.6881 11.0487 18.6924ZM2.99619 15.2531C2.55682 14.4943 2.39869 13.6049 2.54932 12.7418C2.57869 12.7593 2.63057 12.7912 2.66744 12.8124L6.64994 15.1124C6.85182 15.2306 7.10182 15.2306 7.30432 15.1124L12.1662 12.3049V14.2487C12.1674 14.2687 12.1581 14.2881 12.1424 14.3006L8.11682 16.6249C6.32369 17.6574 4.03307 17.0437 2.99619 15.2531ZM1.94807 6.55994C2.38557 5.79994 3.07619 5.21869 3.89869 4.91681C3.89869 4.95119 3.89682 5.01181 3.89682 5.05431V9.65494C3.89557 9.88869 4.02057 10.1056 4.22369 10.2212L9.08557 13.0281L7.40244 13.9999C7.38557 14.0112 7.36432 14.0131 7.34557 14.0049L3.31932 11.6787C1.52994 10.6424 0.916819 8.35244 1.94807 6.55994ZM15.7768 9.77806L10.9149 6.97056L12.5981 5.99931C12.6149 5.98806 12.6362 5.98619 12.6549 5.99431L16.6812 8.31869C18.4737 9.35431 19.0881 11.6474 18.0524 13.4399C17.6143 14.1987 16.9243 14.7799 16.1024 15.0824V10.3443C16.1043 10.1106 15.9793 9.89431 15.7768 9.77806ZM17.4518 7.25681C17.4224 7.23869 17.3706 7.20744 17.3337 7.18619L13.3512 4.88619C13.1493 4.76806 12.8993 4.76806 12.6968 4.88619L7.83494 7.69369V5.74994C7.83369 5.72994 7.84307 5.71056 7.85869 5.69806L11.8843 3.37556C13.6774 2.34119 15.9699 2.95682 17.0037 4.75056C17.4406 5.50806 17.5987 6.39494 17.4506 7.25681H17.4518ZM6.91994 10.7212L5.23619 9.74931C5.21807 9.74056 5.20619 9.72306 5.20369 9.70306V5.05369C5.20494 2.98369 6.88432 1.30619 8.95432 1.30744C9.82994 1.30744 10.6774 1.61494 11.3506 2.17494C11.3199 2.19119 11.2674 2.22056 11.2324 2.24181L7.24994 4.54181C7.04619 4.65744 6.92119 4.87369 6.92244 5.10806L6.91994 10.7199V10.7212ZM7.83432 8.74994L9.99994 7.49931L12.1656 8.74931V11.2499L9.99994 12.4999L7.83432 11.2499V8.74994Z"></path></svg></div></div></div><div class="cc-logo" data-logo-index="4" style="transform:translate(-11px, 31px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M3.89933 13.2268L7.81074 11.0322L7.87651 10.8416L7.81074 10.7356H7.62013L6.96644 10.6953L4.73154 10.6349L2.79329 10.5544L0.915436 10.4537L0.442953 10.353L0 9.76913L0.0456381 9.47785L0.442953 9.21074L1.01208 9.2604L2.2698 9.34631L4.15705 9.47651L5.52617 9.55705L7.55436 9.76778H7.87651L7.92215 9.63758L7.81208 9.55705L7.72618 9.47651L5.77316 8.15302L3.65906 6.75436L2.55168 5.94899L1.95302 5.54094L1.65101 5.15839L1.52081 4.32349L2.06443 3.72483L2.79463 3.7745L2.98121 3.82416L3.72081 4.39329L5.30067 5.61611L7.36376 7.13557L7.66577 7.38658L7.78658 7.30067L7.80134 7.24027L7.66577 7.01342L6.54362 4.98524L5.34631 2.92215L4.81342 2.06711L4.67248 1.55436C4.62282 1.34362 4.58658 1.16644 4.58658 0.950336L5.20537 0.110067L5.54765 0L6.37316 0.110067L6.72081 0.412081L7.23356 1.58523L8.06443 3.43222L9.35302 5.94362L9.7302 6.68859L9.93154 7.37852L10.0067 7.58926H10.1369V7.46846L10.243 6.05369L10.4389 4.31678L10.6295 2.08188L10.6953 1.45235L11.0067 0.697986L11.6255 0.289933L12.1087 0.520805L12.506 1.08993L12.451 1.45772L12.2148 2.99329L11.7517 5.39866L11.4497 7.00939H11.6255L11.8268 6.80805L12.6416 5.72617L14.0107 4.01477L14.6148 3.33557L15.3195 2.58523L15.7718 2.22819H16.6268L17.2564 3.16376L16.9745 4.1302L16.094 5.24698L15.3638 6.19329L14.3168 7.60269L13.6631 8.7302L13.7235 8.82013L13.8792 8.80537L16.2443 8.30201L17.5222 8.07114L19.047 7.80939L19.7369 8.13154L19.8121 8.45906L19.5409 9.12886L17.9101 9.53154L15.9973 9.91409L13.149 10.5879L13.1141 10.6134L13.1544 10.6631L14.4376 10.7839L14.9866 10.8134H16.3302L18.8322 11L19.4859 11.4322L19.8779 11.9611L19.8121 12.3638L18.8054 12.8765L17.447 12.5544L14.2765 11.8L13.1893 11.5289H13.0389V11.6188L13.945 12.5047L15.6054 14.004L17.6846 15.9369L17.7906 16.4148L17.5235 16.7919L17.2416 16.7517L15.4148 15.3772L14.7101 14.7584L13.1141 13.4148H13.0081V13.5557L13.3758 14.094L15.3181 17.0134L15.4188 17.9087L15.2779 18.2L14.7745 18.3758L14.2215 18.2752L13.0846 16.6792L11.9114 14.8819L10.9651 13.2711L10.8497 13.3369L10.2913 19.3517L10.0295 19.6591L9.4255 19.8899L8.92215 19.5074L8.65503 18.8886L8.92215 17.6658L9.2443 16.0698L9.50604 14.8013L9.74228 13.2255L9.88322 12.702L9.87383 12.6671L9.75839 12.6819L8.57047 14.3128L6.76376 16.7544L5.33423 18.2846L4.99195 18.4201L4.39866 18.1128L4.45369 17.5638L4.78524 17.0752L6.76376 14.5584L7.95705 12.9987L8.72752 12.098L8.72215 11.9678H8.67651L3.42148 15.3799L2.48591 15.5007L2.08322 15.1235L2.13289 14.5047L2.32349 14.3034L3.90336 13.2161L3.89799 13.2215L3.89933 13.2268Z"></path></svg></div></div></div><div class="cc-logo" data-logo-index="5" style="transform:translate(55px, -20px)"><div class="cc-bubble"><span class="cc-bubble__edge cc-bubble__edge--l"></span><span class="cc-bubble__edge cc-bubble__edge--r"></span><div class="cc-bubble__icon"><svg viewBox="0 0 20 20" aria-hidden="true"><path d="M18.4218 4.73348L10.4168 0.112643C10.2904 0.0396489 10.147 0.0012207 10.001 0.0012207C9.85503 0.0012207 9.71161 0.0396489 9.58518 0.112643L1.57768 4.73348C1.4716 4.79492 1.38352 4.88314 1.32224 4.98931C1.26096 5.09548 1.22864 5.21589 1.22852 5.33848V14.6601C1.22852 14.9101 1.36185 15.141 1.57852 15.266L9.58435 19.8885C9.71081 19.9614 9.85421 19.9998 10.0002 19.9998C10.1462 19.9998 10.2896 19.9614 10.416 19.8885L18.4227 15.266C18.529 15.2046 18.6174 15.1163 18.6788 15.0099C18.7402 14.9036 18.7726 14.783 18.7727 14.6601V5.33931C18.7725 5.21664 18.74 5.09618 18.6786 4.99C18.6172 4.88382 18.5289 4.79564 18.4227 4.73431L18.4218 4.73348ZM17.9193 5.71348L10.1902 19.1001C10.1377 19.1901 10.0002 19.1535 10.0002 19.0493V10.2835C10 10.1973 9.97726 10.1127 9.93411 10.0381C9.89097 9.9635 9.82898 9.90156 9.75435 9.85848L2.16268 5.47514C2.07352 5.42348 2.11018 5.28514 2.21435 5.28514H17.6727C17.8927 5.28514 18.0293 5.52348 17.9193 5.71348Z"></path></svg></div></div></div></div></div></div></div>diff --git a/site/public/examples/clerk-bento/src/widgets/clerk-cli.js b/site/public/examples/clerk-bento/src/widgets/clerk-cli.jsnew file mode 100644index 0000000..052a9f7--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/clerk-cli.js@@ -0,0 +1,302 @@+// "Clerk CLI" card (clerk.com module 731855, "MCPServer"), without Motion for React.+//+// Hover the card and the Clerk logo on the round button lights up cyan (0.2 s) while a cyan tint fades in and a+// sheen sweeps the button face; the six AI-tool logos on the ring brighten (opacity .7 → 1). Purple→cyan light+// streaks (src/shared/meteor.js) run from the glass terminal panel along both curves into the button at 0.5 s, and+// from the button into the logo ring at 1.35 s, every 1.5 s. From 1.9 s, and then every 1.35 s, the logos step+// one slot clockwise round the ring (straight 1 s moves, cubic-bezier(.7,0,.3,1)). On hover-out the logo, tint,+// sheen and logo brightness go back (0.2 / 0.3 s), the streaks fade out (0.3 s) and are removed, and the carousel+// stops scheduling: a step in flight finishes and the logos stay where they are (no reset; the next hover goes on+// from there). Nothing is random.+//+// How clerk.com runs each value, reproduced here so that frames match:+// - tint opacity, sheen transform, logo-group opacity, the carousel's transforms, the streaks' exit opacity: Motion+// hands them to WAAPI (cubic-bezier easings as CSS cubic-bezier()); on finish the end value is written to the+// style and the animation cancelled. An interrupted value restarts from where it is (sampled with the easing).+// - the active logo group's SVG `opacity` attribute and the `length` motion value (which only switches the cyan+// paths' opacity on while it is > 0): Motion's JS loop, one value per animation frame.+// - Motion's defaults: a value with no transition (tint, logo group, every hover-out except the icon) gets 0.3 s+// cubic-bezier(.25,.1,.35,1).+// - Streaks: three <Meteor stops="dark" speed={.35}> canvases (239×105 each), mounted by AnimatePresence while the+// card is hovered, exit {opacity: 0}. Re-hovering while they fade revives the same instances (and re-renders+// them: Meteor's effect re-runs, clock kept); after removal a new hover starts a new clock.+// - Carousel: setTimeout(550) → setInterval(1350) while hovered; each tick moves logo r to slot (r + step) % 6+// (useAnimate sequence, all six at once). `step` persists across hovers.+// - Hover: react-aria useHover on the card root (pointerenter/pointerleave, touch ignored).+// With prefers-reduced-motion: reduce, hover switches the cyan state instantly and runs no streaks or carousel.++import { createMeteor } from "../shared/meteor.js";++// ---------- easing (Motion's cubicBezier: binary subdivision, 12 iterations) ----------++function cubicBezier(x1, y1, x2, y2) {+ const calc = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;+ const tForX = (x) => {+ let lo = 0, hi = 1, t, cx, i = 0;+ do {+ t = lo + (hi - lo) / 2;+ cx = calc(t, x1, x2) - x;+ if (cx > 0) hi = t; else lo = t;+ } while (Math.abs(cx) > 1e-7 && ++i < 12);+ return t;+ };+ const fn = (t) => (t === 0 || t === 1 ? t : calc(tForX(t), y1, y2));+ fn.css = `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`;+ return fn;+}+const linear = (t) => t;+linear.css = "linear";++const DEFAULT = { duration: 300, ease: cubicBezier(0.25, 0.1, 0.35, 1) }; // Motion's default tween+const LENGTH_IN = { duration: 750, ease: cubicBezier(0.25, 0.75, 0, 1) };+const ICON = { duration: 200, ease: linear };+const SHEEN_IN = { duration: 500, ease: cubicBezier(0, 0.4, 0.2, 1) };+const STEP = { duration: 1000, ease: cubicBezier(0.7, 0, 0.3, 1) };+const SHEEN_REST = [-4, -4]; // rem++// the carousel's six slots on the ring (px in the 256×248 box), clockwise+const SLOTS = [[142, 13], [145, 125], [68, 161], [-13, 104], [-11, 31], [55, -20]];+const FIRST_STEP = 550; // ms after hover-in: setTimeout(…, 550) then setInterval(next, 1350)+const STEP_EVERY = 1350;++// the three streaks (component `j`): box 239×105, speed .35 px/ms, "dark" stops (purple tail → cyan head)+const TOP_CURVE = "M99 47.46H81.8528C79.3577 47.46 77.0054 46.4821 75.4921 44.8156L37.579 3.06442C36.0657 1.39794 33.7134 0.42 31.2182 0.42H0";+const BOTTOM_CURVE = "M99 57.54H81.8528C79.3577 57.54 77.0054 58.5179 75.4921 60.1844L37.579 101.936C36.0657 103.602 33.7134 104.58 31.2182 104.58H0";+const STREAKS = [+ { box: ".cc-track--m1", path: "M159 52.92H235", delay: 1350, repeat: 1500 }, // button → ring+ { box: ".cc-track--m2", path: TOP_CURVE, delay: 500, repeat: 1500, direction: "reverse" }, // panel → button+ { box: ".cc-track--m3", path: BOTTOM_CURVE, delay: 500, repeat: 1500, direction: "reverse" },+];++const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)");+const lerp = (from, to, p) => from.map((f, i) => f + (to[i] - f) * p);+const same = (a, b) => a.every((v, i) => v === b[i]);++// ---------- WAAPI value (Motion's accelerated opacity / transform) ----------++class WaapiValue {+ constructor(el, prop, format, initial) {+ Object.assign(this, { el, prop, format, v: initial, run: null });+ }+ current() {+ const r = this.run;+ if (!r) return this.v;+ const t = Number(r.anim.currentTime) || 0;+ if (t <= 0) return r.from;+ return lerp(r.from, r.to, r.ease(Math.min(t / r.duration, 1)));+ }+ set(v) {+ this.v = v;+ this.el.style[this.prop] = this.format(v);+ }+ stop() {+ const from = this.current();+ if (this.run) {+ this.run.anim.cancel();+ this.run = null;+ }+ this.set(from);+ return from;+ }+ // `since`: ms the animation is back-dated by (Motion creates it on the next frame, started at the change)+ to(target, { duration, ease }, since = 0) {+ const from = this.stop();+ if (same(from, target) || reducedMotion?.matches) {+ this.set(target);+ return;+ }+ const anim = this.el.animate(+ { [this.prop]: [this.format(from), this.format(target)] },+ { duration, easing: ease.css, fill: "both" },+ );+ if (since > 0) anim.currentTime = Math.min(since, duration);+ const run = { anim, from, to: target, duration, ease };+ this.run = run;+ anim.onfinish = () => {+ if (this.run !== run) return;+ this.run = null;+ this.set(target); // Motion commits the final keyframe to the style and cancels the animation+ anim.cancel();+ };+ }+}++// ---------- JS values on one rAF loop (Motion's frameloop + JSAnimation) ----------++const ticking = new Set();+let rafId = 0;+function tick() {+ const now = performance.now();+ for (const f of [...ticking]) f(now);+ rafId = ticking.size ? requestAnimationFrame(tick) : 0;+}+function onFrame(f) {+ ticking.add(f);+ if (!rafId) rafId = requestAnimationFrame(tick);+ return () => ticking.delete(f);+}++class JsValue {+ constructor(initial, render) {+ Object.assign(this, { v: initial, render, run: null });+ }+ sample(r, now) {+ const t = now - r.start;+ if (t <= 0) return r.from;+ return r.from + (r.to - r.from) * r.ease(Math.min(t / r.duration, 1));+ }+ to(target, { duration, ease }) {+ const now = performance.now();+ if (this.run) {+ this.v = this.sample(this.run, now);+ this.run.off();+ this.run = null;+ }+ if (this.v === target || reducedMotion?.matches) {+ this.v = target;+ this.render(target);+ return;+ }+ const run = { from: this.v, to: target, start: now, duration, ease };+ run.off = onFrame((t) => {+ this.v = this.sample(run, t);+ this.render(this.v);+ if (t - run.start >= run.duration) {+ run.off();+ if (this.run === run) this.run = null;+ }+ });+ this.run = run;+ }+}++// ---------- mount ----------++const opacityFmt = ([o]) => String(o);+const translateFmt = ([x, y]) => `translate(${x}px, ${y}px)`;++export function mount(slot, card) {+ const q = (s) => slot.querySelector(s);+ const iconGroup = q(".cc-icon > g");+ if (!iconGroup) return;++ // the active (cyan) Clerk logo: group opacity tween + the paths' opacity = (length > 0)+ const iconPaths = [...iconGroup.querySelectorAll("path")];+ const groupOpacity = new JsValue(0, (o) => iconGroup.setAttribute("opacity", String(o)));+ const length = new JsValue(0, (l) => {+ const on = String(+(l > 0));+ for (const p of iconPaths) if (p.getAttribute("opacity") !== on) p.setAttribute("opacity", on);+ });++ const tint = new WaapiValue(q(".cc-tint"), "opacity", opacityFmt, [0]);+ const sheen = new WaapiValue(q(".cc-sheen"), "transform", ([x, y]) => `translate(${x}rem, ${y}rem)`, SHEEN_REST);+ const logosOpacity = new WaapiValue(q(".cc-logos"), "opacity", opacityFmt, [0.7]);+ const logos = [...slot.querySelectorAll(".cc-logo")].map((el) => {+ const i = Number(el.dataset.logoIndex);+ return new WaapiValue(el, "transform", translateFmt, SLOTS[i]);+ });++ // carousel: every tick moves logo r to slot (r + step) % 6, all at once; `step` persists across hovers+ let step = 0;+ let startTimer = 0;+ let stepTimer = 0;+ // Motion has to read the logos' current transforms first, so it creates the six WAAPI animations in its next+ // frame, back-dated to the tick (startTime = the time of the call)+ const next = () => {+ const s = ++step;+ const at = performance.now();+ requestAnimationFrame(() => {+ const since = performance.now() - at;+ logos.forEach((logo, r) => logo.to(SLOTS[(r + s) % SLOTS.length], STEP, since));+ });+ };++ // streaks (AnimatePresence children)+ const boxes = STREAKS.map((s) => q(s.box));+ let meteors = [];+ const showStreaks = () => {+ if (meteors.length && meteors.every((m) => m.el.isConnected)) {+ // back while they fade out: the same instances return to opacity 1 and re-render (clock kept)+ for (const m of meteors) {+ if (m.exiting) m.revive();+ m.refresh();+ }+ return;+ }+ for (const m of meteors) m.destroy();+ meteors = STREAKS.map((s, i) =>+ createMeteor(boxes[i], {+ stops: "dark",+ speed: 0.35,+ meteors: [{ width: 239, height: 105, path: s.path, delay: s.delay, repeat: s.repeat, direction: s.direction }],+ }),+ );+ };+ const hideStreaks = () => {+ for (const m of meteors) m.exit();+ };++ // Timing, as React + Motion run it on clerk.com (measured against clerk.com frame by frame):+ // - hover-in: the tweens start at the pointer event (their keyframes are known, Motion starts them in the+ // commit); the carousel timers start there too (the effect);+ // - the Meteor canvases mount on the next animation frame (their clock starts on the frame after);+ // - hover-out: everything is applied on the next frame, WAAPI tweens back-dated to the event.+ // A hover-out and back within one frame changes nothing (React batches it).+ let hovered = false; // pointer state+ let shown = false; // hover-in tweens applied+ let streaks = false; // meteors mounted+ let changedAt = 0;+ let req = 0;+ function onNextFrame() {+ req = 0;+ if (hovered) {+ if (!streaks && !reducedMotion?.matches) {+ streaks = true;+ showStreaks();+ }+ return;+ }+ const since = performance.now() - changedAt;+ if (shown) {+ shown = false;+ length.to(0, DEFAULT);+ groupOpacity.to(0, ICON);+ tint.to([0], DEFAULT, since);+ sheen.to(SHEEN_REST, DEFAULT, since);+ logosOpacity.to([0.7], DEFAULT, since);+ }+ if (streaks) {+ streaks = false;+ hideStreaks();+ }+ }+ function setHovered(on) {+ if (on === hovered) return;+ hovered = on;+ changedAt = performance.now();+ if (!req) req = requestAnimationFrame(onNextFrame);+ if (on) {+ if (!shown) {+ shown = true;+ length.to(1, LENGTH_IN);+ groupOpacity.to(1, ICON);+ tint.to([1], DEFAULT);+ sheen.to([0, 0], SHEEN_IN);+ logosOpacity.to([1], DEFAULT);+ }+ if (!reducedMotion?.matches) {+ startTimer = window.setTimeout(() => {+ stepTimer = window.setInterval(next, STEP_EVERY);+ }, FIRST_STEP);+ }+ } else {+ window.clearTimeout(startTimer);+ window.clearInterval(stepTimer);+ startTimer = stepTimer = 0;+ }+ }++ // react-aria useHover on the card root: pointer enter/leave, touch ignored+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") setHovered(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") setHovered(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/fraud.css b/site/public/examples/clerk-bento/src/widgets/fraud.cssnew file mode 100644index 0000000..6849e33--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/fraud.css@@ -0,0 +1,110 @@+/* Fraud and Abuse Prevention card visual: clerk.com's markup (module 555385) with its Tailwind classes resolved to+ plain CSS. Sizes at 1440x900: visual 394.656 x 392; the 304 px "Fraudulent sign-ups detected" pill and the list+ below it are centred in it (w-min); the timeline track is 39 x 393 (the card clips its bottom).+ Motion: src/widgets/fraud.js (clerk.com's Motion-for-React parts) + the :hover colour transition below+ (clerk.com's Tailwind group-hover, plain CSS :hover on the card there too). */++.clerk-card--fraud .fr-root {+ display: flex;+ height: 100%;+ align-items: center;+ justify-content: center;+}+.clerk-card--fraud .fr-wrap { width: min-content; }+.clerk-card--fraud .fr-icon { width: 1rem; height: 1rem; }++/* ---------- pill ---------- */+.clerk-card--fraud .fr-pill {+ display: flex;+ width: 19rem;+ align-items: center;+ gap: 0.875rem;+ border-radius: 0.375rem;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom right, #ffffff0d 0%, #0000 65%);+ padding: 0.75rem;+ box-shadow: 0 0 0 0.25rem #13131680; /* ring-[0.25rem] ring-gray-950/50 */+}+/* text-2xs/4 font-mono text-gray-500 transition duration-500 group-hover:text-white */+.clerk-card--fraud .fr-text {+ font-family: var(--font-mono);+ font-size: 0.6875rem;+ line-height: 1rem;+ color: var(--color-gray-500);+ transition-property: color;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.5s;+}+.clerk-card--fraud .fr-time {+ margin-left: auto;+ font-size: 0.625rem;+ line-height: 1.125rem;+ color: var(--color-gray-600);+}++/* ---------- timeline ---------- */+.clerk-card--fraud .fr-list {+ position: relative;+ padding-top: 4rem;+ padding-left: 2.875rem;+}+.clerk-card--fraud .fr-track {+ position: absolute;+ top: 0;+ left: 1.1875rem;+ z-index: -10;+ aspect-ratio: 39 / 393;+ width: 2.4375rem;+}+.clerk-card--fraud .fr-track__line {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ stroke: #ffffff0d;+}++/* ---------- blocked rows ---------- */+.clerk-card--fraud .fr-row {+ display: flex;+ align-items: flex-start;+ gap: 1rem;+ font-size: 0.625rem;+ line-height: 1.125rem;+}+.clerk-card--fraud .fr-row:not(:last-child) { margin-bottom: 1.5rem; } /* space-y-6 */+.clerk-card--fraud .fr-node {+ position: relative;+ margin-top: 0.0625rem;+ display: flex;+ width: 1.25rem;+ height: 1.25rem;+ flex: none;+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ background-color: #5e5f6e33;+}+.clerk-card--fraud .fr-dot {+ width: 0.25rem;+ height: 0.25rem;+ border-radius: 2147483647px;+ background-color: var(--color-gray-600);+ box-shadow: 0 1px #ffffff1a inset, 0 1px 2px #00000040;+}+.clerk-card--fraud .fr-block {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ background-color: #ef4444; /* red-500 */+}+.clerk-card--fraud .fr-title { font-weight: 500; color: #fff; }+.clerk-card--fraud .fr-desc { color: var(--color-gray-600); }++/* ---------- hover (clerk.com: Tailwind group-hover, inside @media (hover: hover)) ---------- */+@media (hover: hover) {+ .clerk-card--fraud:hover .fr-text { color: #fff; }+}diff --git a/site/public/examples/clerk-bento/src/widgets/fraud.html b/site/public/examples/clerk-bento/src/widgets/fraud.htmlnew file mode 100644index 0000000..d21ab8f--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/fraud.html@@ -0,0 +1,34 @@+<div class="fr-root">+ <div class="fr-wrap">+ <div class="fr-pill">+ <div class="fr-spinner" style="transform: none;">+ <svg viewBox="0 0 16 16" fill="none" class="fr-icon"><path stroke="url(#fr-spinner-gradient)" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="M8 1.75v1.042m0 10.416v1.042m3.125-11.663-.521.902m-5.208 9.022-.521.902m8.537-8.538-.902.52m-9.02 5.21-.903.52M14.25 8h-1.042M2.792 8H1.75m11.662 3.125-.902-.52m-9.02-5.21-.903-.52m8.538 8.538-.52-.902m-5.21-9.022-.52-.902"></path><defs><radialGradient id="fr-spinner-gradient" cx="0" cy="0" r="1" gradientTransform="rotate(102.529 4.047 5.711) scale(11.5244)" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-color="#fff" stop-opacity=".2"></stop></radialGradient></defs></svg>+ </div>+ <div class="fr-text">Fraudulent sign-ups detected</div>+ <div class="fr-time">14:09</div>+ </div>+ <div class="fr-list">+ <div class="fr-track">+ <svg viewBox="0 0 39 393" fill="none" class="fr-track__line"><path d="M2 0V34.6863C2 36.808 2.84285 38.8429 4.34315 40.3431L34.6569 70.6569C36.1571 72.1571 37 74.192 37 76.3137V393"></path></svg>+ </div>+ <div class="fr-rows">+ <div class="fr-row">+ <div class="fr-node"><div class="fr-dot"></div><div class="fr-block" style="opacity: 0; transform: scale(0.8);"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true" class="fr-icon"><path stroke="#131316" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="m5 5 6 6M11 5l-6 6"></path></svg></div></div>+ <div><div class="fr-title" style="opacity: 0; filter: blur(8px);">[email protected]</div><div class="fr-desc" style="opacity: 0; transform: translateY(0.5rem);">Blocked Aug 4 at 14:09</div></div>+ </div>+ <div class="fr-row">+ <div class="fr-node"><div class="fr-dot"></div><div class="fr-block" style="opacity: 0; transform: scale(0.8);"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true" class="fr-icon"><path stroke="#131316" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="m5 5 6 6M11 5l-6 6"></path></svg></div></div>+ <div><div class="fr-title" style="opacity: 0; filter: blur(8px);">[email protected]</div><div class="fr-desc" style="opacity: 0; transform: translateY(0.5rem);">Blocked Aug 4 at 14:10</div></div>+ </div>+ <div class="fr-row">+ <div class="fr-node"><div class="fr-dot"></div><div class="fr-block" style="opacity: 0; transform: scale(0.8);"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true" class="fr-icon"><path stroke="#131316" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="m5 5 6 6M11 5l-6 6"></path></svg></div></div>+ <div><div class="fr-title" style="opacity: 0; filter: blur(8px);">[email protected]</div><div class="fr-desc" style="opacity: 0; transform: translateY(0.5rem);">Blocked Aug 4 at 14:12</div></div>+ </div>+ <div class="fr-row">+ <div class="fr-node"><div class="fr-dot"></div><div class="fr-block" style="opacity: 0; transform: scale(0.8);"><svg viewBox="0 0 16 16" fill="none" aria-hidden="true" class="fr-icon"><path stroke="#131316" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="m5 5 6 6M11 5l-6 6"></path></svg></div></div>+ <div><div class="fr-title" style="opacity: 0; filter: blur(8px);">[email protected]</div><div class="fr-desc" style="opacity: 0; transform: translateY(0.5rem);">Blocked Aug 4 at 14:16</div></div>+ </div>+ </div>+ </div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/fraud.js b/site/public/examples/clerk-bento/src/widgets/fraud.jsnew file mode 100644index 0000000..1f44d39--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/fraud.js@@ -0,0 +1,316 @@+// Fraud and Abuse Prevention card (clerk.com module 555385, "FraudAndAbuseDetection"), without Motion for React.+//+// On hover of the card: the sunburst spinner in the "Fraudulent sign-ups detected" pill turns (one turn per 2 s,+// linear, looping) and the pill text turns white (CSS, 0.5 s); four "blocked" rows come in one after the other+// (delays 0.25 / 0.45 / 0.65 / 0.85 s): a red ✕ disc pops in (opacity 0→1, scale 0.8→1, 0.2 s), the e-mail un-blurs+// (opacity 0→1, blur 8→0 px, 0.5 s) and, 0.2 s later, the "Blocked Aug 4 at 14:xx" line rises 8 px (0.5 s,+// easeOutExpo); and a red→orange light streak runs down the timeline every 3 s (src/shared/meteor.js). On hover-out+// every value goes back with the same delays and durations (clerk.com uses one transition for both states), the+// spinner turns back to 0° (0.5 s, easeOutExpo) and the streak fades out (0.3 s) and is removed. Nothing is random.+//+// How clerk.com (Motion for React) runs each value, reproduced here so that frames match:+// - opacity / filter / transform (the "Blocked …" line's translateY): WAAPI, with function easings sampled into CSS+// linear() (one point per 10 ms); on finish the end value is written to the style.+// - scale (the ✕ disc) and rotate (the spinner): Motion's JS loop, one value per animation frame, rendered as+// `transform: scale()/rotate()` ("none" at the default value).+// - Timing, measured on clerk.com (virtual-clock captures with logged pointer events, .motion-clone/clerk-bento/+// fraud/): at the pointer event the running animations are stopped (a WAAPI one is sampled at that instant and the+// value committed; a JS one keeps its last frame); on the next frame the new animations are created from the current+// values, all back-dated to the event (Motion's createdAt). The meteor is mounted on the next frame.+// - Motion's bookkeeping, including an edge case: an animation that ends in the same frame as a pointer event+// clears the value's *new* animation when its finish event arrives, so on a quick re-hover Motion skips that value+// (it looks already at its target) and it ends at its rest value for that hover. This port does the same.+//+// Addition (not on clerk.com): with prefers-reduced-motion: reduce, hover shows the rows at once, without the+// spinner turn and the streak.++import { createMeteor } from "../shared/meteor.js";++// ---------- easings (clerk.com module 275921) ----------+const easeH = (t) => (t < 0.5 ? 0.5 * Math.pow(2, 16 * t - 8) : -0.5 * Math.pow(2, -16 * t + 8) + 1); // soft easeInOutExpo+const easeU = (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t)); // easeOutExpo+const linear = (t) => t;+// Motion's generateLinearEasing: max(round(duration / 10), 2) points, 4 decimals+function linearEasing(fn, duration) {+ const n = Math.max(Math.round(duration / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(Math.round(1e4 * fn(i / (n - 1))) / 1e4);+ return `linear(${pts.join(", ")})`;+}++const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)");++// ---------- Motion values ----------+// `value` is the motion value, `anim` the animation it holds (Motion's MotionValue.animation).+// stop(now) + request(to, transition, now) run at the pointer event; create(frameNow) on the next frame.+class MotionVal {+ constructor(value) {+ this.value = value;+ this.anim = null;+ this.pending = null;+ }+ // Motion's animateTarget: skip a value that is not animating and already at the target+ request(to, transition, now) {+ if (!this.anim && this.value === to) {+ this.pending = { skip: true, to };+ return;+ }+ this.stop(now);+ const a = { to, ...transition, start: now, live: false };+ this.anim = this.pending = a;+ }+}++// a numeric value rendered into one CSS property through WAAPI (Motion's accelerated path)+class WaapiValue extends MotionVal {+ constructor(el, prop, value, render) {+ super(value);+ Object.assign(this, { el, prop, render });+ }+ write(v) {+ this.el.style[this.prop] = this.render(v);+ }+ set(v) {+ this.stop(performance.now());+ this.anim = this.pending = null;+ this.value = v;+ this.write(v);+ }+ // Motion samples a stopped animation with the same curve (the first keyframe during the delay)+ sample(a, now) {+ const t = Math.max(10, now - a.start) - (a.delay || 0);+ if (t < 0) return a.from;+ return t >= a.duration ? a.to : a.from + (a.to - a.from) * a.ease(t / a.duration);+ }+ // Motion's NativeAnimation.stop(): unless idle/finished, sample the curve now, commit it, cancel+ stop(now) {+ const a = this.anim;+ this.anim = null;+ if (!a || a.done) return;+ if (!a.live) return void (a.cancelled = true); // not created yet (Motion: keyframes not resolved)+ const state = a.wa.playState;+ if (state === "finished") {+ // ended, finish event still pending: Motion reads the value when the next keyframes resolve, after that event+ this.value = a.to;+ } else if (state !== "idle") {+ this.value = this.sample(a, now);+ this.write(this.value);+ a.wa.cancel();+ }+ }+ create() {+ const a = this.pending;+ this.pending = null;+ if (!a) return;+ if (a.skip) return void this.write(a.to);+ if (a.cancelled) return;+ let { duration, delay = 0, ease } = a;+ const from = (a.from = this.value);+ if (from === a.to) {+ // Motion: nothing to animate; set at once, or after the delay through a zero-length animation+ if (!delay) {+ a.done = true;+ if (this.anim === a) this.anim = null;+ return void this.write(a.to);+ }+ duration = 0;+ }+ a.duration = Math.max(duration, 1e-6);+ a.wa = this.el.animate(+ { [this.prop]: [this.render(from), this.render(a.to)] },+ { duration, delay, easing: duration ? linearEasing(ease, duration) : "linear", fill: "both" },+ );+ a.wa.startTime = a.start; // back-dated to the pointer event (Motion's createdAt)+ a.live = true;+ a.wa.onfinish = () => {+ a.done = true;+ this.value = a.to;+ this.write(a.to);+ a.wa.cancel();+ // Motion: MotionValue.start(…).then(clearAnimation) clears whatever animation the value holds by now+ Promise.resolve().then(() => {+ this.anim = null;+ });+ };+ }+}++// a value driven per animation frame (Motion's JS path)+const jsValues = new Set();+let ticking = false;+function tick() {+ const now = performance.now();+ for (const v of jsValues) v.step(now);+ ticking = jsValues.size > 0;+ if (ticking) requestAnimationFrame(tick);+}+class JsValue extends MotionVal {+ constructor(value, apply) {+ super(value);+ this.apply = apply;+ }+ set(v) {+ this.stop(null);+ this.anim = this.pending = null;+ this.value = v;+ this.apply(v);+ }+ // Motion stops a JS animation at its value at that instant+ stop(now) {+ const a = this.anim;+ this.anim = null;+ if (!a) return;+ a.cancelled = true;+ if (a.live && !a.done && now != null) this.apply((this.value = this.at(a, now)));+ }+ create(frameNow) {+ const a = this.pending;+ this.pending = null;+ if (!a) return;+ if (a.skip) return void this.apply((this.value = a.to));+ if (a.cancelled) return;+ a.from = this.value;+ a.live = true;+ jsValues.add(this);+ this.step(frameNow); // Motion ticks a new animation in the frame it is created+ if (!ticking) {+ ticking = true;+ requestAnimationFrame(tick);+ }+ }+ // the value of animation `a` at time `now`. repeat: loop forever (Motion's repeat: Infinity, repeatType "loop":+ // every run goes from → to again)+ at(a, now) {+ const t = now - a.start - (a.delay || 0);+ if (t < -1e-6) return a.from; // the first keyframe during the delay+ if (a.repeat) {+ let p = (t % a.duration) / a.duration;+ if (p === 0 && t > 0) p = 1;+ return a.from + (a.to - a.from) * a.ease(p);+ }+ if (t >= a.duration) return a.to; // Motion ends on the exact last keyframe+ return a.from + (a.to - a.from) * a.ease(Math.max(0, t) / a.duration);+ }+ step(now) {+ const a = this.anim;+ if (!a || !a.live || a.cancelled) return jsValues.delete(this);+ this.value = this.at(a, now);+ this.apply(this.value);+ const done = !a.repeat && now - a.start - (a.delay || 0) >= a.duration;+ if (done) {+ a.done = true;+ this.anim = null;+ jsValues.delete(this);+ }+ }+}++const TRACK_PATH =+ "M2 0V34.6863C2 36.808 2.84285 38.8429 4.34315 40.3431L34.6569 70.6569C36.1571 72.1571 37 74.192 37 76.3137V393";+const METEOR_STOPS = [["rgb(185 28 28 / 0)", 0], ["rgb(185 28 28)", 0.5], ["rgb(243 107 22)", 1]];++export function mount(slot, card) {+ const spinnerEl = slot.querySelector(".fr-spinner");+ const track = slot.querySelector(".fr-track");++ // rest values (clerk.com's SSR inline styles)+ const spinner = new JsValue(0, (v) => {+ spinnerEl.style.transform = v === 0 ? "none" : `rotate(${v}deg)`;+ });+ const rows = [...slot.querySelectorAll(".fr-row")].map((row, i) => {+ const block = row.querySelector(".fr-block");+ const title = row.querySelector(".fr-title");+ const desc = row.querySelector(".fr-desc");+ return {+ delay: (0.2 * i + 0.25) * 1000, // clerk.com: delay .2*r+.25 s+ blockOpacity: new WaapiValue(block, "opacity", 0, String),+ blockScale: new JsValue(0.8, (v) => {+ block.style.transform = v === 1 ? "none" : `scale(${v})`;+ }),+ titleOpacity: new WaapiValue(title, "opacity", 0, String),+ titleBlur: new WaapiValue(title, "filter", 8, (v) => `blur(${v}px)`),+ descOpacity: new WaapiValue(desc, "opacity", 0, String),+ descY: new WaapiValue(desc, "transform", 0.5, (v) => `translateY(${v}rem)`),+ };+ });+ const all = [spinner, ...rows.flatMap((r) => [r.blockOpacity, r.blockScale, r.titleOpacity, r.titleBlur, r.descOpacity, r.descY])];++ // the targets and transitions of each state (clerk.com passes one `transition` for both states of a row)+ function request(hovered, now) {+ if (hovered) spinner.request(360, { duration: 2000, ease: linear, repeat: true }, now);+ else spinner.request(0, { duration: 500, ease: easeU }, now);+ for (const r of rows) {+ const t1 = { duration: 200, delay: r.delay, ease: easeH }; // the ✕ disc+ const t2 = { duration: 500, delay: r.delay, ease: easeH }; // the e-mail+ const t3 = { duration: 500, delay: r.delay + 200, ease: easeU }; // the "Blocked …" line+ r.blockOpacity.request(hovered ? 1 : 0, t1, now);+ r.blockScale.request(hovered ? 1 : 0.8, t1, now);+ r.titleOpacity.request(hovered ? 1 : 0, t2, now);+ r.titleBlur.request(hovered ? 0 : 8, t2, now);+ r.descOpacity.request(hovered ? 1 : 0, t3, now);+ r.descY.request(hovered ? 0 : 0.5, t3, now);+ }+ }+ function setAll(hovered) {+ spinner.set(0);+ for (const r of rows) {+ r.blockOpacity.set(hovered ? 1 : 0);+ r.blockScale.set(hovered ? 1 : 0.8);+ r.titleOpacity.set(hovered ? 1 : 0);+ r.titleBlur.set(hovered ? 0 : 8);+ r.descOpacity.set(hovered ? 1 : 0);+ r.descY.set(hovered ? 0 : 0.5);+ }+ }++ // ---------- hover (react-aria useHover on the card root: pointerenter/leave, touch ignored) ----------+ let hovered = false;+ let meteor = null;+ let mounted = null; // the meteor mounted by the latest pointer event (nothing to fade for it)+ let eventAt = 0;+ let frame = 0;+ const nextFrame = () => {+ frame = 0;+ const frameNow = performance.now();+ for (const v of all) v.create(frameNow);+ if (reducedMotion?.matches) return;+ if (meteor?.el.isConnected && meteor !== mounted) {+ // AnimatePresence exit (opacity → 0, then removed) or, during that exit, back to opacity 1 (same instance,+ // clock continues); like every Motion animation here, back-dated to the pointer event+ const wanted = !hovered || meteor.exiting;+ if (!hovered) meteor.exit();+ else if (meteor.exiting) meteor.revive();+ if (wanted) {+ const list = meteor.el.getAnimations();+ list.forEach((a, i) => (i < list.length - 1 ? a.cancel() : (a.startTime = eventAt)));+ }+ }+ };+ const onHover = (on) => {+ hovered = on;+ eventAt = performance.now();+ if (reducedMotion?.matches) {+ setAll(on);+ if (!on) meteor?.destroy();+ return;+ }+ request(on, eventAt);+ // the meteor wrapper's running fade stops where it is, like the other values+ meteor?.el.getAnimations().forEach((a) => a.pause());+ if (on && !meteor?.el.isConnected) {+ // AnimatePresence mounts the meteor with the state change (React commits right after the event); its clock+ // starts on its first frame once the glow image has loaded+ mounted = meteor = createMeteor(track, {+ stops: METEOR_STOPS,+ meteors: [{ width: 39, height: 393, path: TRACK_PATH, repeat: 3000 }],+ });+ } else mounted = null;+ if (!frame) frame = requestAnimationFrame(nextFrame);+ };+ card.addEventListener("pointerenter", (e) => {+ if (e.pointerType !== "touch" && !hovered) onHover(true);+ });+ card.addEventListener("pointerleave", (e) => {+ if (e.pointerType !== "touch" && hovered) onHover(false);+ });+}diff --git a/site/public/examples/clerk-bento/src/widgets/magic-links.css b/site/public/examples/clerk-bento/src/widgets/magic-links.cssnew file mode 100644index 0000000..4fbcd97--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/magic-links.css@@ -0,0 +1,234 @@+/* "Magic Links" card visual: a field of mono noise text, a code chip that a cyan scan line reveals, a profile+ card (avatar silhouette, name, email) that traces in cyan, gets a check, and rotates out to the next user.+ Sizes, colours, gradients and shadows are clerk.com's resolved Tailwind values (module 642634,+ .motion-clone/clerk-bento/dom/magic-links.html + .hover.html); colours with alpha use the same color-mix() as+ clerk.com's @supports branch. magic-links.js builds the keyed parts and animates them. */++.clerk-card--magic-links .ml-root {+ position: relative;+ display: flex;+ height: 100%;+ flex-direction: column;+ align-items: center;+ justify-content: center;+}++/* ---- code row: font-mono text-[0.625rem]/[0.875rem] tracking-widest break-all ---- */+.clerk-card--magic-links .ml-coderow {+ position: relative;+ display: flex;+ width: 100%;+ justify-content: center;+ text-align: center;+ font-family: var(--font-mono);+ font-size: .625rem;+ line-height: .875rem;+ letter-spacing: .1em;+ word-break: break-all;+}++/* noise above the row: bottom-aligned 1px above the row's bottom, last line clipped (mb -14px + overflow hidden) */+.clerk-card--magic-links .ml-noise-top {+ position: absolute;+ inset-inline: 0;+ bottom: .0625rem;+ overflow: hidden;+ color: #37373c;+}+.clerk-card--magic-links .ml-noise-top > div { margin-bottom: -.875rem; }+/* noise below the row */+.clerk-card--magic-links .ml-noise-bot {+ position: absolute;+ inset-inline: 0;+ top: 100%;+ color: #37373c;+}+/* hovered branch: z-10, text-transparent, a lighter band sweeps through the glyphs (bg-clip-text) */+.clerk-card--magic-links .ml-noise-top.ml-hov { z-index: 10; color: #0000; }+.clerk-card--magic-links .ml-noise-bot.ml-hov { z-index: 10; color: #0000; }+.clerk-card--magic-links .ml-shimmer {+ background-image: linear-gradient(to right, rgb(55 55 60) calc(50% - 2.5rem), rgb(100 100 103) 50%, rgb(55 55 60) calc(50% + 2.5rem));+ background-size: calc(200% + 5rem) 100%;+ background-position: calc(-100% - 5rem) 0%;+ -webkit-background-clip: text;+ background-clip: text;+}++/* radial vignette (600x800) centred 60px below the row's centre: the noise fades into the card colour */+.clerk-card--magic-links .ml-vignette {+ position: absolute;+ top: 50%;+ left: 50%;+ z-index: 20;+ margin-top: -21.25rem;+ margin-left: -18.75rem;+ height: 50rem;+ width: 37.5rem;+ background-image: radial-gradient(10.75rem 9.5rem at center, rgb(33 33 38 / 0), rgb(33 33 38));+}++/* the gray code chip (the only in-flow element of the row) */+.clerk-card--magic-links .ml-code {+ position: relative;+ z-index: 20;+ background-color: color-mix(in oklab, var(--color-gray-400) 10%, transparent);+ padding: .0625rem .25rem;+ color: var(--color-gray-400);+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 1px inset color-mix(in oklab, #fff 15%, transparent);+ -webkit-backdrop-filter: blur(1px);+ backdrop-filter: blur(1px);+}++/* hovered overlay over the chip: same box (an invisible sizer), the cyan code and the scanner */+.clerk-card--magic-links .ml-overlay {+ position: absolute;+ top: 0;+ left: 50%;+ z-index: 20;+ translate: -50% 0;+ padding: .0625rem .25rem;+}+.clerk-card--magic-links .ml-sizer { visibility: hidden; }+.clerk-card--magic-links .ml-cyan {+ position: absolute;+ inset: 0;+ background-color: #28353d;+ padding: .0625rem .25rem;+ color: #5de3ff;+ box-shadow: 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 #0000, 0 0 3px inset color-mix(in oklab, #5de3ff 30%, transparent);+ clip-path: polygon(-10% 0, -10% 0, -10% 110%, -10% 110%);+}+.clerk-card--magic-links .ml-scanner {+ position: absolute;+ inset: 0;+ transform: translateX(-110%);+}+/* 28px clip box left of the scan line: the glow slides out of it, the particles trail inside it */+.clerk-card--magic-links .ml-scanclip {+ position: absolute;+ inset-block: -.5rem;+ right: -.5px;+ overflow: hidden;+}+.clerk-card--magic-links .ml-glow {+ height: 2rem;+ width: 1.75rem;+ transform-origin: 100%;+ background-image: radial-gradient(100% 45.31% at right, rgb(93 227 255 / .6), rgb(93 227 255 / 0));+ transform: translateX(1.75rem);+}+.clerk-card--magic-links .ml-particles { opacity: 0; }+.clerk-card--magic-links .ml-particle {+ position: absolute;+ right: .25rem;+ height: 1px;+ width: 1px;+ border-radius: 2147483647px;+ background-color: #5de3ff;+ filter: blur(.5px);+ transform: translateX(0rem);+}+.clerk-card--magic-links .ml-line {+ position: absolute;+ inset-block: -.5rem;+ right: -.5px;+ width: 1px;+ filter: blur(.25px);+ background-image: linear-gradient(to bottom, rgb(93 227 255 / 0), rgb(93 227 255 / .8) 15%, rgb(93 227 255) 50%, rgb(93 227 255 / .8) 85%, rgb(93 227 255 / 0));+ transform: scaleY(.5);+ opacity: 0;+}++/* ---- bottom: horizon arc + profile ---- */+.clerk-card--magic-links .ml-bottom {+ position: relative;+ z-index: 20;+ margin-top: 2.25rem;+ display: flex;+ width: 100%;+}+.clerk-card--magic-links .ml-horizon,+.clerk-card--magic-links .ml-horizon-edge {+ position: absolute;+ inset-inline: -10%;+ top: 2rem;+ aspect-ratio: 2;+ border-radius: 50%;+}+.clerk-card--magic-links .ml-horizon {+ -webkit-backdrop-filter: blur(3px);+ backdrop-filter: blur(3px);+ background-image: radial-gradient(98.23% 104.12% at 50% -4.12%, rgb(255 255 255 / .05) 6.12%, rgb(255 255 255 / 0) 55.4%);+}+.clerk-card--magic-links .ml-horizon-edge {+ border-top: 1px solid color-mix(in oklab, #fff 5%, transparent);+ -webkit-mask-image: linear-gradient(90deg, #0000, #fff, #0000);+ mask-image: linear-gradient(90deg, #0000, #fff, #0000);+}++/* profile: swings around a pivot 400% of its height below its top */+.clerk-card--magic-links .ml-profile {+ display: flex;+ width: 100%;+ flex: none;+ flex-direction: column;+ align-items: center;+ transform-origin: 50% 400%;+}+/* motion's popLayout: the exiting profile is taken out of the flow at its last box */+.clerk-card--magic-links .ml-profile.ml-popped { position: absolute; }++.clerk-card--magic-links .ml-face {+ position: relative;+ height: 6rem;+ width: 5rem;+ border-radius: .25rem;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom right in oklab, color-mix(in oklab, #fff 5%, transparent) 0%, #0000 64%);+ box-shadow: 0 1px 1px rgb(255 255 255 / 0.05) inset, 0 2px 13px rgb(0 0 0 / 0.2), 0 1px 2px rgb(0 0 0 / 0.2), 0 0 0 3px rgb(19 19 22 / 0.5);+}+.clerk-card--magic-links .ml-face svg {+ position: absolute;+ inset: 0;+ height: 100%;+ width: 100%;+}+.clerk-card--magic-links .ml-hi { stroke: color-mix(in oklab, #fff 5%, transparent); }+.clerk-card--magic-links .ml-base { stroke: #26262c; }+.clerk-card--magic-links .ml-face-cyan {+ transform: translateZ(0);+ filter: drop-shadow(0 0 4px #6be7ff99);+}+.clerk-card--magic-links .ml-face-cyan path { stroke: #5de3ff; }++/* name row: text-2xs/[1.125rem] font-semibold, mt-6 */+.clerk-card--magic-links .ml-namerow {+ position: relative;+ margin-top: 1.5rem;+ display: flex;+ align-items: center;+ font-size: .6875rem;+ line-height: 1.125rem;+ font-weight: 600;+ color: #fff;+}+.clerk-card--magic-links .ml-check {+ position: absolute;+ top: 50%;+ right: 0;+ margin-top: -.375rem;+ margin-right: -.5625rem;+ border-radius: 2147483647px;+ background-color: #5de3ff;+ opacity: 0;+ transform: scale(.5);+}+.clerk-card--magic-links .ml-check svg { height: .75rem; width: .75rem; }+.clerk-card--magic-links .ml-email {+ position: relative;+ margin-top: .125rem;+ font-family: var(--font-mono);+ font-size: .6875rem;+ line-height: 1.125rem;+ color: color-mix(in oklab, #fff 50%, transparent);+}diff --git a/site/public/examples/clerk-bento/src/widgets/magic-links.html b/site/public/examples/clerk-bento/src/widgets/magic-links.htmlnew file mode 100644index 0000000..58ff085--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/magic-links.html@@ -0,0 +1,7 @@+<div class="ml-root">+ <div class="ml-coderow"></div>+ <div class="ml-bottom">+ <div class="ml-horizon"></div>+ <div class="ml-horizon-edge"></div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/magic-links.js b/site/public/examples/clerk-bento/src/widgets/magic-links.jsnew file mode 100644index 0000000..43a8b08--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/magic-links.js@@ -0,0 +1,608 @@+// "Magic Links" card: hover the card and a cyan scan line sweeps the code chip, revealing a new random code, while+// the avatar outline traces in cyan and a light band crosses the noise text; the name shifts and a check mark draws+// in (3.6 s), then the profile swings out on a wheel and a random next user swings in, and the cycle repeats every+// 5.2 s while hovered. Hover-out fades the hovered layers (0.3 s) and slides the name back; the current user stays.+//+// clerk.com builds it with Motion for React (module 642634, .motion-clone/clerk-bento/src/magic-links.module.js).+// This file mirrors that component tree in plain DOM:+// - keyed parts are re-created when the user changes (NoiseCode, the cyan code, the scanner, the profile), and+// AnimatePresence semantics are kept: exiting parts keep their last props (frozen) while their exit runs, new+// parts are inserted after them, `popLayout` takes the exiting profile out of the flow at its last box;+// - HTML values (transform, opacity, clip-path, background-position) run as WAAPI animations with Motion's+// timings, all started at the same time origin (Motion backdates `startTime` to the frame of the state change;+// after a swap the new animations take the next frame as origin, as measured on clerk.com);+// SVG `pathLength`/`opacity` are JS-driven on rAF, as Motion does for SVG;+// - Motion's defaults: a transition with only `delay` is 0.3 s cubic-bezier(.25,.1,.35,1), a transition with a+// duration and no ease is easeOut (0,0,.58,1), an exit with no transition is 0.3 s cubic-bezier(.25,.1,.35,1);+// an interrupted value restarts from its current (sampled) value;+// - randomness is clerk.com's: the same charset and string builder `n(len)`, the 1200-char noise source per render,+// the 200 ms scramble offsets, 16 particles with random top/delay/duration per render of the scanner, the next+// user picked with Math.floor(Math.random() * 50), consumed in the same order per render as React does.++const SVGNS = "http://www.w3.org/2000/svg";+const CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";+// clerk.com's random string builder+function n(e) {+ let r = "";+ const t = CHARS.length;+ let i = 0;+ for (; i < e; i += 1) r += CHARS.charAt(Math.floor(Math.random() * t));+ return r;+}+const USERS = ["Marina Schroeder", "Izaiah Manning", "Jennifer Ochoa", "Winston Brennan", "Elodie Carroll", "Oscar Wong",+ "Adelaide Sloan", "Ocean Haley", "Addilynn Harvey", "Cayden Ball", "Abby Rangel", "Saint Harmon", "Maren Dudley",+ "Colter Marshall", "Adalyn Gutierrez", "Luca Hoover", "Virginia Malone", "Ruben Hodge", "Coraline Sampson",+ "Cain Pollard", "Marisol Jaramillo", "Riggs Weiss", "Lennox Norton", "Callen Harmon", "Maren Robbins",+ "Finnegan Shepard", "Noor Aguilar", "Milo Branch", "Luisa Combs", "Ahmad Rollins", "Araceli McCullough",+ "Briar Owen", "Mikayla Ayers", "Ulises Norris", "Arielle Harding", "Brodie Chambers", "Makayla Spencer", "Ace Kline",+ "Sevyn McKee", "Bjorn Daniel", "Joy Swanson", "Hugo Moss", "Bianca Waller", "Marley Sloan", "Selene Carey",+ "Watson Zamora", "Sierra Bonilla", "Aden Herman", "Paulina Peterson", "Santiago Payne"];+const EMAIL_RE = /^(\S)\S+\./;+const emailOf = (name) => name.toLowerCase().replace(" ", ".").replace(EMAIL_RE, "$1.");+const CODE_PLACEHOLDER = "Yb9WrnC5nFrvvz"; // the chip's server-rendered text (and the overlay's sizer)++const PATH_T = "M26.22 78.25c2.679-3.522 1.485-17.776 1.485-17.776-1.084-2.098-1.918-4.288-2.123-5.619-3.573 0-3.7-8.05-3.827-9.937-.102-1.509 1.403-1.383 2.169-1.132-.298-1.3-.92-5.408-1.021-11.446C22.775 24.794 30.94 17.75 40 17.75h.005c9.059 0 17.225 7.044 17.097 14.59-.102 6.038-.723 10.147-1.021 11.446.765-.251 2.271-.377 2.169 1.132-.128 1.887-.254 9.937-3.827 9.937-.205 1.331-1.039 3.521-2.123 5.619 0 0-1.194 14.254 1.485 17.776";+const PATH_O = "M27.705 60.474a26.884 26.884 0 0 0 1.577 2.682c1.786 2.642 5.36 6.792 10.718 6.792h.005c5.358 0 8.932-4.15 10.718-6.792a26.884 26.884 0 0 0 1.577-2.682";+const PATH_CHECK = "M3.75 6.563 5.438 8.25l2.812-4.5";++// ---------- easing ----------+function bezier(x1, y1, x2, y2) {+ const ax = 3 * x1 - 3 * x2 + 1, bx = 3 * x2 - 6 * x1, cx = 3 * x1;+ const ay = 3 * y1 - 3 * y2 + 1, by = 3 * y2 - 6 * y1, cy = 3 * y1;+ const sx = (s) => ((ax * s + bx) * s + cx) * s;+ const sy = (s) => ((ay * s + by) * s + cy) * s;+ const f = (x) => {+ if (x <= 0) return 0;+ if (x >= 1) return 1;+ let lo = 0, hi = 1, s = x;+ for (let k = 0; k < 40; k++) {+ const v = sx(s);+ if (Math.abs(v - x) < 1e-7) break;+ if (v < x) lo = s; else hi = s;+ s = (lo + hi) / 2;+ }+ return sy(s);+ };+ f.css = `cubic-bezier(${x1}, ${y1}, ${x2}, ${y2})`;+ return f;+}+const EASE_DEFAULT = bezier(0.25, 0.1, 0.35, 1); // Motion's default 0.3 s tween+const EASE_OUT = bezier(0, 0, 0.58, 1); // Motion's "easeOut" (= CSS ease-out)+const EASE_SWAP = bezier(0.7, 0, 0.3, 1); // profile swing, cyan code wipe-out+const LINEAR = (t) => t;+LINEAR.css = "linear";+const DEF = { duration: 300, ease: EASE_DEFAULT };++const now = () => performance.now();+// Start a WAAPI animation at time origin t0 (+ delay). A time origin in the future (the swap's next frame) becomes+// extra delay, so it behaves the same whether startTime may be set ahead or not.+function startAt(anim, t0) {+ const n = now();+ if (t0 > n) {+ const timing = anim.effect.getTiming();+ anim.effect.updateTiming({ delay: (Number(timing.delay) || 0) + (t0 - n) });+ anim.startTime = n;+ } else {+ anim.startTime = t0;+ }+ return anim;+}++// ---------- animated values ----------+// One HTML style property run as WAAPI (like Motion's NativeAnimation): `to()` starts from the value sampled with+// the JS easing at the given time; on finish the target is committed to the style and the animation cancelled.+class Value {+ constructor(el, prop, format, v, write = true) {+ this.el = el;+ this.prop = prop;+ this.format = format;+ this.v = v;+ this.run = null;+ if (write) el.style[prop] = format(v);+ }+ current(t = now()) {+ const r = this.run;+ if (!r) return this.v;+ const e = t - r.t0 - r.delay;+ if (e <= 0) return r.from;+ const p = r.duration ? r.ease(Math.min(e / r.duration, 1)) : 1;+ return r.from.map((f, i) => f + (r.to[i] - f) * p);+ }+ to(target, { t0 = now(), delay = 0, duration, ease, onDone }) {+ const from = this.current(t0);+ if (this.run) { this.run.anim.cancel(); this.run = null; }+ this.v = from;+ this.el.style[this.prop] = this.format(from);+ if (from.every((f, i) => f === target[i])) { this.v = target; onDone?.(); return; }+ const anim = this.el.animate(+ { [this.prop]: [this.format(from), this.format(target)] },+ { duration, delay, easing: ease.css, fill: "both" },+ );+ startAt(anim, t0);+ const run = { anim, from, to: target, t0, delay, duration, ease };+ this.run = run;+ anim.onfinish = () => {+ if (this.run !== run) return;+ this.run = null;+ this.v = target;+ this.el.style[this.prop] = this.format(target);+ anim.cancel();+ onDone?.();+ };+ }+ stop() { if (this.run) { const v = this.current(); this.run.anim.cancel(); this.run = null; this.v = v; this.el.style[this.prop] = this.format(v); } }+}++// A JS-driven number (SVG pathLength / opacity attributes), stepped on rAF with the frame timestamp.+const ticker = {+ items: new Set(),+ raf: 0,+ last: 0,+ interval: 1000 / 60, // last frame interval seen (the swap starts its animations one frame after the check)+ add(item) {+ this.items.add(item);+ if (!this.raf) this.raf = requestAnimationFrame((ts) => this.tick(ts));+ },+ tick(ts) {+ this.raf = 0;+ const t = Math.max(ts, 0);+ if (this.last && t - this.last > 4 && t - this.last < 50) this.interval = t - this.last;+ this.last = t;+ for (const item of [...this.items]) if (!item.step(t)) this.items.delete(item);+ if (this.items.size) this.raf = requestAnimationFrame((x) => this.tick(x));+ },+};+class JsValue {+ constructor(apply, v) {+ this.apply = apply;+ this.v = v;+ this.run = null;+ apply(v);+ }+ current(t = now()) {+ const r = this.run;+ if (!r) return this.v;+ const e = t - r.t0 - r.delay;+ if (e < 0 || (e === 0 && r.duration)) return r.from;+ const p = r.duration ? r.ease(Math.min(e / r.duration, 1)) : 1;+ return r.from + (r.to - r.from) * p;+ }+ to(target, { t0 = now(), delay = 0, duration, ease = EASE_OUT, onDone }) {+ const from = this.current(t0);+ this.v = from;+ this.run = { from, to: target, t0, delay, duration, ease, onDone };+ ticker.add(this);+ }+ step(t) {+ const r = this.run;+ if (!r) return false;+ if (t - r.t0 - r.delay >= r.duration) {+ this.run = null;+ this.v = r.to;+ this.apply(r.to);+ r.onDone?.(t);+ return false;+ }+ this.v = this.current(t);+ this.apply(this.v);+ return true;+ }+ stop() { if (this.run) { this.v = this.current(); this.run = null; } }+}++// Motion's pathLength on an SVG path: pathLength="1", stroke-dasharray "<len> 1", stroke-dashoffset 0+function svgPath(path) {+ const len = new JsValue((v) => path.setAttribute("stroke-dasharray", `${v} 1`), 0);+ const op = new JsValue((v) => path.setAttribute("opacity", String(v)), 0);+ return { len, op };+}++// ---------- DOM helpers ----------+function el(tag, cls, text) {+ const e = document.createElement(tag);+ if (cls) e.className = cls;+ if (text !== undefined) e.textContent = text;+ return e;+}+function svgEl(html) {+ const t = document.createElementNS(SVGNS, "svg");+ t.innerHTML = html;+ return t;+}+// clerk.com's text writer: replace the single text node's data, else textContent+function d(e, r) {+ if (!e) return;+ const a = e.firstChild;+ if (a && !a.nextSibling && a.nodeType === Node.TEXT_NODE) a.data = r;+ else e.textContent = r;+}+const opacity = ([o]) => String(o);++// ---------- NoiseCode (clerk.com's `p`, keyed by the user's name) ----------+// Two blocks of 600 random characters above and below the chip, a vignette, and the gray chip. Hovered, a rAF loop+// re-slices the 1200-char source every 200 ms and writes the chip's text from it; a light band sweeps the noise.+class Noise {+ constructor(row) {+ this.row = row;+ this.y = null; // refs y/g (top/bottom strings), set from the first render's source+ this.g = null;+ this.u = " "; // states u/j: the hovered branch's rendered text+ this.j = " ";+ this.hov = null; // present hovered branch+ this.rest = null; // present static branch+ this.exiting = null; // exiting hovered branch+ this.vignette = el("div", "ml-vignette");+ this.code = el("div", "ml-code", CODE_PLACEHOLDER);+ this.raf = 0;+ this.eff = null; // last effect deps+ const first = row.firstChild;+ row.insertBefore(this.vignette, first);+ row.insertBefore(this.code, first);+ }+ remove() {+ this.cleanup();+ for (const b of [this.hov, this.rest, this.exiting]) if (b) b.nodes.forEach((x) => x.remove());+ this.vignette.remove();+ this.code.remove();+ }+ insertBranch(nodes) { for (const x of nodes) this.row.insertBefore(x, this.vignette); }+ // one React render of `p` with props {hovered, enterDelay}+ render(hovered, A, t0) {+ const c = n(1200);+ if (this.y === null) { this.y = c.slice(0, 600); this.g = c.slice(600); }+ // AnimatePresence: "hovered" / "not-hovered" branches+ if (hovered) {+ if (this.rest) { this.rest.nodes.forEach((x) => x.remove()); this.rest = null; }+ if (!this.hov) {+ if (this.exiting) { // same key back while it fades out: revive (opacity back to 1, default tween)+ this.hov = this.exiting;+ this.exiting = null;+ this.hov.fades.forEach((v) => v.to([1], { t0, ...DEF }));+ d(this.hov.top, this.u);+ d(this.hov.bot, this.j);+ } else {+ this.hov = this.mountHovered(A, t0);+ }+ }+ } else {+ if (this.hov) {+ const b = this.hov;+ this.hov = null;+ this.exiting = b;+ let left = b.fades.length;+ b.fades.forEach((v) => v.to([0], { t0, ...DEF, onDone: () => {+ if (--left || this.exiting !== b) return;+ b.nodes.forEach((x) => x.remove());+ this.exiting = null;+ } }));+ }+ if (!this.rest) {+ const top = el("div", "ml-noise-top");+ const topText = el("div", "", " ");+ top.append(topText);+ const bot = el("div", "ml-noise-bot", " ");+ this.rest = { nodes: [top, bot], top: topText, bot };+ this.insertBranch(this.rest.nodes);+ }+ }+ this.effect(hovered, c);+ }+ mountHovered(A, t0) {+ const top = el("div", "ml-noise-top ml-hov");+ const topText = el("div", "ml-shimmer", this.u);+ top.append(topText);+ const bot = el("div", "ml-noise-bot ml-hov ml-shimmer", this.j);+ const nodes = [top, bot];+ this.insertBranch(nodes);+ for (const x of [topText, bot]) {+ const a = x.animate(+ { backgroundPosition: ["calc(-100% - 5rem) 0%", "calc(-200% - 5rem) 0%"] },+ { delay: (A + 0.5) * 1000, duration: 3000, easing: "linear", fill: "both" },+ );+ startAt(a, t0);+ }+ const fades = [new Value(topText, "opacity", opacity, [1], false), new Value(bot, "opacity", opacity, [1], false)];+ return { nodes, top: topText, bot, fades };+ }+ cleanup() { if (this.raf) cancelAnimationFrame(this.raf); this.raf = 0; }+ // useEffect(..., [hovered, 600, c]): re-runs when the hover state or the (string) source changes+ effect(hovered, c) {+ if (this.eff && this.eff.hovered === hovered && this.eff.c === c) return;+ this.cleanup();+ this.eff = { hovered, c };+ if (!hovered) {+ d(this.rest?.top, this.y);+ d(this.rest?.bot, this.g);+ const changed = this.u !== this.y || this.j !== this.g;+ this.u = this.y;+ this.j = this.g;+ if (changed) this.render(false); // setState → `p` renders again (a fresh source, same texts)+ return;+ }+ let r = 0;+ const loop = () => {+ const i = window.performance.now();+ if (i < r) { this.raf = requestAnimationFrame(loop); return; }+ r = i + 200;+ const s = 600 * Math.random() * 2;+ this.y = c.slice(s, s + 600) + c.slice(0, Math.max(0, s - 600));+ d(this.hov?.top, this.y);+ const l = 600 * Math.random() * 2;+ this.g = c.slice(l, l + 600) + c.slice(0, Math.max(0, l - 600));+ d(this.hov?.bot, this.g);+ d(this.code, this.y.slice(0, 14));+ this.raf = requestAnimationFrame(loop);+ };+ this.raf = requestAnimationFrame(loop);+ }+}++// ---------- scanner (clerk.com's `x`, keyed by name): line + glow + 16 particles, synced with the code reveal ----------+class Scanner {+ constructor(A, t0) {+ this.root = el("div", "ml-scanner");+ const clip = el("div", "ml-scanclip");+ const glow = el("div", "ml-glow");+ this.particles = el("div", "ml-particles");+ const line = el("div", "ml-line");+ clip.append(glow, this.particles);+ this.root.append(clip, line);+ const run = (node, kf, opts) => {+ startAt(node.animate(kf, { fill: "both", easing: "linear", ...opts }), t0);+ };+ const T = { delay: A * 1000, duration: 3000 };+ run(this.root, { transform: ["translateX(-110%)", "translateX(10%)"] }, T);+ run(glow, { transform: ["translateX(1.75rem)", "translateX(0rem)", "translateX(0rem)", "translate(1.75rem)"], offset: [0, 0.8 / 3, 2.6 / 3, 1] }, T);+ const fade = { offset: [0, 0.2 / 3, 2.6 / 3, 1] };+ run(this.particles, { opacity: [0, 1, 1, 0], ...fade }, T);+ run(line, { transform: ["scaleY(0.5)", "scaleY(1)", "scaleY(1)", "scaleY(0.5)"], ...fade }, T);+ run(line, { opacity: [0, 1, 1, 0], ...fade }, T);+ this.dots = [];+ for (let k = 0; k < 16; k++) {+ const i = A + +Math.random(), o = 1 + +Math.random();+ const dot = el("div", "ml-particle");+ dot.style.top = `${100 * Math.random()}%`;+ this.particles.append(dot);+ this.dots.push(dot);+ const timing = { delay: i * 1000, duration: o * 1000, easing: "ease-out", iterations: Infinity };+ run(dot, [{ opacity: 0, offset: 0 }, { opacity: 1, offset: 0.1 }, { opacity: 0, offset: 1 }], timing);+ run(dot, { transform: ["translateX(0rem)", "translateX(-1rem)"] }, timing);+ }+ }+ // a re-render: new random top per particle (Motion keeps the running animations, the style updates)+ rerender() {+ for (const dot of this.dots) {+ Math.random(); Math.random();+ dot.style.top = `${100 * Math.random()}%`;+ }+ }+}++// ---------- overlay over the chip (present while hovered): sizer, cyan code (keyed), scanner (keyed) ----------+const clip = (p) => `polygon(${p[0]}% ${p[1]}%, ${p[2]}% ${p[3]}%, ${p[4]}% ${p[5]}%, ${p[6]}% ${p[7]}%)`;+const CLIP_HIDDEN = [-10, 0, -10, 0, -10, 110, -10, 110];+const CLIP_SHOWN = [-10, 0, 110, 0, 110, 100, -10, 100];+const CLIP_GONE = [110, 0, 110, 0, 110, 100, 110, 100];+class Overlay {+ constructor(row, user, A, t0) {+ this.el = el("div", "ml-overlay");+ this.el.append(el("span", "ml-sizer", CODE_PLACEHOLDER));+ this.op = new Value(this.el, "opacity", opacity, [1], false);+ this.cyan = null;+ this.mountKeyed(user, A, t0);+ row.append(this.el);+ }+ mountKeyed(user, A, t0) {+ const cy = el("div", "ml-cyan", user.code);+ cy.clip = new Value(cy, "clipPath", clip, CLIP_HIDDEN);+ cy.clip.to(CLIP_SHOWN, { t0, delay: A * 1000, duration: 3000, ease: LINEAR });+ this.scanner = new Scanner(A, t0);+ this.el.insertBefore(cy, this.scannerEl || null);+ this.el.append(this.scanner.root);+ this.scannerEl = this.scanner.root;+ this.cyan = cy;+ }+ // a MagicLinks render while present+ render(user, A, t0, changed) {+ if (!changed) {+ d(this.cyan, user.code);+ this.scanner.rerender();+ return;+ }+ // old cyan code wipes out left → right (its own exit), old scanner is replaced at once+ const old = this.cyan;+ old.clip.to(CLIP_GONE, { t0, delay: 500, duration: 1000, ease: EASE_SWAP, onDone: () => old.remove() });+ this.scannerEl.remove();+ this.scannerEl = null;+ this.mountKeyed(user, A, t0);+ }+ exit(t0, done) { this.op.to([0], { t0, ...DEF, onDone: done }); }+ revive(t0) { this.op.to([1], { t0, ...DEF }); }+}+// ---------- profile (keyed by name, AnimatePresence popLayout) ----------+class Profile {+ constructor(user, entering, t0) {+ this.user = user;+ this.frozen = false;+ this.el = el("div", "ml-profile");+ this.face = el("div", "ml-face");+ this.face.append(svgEl(""));+ const base = this.face.firstChild;+ for (const [k, v] of [["viewBox", "0 0 80 96"], ["fill", "none"], ["aria-hidden", "true"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "1.5"]]) base.setAttribute(k, v);+ base.innerHTML = `<path d="${PATH_T}" class="ml-hi" transform="translate(0 1)"></path><path d="${PATH_O}" class="ml-hi" transform="translate(0 1)"></path><path d="${PATH_T}" class="ml-base"></path><path d="${PATH_O}" class="ml-base"></path>`;+ this.row = el("div", "ml-namerow");+ this.name = el("div", "ml-name", user.name);+ this.row.append(this.name);+ this.email = el("div", "ml-email", `${user.email}@example.com`);+ this.el.append(this.face, this.row, this.email);+ this.rot = new Value(this.el, "transform", ([a]) => `rotate(${a}deg)`, [entering ? -45 : 0]);+ this.op = new Value(this.el, "opacity", opacity, [entering ? 0 : 1]);+ this.nameX = new Value(this.name, "transform", ([x]) => `translate(${x}rem, 0rem)`, [0], !entering);+ this.nameTarget = 0;+ this.cyan = null; // face trace (present) and its exiting copy+ this.cyanExit = null;+ this.check = null;+ this.checkExit = null;+ if (entering) {+ const swing = { t0, delay: 500, duration: 1000, ease: EASE_SWAP };+ this.rot.to([0], swing);+ this.op.to([1], swing);+ }+ }+ setEmail(user) { this.user = user; this.email.textContent = `${user.email}@example.com`; }+ // a render with props {hovered, enterDelay}; an exiting profile is frozen with its last props+ update(hovered, A, t0, onCheck) {+ if (this.frozen) return;+ // name: animate changes only when the target changes+ const target = hovered ? -0.5625 : 0;+ if (target !== this.nameTarget) {+ this.nameTarget = target;+ this.nameX.to([target], hovered ? { t0, delay: (A + 3) * 1000, ...DEF } : { t0, ...DEF });+ }+ if (hovered) {+ if (!this.cyan) {+ if (this.cyanExit) { this.cyan = this.cyanExit; this.cyanExit = null; }+ else this.cyan = this.mountCyan();+ this.enterCyan(A, t0);+ }+ if (!this.check) {+ if (this.checkExit) { this.check = this.checkExit; this.checkExit = null; }+ else this.check = this.mountCheck();+ this.enterCheck(A, t0, onCheck);+ }+ } else {+ if (this.cyan) {+ const c = (this.cyanExit = this.cyan);+ this.cyan = null;+ let left = 4;+ const done = () => { if (--left || this.cyanExit !== c) return; c.svg.remove(); this.cyanExit = null; };+ for (const p of c.paths) { p.len.to(0, { t0, ...DEF, onDone: done }); p.op.to(0, { t0, ...DEF, onDone: done }); }+ }+ if (this.check) {+ const c = (this.checkExit = this.check);+ this.check = null;+ let left = 2;+ const done = () => { if (--left || this.checkExit !== c) return; c.el.remove(); this.checkExit = null; };+ c.op.to([0], { t0, ...DEF, onDone: done });+ c.scale.to([0.5], { t0, ...DEF, onDone: done });+ }+ }+ }+ mountCyan() {+ const svg = svgEl(`<path d="${PATH_T}" pathLength="1" stroke-dashoffset="0"></path><path d="${PATH_O}" pathLength="1" stroke-dashoffset="0"></path>`);+ for (const [k, v] of [["viewBox", "0 0 80 96"], ["fill", "none"], ["aria-hidden", "true"], ["class", "ml-face-cyan"], ["stroke-linecap", "round"], ["stroke-linejoin", "round"], ["stroke-width", "1.5"]]) svg.setAttribute(k, v);+ this.face.append(svg);+ return { svg, paths: [...svg.children].map(svgPath) };+ }+ enterCyan(A, t0) {+ const [T, O] = this.cyan.paths;+ T.len.to(1, { t0, delay: A * 1000, duration: 3000, ease: EASE_OUT });+ T.op.to(1, { t0, delay: (A + 0.01) * 1000, duration: 0 });+ O.len.to(1, { t0, delay: (A + 0.2) * 1000, duration: 2700, ease: EASE_OUT });+ O.op.to(1, { t0, delay: (A + 0.2 + 0.01) * 1000, duration: 0 });+ }+ mountCheck() {+ const node = el("div", "ml-check");+ const svg = svgEl(`<path stroke="#131316" stroke-linecap="round" stroke-linejoin="round" stroke-width="1.25" d="${PATH_CHECK}" pathLength="1" stroke-dashoffset="0"></path>`);+ for (const [k, v] of [["viewBox", "0 0 12 12"], ["fill", "none"], ["aria-hidden", "true"]]) svg.setAttribute(k, v);+ node.append(svg);+ this.row.append(node);+ return {+ el: node,+ op: new Value(node, "opacity", opacity, [0]),+ scale: new Value(node, "transform", ([s]) => `scale(${s})`, [0.5]),+ path: svgPath(svg.firstChild),+ pathStarted: false,+ };+ }+ enterCheck(A, t0, onCheck) {+ const c = this.check;+ const i = A + 3 + 0.1;+ c.op.to([1], { t0, delay: i * 1000, ...DEF });+ c.scale.to([1], { t0, delay: i * 1000, ...DEF });+ if (c.pathStarted) return; // the path's animate target never changes: Motion does not restart it+ c.pathStarted = true;+ // onAnimationComplete of {pathLength: 1, opacity: 1}: only while the check is present (useIsPresent)+ let left = 2;+ const done = (t) => { if (--left === 0 && this.check === c && !this.frozen) onCheck(t); };+ c.path.len.to(1, { t0, delay: (i + 0.3) * 1000, duration: 200, ease: EASE_OUT, onDone: done });+ c.path.op.to(1, { t0, delay: (i + 0.3) * 1000, duration: 0, onDone: done });+ }+ // popLayout exit: out of the flow at its last box (Motion's PopChild: computed width/height, offsetTop/Left),+ // frozen, swings to 45° and fades+ exit(t0) {+ const cs = getComputedStyle(this.el);+ const w = parseFloat(cs.width), h = parseFloat(cs.height);+ const { offsetTop: top, offsetLeft: left } = this.el;+ Object.assign(this.el.style, { top: `${top}px`, left: `${left}px`, width: `${w}px`, height: `${h}px` });+ this.el.classList.add("ml-popped");+ this.frozen = true;+ const swing = { t0, delay: 500, duration: 1000, ease: EASE_SWAP };+ this.rot.to([45], swing);+ this.op.to([0], { ...swing, onDone: () => this.el.remove() });+ }+}++// ---------- the card ----------+export function mount(slot, card) {+ const root = slot.querySelector(".ml-root");+ if (!root || !card) return;+ const row = root.querySelector(".ml-coderow");+ const bottom = root.querySelector(".ml-bottom");++ let hovered = false;+ let A = 0; // enterDelay: 0 on the first cycle of a hover, 1.6 s after each swap+ let user = { name: "Joseph Cole", email: "j.cole", code: n(14) };+ let noise = new Noise(row);+ let overlay = null;+ let overlayExit = null;+ let profile = new Profile(user, false);+ bottom.append(profile.el);+ noise.render(false, A, now());++ // one render of MagicLinks; `changed`: the user (key) changed+ function render(t0, changed) {+ if (changed) { noise.remove(); noise = new Noise(row); }+ noise.render(hovered, A, t0);+ if (hovered) {+ if (overlay) overlay.render(user, A, t0, changed);+ else if (overlayExit) { overlay = overlayExit; overlayExit = null; overlay.revive(t0); overlay.render(user, A, t0, changed); }+ else overlay = new Overlay(row, user, A, t0);+ } else if (overlay) {+ const o = (overlayExit = overlay);+ overlay = null;+ o.exit(t0, () => { if (overlayExit === o) { o.el.remove(); overlayExit = null; } });+ }+ if (changed) {+ profile.exit(t0);+ profile = new Profile(user, true, t0);+ bottom.append(profile.el);+ } else {+ profile.setEmail(user);+ }+ profile.update(hovered, A, t0, onCheck);+ }++ // the check mark finished drawing (frame time t): next random user, new code, next cycle 1.6 s later.+ // The DOM swaps in this frame; as on clerk.com (onAnimationComplete → React render → Motion), the new animations+ // take their time origin from the next frame.+ function onCheck(t) {+ const e = USERS[Math.floor(Math.random() * USERS.length)];+ const next = { name: e, email: emailOf(e), code: n(14) };+ const changed = next.name !== user.name;+ user = next;+ A = 1.6;+ render((t ?? now()) + ticker.interval, changed);+ }++ function setHovered(on) {+ if (on === hovered) return;+ hovered = on;+ if (!on) A = 0;+ render(now(), false);+ }++ // react-aria useHover on the card root: pointer enter/leave, touch ignored+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") setHovered(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") setHovered(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/mfa.css b/site/public/examples/clerk-bento/src/widgets/mfa.cssnew file mode 100644index 0000000..14314be--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/mfa.css@@ -0,0 +1,100 @@+/* clerk.com "Multifactor Authentication" card visual: six 32x40 one-time-code tiles.+ Classes and values follow clerk.com's markup (module 492483): Tailwind tokens resolved to px/colours.+ The overlay (.mfa-overlay) only exists while the card is hovered; it is built and animated by mfa.js. */++/* div.isolate.flex.h-full.items-center.justify-center */+.clerk-card--mfa .mfa-stage {+ isolation: isolate;+ display: flex;+ height: 100%;+ align-items: center;+ justify-content: center;+}+/* div.relative (252x40) */+.clerk-card--mfa .mfa-otp { position: relative; }+/* div.flex.gap-3 */+.clerk-card--mfa .mfa-tiles { display: flex; gap: 12px; }+/* base tile: flex h-10 w-8 items-center justify-center overflow-hidden rounded-md bg-gray-950 */+.clerk-card--mfa .mfa-tile {+ display: flex;+ height: 40px;+ width: 32px;+ align-items: center;+ justify-content: center;+ overflow: hidden;+ border-radius: 6px;+ background-color: var(--color-gray-950);+ box-shadow: 0 10px 19px 4px rgb(0 0 0 / 0.16), 0 -10px 16px -4px rgb(255 255 255 / 0.04),+ 0 0 0 1px rgb(255 255 255 / 0.01), 0 1px 0 0 rgb(255 255 255 / 0.02);+}+/* z-10 h-2 w-2 rounded-full bg-white, opacity 0 (never shown on clerk.com either) */+.clerk-card--mfa .mfa-dot {+ z-index: 10;+ height: 8px;+ width: 8px;+ border-radius: 2147483647px;+ background-color: #fff;+ box-shadow: 0 0 3px 1px rgb(0 0 0 / 0.3);+ opacity: 0;+}+/* svg width=0 height=0 class=absolute: holds the #mfa-clip clipPath */+.clerk-card--mfa .mfa-defs { position: absolute; }++/* ---------- hover overlay (motion.div.absolute.inset-0) ---------- */+.clerk-card--mfa .mfa-overlay { position: absolute; inset: 0; }+/* div.absolute.inset-0.flex.gap-3 (digits) and div[data-mask].absolute.inset-0.z-10.flex.gap-3 */+.clerk-card--mfa .mfa-row { position: absolute; inset: 0; display: flex; gap: 12px; }+.clerk-card--mfa .mfa-mask { z-index: 10; }+.clerk-card--mfa .mfa-cell {+ display: flex;+ height: 40px;+ width: 32px;+ align-items: center;+ justify-content: center;+}+.clerk-card--mfa .mfa-mask > .mfa-cell { border-radius: 6px; }+/* digit: relative z-20 font-mono font-medium text-white (16px / 24px inherited) */+.clerk-card--mfa .mfa-digit {+ position: relative;+ z-index: 20;+ font-family: var(--font-mono);+ font-weight: 500;+ color: #fff;+}+/* div.absolute.inset-0.[clip-path:url(#mfa-clip)]: the focus fill and caret are clipped to the six tiles */+.clerk-card--mfa .mfa-clip { position: absolute; inset: 0; clip-path: url(#mfa-clip); }+/* [data-bg]: absolute top-0 left-0 h-10 w-8 rounded-md bg-[#24333C] opacity-0 */+.clerk-card--mfa .mfa-bg {+ position: absolute;+ top: 0;+ left: 0;+ height: 40px;+ width: 32px;+ border-radius: 6px;+ background-color: #24333c;+ opacity: 0;+}+/* [data-cursor]: absolute left-1.5 h-px w-5 bg-[#5DE3FF]/40 opacity-0, origin = tile centre */+.clerk-card--mfa .mfa-cursor {+ position: absolute;+ left: 6px;+ bottom: calc(5 / 16 * 1rem);+ height: 1px;+ width: 20px;+ background-color: #5de3ff66;+ background-color: lab(83.7389% -31.8231 -25.1752 / 0.4);+ box-shadow: 0 0 4px rgb(107 231 255 / 0.4);+ transform-origin: 50% -0.875rem;+ opacity: 0;+}+/* [data-border] (opacity-0) and the five [data-border-finale] (inline left + opacity 0) */+.clerk-card--mfa .mfa-border {+ position: absolute;+ top: 0;+ left: 0;+ height: 40px;+ width: 32px;+ border-radius: 6px;+ box-shadow: 0 0 0 1px #5de3ff inset, 0 0 4px 2px rgb(107 231 255 / 0.2);+}+.clerk-card--mfa .mfa-border:not(.mfa-border--finale) { opacity: 0; }diff --git a/site/public/examples/clerk-bento/src/widgets/mfa.html b/site/public/examples/clerk-bento/src/widgets/mfa.htmlnew file mode 100644index 0000000..44ec13a--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/mfa.html@@ -0,0 +1,13 @@+<div class="mfa-stage">+ <div class="mfa-otp">+ <div class="mfa-tiles">+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ <div data-num class="mfa-tile"><div data-dot class="mfa-dot"></div></div>+ </div>+ <svg width="0" height="0" class="mfa-defs" aria-hidden="true"><defs><clipPath id="mfa-clip" clipPathUnits="objectBoundingBox"><path d="M0.024,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15 M0.198,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15 M0.373,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15 M0.548,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15 M0.722,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15 M0.897,0 h0.079 a0.024,0.15,0,0,1,0.024,0.15 v0.7 a0.024,0.15,0,0,1,-0.024,0.15 h-0.079 a0.024,0.15,0,0,1,-0.024,-0.15 v-0.7 a0.024,0.15,0,0,1,0.024,-0.15"/></clipPath></defs></svg>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/mfa.js b/site/public/examples/clerk-bento/src/widgets/mfa.jsnew file mode 100644index 0000000..ceedfde--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/mfa.js@@ -0,0 +1,305 @@+// clerk.com "Multifactor Authentication" card (clerk.com module 492483), rebuilt without libraries.+//+// While the card is hovered, a cyan focus box steps across six one-time-code tiles and types a random digit+// (1–9) into each; then all six flash a cyan ring and fade, and a new code starts 0.7 s later. Leaving the+// card fades the whole overlay out over 0.3 s; the dark tiles underneath never change.+//+// clerk.com mounts an overlay inside <AnimatePresence> while the card is hovered and runs three Motion+// `useAnimate` sequences on it (A: focus the first tile, B: type five more digits, C: success flash).+// sequence() below re-implements the part of Motion's sequence builder those calls use — `at: "<"` and+// `"+0.1"`, per-value transitions, default duration/ease, `null` = current value, keyframes merged per element+// and value into one WAAPI animation spanning the sequence, values committed on finish — so the three+// sequences are copied from clerk.com's source verbatim, only with elements instead of selector strings.++const EASE = { easeOut: "cubic-bezier(0, 0, 0.58, 1)", easeInOut: "cubic-bezier(0.42, 0, 0.58, 1)" };+const easing = (e) => (Array.isArray(e) ? `cubic-bezier(${e.join(", ")})` : EASE[e] || e);+const CSS_NAME = { opacity: "opacity", transform: "transform", clipPath: "clip-path" };+const EXIT_EASE = easing([0.25, 0.1, 0.35, 1]); // Motion's default tween for opacity (0.3 s)++// Latencies measured on clerk.com (1440x900, track.json): pointer → sequence A, between chained sequences+// (await + Motion keyframe resolution), end of a run → next overlay's clock (React re-render + effect),+// pointer leave → exit fade. Each start is planned on the document timeline from the previous planned end (not+// from when the promise happened to resolve), so the loop period stays 3.5 s and never drifts.+const LAG_IN = 44;+const GAP_SEQ = 25;+const GAP_LOOP = 50;+const LAG_OUT = 20;++function defaultOffset(n) {+ const o = [0];+ for (let i = 1; i < n; i++) o.push(i / (n - 1));+ return o;+}++function nextTime(current, at, prev) {+ if (typeof at === "number") return at;+ if (at[0] === "+" || at[0] === "-") return Math.max(0, current + parseFloat(at));+ if (at === "<") return prev;+ return current;+}++const now = () => document.timeline.currentTime ?? performance.now();++// A new WAAPI animation only gets its start time when it is ready (a frame or two later). Planned starts are+// expressed as delay from `created`; once ready, the start time is moved back to `created` so the plan holds.+// (If something else drives the animation, e.g. a recorder's virtual clock, it is paused by then: left alone.)+function anchor(a, created) {+ a.ready.then(() => {+ if (a.playState === "running" && a.startTime !== null && a.startTime > created) a.startTime = created;+ }, () => {});+}++// Motion's createAnimationsFromSequence + animateSequence, for [elements[], keyframes, transition] segments.+function sequence(segments, { delay = 0, defaultTransition = {} } = {}, startAt) {+ const defaultDuration = defaultTransition.duration || 0.3;+ const values = new Map(); // element → Map(key → [{ at, value, easing }])+ let currentTime = 0;+ let prevTime = 0;+ let total = 0;+ for (const [targets, keyframes, transition = {}] of segments) {+ if (transition.at !== undefined) currentTime = nextTime(currentTime, transition.at, prevTime);+ let maxDuration = 0;+ for (const el of targets) {+ if (!values.has(el)) values.set(el, new Map());+ const byKey = values.get(el);+ for (const key of Object.keys(keyframes)) {+ const t = transition[key] || transition; // getValueTransition+ const list = [].concat(keyframes[key]);+ const times = defaultOffset(list.length);+ if (times.length === 1) times[1] = 1;+ if (list.length === 1) list.unshift(null);+ const d = t.delay || 0;+ const duration = t.duration ?? defaultDuration;+ const ease = t.ease || defaultTransition.ease || "easeOut";+ const start = currentTime + d;+ const end = start + duration;+ if (!byKey.has(key)) byKey.set(key, []);+ const seq = byKey.get(key);+ for (let i = 0; i < seq.length; i++) if (seq[i].at > start && seq[i].at < end) seq.splice(i--, 1);+ list.forEach((value, i) => seq.push({ at: start + (end - start) * times[i], value, easing: ease }));+ maxDuration = Math.max(maxDuration, d + duration);+ total = Math.max(total, end);+ }+ }+ prevTime = currentTime;+ currentTime += maxDuration;+ }++ // start at `startAt` on the document timeline, expressed as extra delay so it also works under virtual clocks+ const created = now();+ const lead = startAt - created;+ const anims = [];+ for (const [el, byKey] of values) {+ for (const [key, seq] of byKey) {+ seq.sort((a, b) => (a.at === b.at ? (a.value === null ? 1 : b.value === null ? -1 : 0) : a.at - b.at));+ const kf = [];+ const offsets = [];+ const eases = [];+ for (const k of seq) {+ kf.push(k.value);+ offsets.push(total ? k.at / total : 0);+ eases.push(k.easing || "easeOut");+ }+ if (offsets[0] !== 0) {+ offsets.unshift(0);+ kf.unshift(kf[0]);+ eases.unshift("easeInOut");+ }+ if (offsets[offsets.length - 1] !== 1) {+ offsets.push(1);+ kf.push(null);+ }+ const name = CSS_NAME[key];+ for (let i = 0; i < kf.length; i++) {+ if (kf[i] === null) kf[i] = i === 0 ? getComputedStyle(el).getPropertyValue(name) : kf[i - 1];+ }+ const frames = kf.map((v, i) => ({ [key]: String(v), offset: offsets[i], easing: easing(eases[i] || "linear") }));+ const a = el.animate(frames, { duration: total * 1000, delay: delay * 1000 + lead, fill: "both" });+ anchor(a, created);+ anims.push({ a, el, name, final: String(kf[kf.length - 1]) });+ }+ }+ const done = Promise.all(anims.map((x) => x.a.finished)).then(() => {+ for (const x of anims) {+ x.el.style.setProperty(x.name, x.final);+ x.a.cancel();+ }+ });+ done.catch(() => {});+ return {+ done,+ end: startAt + (delay + total) * 1000,+ cancel: () => anims.forEach((x) => x.a.cancel()),+ };+}++// ---------- clerk.com's three sequences (selectors replaced by the overlay's elements) ----------++const seqA = (o) => [+ [o.border, { opacity: 1, transform: ["scale(1.5)", "scale(0.9)", "scale(1)"] }, { duration: 0.3, opacity: { duration: 0.1 } }],+ [o.bg, { opacity: 1 }, { at: "<" }],+ [o.cursor, { opacity: 1, transform: ["scale(1.75)", "scale(1)"] }, { at: "<" }],+ [[o.digits[0]], { opacity: 1, transform: "scale(1)" }, { duration: 0.1 }],+];++function step(o, e) {+ const r = 44 * (e + 1);+ return [+ [o.cursor, { transform: `translateX(${r / 16}rem)` }, {}],+ [[...o.bg, ...o.border], { transform: `translateX(${r / 16}rem)` }, { at: "<" }],+ [o.mask, { clipPath: `inset(0 calc(100% - ${((e + 2) * 32 + (e + 1) * 12) / 16}rem) 0 ${r / 16}rem round 0.375rem)` }, { at: "<" }],+ [[o.digits[e + 1]], { opacity: 1, transform: "scale(1)" }, { duration: 0.1, at: "+0.1" }],+ [o.border, { transform: [`translateX(${r / 16}rem) scale(0.9)`, `translateX(${r / 16}rem) scale(1)`] }, { at: "<" }],+ ];+}+const seqB = (o) => [0, 1, 2, 3, 4].flatMap((e) => step(o, e));++const seqC = (o) => [+ [o.border, { opacity: 0, transform: "translateX(13.75rem) scale(1.5)" }],+ [o.digits, { opacity: 0, transform: ["scale(1)", "scale(1.5)"] }, { at: "<" }],+ [o.finale, { opacity: [1, 0], transform: ["scale(1)", "scale(1.5)"] }, { at: "<" }],+ [o.bg, { opacity: 0 }, { at: "<" }],+ [o.cursor, { opacity: 0, transform: "translateX(13.75rem) scale(1.5)" }, { at: "<" }],+];++// ---------- overlay ----------++const MASK_CELL =+ '<div data-num class="mfa-cell" style="clip-path: polygon(0 0, 100% 0, 100% 2.125rem, 0 2.125rem)"></div>';++function buildOverlay(host) {+ // clerk.com: useMemo(() => Array.from({ length: 6 }, () => Math.floor(9 * Math.random() + 1)), [])+ const digits = Array.from({ length: 6 }, () => Math.floor(9 * Math.random() + 1));+ const el = document.createElement("div");+ el.className = "mfa-overlay";+ el.innerHTML =+ `<div class="mfa-row">${digits+ .map((d) => `<div data-num class="mfa-cell"><div data-dot-active class="mfa-digit" style="opacity: 0; transform: scale(0.1)">${d}</div></div>`)+ .join("")}</div>` ++ `<div data-mask class="mfa-row mfa-mask" style="clip-path: inset(0 calc(100% - 2rem) 0 0 round 0.375rem)">${MASK_CELL.repeat(6)}</div>` ++ `<div class="mfa-clip"><div data-bg class="mfa-bg"></div><div data-cursor class="mfa-cursor"></div></div>` ++ `<div data-border class="mfa-border"></div>` ++ [0, 1, 2, 3, 4]+ .map((i) => `<div data-border-finale class="mfa-border mfa-border--finale" style="left: calc(44 / 16 * ${i}rem); opacity: 0"></div>`)+ .join("");+ host.append(el); // after any overlay still fading out, as AnimatePresence keeps exiting children in place+ const q = (s) => [...el.querySelectorAll(s)];+ return {+ el,+ token: 0,+ seq: null,+ fade: null,+ exiting: false,+ border: q("[data-border]"),+ bg: q("[data-bg]"),+ cursor: q("[data-cursor]"),+ mask: q("[data-mask]"),+ finale: q("[data-border-finale]"),+ digits: q("[data-dot-active]"),+ };+}++export async function mount(slot, card) {+ const host = slot.querySelector(".mfa-otp");+ if (!host) return;+ // the digits are the only Geist Mono text in the card and appear only on hover: load the face up front+ try {+ await document.fonts.load('500 16px "Geist Mono"', "0123456789");+ } catch {}++ const reduced = matchMedia("(prefers-reduced-motion: reduce)");+ let hovered = false;+ let live = null; // the overlay for the current hover (React key), possibly fading out++ // A → B → C, then onComplete; a newer token (restart, removal) stops the chain like clerk.com's `i = false`+ async function run(o, delay, startAt) {+ const token = ++o.token;+ o.seq?.cancel();+ try {+ o.seq = sequence(seqA(o), { delay, defaultTransition: { duration: 0.3, ease: [0.7, 0, 0.3, 1] } }, startAt);+ await o.seq.done;+ if (token !== o.token) return;+ o.seq = sequence(seqB(o), { defaultTransition: { duration: 0.15 } }, Math.max(o.seq.end + GAP_SEQ, now() - 40));+ await o.seq.done;+ if (token !== o.token) return;+ o.seq = sequence(seqC(o), {}, Math.max(o.seq.end + GAP_SEQ, now() - 40));+ await o.seq.done;+ if (token !== o.token) return;+ complete(o, o.seq.end);+ } catch {+ // cancelled+ }+ }++ // onComplete: h(.7), f(key + 1). Still hovered → the finished overlay exits (it is invisible by now) and a+ // fresh one with new digits mounts and starts after 0.7 s.+ function complete(o, end) {+ if (!hovered || live !== o || o.exiting) return;+ fadeOut(o, now());+ live = buildOverlay(host);+ run(live, 0.7, Math.max(end + GAP_LOOP, now() - 40));+ }++ function fade(o, to, startAt, onDone) {+ const from = getComputedStyle(o.el).opacity;+ o.fade?.cancel();+ const created = now();+ const a = o.el.animate([{ opacity: from }, { opacity: to }], { duration: 300, delay: startAt - created, easing: EXIT_EASE, fill: "both" });+ anchor(a, created);+ o.fade = a;+ a.finished.then(() => o.fade === a && onDone(a), () => {});+ }++ // AnimatePresence exit: opacity → 0 in 0.3 s while the sequence keeps running, then unmount (cancel all)+ function fadeOut(o, startAt) {+ o.exiting = true;+ fade(o, 0, startAt, () => {+ o.token++;+ o.seq?.cancel();+ o.el.remove();+ if (live === o) live = null;+ });+ }++ card.addEventListener("pointerenter", (e) => {+ if (e.pointerType === "touch" || hovered) return;+ hovered = true;+ const t = Math.max(e.timeStamp, now()) + LAG_IN;+ if (reduced.matches) {+ showStill();+ return;+ }+ if (live && live.exiting) {+ // same React key still fading out: it fades back in and its sequence restarts from A, same digits+ const o = live;+ o.exiting = false;+ fade(o, 1, t, (a) => {+ a.cancel();+ o.fade = null;+ });+ run(o, 0, t);+ } else {+ live = buildOverlay(host);+ run(live, 0, t);+ }+ });++ card.addEventListener("pointerleave", (e) => {+ if (e.pointerType === "touch" || !hovered) return;+ hovered = false;+ if (reduced.matches) {+ live?.el.remove();+ live = null;+ return;+ }+ if (live && !live.exiting) fadeOut(live, Math.max(e.timeStamp, now()) + LAG_OUT);+ });++ // prefers-reduced-motion (not handled on clerk.com): show the typed code without motion while hovered+ function showStill() {+ live?.el.remove();+ live = buildOverlay(host);+ for (const d of live.digits) Object.assign(d.style, { opacity: 1, transform: "none" });+ for (const x of [...live.border, ...live.bg, ...live.cursor]) Object.assign(x.style, { opacity: 1, transform: "translateX(13.75rem)" });+ }+}diff --git a/site/public/examples/clerk-bento/src/widgets/otp.css b/site/public/examples/clerk-bento/src/widgets/otp.cssnew file mode 100644index 0000000..3809a7c--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/otp.css@@ -0,0 +1,187 @@+/* clerk.com "Email and SMS one-time passcodes" visual. Values are clerk.com's resolved Tailwind classes+ (dom/otp.html + css/otp.css in the recon); rest state here, hover motion in otp.js (as Motion does it). */++/* 206px box hanging from the top of the 164px slot, clipped by its own overflow (the card itself does not clip).+ Its lower 42px sit under the card text (z-index 20). */+.clerk-card--otp .otp-box {+ position: absolute;+ inset-inline: 0;+ top: 0;+ isolation: isolate;+ height: 12.875rem;+ overflow: hidden;+ padding-top: 1.5rem;+ transform: translateY(0rem) scale(0.98);+}++.clerk-card--otp .otp-phone {+ margin-inline: auto;+ width: 16.5rem;+ height: 14rem;+ border-radius: 2.75rem;+ background-color: var(--color-gray-800);+ padding: 0.375rem;+ box-shadow: 0 1px 0 0 rgb(255 255 255 / 0.05) inset, 0px 2px 5px 0 rgb(0 0 0 / 0.40);+ background-image: linear-gradient(180deg, rgb(255 255 255 / 0.05) 0%, rgb(255 255 255 / 0) 67.19%);+}++.clerk-card--otp .otp-screen {+ position: relative;+ height: 12.5rem;+ overflow: hidden;+ border-radius: 2.375rem;+ background-color: #13131680;+ padding: 0.75rem 1.25rem 0;+ /* ring-1 ring-inset ring-black/5 */+ box-shadow: inset 0 0 0 1px #0000000d;+}++/* lock badge (transform-gpu: translateZ(0)); background and shadow are driven by otp.js */+.clerk-card--otp .otp-lock {+ position: relative;+ z-index: 10;+ margin-inline: auto;+ display: flex;+ width: 1.5rem;+ height: 1.5rem;+ transform: translateZ(0);+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ background-color: #131316;+ box-shadow: 0 1px rgb(255 255 255 / 0.05);+}+.clerk-card--otp .otp-lock__icon {+ width: 1rem;+ height: 1rem;+}++/* inline wrapper with perspective, as on clerk.com (no transformed 3D children, so no visible effect) */+.clerk-card--otp .otp-persp {+ perspective: 1000px;+}++/* SMS notification: parked above the screen top (clipped by the screen), blurred and half transparent */+.clerk-card--otp .otp-notif {+ position: absolute;+ inset-inline: 0.5rem;+ top: 3rem;+ z-index: 20;+ display: flex;+ transform-origin: top;+ align-items: center;+ column-gap: 0.75rem;+ border-radius: 1rem;+ background-color: var(--color-gray-800);+ padding: 0.5rem;+ box-shadow: 0 6px 12px rgb(19 19 22 / 0.6), 0 1px rgb(255 255 255 / 0.03) inset;+ transform: translateY(-6.5rem) scale(.9);+ filter: blur(2px);+ opacity: 0.5;+}+.clerk-card--otp .otp-notif__icon {+ display: flex;+ width: 2.5rem;+ height: 2.5rem;+ flex: none;+ align-items: center;+ justify-content: center;+ border-radius: 0.625rem;+ background-color: var(--color-gray-700);+ box-shadow: 0 1px rgb(255 255 255 / 0.05) inset;+ background-image: radial-gradient(circle at top, rgb(114 233 255 / 0.2), rgb(114 233 255 / 0));+}+.clerk-card--otp .otp-notif__svg {+ width: 2.5rem;+ height: 2.5rem;+}+.clerk-card--otp .otp-notif__text {+ min-width: 0;+}+.clerk-card--otp .otp-notif__title {+ font-size: 0.625rem;+ line-height: 1rem;+ font-weight: 500;+ color: #5de3ff;+}+.clerk-card--otp .otp-notif__body {+ font-size: 0.6875rem;+ line-height: 1rem;+ text-overflow: ellipsis;+ white-space: nowrap;+ overflow: hidden;+ color: var(--color-gray-200);+}+.clerk-card--otp .otp-notif__code {+ color: #fff;+}++/* app grid: 4 per row, 2 rows */+.clerk-card--otp .otp-apps {+ margin-top: 1.5rem;+ display: flex;+ flex-wrap: wrap;+ justify-content: space-between;+ column-gap: 0.5rem;+ row-gap: 1rem;+ text-align: center;+}+.clerk-card--otp .otp-app {+ flex: none;+ /* clerk.com's items are all 40px wide (the tile); Geist sets "NatWest" ~1px wider than Suisse Int'l, which+ would widen that item and shift the tiles of the second row. Keep 40px and let the label overflow centred. */+ width: 2.5rem;+}+.clerk-card--otp .otp-app__tile {+ position: relative;+ width: 2.5rem;+ height: 2.5rem;+ border-radius: 0.625rem;+ background-color: var(--color-gray-800);+ box-shadow: 0 1px rgb(255 255 255 / 0.05) inset;+}+.clerk-card--otp .otp-app__svg {+ width: 2.5rem;+ height: 2.5rem;+}+.clerk-card--otp .otp-app__label {+ margin-top: 0.375rem;+ font-size: 0.625rem;+ line-height: 1rem;+ font-weight: 500;+ color: var(--color-gray-300);+ display: flex;+ justify-content: center;+ white-space: nowrap;+}++/* the "1" badge on the SMS app (backdrop-blur = 8px) */+.clerk-card--otp .otp-badge {+ position: absolute;+ top: -0.375rem;+ left: -0.375rem;+ z-index: 10;+ display: flex;+ width: 1.25rem;+ height: 1.25rem;+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ font-size: 0.625rem;+ line-height: 1;+ font-weight: 600;+ color: var(--color-gray-950);+ -webkit-backdrop-filter: blur(8px);+ backdrop-filter: blur(8px);+ transform: scale(0.75);+ background: #FFFFFF40;+}++/* bottom fade over the phone (bg-linear-to-t from-gray-900, oklab interpolation as in Tailwind v4) */+.clerk-card--otp .otp-fade {+ position: absolute;+ inset: 0;+ background-image: linear-gradient(to top, var(--color-gray-900) 0%, #0000 100%);+ background-image: linear-gradient(to top in oklab, var(--color-gray-900) 0%, #0000 100%);+ transform: translateY(0rem);+}diff --git a/site/public/examples/clerk-bento/src/widgets/otp.html b/site/public/examples/clerk-bento/src/widgets/otp.htmlnew file mode 100644index 0000000..798f563--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/otp.html@@ -0,0 +1,3 @@+<!-- clerk.com "Email and SMS one-time passcodes" visual (EmailSMS, module 127528), rebuilt without React/Motion.+ Same boxes, colours, shadows and inline SVGs as clerk.com (SVG ids prefixed with "otp-"); motion in otp.js. -->+<div class="otp-box" data-otp="box"><div class="otp-phone"><div class="otp-screen"><div class="otp-lock" data-otp="lock"><svg class="otp-lock__icon" viewBox="0 0 16 16" aria-hidden="true"><path data-otp-lock-path="1" fill="#fff" fill-opacity=".4" d="M3 9a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V9Z" opacity="0"></path><path data-otp-lock-path="2" fill="#fff" fill-opacity=".4" fill-rule="evenodd" d="M8 4a2.5 2.5 0 0 0-2.5 2.5V10h-1V6.5a3.5 3.5 0 1 1 7 0V10h-1V6.5A2.5 2.5 0 0 0 8 4Z" clip-rule="evenodd" opacity="0"></path><path data-otp-lock-path="3" d="M3 8a2 2 0 0 1 2-2h6a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8Z" fill="#747686"></path><path data-otp-lock-path="4" fill-rule="evenodd" d="M8 3a2.5 2.5 0 0 0-2.5 2.5V9h-1V5.5a3.5 3.5 0 1 1 7 0V9h-1V5.5A2.5 2.5 0 0 0 8 3Z" clip-rule="evenodd" fill="#747686"></path></svg></div><span class="otp-persp"><div class="otp-notif" data-otp="notif"><div class="otp-notif__icon"><svg class="otp-notif__svg" viewBox="0 0 40 40" fill="none" aria-hidden="true"><g filter="url(#otp-filter0_di_5116_3367)"><path fill="#5DE3FF" fill-rule="evenodd" d="M20 32c6.627 0 12-5.373 12-12S26.627 8 20 8 8 13.373 8 20s5.373 12 12 12Zm6-12c0 2.761-2.686 5-6 5a7.2 7.2 0 0 1-1.163-.094 1.227 1.227 0 0 0-.79.14c-.613.34-1.308.571-1.983.72-.82.182-1.314-.759-.895-1.485.04-.07.08-.14.119-.212.21-.382.099-.846-.184-1.178C14.409 22.075 14 21.077 14 20c0-2.761 2.686-5 6-5s6 2.239 6 5Z" clip-rule="evenodd"></path></g><defs><filter id="otp-filter0_di_5116_3367" width="42" height="42" x="-1" y="-1" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="effect1_dropShadow_5116_3367"></feMorphology><feOffset></feOffset><feGaussianBlur stdDeviation="4"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0.419608 0 0 0 0 0.905882 0 0 0 0 1 0 0 0 0.3 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_5116_3367"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_5116_3367" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"></feColorMatrix><feBlend in2="shape" result="effect2_innerShadow_5116_3367"></feBlend></filter></defs></svg></div><div class="otp-notif__text"><div class="otp-notif__title">Security alert</div><div class="otp-notif__body">Your security passcode is <span class="otp-notif__code">764676</span></div></div></div></span><div class="otp-apps"><div class="otp-app"><div class="otp-app__tile"><svg class="otp-app__svg" viewBox="0 0 40 40" fill="none" aria-hidden="true"><g filter="url(#otp-email-sms-icon-shadow)"><path fill="#5E5F6E" d="m31.661 28.642-1.576 2.465c-.126.197-.266.388-.465.509-1.796 1.084-7.63.18-14.523-6.713-7.302-7.303-7.883-13.416-6.5-14.799l2.761-1.765a2.152 2.152 0 0 1 2.68.291l2.119 2.118c.714.714.835 1.83.29 2.68l-1.18 1.847c-.387.607-.657 1.29-.451 1.98.373 1.253 1.406 3.24 3.047 4.882a12.282 12.282 0 0 0 3.656 2.515c1.425.633 2.997.214 4.311-.626l.742-.474a2.151 2.151 0 0 1 2.68.291l2.118 2.119c.714.714.835 1.829.291 2.68Z"></path><path fill="url(#otp-paint0_linear_5116_3351)" fill-opacity=".2" d="m31.661 28.642-1.576 2.465c-.126.197-.266.388-.465.509-1.796 1.084-7.63.18-14.523-6.713-7.302-7.303-7.883-13.416-6.5-14.799l2.761-1.765a2.152 2.152 0 0 1 2.68.291l2.119 2.118c.714.714.835 1.83.29 2.68l-1.18 1.847c-.387.607-.657 1.29-.451 1.98.373 1.253 1.406 3.24 3.047 4.882a12.282 12.282 0 0 0 3.656 2.515c1.425.633 2.997.214 4.311-.626l.742-.474a2.151 2.151 0 0 1 2.68.291l2.118 2.119c.714.714.835 1.829.291 2.68Z"></path></g><defs><linearGradient id="otp-paint0_linear_5116_3351" x1="20" x2="20" y1="9" y2="31" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><filter id="otp-email-sms-icon-shadow" width="30" height="30" x="5" y="6" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feGaussianBlur stdDeviation="1.5"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.2 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_5116_3351"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_5116_3351" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.08 0"></feColorMatrix><feBlend in2="shape" result="effect2_innerShadow_5116_3351"></feBlend></filter></defs></svg></div><div class="otp-app__label">Phone</div></div><div class="otp-app"><div class="otp-app__tile"><svg class="otp-app__svg" viewBox="0 0 40 40" fill="none" aria-hidden="true"><g fill-rule="evenodd" clip-rule="evenodd" filter="url(#otp-email-sms-icon-shadow)"><path fill="#5E5F6E" d="M20 32c6.627 0 12-5.373 12-12S26.627 8 20 8 8 13.373 8 20s5.373 12 12 12Zm6-12c0 2.761-2.686 5-6 5a7.2 7.2 0 0 1-1.163-.094 1.227 1.227 0 0 0-.79.14c-.613.34-1.308.571-1.983.72-.82.182-1.314-.759-.895-1.485.04-.07.08-.14.119-.212.21-.382.099-.846-.184-1.178C14.409 22.075 14 21.077 14 20c0-2.761 2.686-5 6-5s6 2.239 6 5Z"></path><path fill="url(#otp-paint0_linear_5116_3354)" fill-opacity=".2" d="M20 32c6.627 0 12-5.373 12-12S26.627 8 20 8 8 13.373 8 20s5.373 12 12 12Zm6-12c0 2.761-2.686 5-6 5a7.2 7.2 0 0 1-1.163-.094 1.227 1.227 0 0 0-.79.14c-.613.34-1.308.571-1.983.72-.82.182-1.314-.759-.895-1.485.04-.07.08-.14.119-.212.21-.382.099-.846-.184-1.178C14.409 22.075 14 21.077 14 20c0-2.761 2.686-5 6-5s6 2.239 6 5Z"></path></g><defs><linearGradient id="otp-paint0_linear_5116_3354" x1="20" x2="20" y1="9" y2="31" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient></defs></svg><div class="otp-badge" data-otp="badge">1</div></div><div class="otp-app__label">SMS</div></div><div class="otp-app"><div class="otp-app__tile"><svg class="otp-app__svg" viewBox="0 0 40 40" fill="none" aria-hidden="true"><g filter="url(#otp-email-sms-icon-shadow)"><path fill="#5E5F6E" d="M19.083 13.241a.768.768 0 0 0-.179-.523c-.594-.657-2.828-2.545-8.984-2.718-.506-.014-.92.429-.92.973v16.746c0 .544.414.984.92.998 3.126.088 5.241.617 6.643 1.204.846.354 2.52-.54 2.52-1.515V13.24Z"></path><path fill="url(#otp-paint0_linear_5116_3361)" fill-opacity=".2" d="M19.083 13.241a.768.768 0 0 0-.179-.523c-.594-.657-2.828-2.545-8.984-2.718-.506-.014-.92.429-.92.973v16.746c0 .544.414.984.92.998 3.126.088 5.241.617 6.643 1.204.846.354 2.52-.54 2.52-1.515V13.24Z"></path><path fill="#5E5F6E" d="M20.917 13.241c0-.194.053-.383.179-.523.594-.657 2.828-2.545 8.984-2.718.506-.014.92.429.92.973v16.746c0 .544-.414.984-.92.998-3.126.088-5.241.617-6.643 1.204-.846.354-2.52-.54-2.52-1.515V13.24Z"></path><path fill="url(#otp-paint1_linear_5116_3361)" fill-opacity=".2" d="M20.917 13.241c0-.194.053-.383.179-.523.594-.657 2.828-2.545 8.984-2.718.506-.014.92.429.92.973v16.746c0 .544-.414.984-.92.998-3.126.088-5.241.617-6.643 1.204-.846.354-2.52-.54-2.52-1.515V13.24Z"></path></g><defs><linearGradient id="otp-paint0_linear_5116_3361" x1="20" x2="20" y1="10" y2="30" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><linearGradient id="otp-paint1_linear_5116_3361" x1="20" x2="20" y1="10" y2="30" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient></defs></svg></div><div class="otp-app__label">Books</div></div><div class="otp-app"><div class="otp-app__tile"><svg class="otp-app__svg" viewBox="0 0 40 40" fill="none" aria-hidden="true"><g filter="url(#otp-email-sms-icon-shadow)"><path fill="#5E5F6E" fill-rule="evenodd" d="M14 30a1 1 0 0 1 1-1h9a1 1 0 1 1 0 2h-9a1 1 0 0 1-1-1Z" clip-rule="evenodd"></path><path fill="url(#otp-paint0_linear_5116_3364)" fill-opacity=".2" fill-rule="evenodd" d="M14 30a1 1 0 0 1 1-1h9a1 1 0 1 1 0 2h-9a1 1 0 0 1-1-1Z" clip-rule="evenodd"></path><path fill="#5E5F6E" d="M8 13a2 2 0 0 1 2-2h20a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V13Z"></path><path fill="url(#otp-paint1_linear_5116_3364)" fill-opacity=".2" d="M8 13a2 2 0 0 1 2-2h20a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2V13Z"></path></g><defs><linearGradient id="otp-paint0_linear_5116_3364" x1="20" x2="20" y1="11" y2="31" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><linearGradient id="otp-paint1_linear_5116_3364" x1="20" x2="20" y1="11" y2="31" gradientUnits="userSpaceOnUse"><stop stop-color="#fff"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient></defs></svg></div><div class="otp-app__label">TV</div></div><div class="otp-app"><div class="otp-app__tile"></div><div class="otp-app__label">Google</div></div><div class="otp-app"><div class="otp-app__tile"></div><div class="otp-app__label">X</div></div><div class="otp-app"><div class="otp-app__tile"></div><div class="otp-app__label">NatWest</div></div><div class="otp-app"><div class="otp-app__tile"></div><div class="otp-app__label">Clerk</div></div></div></div></div><div class="otp-fade" data-otp="fade"></div></div>diff --git a/site/public/examples/clerk-bento/src/widgets/otp.js b/site/public/examples/clerk-bento/src/widgets/otp.jsnew file mode 100644index 0000000..5e3970a--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/otp.js@@ -0,0 +1,255 @@+// clerk.com "Email and SMS one-time passcodes" (EmailSMS, module 127528): hover motion without React/Motion.+//+// clerk.com drives this card with Motion for React: declarative `animate` targets that switch with the card's+// hover state. Motion runs transform / opacity / filter as Web Animations (WAAPI) and everything else+// (colours, box-shadows, SVG attributes) from JS on each animation frame. This file does the same, with the+// same durations, easings, spring, colour mixing and value formats, so the frames match:+//+// element hover-in hover-out+// phone box translateY(0→-2rem) scale(.98→1), .5s, 1-2^-8t back, .5s, 1-2^-8t+// lock badge bg #131316 → #5DE3FF, .3s cubic-bezier(.25,.1,.35,1) back, same+// lock badge shadow 1 shadow → 2 shadows: not mixable, snaps snaps back+// padlock highlight paths opacity 0→1, body #747686→#043048, .4s easeOut; back the same+// notification spring (bounce .2, .6s) after .2s: translateY(-6.5rem→0) scale(.9→1), opacity .5→1;+// blur 2px→0, .6s easeOut after .2s back, .3s cubic-bezier(.25,.1,.35,1)+// "1" badge scale .75→1, bg #FFFFFF40→#5DE3FF, glow none→on, .5s, 1-2^-8t; back the same+// bottom fade translateY(0→2rem), .3s cubic-bezier(.25,.1,.35,1); back the same+//+// Plays once on hover and holds; on hover-out every value returns to rest from wherever it is.+// Nothing is random (the passcode is the fixed "764676"). With prefers-reduced-motion: reduce the card switches+// state without motion (an addition: clerk.com animates regardless).++// ---------- easings (Motion's implementations) ----------++// clerk's local ease `l`: a soft expo-out+const expoOut8 = (t) => (t === 1 ? 1 : 1 - Math.pow(2, -8 * t));++// Motion's cubicBezier (binary subdivision, 12 steps)+function cubicBezier(x1, y1, x2, y2) {+ const calc = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;+ const tForX = (x) => {+ let lo = 0, hi = 1, t, cx, i = 0;+ do {+ t = lo + (hi - lo) / 2;+ cx = calc(t, x1, x2) - x;+ if (cx > 0) hi = t; else lo = t;+ } while (Math.abs(cx) > 1e-7 && ++i < 12);+ return t;+ };+ return (t) => (t === 0 || t === 1 ? t : calc(tForX(t), y1, y2));+}+const MOTION_DEFAULT = [0.25, 0.1, 0.35, 1]; // Motion's default tween for non-transform-shorthand values (.3s)+const EASE_OUT = [0, 0, 0.58, 1]; // Motion's "easeOut", used when a transition only sets a duration+const bezierCss = (b) => `cubic-bezier(${b.join(", ")})`;++// Motion's spring from { duration, bounce } (findSpring + underdamped generator), as an easing over [0, 1].+// With a duration the spring is "resolved from duration": it ends exactly at `duration` and snaps to the target.+function springEase(durationMs, bounce) {+ const zeta = Math.min(1, Math.max(0.05, 1 - bounce));+ const dur = Math.min(10, Math.max(0.01, durationMs / 1000));+ const damped = (w, z) => w * Math.sqrt(1 - z * z);+ const env = (w) => 0.001 - ((w * zeta) / damped(w, zeta)) * Math.exp(-w * zeta * dur);+ const der = (w) => {+ const a = w * zeta * dur, r = zeta * zeta * w * w * dur;+ return (-r * Math.exp(-a) * (-env(w) + 0.001 > 0 ? -1 : 1)) / damped(w * w, zeta);+ };+ let w = 5 / dur;+ for (let i = 1; i < 12; i++) w -= env(w) / der(w);+ const stiffness = w * w, damping = 2 * zeta * Math.sqrt(stiffness);+ const L = damping / (2 * Math.sqrt(stiffness)); // = zeta+ const W = Math.sqrt(stiffness) / 1000; // rad/ms+ const Wd = damped(W, L), O = 100, A = (L * W * O) / Wd;+ const value = (t) => 100 - Math.exp(-L * W * t) * (A * Math.sin(Wd * t) + O * Math.cos(Wd * t));+ return (p) => (p >= 1 ? 1 : value(p * durationMs) / 100);+}++// Motion hands JS easings to WAAPI as linear() sampled every 10ms+function linearEasing(ease, durationMs) {+ const n = Math.max(Math.round(durationMs / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(Math.round(ease(i / (n - 1)) * 1e4) / 1e4);+ return `linear(${pts.join(", ")})`;+}++const EASE = {+ expo8: { fn: expoOut8, css: (d) => linearEasing(expoOut8, d) },+ default: { fn: cubicBezier(...MOTION_DEFAULT), css: () => bezierCss(MOTION_DEFAULT) },+ easeOut: { fn: cubicBezier(...EASE_OUT), css: () => "ease-out" },+ spring: (() => { const fn = springEase(600, 0.2); return { fn, css: (d) => linearEasing(fn, d) }; })(),+};++// ---------- value mixing (Motion's mixers) ----------++const mixNumbers = (a, b, p) => a.map((v, i) => v + (b[i] - v) * p);+// colours: rgb mixed in squared space, alpha linearly+const sqMix = (a, b, p) => { const e = p * (b * b - a * a) + a * a; return e < 0 ? 0 : Math.sqrt(e); };+const mixColor = (a, b, p) => [sqMix(a[0], b[0], p), sqMix(a[1], b[1], p), sqMix(a[2], b[2], p), a[3] + (b[3] - a[3]) * p];+// values Motion cannot interpolate (different shadow counts) switch on the first frame with progress > 0+const mixSnap = (a, b, p) => (p > 0 ? b : a);++const r5 = (v) => Math.round(v * 1e5) / 1e5;+const clamp = (lo, hi, v) => Math.min(hi, Math.max(lo, v));+const rgba = ([r, g, b, a]) =>+ `rgba(${Math.round(clamp(0, 255, r))}, ${Math.round(clamp(0, 255, g))}, ${Math.round(clamp(0, 255, b))}, ${r5(clamp(0, 1, a))})`;+const hex = (h) => [parseInt(h.slice(1, 3), 16), parseInt(h.slice(3, 5), 16), parseInt(h.slice(5, 7), 16), h.length > 7 ? parseInt(h.slice(7, 9), 16) / 255 : 1];++// ---------- a tiny animation engine: one channel per element property ----------+//+// Timing as in Motion, whose animations all count from the moment the hover state changed (Motion sets+// `startTime = createdAt`): Web Animations are created right away and, on the next animation frame, set to+// (frame time − change time) of progress; JS-driven values are applied from that frame on, in whole+// milliseconds since the change, as Motion's JS animations are.++const reduceMotion = matchMedia("(prefers-reduced-motion: reduce)");+const running = new Set(); // JS-driven channels with an active tween+const resync = new Set(); // Web Animations created since the last frame+let rafId = 0;++function tick() {+ rafId = 0;+ const now = performance.now();+ for (const ch of resync) {+ const a = ch.anim;+ // backdate through currentTime rather than startTime: same result in a browser, and it still holds when a+ // recorder virtualises performance.now() but not the native animation timeline+ if (a && a.wa) a.wa.currentTime = Math.max(0, now - a.start);+ }+ resync.clear();+ for (const ch of running) {+ ch.apply(ch.valueAt(now));+ if (ch.done(now)) { ch.cur = ch.anim.to; ch.anim = null; running.delete(ch); }+ }+ if (running.size) rafId = requestAnimationFrame(tick);+}+const schedule = () => { if (!rafId) rafId = requestAnimationFrame(tick); };++class Channel {+ // waapi: [element, CSS property] animated with element.animate(); otherwise `apply(value)` runs every frame+ constructor({ rest, mix = mixNumbers, format, waapi, apply }) {+ this.cur = rest; this.mix = mix; this.format = format; this.waapi = waapi; this.applyFn = apply;+ this.anim = null;+ }+ elapsed(now) {+ const a = this.anim;+ return (a.wa ? now - a.start : Math.round(now - a.start)) - a.delay;+ }+ progress(now) {+ const t = this.elapsed(now), a = this.anim;+ if (t <= 0) return 0;+ if (t >= a.dur) return 1;+ return a.ease.fn(t / a.dur);+ }+ valueAt(now) { return this.anim ? this.mix(this.anim.from, this.anim.to, this.progress(now)) : this.cur; }+ done(now) { return !this.anim.wa && this.elapsed(now) >= this.anim.dur; }+ apply(v) { this.applyFn(this.format(v)); }+ // tween from the current value to `target`, counting from `t0` (the hover change, i.e. now)+ to(target, { dur, delay = 0, ease }, t0) {+ const from = this.valueAt(t0);+ this.stop();+ if (reduceMotion.matches) { dur = 0; delay = 0; }+ if (dur <= 0) {+ this.cur = target;+ if (this.waapi) this.waapi[0].style[this.waapi[1]] = this.format(target); else this.apply(target);+ return;+ }+ const anim = (this.anim = { from, to: target, start: t0, delay, dur, ease, wa: null });+ if (this.waapi) {+ const [el, prop] = this.waapi;+ const wa = el.animate([{ [prop]: this.format(from) }, { [prop]: this.format(target) }],+ { duration: dur, delay, easing: ease.css(dur), fill: "both" });+ anim.wa = wa;+ wa.onfinish = () => {+ if (this.anim !== anim) return;+ el.style[prop] = this.format(target); // commit the end value, then drop the animation (as Motion does)+ wa.cancel();+ this.cur = target; this.anim = null;+ };+ resync.add(this);+ } else {+ running.add(this);+ }+ schedule();+ }+ stop() {+ if (!this.anim) return;+ if (this.anim.wa) { this.anim.wa.onfinish = null; this.anim.wa.cancel(); }+ running.delete(this);+ resync.delete(this);+ this.anim = null;+ }+}++// ---------- mount ----------++export function mount(slot, card) {+ const $ = (s) => slot.querySelector(s);+ const box = $(".otp-box"), lock = $(".otp-lock"), notif = $(".otp-notif"), badge = $(".otp-badge"), fade = $(".otp-fade");+ const lockPaths = [1, 2, 3, 4].map((i) => $(`[data-otp-lock-path="${i}"]`));+ const setStyle = (el, prop) => (v) => { el.style[prop] = v; };+ const setAttr = (els, name) => (v) => { for (const el of els) el.setAttribute(name, v); };++ const LOCK_SHADOW_REST = "0 1px rgb(255 255 255 / 0.05)";+ const GLOW = "0 0 8px 1px rgb(107 231 255 / 0.3), 0 1px rgb(255 255 255 / 0.2) inset";++ const ch = {+ box: new Channel({ rest: [0, 0.98], waapi: [box, "transform"], format: ([y, s]) => `translateY(${r5(y)}rem) scale(${r5(s)})` }),+ lockBg: new Channel({ rest: hex("#131316"), mix: mixColor, format: rgba, apply: setStyle(lock, "backgroundColor") }),+ lockShadow: new Channel({ rest: LOCK_SHADOW_REST, mix: mixSnap, format: (v) => v, apply: setStyle(lock, "boxShadow") }),+ lockHi: new Channel({ rest: [0], format: ([o]) => String(r5(o)), apply: setAttr(lockPaths.slice(0, 2), "opacity") }),+ lockFill: new Channel({ rest: hex("#747686"), mix: mixColor, format: rgba, apply: setAttr(lockPaths.slice(2), "fill") }),+ notif: new Channel({ rest: [-6.5, 0.9], waapi: [notif, "transform"], format: ([y, s]) => `translateY(${r5(y)}rem) scale(${r5(s)})` }),+ notifOpacity: new Channel({ rest: [0.5], waapi: [notif, "opacity"], format: ([o]) => String(r5(o)) }),+ notifBlur: new Channel({ rest: [2], waapi: [notif, "filter"], format: ([b]) => `blur(${r5(b)}px)` }),+ badge: new Channel({ rest: [0.75], waapi: [badge, "transform"], format: ([s]) => `scale(${r5(s)})` }),+ badgeBg: new Channel({ rest: hex("#FFFFFF40"), mix: mixColor, format: rgba, apply: setStyle(badge, "background") }),+ // from "none", Motion animates from the target with every number at 0 and every colour transparent+ badgeGlow: new Channel({+ rest: [0, 0, 0, 0, 0],+ format: ([blur, spread, a1, y, a2]) =>+ `0 0 ${r5(blur)}px ${r5(spread)}px rgba(107, 231, 255, ${r5(a1)}), 0 ${r5(y)}px rgba(255, 255, 255, ${r5(a2)}) inset`,+ apply: setStyle(badge, "boxShadow"),+ }),+ fade: new Channel({ rest: [0], waapi: [fade, "transform"], format: ([y]) => `translateY(${r5(y)}rem)` }),+ };+ badge.style.boxShadow = "none";++ const DEFAULT = { dur: 300, ease: EASE.default };+ const show = (t0) => {+ ch.box.to([-2, 1], { dur: 500, ease: EASE.expo8 }, t0);+ ch.lockBg.to(hex("#5DE3FF"), DEFAULT, t0);+ ch.lockShadow.to(GLOW, DEFAULT, t0);+ ch.lockHi.to([1], { dur: 400, ease: EASE.easeOut }, t0);+ ch.lockFill.to(hex("#043048"), { dur: 400, ease: EASE.easeOut }, t0);+ ch.notif.to([0, 1], { dur: 600, delay: 200, ease: EASE.spring }, t0);+ ch.notifOpacity.to([1], { dur: 600, delay: 200, ease: EASE.spring }, t0);+ ch.notifBlur.to([0], { dur: 600, delay: 200, ease: EASE.easeOut }, t0);+ ch.badge.to([1], { dur: 500, ease: EASE.expo8 }, t0);+ ch.badgeBg.to(hex("#5DE3FF"), { dur: 500, ease: EASE.expo8 }, t0);+ ch.badgeGlow.to([8, 1, 0.3, 1, 0.2], { dur: 500, ease: EASE.expo8 }, t0);+ ch.fade.to([2], DEFAULT, t0);+ };+ const hide = (t0) => {+ ch.box.to([0, 0.98], { dur: 500, ease: EASE.expo8 }, t0);+ ch.lockBg.to(hex("#131316"), DEFAULT, t0);+ ch.lockShadow.to(LOCK_SHADOW_REST, DEFAULT, t0);+ ch.lockHi.to([0], { dur: 400, ease: EASE.easeOut }, t0);+ ch.lockFill.to(hex("#747686"), { dur: 400, ease: EASE.easeOut }, t0);+ ch.notif.to([-6.5, 0.9], DEFAULT, t0);+ ch.notifOpacity.to([0.5], DEFAULT, t0);+ ch.notifBlur.to([2], DEFAULT, t0);+ ch.badge.to([0.75], { dur: 500, ease: EASE.expo8 }, t0);+ ch.badgeBg.to(hex("#FFFFFF40"), { dur: 500, ease: EASE.expo8 }, t0);+ ch.badgeGlow.to([0, 0, 0, 0, 0], { dur: 500, ease: EASE.expo8 }, t0);+ ch.fade.to([0], DEFAULT, t0);+ };++ // Hover as react-aria's useHover on the card root: pointerenter/leave, touch ignored.+ let hovered = false;+ const set = (on) => {+ if (on === hovered) return;+ hovered = on;+ if (on) show(performance.now()); else hide(performance.now());+ };+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") set(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") set(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/passwords.css b/site/public/examples/clerk-bento/src/widgets/passwords.cssnew file mode 100644index 0000000..65e51ba--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/passwords.css@@ -0,0 +1,131 @@+/* "Passwords" card visual: a notched slab, a keyhole dial and a password field.+ Sizes, colours, gradients and shadows are clerk.com's resolved Tailwind values (module 312823,+ .motion-clone/clerk-bento/dom/passwords.html); colours with alpha use the same color-mix() as clerk.com.+ Inline styles in passwords.html hold the rest state; passwords.js animates them. */++.clerk-card--passwords .pw-scene {+ position: absolute;+ inset: 0;+ display: flex;+ flex-direction: column;+ align-items: center;+ gap: 16px;+}++/* 317x214 notched slab, fading out downwards (absolute inset-0 top-[5.25rem], mask black -> transparent) */+.clerk-card--passwords .pw-slab {+ position: absolute;+ inset: 0;+ top: 5.25rem;+ display: flex;+ justify-content: center;+ overflow: hidden;+ -webkit-mask: linear-gradient(#000, #0000);+ mask: linear-gradient(#000, #0000);+}++/* dial: z-10 mt-[2.875rem] size-[4.5rem] rounded-full bg-gray-950 p-1, every div inside it rounded-full */+.clerk-card--passwords .pw-dial {+ z-index: 10;+ margin-top: 2.875rem;+ width: 4.5rem;+ height: 4.5rem;+ border-radius: 2147483647px;+ background-color: var(--color-gray-950);+ padding: 4px;+ box-shadow: 0 1px 0 color-mix(in oklab, #fff 5%, transparent);+}+.clerk-card--passwords .pw-dial div { border-radius: 2147483647px; }++.clerk-card--passwords .pw-dial__face {+ position: relative;+ width: 100%;+ height: 100%;+ overflow: hidden;+ background-image: linear-gradient(to bottom, var(--color-gray-800) 0%, var(--color-gray-850) 100%);+ background-image: linear-gradient(to bottom in oklab, var(--color-gray-800) 0%, var(--color-gray-850) 100%);+ box-shadow: inset 0 1px 0 color-mix(in oklab, #fff 8%, transparent);+}+.clerk-card--passwords .pw-dial__hub {+ position: absolute;+ inset: 16px;+ background-image: linear-gradient(to bottom, var(--color-gray-850) 0%, #2f303780 100%);+ background-image: linear-gradient(to bottom in oklab, var(--color-gray-850) 0%, color-mix(in oklab, var(--color-gray-800) 50%, transparent) 100%);+ box-shadow:+ 0 1px 0 color-mix(in oklab, #fff 2%, transparent),+ 0 -1px 0 color-mix(in oklab, #fff 6%, transparent),+ 0 -2px 4px color-mix(in oklab, #fff 2%, transparent),+ inset 0 1px 1px color-mix(in oklab, #000 20%, transparent);+}+.clerk-card--passwords .pw-dial__texture {+ position: relative;+ z-index: 10;+ width: 100%;+ height: 100%;+ background-image: repeating-radial-gradient(color-mix(in oklab, #000 20%, transparent) .125rem, transparent .25rem);+}+.clerk-card--passwords .pw-dial__center {+ display: flex;+ width: 100%;+ height: 100%;+ align-items: center;+ justify-content: center;+ filter: drop-shadow(0 1px 0 color-mix(in oklab, #fff 10%, transparent));+}+.clerk-card--passwords .pw-keyhole { fill: var(--color-gray-950); }++/* rim lights: thin inset highlights that rotate into place when the dial unlocks */+.clerk-card--passwords .pw-rim { position: absolute; inset: 0; }+.clerk-card--passwords .pw-rim--a { box-shadow: inset 2.5px -2.5px 0 -2px color-mix(in oklab, #fff 8%, transparent); }+.clerk-card--passwords .pw-rim--b { box-shadow: inset -2.5px 2.5px 0 -2px color-mix(in oklab, #fff 8%, transparent); }++/* glint: a 40px pill of white at 10 %, parked off the top-left, sweeps to the centre */+.clerk-card--passwords .pw-glint {+ position: absolute;+ top: 0;+ left: 50%;+ width: 40px;+ height: 100%;+ background-image: linear-gradient(90deg, transparent, color-mix(in oklab, #fff 50%, transparent) 30%, white, color-mix(in oklab, #fff 50%, transparent) 70%, transparent);+ opacity: .1;+}++/* password field: relative h-7 w-56 rounded-md bg-gray-900 bg-linear-to-b from-gray-800 to-gray-850 shadow-md ring-1 */+.clerk-card--passwords .pw-field {+ position: relative;+ width: 224px;+ height: 28px;+ border-radius: .375rem;+ background-color: var(--color-gray-900);+ background-image: linear-gradient(to bottom, var(--color-gray-800) 0%, var(--color-gray-850) 100%);+ background-image: linear-gradient(to bottom in oklab, var(--color-gray-800) 0%, var(--color-gray-850) 100%);+ box-shadow:+ 0 0 #0000, 0 0 #0000, 0 0 #0000,+ 0 0 0 1px color-mix(in oklab, #000 20%, transparent),+ 0 4px 6px -1px color-mix(in oklab, #000 10%, transparent),+ 0 2px 4px -2px color-mix(in oklab, #000 10%, transparent);+}+/* focus state: cyan border, tint and glow */+.clerk-card--passwords .pw-focus {+ position: absolute;+ inset: 0;+ display: flex;+ align-items: center;+ gap: 6px;+ border-radius: inherit;+ border: 1px solid #3ad4fd;+ background-color: color-mix(in oklab, #3ad4fd 5%, transparent);+ padding: 0 12px;+ box-shadow: 0 0 6px 3px color-mix(in oklab, #3ad4fd 10%, transparent);+}+/* typed characters: size-1 rounded-full bg-sky-500 shadow-sm shadow-black/40 */+.clerk-card--passwords .pw-dot {+ flex: none;+ width: 4px;+ height: 4px;+ border-radius: 2147483647px;+ background-color: #00aee3;+ box-shadow:+ 0 1px 3px 0 color-mix(in oklab, #000 40%, transparent),+ 0 1px 2px -1px color-mix(in oklab, #000 40%, transparent);+}diff --git a/site/public/examples/clerk-bento/src/widgets/passwords.html b/site/public/examples/clerk-bento/src/widgets/passwords.htmlnew file mode 100644index 0000000..ef2af7f--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/passwords.html@@ -0,0 +1,21 @@+<div class="pw-scene" style="transform: translateY(0rem)">+ <div class="pw-slab">+ <svg width="317" height="214" viewBox="0 0 317 214" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M21.6502 2.38322L2.30334 22.0051C0.827423 23.502 0 25.5197 0 27.6219L0 214L317 214L317 27.6219C317 25.5197 316.173 23.502 314.697 22.0051L295.35 2.38322C293.846 0.858434 291.794 0 289.653 0L27.3468 0C25.2055 0 23.1536 0.858435 21.6502 2.38322Z" fill="#2B2B30" stroke="white" stroke-opacity="0.04"></path></svg>+ </div>+ <div class="pw-dial">+ <div class="pw-dial__face">+ <div class="pw-dial__hub"></div>+ <div class="pw-dial__texture">+ <div class="pw-dial__center">+ <div class="pw-needle" style="transform: rotate(0deg)"><svg width="8" height="36" viewBox="0 0 8 36" fill="none" xmlns="http://www.w3.org/2000/svg"><path class="pw-keyhole" fill-rule="evenodd" clip-rule="evenodd" d="M3 0C1.34315 0 0 1.34315 0 3V19.5858C0 19.851 0.105357 20.1054 0.292893 20.2929L3.29289 23.2929C3.68342 23.6834 3.68342 24.3166 3.29289 24.7071L0.292893 27.7071C0.105357 27.8946 0 28.149 0 28.4142V33C0 34.6569 1.34315 36 3 36H5C6.65685 36 8 34.6569 8 33V16.4142C8 16.149 7.89464 15.8946 7.70711 15.7071L4.70711 12.7071C4.31658 12.3166 4.31658 11.6834 4.70711 11.2929L7.70711 8.29289C7.89464 8.10536 8 7.851 8 7.58579V3C8 1.34315 6.65685 0 5 0H3Z"></path></svg></div>+ </div>+ </div>+ <div class="pw-rim pw-rim--a" style="transform: rotate(90deg); opacity: 0"></div>+ <div class="pw-rim pw-rim--b" style="transform: rotate(-90deg); opacity: 0"></div>+ <div class="pw-glint" style="transform: translateX(-125%) translateY(-75%) rotate(45deg) scaleY(1.2)"></div>+ </div>+ </div>+ <div class="pw-field" style="transform: translateY(0rem); opacity: 0.5">+ <div class="pw-focus" style="opacity: 0"></div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/passwords.js b/site/public/examples/clerk-bento/src/widgets/passwords.jsnew file mode 100644index 0000000..539839d--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/passwords.js@@ -0,0 +1,132 @@+// "Passwords" card: hover the card and the scene lifts, the field focuses and ten dots type in; after 2 s the+// keyhole dial turns 90° to unlock. It holds while hovered and reverses on hover-out.+//+// clerk.com builds it with Motion for React (module 312823): declarative `animate` per hover state, run as+// WAAPI animations with `fill: "both"` and the JS easings sampled into CSS linear() (Motion's+// generateLinearEasing, one point per 10 ms). An interrupted animation restarts from the value sampled with the+// JS easing at its current time, as Motion does. This file reproduces that with plain WAAPI.++// clerk.com's easings (module 275921): u = easeOutExpo, H = a steep easeInOutExpo (H(0) = 0.00195, not 0)+const easeOutExpo = (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t));+const easeInOutExpo = (t) => (t < 0.5 ? 0.5 * Math.pow(2, 16 * t - 8) : -0.5 * Math.pow(2, -16 * t + 8) + 1);++const linearCache = new Map();+function linearEasing(ease, duration) {+ const key = `${ease.name}|${duration}`;+ let css = linearCache.get(key);+ if (!css) {+ const n = Math.max(Math.round(duration / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(Math.round(ease(i / (n - 1)) * 10000) / 10000);+ css = `linear(${pts.join(", ")})`;+ linearCache.set(key, css);+ }+ return css;+}++const reducedMotion = window.matchMedia?.("(prefers-reduced-motion: reduce)");++// One animated style property: a vector of numbers plus a formatter, like a Motion value holding a string.+class Value {+ constructor(el, prop, format, initial) {+ this.el = el;+ this.prop = prop;+ this.format = format;+ this.v = initial;+ this.run = null;+ }+ // value now: during the delay the start value, then the JS easing at the WAAPI time (Motion's sampling on stop)+ current() {+ const r = this.run;+ if (!r) return this.v;+ const t = (Number(r.anim.currentTime) || 0) - r.delay;+ if (t <= 0) return r.from;+ const p = r.ease(Math.min(t / r.duration, 1));+ return r.from.map((f, i) => f + (r.to[i] - f) * p);+ }+ set(v) {+ this.v = v;+ this.el.style[this.prop] = this.format(v);+ }+ to(target, { duration, delay = 0, ease }) {+ const from = this.current();+ if (this.run) { this.run.anim.cancel(); this.run = null; }+ this.set(from);+ if (from.every((f, i) => f === target[i])) return; // nothing to animate (Motion makes it instant)+ if (reducedMotion?.matches) { this.set(target); return; }+ const anim = this.el.animate(+ { [this.prop]: [this.format(from), this.format(target)] },+ { duration, delay, easing: linearEasing(ease, duration), fill: "both" },+ );+ const run = { anim, from, to: target, delay, duration, ease };+ this.run = run;+ anim.onfinish = () => {+ if (this.run !== run) return;+ this.run = null;+ this.set(target); // Motion commits the final keyframe to the style and cancels the animation+ anim.cancel();+ };+ }+}++const translateY = ([y]) => `translateY(${y}rem)`;+const rotate = ([a]) => `rotate(${a}deg)`;+const opacity = ([o]) => String(o);+const glint = ([x, y]) => `translateX(${x}%) translateY(${y}%) rotate(45deg) scaleY(1.2)`;++export function mount(slot, card) {+ const q = (s) => slot.querySelector(s);+ if (!q(".pw-scene")) return;++ const v = {+ scene: new Value(q(".pw-scene"), "transform", translateY, [0]),+ fieldY: new Value(q(".pw-field"), "transform", translateY, [0]),+ fieldO: new Value(q(".pw-field"), "opacity", opacity, [0.5]),+ focus: new Value(q(".pw-focus"), "opacity", opacity, [0]),+ needle: new Value(q(".pw-needle"), "transform", rotate, [0]),+ rimAR: new Value(q(".pw-rim--a"), "transform", rotate, [90]),+ rimAO: new Value(q(".pw-rim--a"), "opacity", opacity, [0]),+ rimBR: new Value(q(".pw-rim--b"), "transform", rotate, [-90]),+ rimBO: new Value(q(".pw-rim--b"), "opacity", opacity, [0]),+ glint: new Value(q(".pw-glint"), "transform", glint, [-125, -75]),+ };+ const focus = q(".pw-focus");+ let dots = [];+ let hovered = false;++ function setHovered(on) {+ if (on === hovered) return;+ hovered = on;+ // layout: scene up 2rem, field down 1rem + opaque, focus ring in; 1 s easeOutExpo both ways+ const layout = { duration: 1000, ease: easeOutExpo };+ v.scene.to([on ? -2 : 0], layout);+ v.fieldY.to([on ? 1 : 0], layout);+ v.fieldO.to([on ? 1 : 0.5], layout);+ v.focus.to([on ? 1 : 0], layout);+ // dial: unlock after 2 s with easeInOutExpo; back in 0.5 s easeOutExpo+ const dial = on ? { duration: 1000, delay: 2000, ease: easeInOutExpo } : { duration: 500, ease: easeOutExpo };+ v.needle.to([on ? 90 : 0], dial);+ v.rimAR.to([on ? 0 : 90], dial);+ v.rimAO.to([on ? 1 : 0], dial);+ v.rimBR.to([on ? 0 : -90], dial);+ v.rimBO.to([on ? 1 : 0], dial);+ v.glint.to(on ? [-50, 0] : [-125, -75], dial);+ // typed dots: mounted on hover, each un-blurs in 1 s from 0.75 s, 0.1 s apart; removed at once on hover-out+ for (const d of dots) d.remove();+ dots = [];+ if (!on) return;+ for (let i = 0; i < 10; i++) {+ const d = document.createElement("div");+ d.className = "pw-dot";+ focus.appendChild(d);+ dots.push(d);+ const timing = { duration: 1000, delay: 750 + 100 * i, ease: easeOutExpo };+ new Value(d, "opacity", opacity, [0]).to([1], timing);+ new Value(d, "filter", ([b]) => `blur(${b}px)`, [8]).to([0], timing);+ }+ }++ // react-aria useHover on the card root: pointer enter/leave, touch ignored+ card.addEventListener("pointerenter", (e) => { if (e.pointerType !== "touch") setHovered(true); });+ card.addEventListener("pointerleave", (e) => { if (e.pointerType !== "touch") setHovered(false); });+}diff --git a/site/public/examples/clerk-bento/src/widgets/session-management.css b/site/public/examples/clerk-bento/src/widgets/session-management.cssnew file mode 100644index 0000000..88706a5--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/session-management.css@@ -0,0 +1,226 @@+/* Session Management card visual: clerk.com's markup (module 956494) with its Tailwind classes resolved to plain CSS.+ Sizes in the comments are clerk.com's at 1440x900: visual 394.672 x 412, session panel 256 x 252 centred+ (top 104), side panels 208 x 248, circuit track 600 x 87 (only x 102..498 is inside the card).+ Motion: src/widgets/session-management.js (Motion-for-React parts) + the :hover transitions below+ (clerk.com's Tailwind group-hover parts, which are plain CSS :hover on the card there too). */++.clerk-card--session-management .sm-root {+ position: relative;+ display: flex;+ height: 100%;+ flex-direction: column;+ align-items: center;+ justify-content: center;+}+.clerk-card--session-management .sm-wrap { position: relative; }++/* the "session" panel: frosted glass over the track */+.clerk-card--session-management .sm-card {+ position: relative;+ z-index: 10;+ margin: 3rem auto 0;+ width: 16rem;+ border-radius: 0.5rem;+ background-color: #7476860d;+ background-image: linear-gradient(to bottom right, #ffffff0d 0%, #0000 65%);+ padding: 3.5rem 1.5rem 1.5rem;+ font-size: 0.625rem;+ line-height: 1.125rem;+ box-shadow: 0 1px 1px #ffffff0d inset, 0 2px 13px #0003, 0 1px 2px #0003;+ -webkit-backdrop-filter: blur(8px);+ backdrop-filter: blur(8px);+}++/* ---------- laptop ---------- */+.clerk-card--session-management .sm-laptop-row {+ position: relative;+ isolation: isolate;+ z-index: 20;+ margin-inline: auto;+ display: flex;+ justify-content: center;+}+.clerk-card--session-management .sm-laptop {+ position: relative;+ isolation: isolate;+ perspective: 1000px;+}+/* lid: transform and background are animated from JS (rest state inline in the HTML) */+.clerk-card--session-management .sm-lid {+ --sm-screen-off-color: var(--color-gray-900);+ --sm-screen-on-color: var(--color-gray-600);+ position: absolute;+ bottom: calc(100% - 0.0625rem);+ left: 50%;+ display: flex;+ height: 4.25rem;+ width: 6.5rem;+ transform-origin: bottom;+ align-items: center;+ justify-content: center;+ border-top-left-radius: 0.25rem;+ border-top-right-radius: 0.25rem;+ border: 1px solid var(--color-gray-600);+ box-shadow: inset 0 0 0 2px #000000bf;+ transform-style: preserve-3d;+ perspective: 60px;+}+/* screen dimmer (group-hover: fades out in 500 ms, back in 1000 ms) */+.clerk-card--session-management .sm-lid::before {+ content: "";+ position: absolute;+ inset: -0.0625rem;+ z-index: 10;+ border-radius: inherit;+ background-image: linear-gradient(to bottom, #0006 0.0625rem, #000c 100%);+ transition-property: opacity;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 1s;+}+/* lid top edge (its thickness, seen when the lid is folded) */+.clerk-card--session-management .sm-lid::after {+ content: "";+ position: absolute;+ inset-inline: -1px;+ top: 0;+ z-index: -10;+ height: 0.125rem;+ transform: rotateX(90deg) translateY(-1px);+ border-top-left-radius: 2147483647px;+ border-top-right-radius: 2147483647px;+ background-color: var(--color-gray-500);+}+.clerk-card--session-management .sm-glare {+ position: absolute;+ inset-inline: 0;+ top: 0.125rem;+ height: 1.25rem;+ transform-origin: top;+ background-image: linear-gradient(to bottom, #ffffff26 0%, transparent 100%);+ filter: blur(8px);+}+/* diagonal glass reflection (group-hover: in 1000 ms, out 500 ms) */+.clerk-card--session-management .sm-sheen {+ position: absolute;+ inset: 0;+ z-index: 30;+ overflow: hidden;+ border-radius: inherit;+ opacity: 0;+ transition-property: opacity;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 0.5s;+}+.clerk-card--session-management .sm-sheen__shine {+ position: absolute;+ width: 125%;+ height: 125%;+ translate: -2.5rem -50%;+ rotate: -45deg;+ background-image: linear-gradient(to left, #ffffff14 0%, #0000 100%);+}+.clerk-card--session-management .sm-icon {+ border-radius: 2147483647px;+ background-color: var(--color-gray-950);+ padding: 0.5rem;+ box-shadow: 0 1px #ffffff0d;+}+.clerk-card--session-management .sm-icon__logo {+ position: relative;+ z-index: 20;+ filter: brightness(150%) drop-shadow(0 0 8px #5de3ff80);+}+.clerk-card--session-management .sm-base {+ position: relative;+ height: 0.375rem;+ width: 7.25rem;+ border-radius: 0.25rem 0.25rem 0.375rem 0.375rem;+ background-image: linear-gradient(to bottom, var(--color-gray-600) 65%, var(--color-gray-700) 100%);+ box-shadow: inset 0 1px 0px #ffffff1a;+}+/* the notch */+.clerk-card--session-management .sm-base::before {+ content: "";+ position: absolute;+ top: 0;+ left: 50%;+ height: 0.125rem;+ width: 1.25rem;+ translate: -50% 0;+ border-bottom-right-radius: 2147483647px;+ border-bottom-left-radius: 2147483647px;+ background-color: var(--color-gray-700);+ box-shadow: inset 2px 0 1px -2px #00000080, inset -2px 0 1px -2px #00000080, 0 1px 0 #ffffff1a;+}++/* ---------- rows and button ---------- */+.clerk-card--session-management .sm-row {+ display: flex;+ padding-block: 0.375rem;+ border-top: 1px solid #ffffff0d;+}+.clerk-card--session-management .sm-row--first {+ margin-top: 1.5rem;+ border-top: 0;+}+.clerk-card--session-management .sm-label {+ width: 3.5rem;+ flex: none;+ color: var(--color-gray-400);+}+.clerk-card--session-management .sm-value {+ font-weight: 500;+ color: #fff;+}+/* group-hover: white text, gray-700 ring, 1000 ms both ways */+.clerk-card--session-management .sm-button {+ margin-top: 1.5rem;+ border-radius: 0.375rem;+ padding: 0.25rem;+ text-align: center;+ font-weight: 500;+ color: var(--color-gray-600);+ box-shadow: inset 0 0 0 1px var(--color-gray-850);+ transition-property: color, box-shadow;+ transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);+ transition-duration: 1s;+}++/* ---------- side panels, circuit track, vignette ---------- */+.clerk-card--session-management .sm-panel {+ position: absolute;+ top: 7.625rem;+ width: 13rem;+}+.clerk-card--session-management .sm-panel--right { left: 100%; margin-left: 0.375rem; }+.clerk-card--session-management .sm-panel--left { right: 100%; margin-right: 0.375rem; scale: -1 1; }+.clerk-card--session-management .sm-track {+ position: absolute;+ top: 1.875rem;+ left: 50%;+ margin-left: -18.75rem;+ aspect-ratio: 600 / 87;+ width: 37.5rem;+}+.clerk-card--session-management .sm-track__line {+ position: absolute;+ inset: 0;+ width: 100%;+ height: 100%;+ stroke: #ffffff0d;+}+.clerk-card--session-management .sm-vignette {+ position: absolute;+ inset: 0;+ background-image: radial-gradient(97.14% 100% at top, #21212600 42.04%, #212126 89.82%);+}++/* ---------- hover (clerk.com: Tailwind group-hover, inside @media (hover: hover)) ---------- */+@media (hover: hover) {+ .clerk-card--session-management:hover .sm-lid::before { opacity: 0; transition-duration: 0.5s; }+ .clerk-card--session-management:hover .sm-sheen { opacity: 1; transition-duration: 1s; }+ .clerk-card--session-management:hover .sm-button {+ color: #fff;+ box-shadow: inset 0 0 0 1px var(--color-gray-700);+ }+}diff --git a/site/public/examples/clerk-bento/src/widgets/session-management.html b/site/public/examples/clerk-bento/src/widgets/session-management.htmlnew file mode 100644index 0000000..19699c5--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/session-management.html@@ -0,0 +1,28 @@+<div class="sm-root">+ <div class="sm-wrap">+ <div class="sm-card">+ <div class="sm-laptop-row">+ <div class="sm-laptop">+ <div class="sm-lid" style="transform: rotateX(-75deg) translateX(-50%); background: var(--sm-screen-on-color);">+ <div class="sm-glare" style="transform: rotateX(90deg);"></div>+ <div class="sm-sheen"><div class="sm-sheen__shine"></div></div>+ <div class="sm-icon" style="opacity: 0;">+ <svg class="sm-icon__logo" width="14" height="14" viewBox="0 0 14 14" fill="none" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M10.9419 1.82065C11.128 1.63454 11.1093 1.32641 10.8906 1.17994C9.77796 0.434669 8.43972 0 6.99997 0C3.13399 0 0 3.13401 0 7C0 8.43976 0.434666 9.778 1.17993 10.8906C1.32641 11.1093 1.63453 11.128 1.82064 10.9419L3.41924 9.3433C3.56372 9.19882 3.58655 8.97468 3.49338 8.79283C3.21791 8.2551 3.06248 7.6457 3.06248 7C3.06248 4.82538 4.82535 3.0625 6.99997 3.0625C7.64566 3.0625 8.25506 3.21792 8.79278 3.4934C8.97463 3.58656 9.19877 3.56374 9.34325 3.41926L10.9419 1.82065ZM9.18748 7C9.18748 8.20812 8.20811 9.1875 6.99999 9.1875C5.79187 9.1875 4.8125 8.20812 4.8125 7C4.8125 5.79188 5.79187 4.8125 6.99999 4.8125C8.20811 4.8125 9.18748 5.79188 9.18748 7ZM10.9432 12.1792C11.1293 12.3653 11.1106 12.6734 10.8919 12.8199C9.77931 13.5652 8.44107 13.9998 7.00131 13.9998C5.56155 13.9998 4.22331 13.5652 3.11067 12.8199C2.89199 12.6734 2.8733 12.3653 3.05942 12.1792L4.65801 10.5806C4.80249 10.4361 5.02663 10.4133 5.20848 10.5064C5.74621 10.7819 6.35561 10.9373 7.00131 10.9373C7.64701 10.9373 8.25641 10.7819 8.79413 10.5064C8.97599 10.4133 9.20012 10.4361 9.34461 10.5806L10.9432 12.1792Z" fill="#5DE3FF"></path></svg>+ </div>+ </div>+ <div class="sm-base"></div>+ </div>+ </div>+ <div class="sm-row sm-row--first"><div class="sm-label" style="transform: translateX(5.45rem);">Device</div><div class="sm-value" style="filter: blur(8px); opacity: 0;">MacBook Pro</div></div>+ <div class="sm-row"><div class="sm-label" style="transform: translateX(5.25rem);">Browser</div><div class="sm-value" style="filter: blur(8px); opacity: 0;">Chrome</div></div>+ <div class="sm-row"><div class="sm-label" style="transform: translateX(5.15rem);">Location</div><div class="sm-value" style="filter: blur(8px); opacity: 0;">San Francisco, CA</div></div>+ <div class="sm-button">Sign out of device</div>+ </div>+ <svg class="sm-panel sm-panel--right" viewBox="0 0 208 248" fill="none" aria-hidden="true"><g filter="url(#sm-panel-filter)" shape-rendering="crispEdges"><path fill="#fff" fill-opacity=".04" d="M4.229 24.678 23.639 4.46A8 8 0 0 1 29.409 2H198a8 8 0 0 1 8 8v228a8 8 0 0 1-8 8H10a8 8 0 0 1-8-8V30.219a8 8 0 0 1 2.229-5.54Z"></path><path stroke="#fff" stroke-opacity=".05" d="M24 4.806 4.59 25.024a7.5 7.5 0 0 0-2.09 5.194V238a7.5 7.5 0 0 0 7.5 7.5h188a7.5 7.5 0 0 0 7.5-7.5V10a7.5 7.5 0 0 0-7.5-7.5H29.41A7.5 7.5 0 0 0 24 4.806Z"></path></g><defs><filter id="sm-panel-filter" width="220" height="260" x="-6" y="-6" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feGaussianBlur in="BackgroundImageFix" stdDeviation="4"></feGaussianBlur><feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur"></feComposite><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend in2="effect1_backgroundBlur" result="effect2_dropShadow"></feBlend><feBlend in="SourceGraphic" in2="effect2_dropShadow" result="shape"></feBlend></filter></defs></svg>+ <svg class="sm-panel sm-panel--left" viewBox="0 0 208 248" fill="none" aria-hidden="true"><g filter="url(#sm-panel-filter)" shape-rendering="crispEdges"><path fill="#fff" fill-opacity=".04" d="M4.229 24.678 23.639 4.46A8 8 0 0 1 29.409 2H198a8 8 0 0 1 8 8v228a8 8 0 0 1-8 8H10a8 8 0 0 1-8-8V30.219a8 8 0 0 1 2.229-5.54Z"></path><path stroke="#fff" stroke-opacity=".05" d="M24 4.806 4.59 25.024a7.5 7.5 0 0 0-2.09 5.194V238a7.5 7.5 0 0 0 7.5 7.5h188a7.5 7.5 0 0 0 7.5-7.5V10a7.5 7.5 0 0 0-7.5-7.5H29.41A7.5 7.5 0 0 0 24 4.806Z"></path></g></svg>+ <div class="sm-track">+ <svg class="sm-track__line" viewBox="0 0 600 87" fill="none" aria-hidden="true"><path d="M0 86h136.686a8 8 0 0 0 5.657-2.343l80.314-80.314A8 8 0 0 1 228.314 1h143.372a8 8 0 0 1 5.657 2.343l80.314 80.314A8 8 0 0 0 463.314 86H600"></path></svg>+ </div>+ </div>+ <div class="sm-vignette"></div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/session-management.js b/site/public/examples/clerk-bento/src/widgets/session-management.jsnew file mode 100644index 0000000..ef0ac72--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/session-management.js@@ -0,0 +1,251 @@+// Session Management card (clerk.com module 956494), without Motion for React.+//+// On hover of the card: the laptop lid swings open (rotateX -75° → 20°, 1 s, clerk.com's soft easeInOutExpo "H"),+// the screen darkens and the Clerk logo fades in, the Device/Browser/Location labels slide left (0.6 s, staggered+// 0/50/100 ms) while the values un-blur, and a purple→cyan meteor runs along the circuit track every 2 s+// (src/shared/meteor.js). On hover-out every value returns with clerk.com's "rest" transitions and the meteor fades+// out (0.3 s) and is removed. The screen dimmer, glass sheen and button are CSS :hover transitions+// (session-management.css), as clerk.com's Tailwind group-hover classes.+//+// How clerk.com runs each value, reproduced here so that frames match:+// - transform / opacity / filter: Motion hands them to WAAPI, with function easings sampled into CSS linear()+// (one point per 10 ms); on finish the end value is written to the style.+// - background (a colour, resolved from a CSS variable) and the glare's rotateX: Motion's JS loop, one value per+// animation frame, colours mixed as sqrt(a²(1−p)+b²p) per channel.+// - A transition without `ease` uses Motion's default "easeOut" = cubic-bezier(0,0,.58,1); one with only a delay+// uses Motion's default tween (0.3 s, cubic-bezier(.25,.1,.35,1)).+// - Timing, measured on clerk.com (virtual-clock captures, see .motion-clone/clerk-bento/session-management/):+// on hover-in the WAAPI animations are back-dated to the pointer event (Motion sets animation.startTime), the+// JS-driven values start on the next frame, and the meteor mounts on the next frame (React runs its effect+// after paint) so its clock starts one frame later still; on hover-out everything starts on the next frame.+// Interrupted animations continue from their current value, as Motion does.++import { createMeteor } from "../shared/meteor.js";++// ---------- easings (clerk.com module 275921, Motion defaults) ----------+const easeH = (t) => (t < 0.5 ? 0.5 * Math.pow(2, 16 * t - 8) : -0.5 * Math.pow(2, -16 * t + 8) + 1);+const easeU = (t) => (t === 1 ? 1 : 1 - Math.pow(2, -10 * t));+function cubicBezier(x1, y1, x2, y2) {+ const bez = (t, a, b) => (((1 - 3 * b + 3 * a) * t + (3 * b - 6 * a)) * t + 3 * a) * t;+ return (x) => {+ if (x <= 0 || x >= 1) return x <= 0 ? 0 : 1;+ let lo = 0, hi = 1, t = x;+ for (let i = 0; i < 24; i++) {+ t = (lo + hi) / 2;+ if (bez(t, x1, x2) < x) lo = t;+ else hi = t;+ }+ return bez(t, y1, y2);+ };+}+const EASE_OUT = { fn: cubicBezier(0, 0, 0.58, 1), css: "ease-out" }; // Motion's WAAPI default+const EASE_DEFAULT = { fn: cubicBezier(0.25, 0.1, 0.35, 1), css: "cubic-bezier(0.25, 0.1, 0.35, 1)" }; // Motion's default tween+// Motion's generateLinearEasing: max(round(duration / 10), 2) points, 4 decimals+function linearEasing(fn, duration) {+ const n = Math.max(Math.round(duration / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(Math.round(1e4 * fn(i / (n - 1))) / 1e4);+ return `linear(${pts.join(", ")})`;+}+const waapiEase = (ease, duration) =>+ typeof ease === "function" ? { fn: ease, css: linearEasing(ease, duration) } : ease;++// ---------- a numeric value rendered into one CSS property through WAAPI (Motion's accelerated path) ----------+class WaapiValue {+ constructor(el, prop, value, render) {+ Object.assign(this, { el, prop, value, render, anim: null, opts: null, from: value, to: value });+ }+ current() {+ const { anim, opts } = this;+ if (!anim) return this.value;+ const local = anim.currentTime ?? 0;+ const p = Math.min(1, Math.max(0, (local - opts.delay) / opts.duration));+ return this.from + (this.to - this.from) * opts.ease.fn(p);+ }+ animate(to, { duration, delay = 0, ease = EASE_OUT, startTime }) {+ const from = this.current();+ this.anim?.cancel();+ const e = waapiEase(ease, duration);+ const anim = this.el.animate(+ { [this.prop]: [this.render(from), this.render(to)] },+ { duration, delay, easing: e.css, fill: "both" },+ );+ if (startTime != null) anim.startTime = startTime; // Motion back-dates to the state change+ Object.assign(this, { anim, from, to, value: from, opts: { duration, delay, ease: e } });+ anim.onfinish = () => {+ if (this.anim !== anim) return;+ this.el.style[this.prop] = this.render(to);+ this.value = to;+ this.anim = null;+ anim.cancel();+ };+ }+}++// ---------- a value driven per animation frame (Motion's JS path) ----------+const jsValues = new Set();+let ticking = false;+function tick() {+ const now = performance.now();+ for (const v of jsValues) v.step(now);+ ticking = jsValues.size > 0;+ if (ticking) requestAnimationFrame(tick);+}+class JsValue {+ constructor(value, mix, apply) {+ Object.assign(this, { value, mix, apply, tween: null });+ }+ animate(to, { duration, delay = 0, ease = EASE_OUT.fn }) {+ this.tween = { from: this.value, to, duration, delay, ease, start: performance.now() };+ jsValues.add(this);+ if (!ticking) {+ ticking = true;+ requestAnimationFrame(tick);+ }+ }+ step(now) {+ const tw = this.tween;+ if (!tw) return jsValues.delete(this);+ const p = Math.min(1, Math.max(0, (now - tw.start - tw.delay) / tw.duration));+ this.value = this.mix(tw.from, tw.to, tw.ease(p));+ this.apply(this.value);+ if (p >= 1) {+ this.tween = null;+ jsValues.delete(this);+ }+ }+}++// Motion's mixColor for two opaque hex colours ("rgba(r, g, b, 1)" output)+const hexRgb = (h) => [1, 3, 5].map((i) => parseInt(h.slice(i, i + 2), 16));+const mixRgb = (a, b, p) => a.map((c, i) => Math.sqrt(Math.max(0, p * (b[i] * b[i] - c * c) + c * c)));+const rgbString = (c) => `rgba(${c.map((v) => Math.round(Math.max(0, Math.min(255, v)))).join(", ")}, 1)`;++const TRACK_PATH =+ "M0 86h136.686a8 8 0 0 0 5.657-2.343l80.314-80.314A8 8 0 0 1 228.314 1h143.372a8 8 0 0 1 5.657 2.343l80.314 80.314A8 8 0 0 0 463.314 86H600";++export function mount(slot, card) {+ const $ = (s) => slot.querySelector(s);+ const lid = $(".sm-lid");+ const glare = $(".sm-glare");+ const icon = $(".sm-icon");+ const track = $(".sm-track");+ const labels = [...slot.querySelectorAll(".sm-label")];+ const valuesEls = [...slot.querySelectorAll(".sm-value")];++ const cs = getComputedStyle(lid);+ const screenOn = hexRgb(cs.getPropertyValue("--sm-screen-on-color").trim() || "#5e5f6e"); // gray-600+ const screenOff = hexRgb(cs.getPropertyValue("--sm-screen-off-color").trim() || "#212126"); // gray-900++ // rest values (clerk.com's SSR inline styles)+ const lidRot = new WaapiValue(lid, "transform", -75, (v) => `rotateX(${v}deg) translateX(-50%)`);+ const lidBg = new JsValue(screenOn, mixRgb, (c) => (lid.style.background = rgbString(c)));+ const glareRot = new JsValue(90, (a, b, p) => a + (b - a) * p, (v) => {+ glare.style.transform = parseFloat(v) === 0 ? "none" : `rotateX(${v}deg)`;+ });+ const glareOpacity = new WaapiValue(glare, "opacity", 1, String);+ const iconOpacity = new WaapiValue(icon, "opacity", 0, String);+ const LABEL_X = [5.45, 5.25, 5.15]; // rem+ const labelX = labels.map((el, i) => new WaapiValue(el, "transform", LABEL_X[i], (v) => `translateX(${v}rem)`));+ const valueBlur = valuesEls.map((el) => new WaapiValue(el, "filter", 8, (v) => `blur(${v}px)`));+ const valueOpacity = valuesEls.map((el) => new WaapiValue(el, "opacity", 0, String));++ // the glare has no `initial` on clerk.com: after hydration it turns 0° → 90° with its rest transition+ glare.style.transform = "none";+ glareRot.value = 0;+ glareRot.animate(90, { duration: 2000, delay: 400, ease: easeU });++ // Motion's WAAPI values (transform, opacity, filter). startTime: Motion back-dates hover-in animations to their+ // creation (animation.startTime = createdAt).+ function animateWaapi(hovered, startTime) {+ if (hovered) {+ lidRot.animate(20, { duration: 1000, ease: easeH, startTime });+ glareOpacity.animate(0, { duration: 1000, startTime }); // {duration:1} → ease-out+ iconOpacity.animate(1, { duration: 2000, delay: 500, ease: easeU, startTime });+ labelX.forEach((v, i) => v.animate(0, { duration: 600, delay: 50 * i, ease: easeH, startTime }));+ valuesEls.forEach((_, i) => {+ const t = { duration: 600, delay: 200 + 50 * i, startTime }; // ease-out+ valueBlur[i].animate(0, t);+ valueOpacity[i].animate(1, t);+ });+ } else {+ lidRot.animate(-75, { duration: 1000, ease: easeH });+ glareOpacity.animate(1, { duration: 2000, delay: 400, ease: easeU });+ iconOpacity.animate(0, { duration: 500, delay: 250, ease: easeU });+ labelX.forEach((v, i) => v.animate(LABEL_X[i], { duration: 600, delay: 50 * i, ease: easeH }));+ valuesEls.forEach((_, i) => {+ const t = { duration: 1000, delay: i === 2 ? 200 : 0, ease: easeU };+ valueBlur[i].animate(8, t);+ valueOpacity[i].animate(0, t);+ });+ }+ }+ // Motion's JS-driven values (frame loop)+ function animateJs(hovered) {+ if (hovered) {+ lidBg.animate(screenOff, { duration: 500 }); // {duration:.5} → Motion's default ease, easeOut+ glareRot.animate(0, { duration: 1000 }); // {duration:1} → easeOut+ } else {+ lidBg.animate(screenOn, { duration: 300, delay: 300, ease: EASE_DEFAULT.fn }); // {delay:.3} → default tween+ glareRot.animate(90, { duration: 2000, delay: 400, ease: easeU });+ }+ }++ // ---------- hover (react-aria useHover on the card root: pointerenter/leave, touch ignored) ----------+ // Timing as measured on clerk.com: on hover-in the WAAPI animations start with the pointer event, the JS values+ // and the meteor on the next frame (React runs the meteor's effect after paint, so its clock starts one frame+ // later still); on hover-out everything starts on the next frame.+ let hovered = false;+ let waapiOn = false;+ let jsOn = false;+ let pending = false;+ let meteor = null;+ const sync = () => {+ pending = false;+ if (hovered) {+ if (jsOn) return;+ jsOn = true;+ // AnimatePresence: mount the meteor, or revive the one still fading out (its clock continues)+ if (meteor?.el.isConnected) {+ if (meteor.exiting) meteor.revive();+ } else {+ meteor = createMeteor(track, {+ stops: "dark",+ meteors: [{ width: 600, height: 87, path: TRACK_PATH, repeat: 2000 }],+ });+ }+ animateJs(true);+ } else {+ if (waapiOn) {+ waapiOn = false;+ animateWaapi(false);+ }+ if (jsOn) {+ jsOn = false;+ animateJs(false);+ meteor?.exit();+ }+ }+ };+ const schedule = () => {+ if (!pending) {+ pending = true;+ requestAnimationFrame(sync);+ }+ };++ card.addEventListener("pointerenter", (e) => {+ if (e.pointerType === "touch" || hovered) return;+ hovered = true;+ if (!waapiOn) {+ waapiOn = true;+ animateWaapi(true, performance.now());+ }+ schedule();+ });+ card.addEventListener("pointerleave", (e) => {+ if (e.pointerType === "touch" || !hovered) return;+ hovered = false;+ schedule();+ });+}diff --git a/site/public/examples/clerk-bento/src/widgets/social-sign-on.css b/site/public/examples/clerk-bento/src/widgets/social-sign-on.cssnew file mode 100644index 0000000..694a052--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/social-sign-on.css@@ -0,0 +1,140 @@+/* Social Sign-On card visual: clerk.com's markup (module 593274) with its Tailwind classes resolved to plain CSS,+ colours written the way clerk.com's stylesheet computes them (color-mix / lab, gradients "in oklab").+ Sizes at 1440x900: visual 394.672 x 164; centre column 98 x 192 (bottom 28 px clipped); cloud box 64 x 64 at+ (165.3, 60); two 248 x 248 logo tracks, the right one mirrored, 76 px either side of the centre.+ Motion: social-sign-on.js (no CSS transitions on this card). */++/* background layer: circuit lines, light streaks and both logo tracks, faded out towards the bottom */+.clerk-card--social-sign-on .sso-bg {+ position: absolute;+ inset: 0;+ overflow: hidden;+ -webkit-mask-image: linear-gradient(#fff 60%, #0000);+ mask-image: linear-gradient(#fff 60%, #0000);+}+.clerk-card--social-sign-on .sso-column {+ position: relative;+ margin-inline: auto;+ aspect-ratio: 98 / 192;+ width: 6.125rem;+}+.clerk-card--social-sign-on .sso-lines {+ position: absolute;+ inset: 0;+ height: 100%;+ width: 100%;+}++/* logo tracks */+.clerk-card--social-sign-on .sso-track {+ position: absolute;+ top: 1.5rem;+}+.clerk-card--social-sign-on .sso-track--left {+ right: 50%;+ margin-right: 4.75rem;+}+.clerk-card--social-sign-on .sso-track--right {+ left: 50%;+ margin-left: 4.75rem;+ scale: -1 1;+}+.clerk-card--social-sign-on .sso-track__inner {+ position: relative;+ height: 15.5rem;+ width: 15.5rem;+}+.clerk-card--social-sign-on .sso-panel {+ position: absolute;+ top: 1.125rem;+ right: 1.125rem;+ height: 13.5rem;+ width: 6.8125rem;+ overflow: visible;+}+.clerk-card--social-sign-on .sso-logo {+ position: absolute;+ top: 0;+ left: 0;+ display: flex;+ height: 2.5rem;+ width: 2.5rem;+ align-items: center;+ justify-content: center;+ border-radius: 2147483647px;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom in oklab, color-mix(in oklab, #fff 5%, transparent) 0%, #0000 67%);+ box-shadow: 0 1px 3px 0 #0000001a, 0 1px 2px -1px #0000001a;+}+.clerk-card--social-sign-on .sso-logo__ring {+ position: absolute;+ inset: 0;+ border-radius: 2147483647px;+}+.clerk-card--social-sign-on .sso-logo__ring--white {+ box-shadow: inset 0 0 0 1px color-mix(in oklab, #fff 5%, transparent);+ -webkit-mask-image: linear-gradient(90deg, #fff, #0000);+ mask-image: linear-gradient(90deg, #fff, #0000);+}+.clerk-card--social-sign-on .sso-logo__ring--cyan {+ box-shadow: inset 0 0 0 1px lab(84.5189% -31.4667 -23.9754 / 0.08);+ -webkit-mask-image: linear-gradient(270deg, #fff, #0000);+ mask-image: linear-gradient(270deg, #fff, #0000);+}+.clerk-card--social-sign-on .sso-logo svg {+ height: 1.25rem;+ width: 1.25rem;+ fill: #fff;+}+/* the right track is mirrored; its glyphs are mirrored back */+.clerk-card--social-sign-on .sso-track--right .sso-logo svg { scale: -1 1; }++/* the cloud box, above the background layer (not masked) */+.clerk-card--social-sign-on .sso-boxwrap {+ position: absolute;+ top: 0;+ left: 50%;+ margin-left: -3.0625rem;+ aspect-ratio: 98 / 192;+ width: 6.125rem;+ padding-top: 3.75rem;+}+.clerk-card--social-sign-on .sso-box {+ position: relative;+ margin-inline: auto;+ display: flex;+ height: 4rem;+ width: 4rem;+ align-items: center;+ justify-content: center;+ overflow: hidden;+ border-radius: 0.25rem;+ background-color: var(--color-gray-800);+ background-image: linear-gradient(to bottom right in oklab, color-mix(in oklab, #fff 5%, transparent) 0%, #0000 64%);+ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.05) inset, 0 2px 13px rgba(0, 0, 0, 0.2), 0 1px 2px rgba(0, 0, 0, 0.2),+ 0 0 0 3px rgba(19, 19, 22, 0.5);+}+.clerk-card--social-sign-on .sso-glow {+ position: absolute;+ inset: 0;+ background-image: radial-gradient(111.72% 100% at 50% 0%, rgb(118 237 255 / 0.2), rgb(118 237 255 / 0) 53.91%);+}+.clerk-card--social-sign-on .sso-cloud { position: relative; }+.clerk-card--social-sign-on .sso-cloud svg {+ width: 2.125rem;+ overflow: visible;+}+.clerk-card--social-sign-on .sso-cloud-active {+ position: absolute;+ inset: 0;+}+/* diagonal sheen, parked at the top-left outside the box at rest */+.clerk-card--social-sign-on .sso-shine {+ position: absolute;+ inset: -1rem;+ background-image: linear-gradient(to bottom right in oklab, color-mix(in oklab, #fff 0%, transparent) 35%,+ color-mix(in oklab, #fff 25%, transparent) 50%, color-mix(in oklab, #fff 0%, transparent) 65%);+ mix-blend-mode: overlay;+}++/* the meteor canvas (src/shared/meteor.js) fills .sso-column while the card is hovered */diff --git a/site/public/examples/clerk-bento/src/widgets/social-sign-on.html b/site/public/examples/clerk-bento/src/widgets/social-sign-on.htmlnew file mode 100644index 0000000..a3d5e83--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/social-sign-on.html@@ -0,0 +1,43 @@+<!-- Social Sign-On card visual: clerk.com's markup (module 593274), SVG copied verbatim, Tailwind classes resolved+ in social-sign-on.css. Motion: social-sign-on.js. Built by .motion-clone/clerk-bento/social-sign-on/tools/gen-html.py -->+<div class="sso-bg">+ <div class="sso-column">+ <svg class="sso-lines" viewBox="0 0 98 192" fill="none" aria-hidden="true"><path stroke="#fff" stroke-opacity=".06" d="M49 192V96.266a8 8 0 0 0-2.285-5.599L3.285 46.333A8 8 0 0 1 1 40.734V-28M49 93l45.715-46.667A8 8 0 0 0 97 40.734V-23"></path></svg>+ </div>+ <div class="sso-track sso-track--left">+ <div class="sso-track__inner">+ <svg class="sso-panel" viewBox="0 0 109 216" fill="none" aria-hidden="true"><g filter="url(#sso-background-filter)"><path fill="#fff" fill-opacity=".02" d="M 104.715 48.667 L 61.353 4.402 A 8 8 0 0 0 55.638 2 H -100 a 8 8 0 0 0 -8 8 V 206 a 8 8 0 0 0 8 8 H 99 A 8 8 0 0 0 107 206 V 54.266 C 107 52.172 106.18 50.163 104.715 48.667 Z" shape-rendering="crispEdges"></path><path stroke="#fff" stroke-opacity=".05" d="M 60.996 4.752 L 104.358 49.017 A 7.5 7.5 0 0 1 106.5 54.265 V 206 A 7.5 7.5 0 0 1 99 213.5 H -100 a 7.5 7.5 0 0 1 -7.5 -7.5 V 10 a 7.5 7.5 0 0 1 7.5 -7.5 H 55.638 A 7.5 7.5 0 0 1 60.996 4.752 Z" shape-rendering="crispEdges"></path></g><defs><filter id="sso-background-filter" width="219" height="216" x="-110" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_1860_5760"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_1860_5760" result="shape"></feBlend></filter></defs></svg>+ <div class="sso-logos" style="opacity: 0.7">+ <div class="sso-logo" data-logo="discord" style="transform: translate(-1.5rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.865-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037c-1.687.29-3.33.8-4.885 1.515a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.083.083 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.077.077 0 0 0 .084-.028c.462-.63.874-1.295 1.227-1.994a.076.076 0 0 0-.042-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.291.075.075 0 0 1 .077-.011c3.928 1.793 8.18 1.793 12.062 0a.073.073 0 0 1 .078.01c.12.098.246.198.373.292a.076.076 0 0 1 .03.065.078.078 0 0 1-.036.063c-.599.349-1.225.647-1.873.89a.076.076 0 0 0-.05.076c.001.012.004.022.009.032.36.698.772 1.362 1.225 1.993a.077.077 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.029.079.079 0 0 0 .032-.055c.5-5.177-.838-9.674-3.549-13.66a.06.06 0 0 0-.031-.03ZM8.02 15.33c-1.182 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418Zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418Z"></path></svg></div>+ <div class="sso-logo" data-logo="google" style="transform: translate(5rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12.48 10.92v3.28h7.84c-.24 1.84-.853 3.187-1.787 4.133-1.147 1.147-2.933 2.4-6.053 2.4-4.827 0-8.6-3.893-8.6-8.72 0-4.827 3.773-8.72 8.6-8.72 2.6 0 4.507 1.027 5.907 2.347l2.307-2.307C18.747 1.44 16.133 0 12.48 0 5.867 0 .307 5.387.307 12s5.56 12 12.173 12c3.573 0 6.267-1.173 8.373-3.36 2.16-2.16 2.84-5.213 2.84-7.667 0-.76-.053-1.467-.173-2.053H12.48Z"></path></svg></div>+ <div class="sso-logo" data-logo="github" style="transform: translate(10rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 .297c-6.63 0-12 5.373-12 12 0 5.303 3.438 9.8 8.205 11.385.6.113.82-.258.82-.577 0-.285-.01-1.04-.015-2.04-3.338.724-4.042-1.61-4.042-1.61C4.422 18.07 3.633 17.7 3.633 17.7c-1.087-.744.084-.729.084-.729 1.205.084 1.838 1.236 1.838 1.236 1.07 1.835 2.809 1.305 3.495.998.108-.776.417-1.305.76-1.605-2.665-.3-5.466-1.332-5.466-5.93 0-1.31.465-2.38 1.235-3.22-.135-.303-.54-1.523.105-3.176 0 0 1.005-.322 3.3 1.23.96-.267 1.98-.399 3-.405 1.02.006 2.04.138 3 .405 2.28-1.552 3.285-1.23 3.285-1.23.645 1.653.24 2.873.12 3.176.765.84 1.23 1.91 1.23 3.22 0 4.61-2.805 5.625-5.475 5.92.42.36.81 1.096.81 2.22 0 1.606-.015 2.896-.015 3.286 0 .315.21.69.825.57C20.565 22.092 24 17.592 24 12.297c0-6.627-5.373-12-12-12Z"></path></svg></div>+ <div class="sso-logo" data-logo="notion" style="transform: translate(calc(10rem + 3rem), 3rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M4.458 4.208c.746.606 1.026.56 2.428.466l13.215-.793c.28 0 .047-.28-.046-.326L17.86 1.968c-.42-.326-.98-.7-2.055-.607L3.01 2.295c-.466.046-.56.28-.374.466l1.823 1.447Zm.793 3.08v13.904c0 .747.373 1.027 1.214.98l14.523-.84c.841-.046.935-.56.935-1.167V6.354c0-.606-.233-.933-.748-.887l-15.177.887c-.56.047-.747.328-.747.934Zm14.337.745c.093.42 0 .84-.42.888l-.7.14v10.264c-.608.327-1.168.514-1.635.514-.748 0-.935-.234-1.495-.933l-4.577-7.186v6.952L12.21 19s0 .84-1.168.84l-3.222.186c-.093-.186 0-.653.327-.746l.84-.233V9.854L7.821 9.76c-.094-.42.14-1.026.793-1.073l3.456-.233 4.764 7.279v-6.44l-1.215-.139c-.093-.514.28-.887.747-.933l3.222-.188ZM1.935 1.035l13.31-.98c1.634-.14 2.055-.047 3.082.7l4.25 2.986c.7.513.933.653.933 1.213v16.378c0 1.026-.373 1.634-1.68 1.726l-15.458.934c-.98.047-1.448-.093-1.962-.747l-3.129-4.06c-.56-.747-.793-1.306-.793-1.96V2.667c0-.839.374-1.54 1.447-1.632Z"></path></svg></div>+ <div class="sso-logo" data-logo="linear" style="transform: translate(calc(10rem + 3rem), calc(5rem + 5rem))"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M.294 14.765c-.053-.227.218-.37.383-.205l8.763 8.763c.166.165.022.436-.205.383a12.03 12.03 0 0 1-8.94-8.94ZM0 11.253a.237.237 0 0 0 .07.183L12.564 23.93a.237.237 0 0 0 .183.07c.568-.036 1.126-.11 1.67-.223a.233.233 0 0 0 .115-.395L.618 9.468a.233.233 0 0 0-.395.114A12.017 12.017 0 0 0 0 11.253ZM1.01 7.13c-.04.09-.019.195.05.264L16.607 22.94c.07.07.174.09.264.05.428-.19.844-.406 1.244-.644a.236.236 0 0 0 .044-.37L2.025 5.841a.236.236 0 0 0-.37.044c-.238.4-.453.816-.644 1.244Zm2.028-2.791a.237.237 0 0 1-.01-.325C5.227 1.55 8.426 0 11.987 0 18.623 0 24 5.378 24 12.011c0 3.562-1.55 6.762-4.013 8.962a.237.237 0 0 1-.325-.011L3.038 4.338Z"></path></svg></div>+ <div class="sso-logo" data-logo="apple" style="transform: translate(calc(10rem + 3rem), calc(10rem + 3rem))"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12.152 6.896c-.948 0-2.415-1.078-3.96-1.04-2.04.027-3.91 1.183-4.961 3.014-2.117 3.675-.546 9.103 1.519 12.09 1.013 1.454 2.208 3.09 3.792 3.039 1.52-.065 2.09-.987 3.935-.987 1.83 0 2.35.987 3.96.948 1.637-.026 2.676-1.48 3.676-2.948 1.156-1.688 1.636-3.325 1.662-3.415-.04-.013-3.182-1.221-3.22-4.857-.026-3.04 2.48-4.494 2.597-4.559-1.43-2.09-3.623-2.324-4.39-2.376-2-.156-3.675 1.091-4.61 1.091ZM15.53 3.83c.843-1.012 1.4-2.427 1.245-3.83-1.207.052-2.662.805-3.532 1.818-.78.896-1.454 2.338-1.273 3.714 1.338.104 2.715-.688 3.559-1.701"></path></svg></div>+ </div>+ </div>+ </div>+ <div class="sso-track sso-track--right">+ <div class="sso-track__inner">+ <svg class="sso-panel" viewBox="0 0 109 216" fill="none" aria-hidden="true"><g filter="url(#sso-background-filter)"><path fill="#fff" fill-opacity=".02" d="M 104.715 48.667 L 61.353 4.402 A 8 8 0 0 0 55.638 2 H -100 a 8 8 0 0 0 -8 8 V 206 a 8 8 0 0 0 8 8 H 99 A 8 8 0 0 0 107 206 V 54.266 C 107 52.172 106.18 50.163 104.715 48.667 Z" shape-rendering="crispEdges"></path><path stroke="#fff" stroke-opacity=".05" d="M 60.996 4.752 L 104.358 49.017 A 7.5 7.5 0 0 1 106.5 54.265 V 206 A 7.5 7.5 0 0 1 99 213.5 H -100 a 7.5 7.5 0 0 1 -7.5 -7.5 V 10 a 7.5 7.5 0 0 1 7.5 -7.5 H 55.638 A 7.5 7.5 0 0 1 60.996 4.752 Z" shape-rendering="crispEdges"></path></g></svg>+ <div class="sso-logos" style="opacity: 0.7">+ <div class="sso-logo" data-logo="linkedin" style="transform: translate(calc(10rem + 3rem), calc(10rem + 3rem))"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M19.04 19.043h-2.962v-4.64c0-1.107-.023-2.531-1.544-2.531-1.544 0-1.78 1.204-1.78 2.449v4.722H9.793V9.5h2.845v1.3h.038c.397-.75 1.364-1.54 2.808-1.54 3.001 0 3.556 1.974 3.556 4.545v5.238ZM6.447 8.194c-.954 0-1.72-.772-1.72-1.72a1.72 1.72 0 1 1 1.72 1.72Zm1.484 10.85h-2.97V9.5h2.97v9.543ZM20.521 2H3.476C2.66 2 2 2.645 2 3.44v17.12c0 .796.66 1.44 1.476 1.44h17.042c.815 0 1.482-.644 1.482-1.44V3.44C22 2.646 21.333 2 20.518 2h.003Z"></path></svg></div>+ <div class="sso-logo" data-logo="microsoft" style="transform: translate(calc(10rem + 3rem), calc(5rem + 5rem))"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M2 2v9.507h9.507V2H2Zm10.495 0v9.507H22V2h-9.505ZM2 12.495V22h9.507v-9.505H2Zm10.495 0V22H22v-9.505h-9.505Z"></path></svg></div>+ <div class="sso-logo" data-logo="atlassian" style="transform: translate(calc(10rem + 3rem), 3rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M7.526 11.16a.626.626 0 0 0-1.063.116L1.068 22.06a.645.645 0 0 0 .578.933h7.507a.621.621 0 0 0 .578-.358c1.62-3.346.638-8.436-2.206-11.476l.001.002Zm3.955-9.806a14.222 14.222 0 0 0-.83 14.04l3.62 7.242a.644.644 0 0 0 .576.356h7.507a.645.645 0 0 0 .578-.932L12.577 1.348a.61.61 0 0 0-1.096.006Z"></path></svg></div>+ <div class="sso-logo" data-logo="dropbox" style="transform: translate(10rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M6 1.807 0 5.629l6 3.822 6.001-3.822L6 1.807Zm12 0-6 3.822 6 3.822 6-3.822-6-3.822ZM0 13.274l6 3.822 6.001-3.822L6 9.451l-6 3.823Zm18-3.823-6 3.823 6 3.822 6-3.822-6-3.823Zm-12 8.92 6.001 3.822 6-3.822-6-3.822L6 18.371Z"></path></svg></div>+ <div class="sso-logo" data-logo="x" style="transform: translate(5rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M17.521 3.325h2.944l-6.432 7.352L21.6 20.679h-5.924l-4.64-6.067-5.31 6.067H2.78l6.88-7.864-7.26-9.49h6.076l4.194 5.546 4.851-5.546Zm-1.033 15.593h1.632L7.59 4.995H5.838l10.65 13.923Z"></path></svg></div>+ <div class="sso-logo" data-logo="hubspot" style="transform: translate(-1.5rem, 0rem)"><span class="sso-logo__ring sso-logo__ring--white"></span><span class="sso-logo__ring sso-logo__ring--cyan"></span><svg viewBox="0 0 24 24" aria-hidden="true"><path d="M18.164 7.93V5.084a2.198 2.198 0 0 0 1.267-1.978v-.067A2.2 2.2 0 0 0 17.238.845h-.067a2.2 2.2 0 0 0-2.193 2.193v.067a2.195 2.195 0 0 0 1.252 1.973l.013.006v2.852a6.22 6.22 0 0 0-2.969 1.31l.012-.01-7.828-6.095A2.497 2.497 0 1 0 4.3 4.656l-.012.006 7.697 5.991a6.175 6.175 0 0 0-1.038 3.446 6.22 6.22 0 0 0 1.147 3.607l-.013-.02-2.342 2.343a1.967 1.967 0 0 0-.58-.095h-.002a2.033 2.033 0 1 0 2.033 2.033 1.982 1.982 0 0 0-.1-.595l.005.014 2.317-2.317a6.246 6.246 0 1 0 4.782-11.134l-.036-.005h.006Zm-.964 9.378a3.206 3.206 0 1 1 3.215-3.207v.002a3.207 3.207 0 0 1-3.207 3.207l-.008-.002Z"></path></svg></div>+ </div>+ </div>+ </div>+</div>+<div class="sso-boxwrap">+ <div class="sso-box">+ <div class="sso-glow" style="opacity: 0"></div>+ <div class="sso-cloud">+ <svg class="sso-cloud__idle" viewBox="0 0 34 23" fill="none" aria-hidden="true"><g filter="url(#sso-cloud-filter0)"><path fill="#212126" d="M26.008 22.984a.008.008 0 0 0-.008.008.008.008 0 0 1-.008.008H8.008A.008.008 0 0 1 8 22.992a.008.008 0 0 0-.009-.008 7.5 7.5 0 1 1 0-14.968A.008.008 0 0 0 8 8.008C8 8.004 8.003 8 8.008 8h.02a.03.03 0 0 0 .03-.026 9.001 9.001 0 0 1 17.884 0 .029.029 0 0 0 .029.026h.02c.005 0 .009.004.009.008 0 .005.004.008.008.008a7.5 7.5 0 1 1 0 14.968Z"></path></g><defs><filter id="sso-cloud-filter0" width="34" height="25" x="0" y="0" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.06 0"></feColorMatrix><feBlend in2="BackgroundImageFix" mode="color-dodge" result="effect1_dropShadow_228_61"></feBlend><feBlend in="SourceGraphic" in2="effect1_dropShadow_228_61" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="2"></feOffset><feGaussianBlur stdDeviation="2.5"></feGaussianBlur><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.15 0"></feColorMatrix><feBlend in2="shape" result="effect2_innerShadow_228_61"></feBlend></filter></defs></svg>+ <svg class="sso-cloud-active" viewBox="0 0 34 23" fill="none" aria-hidden="true" style="opacity: 0"><g filter="url(#sso-cloud-active-filter)"><path fill="#5DE3FF" d="M26.008 22.984a.008.008 0 0 0-.008.008.008.008 0 0 1-.008.008H8.008A.008.008 0 0 1 8 22.992a.008.008 0 0 0-.009-.008 7.5 7.5 0 1 1 0-14.968A.008.008 0 0 0 8 8.008C8 8.004 8.003 8 8.008 8h.02a.03.03 0 0 0 .03-.026 9.001 9.001 0 0 1 17.884 0 .029.029 0 0 0 .029.026h.02c.005 0 .009.004.009.008 0 .005.004.008.008.008a7.5 7.5 0 1 1 0 14.968Z"></path><path fill="url(#sso-cloud-active-gradient)" d="M26.008 22.984a.008.008 0 0 0-.008.008.008.008 0 0 1-.008.008H8.008A.008.008 0 0 1 8 22.992a.008.008 0 0 0-.009-.008 7.5 7.5 0 1 1 0-14.968A.008.008 0 0 0 8 8.008C8 8.004 8.003 8 8.008 8h.02a.03.03 0 0 0 .03-.026 9.001 9.001 0 0 1 17.884 0 .029.029 0 0 0 .029.026h.02c.005 0 .009.004.009.008 0 .005.004.008.008.008a7.5 7.5 0 1 1 0 14.968Z" style="mix-blend-mode: overlay"></path><path stroke="#fff" stroke-opacity=".2" d="M26.04 22.485a.507.507 0 0 0-.159.015H8.118a.507.507 0 0 0-.159-.015 7 7 0 1 1 0-13.97.506.506 0 0 0 .238-.042.53.53 0 0 0 .357-.443 8.501 8.501 0 0 1 16.891 0 .53.53 0 0 0 .357.443.505.505 0 0 0 .239.042 7 7 0 1 1 0 13.97Zm.46.507V23v-.008ZM7.5 23a.52.52 0 0 1 0-.008V23Zm0-14.992V8v.008Zm19 0V8v.008Z"></path></g><defs><linearGradient id="sso-cloud-active-gradient" x1="17" x2="17" y1="0" y2="15.5" gradientUnits="userSpaceOnUse"><stop offset=".529"></stop><stop offset="1" stop-opacity="0"></stop></linearGradient><filter id="sso-cloud-active-filter" width="52" height="41" x="-9" y="-9" color-interpolation-filters="sRGB" filterUnits="userSpaceOnUse"><feFlood flood-opacity="0" result="BackgroundImageFix"></feFlood><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="effect1_dropShadow_228_63"></feMorphology><feOffset></feOffset><feGaussianBlur stdDeviation="4"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0.419608 0 0 0 0 0.905882 0 0 0 0 1 0 0 0 0.4 0"></feColorMatrix><feBlend in2="BackgroundImageFix" result="effect1_dropShadow_228_63"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation="1"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.35 0"></feColorMatrix><feBlend in2="effect1_dropShadow_228_63" result="effect2_dropShadow_228_63"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset></feOffset><feGaussianBlur stdDeviation=".5"></feGaussianBlur><feComposite in2="hardAlpha" operator="out"></feComposite><feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.45 0"></feColorMatrix><feBlend in2="effect2_dropShadow_228_63" result="effect3_dropShadow_228_63"></feBlend><feBlend in="SourceGraphic" in2="effect3_dropShadow_228_63" result="shape"></feBlend><feColorMatrix in="SourceAlpha" result="hardAlpha" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0"></feColorMatrix><feOffset dy="1"></feOffset><feComposite in2="hardAlpha" k2="-1" k3="1" operator="arithmetic"></feComposite><feColorMatrix values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.2 0"></feColorMatrix><feBlend in2="shape" result="effect4_innerShadow_228_63"></feBlend></filter></defs></svg>+ </div>+ <div class="sso-shine" style="transform: translate(-4rem, -4rem)"></div>+ </div>+</div>diff --git a/site/public/examples/clerk-bento/src/widgets/social-sign-on.js b/site/public/examples/clerk-bento/src/widgets/social-sign-on.jsnew file mode 100644index 0000000..50cb61b--- /dev/null+++ b/site/public/examples/clerk-bento/src/widgets/social-sign-on.js@@ -0,0 +1,310 @@+// Social Sign-On card (clerk.com module 593274, export SocialSignOn), without Motion for React.+//+// On hover of the card the cloud box lights up (cyan cloud, glow, a diagonal sheen sweeps in) and both logo tracks+// brighten from 0.7 to 1. Light streaks run along the circuit lines (src/shared/meteor.js, clerk.com's canvas):+// one rises into the box from below every 1.4 s, and one shoots out of the box to the left (0.7 s, then every+// 2.8 s) and to the right (2.1 s, then every 2.8 s). Each side streak, as it starts, moves that side's six logo+// chips one slot along their track (1.2 s, cubic-bezier(.7,0,.3,1)): Discord, Google, GitHub, Notion, Linear, Apple+// on the left; LinkedIn, Microsoft, Atlassian, Dropbox, X, HubSpot on the right. On hover-out the lit state fades+// back (0.3 s) and the streaks stop at the next start of the centre streak; the logos stay where they are and the+// next hover continues from there. Nothing is random.+//+// How clerk.com runs each part, reproduced here so that frames match:+// - transform / opacity of HTML elements (glow, sheen, logo containers, logo chips): Motion hands them to WAAPI and+// back-dates the animation to its creation (animation.startTime = createdAt); on finish the end value is written+// to the style. A transition without `ease`/`duration` is Motion's default tween: 0.3 s cubic-bezier(.25,.1,.35,1).+// - the opacity of the active cloud (an <svg>, not an HTMLElement) is Motion's JS loop: one value per frame.+// - the streaks are clerk.com's <Meteor> inside <AnimatePresence>: mounted while hovered; on hover-out the+// component re-renders (Meteor's effect re-runs, so a streak in flight "begins" again) and the centre streak's+// onBegin calls usePresence's safeToRemove() and returns false (loop stops, canvas removed, no fade).+// Re-hovering before that revives the same instance (another re-render), its clock continues.+// - the logo steps are a Motion useAnimate sequence called from the side streaks' onBegin, guarded by the+// `hovered` prop: every chip moves one slot (at:"<", all together); the chip that wraps from the last slot to the+// first jumps there instantly ({duration:0}), on the next frame (Motion resolves keyframes a frame later).+// - Timing (measured on clerk.com with virtual-clock captures, .motion-clone/clerk-bento/social-sign-on/; every+// element starts on the same frame as there): the hover state is a zustand store read with useSyncExternalStore,+// so React renders, commits and runs effects in a microtask right after the pointer event. The streak canvas+// mounts (or re-renders) then and its clock starts on the next frame, once its glow image has loaded. Motion+// starts the declarative values at the event too, creating them on the next frame: WAAPI ones back-dated to the+// event, the JS one evaluated from the event time.+//+// Addition (not on clerk.com): with prefers-reduced-motion: reduce, hover switches the lit state without tweens and+// shows no streaks or logo steps.++import { createMeteor } from "../shared/meteor.js";++// ---------- easings ----------+function cubicBezier(x1, y1, x2, y2) {+ const bez = (t, a, b) => (((1 - 3 * b + 3 * a) * t + (3 * b - 6 * a)) * t + 3 * a) * t;+ return (x) => {+ if (x <= 0 || x >= 1) return x <= 0 ? 0 : 1;+ let lo = 0, hi = 1, t = x;+ for (let i = 0; i < 24; i++) {+ t = (lo + hi) / 2;+ if (bez(t, x1, x2) < x) lo = t;+ else hi = t;+ }+ return bez(t, y1, y2);+ };+}+const ease = (p) => ({ fn: cubicBezier(...p), css: `cubic-bezier(${p.join(", ")})` });+const EASE_DEFAULT = ease([0.25, 0.1, 0.35, 1]); // Motion's default tween (0.3 s)+const EASE_SHINE = ease([0, 0.4, 0.2, 1]);+const EASE_STEP = ease([0.7, 0, 0.3, 1]);++// ---------- a numeric value rendered into one CSS property through WAAPI (Motion's accelerated path) ----------+class WaapiValue {+ constructor(el, prop, value, render) {+ Object.assign(this, { el, prop, value, render, anim: null, opts: null, from: value, to: value });+ }+ current() {+ const { anim, opts } = this;+ if (!anim) return this.value;+ const local = anim.currentTime ?? 0;+ const p = Math.min(1, Math.max(0, local / opts.duration));+ return this.from + (this.to - this.from) * opts.ease.fn(p);+ }+ set(to) {+ this.anim?.cancel();+ this.anim = null;+ this.value = this.from = this.to = to;+ this.el.style[this.prop] = this.render(to);+ }+ animate(to, { duration, ease: e = EASE_DEFAULT, startTime }) {+ const from = this.current();+ this.anim?.cancel();+ const anim = this.el.animate(+ { [this.prop]: [this.render(from), this.render(to)] },+ { duration, easing: e.css, fill: "both" },+ );+ if (startTime != null) anim.startTime = startTime; // Motion back-dates to the animation's creation+ Object.assign(this, { anim, from, to, value: from, opts: { duration, ease: e } });+ anim.onfinish = () => {+ if (this.anim !== anim) return;+ this.el.style[this.prop] = this.render(to);+ this.value = to;+ this.anim = null;+ anim.cancel();+ };+ }+}++// ---------- a value driven per animation frame (Motion's JS path) ----------+const jsValues = new Set();+let ticking = false;+function tick() {+ const now = performance.now();+ for (const v of jsValues) v.step(now);+ ticking = jsValues.size > 0;+ if (ticking) requestAnimationFrame(tick);+}+class JsValue {+ constructor(value, apply) {+ Object.assign(this, { value, apply, tween: null });+ }+ set(to) {+ this.tween = null;+ jsValues.delete(this);+ this.value = to;+ this.apply(to);+ }+ // called inside an animation frame: the first value is rendered in this frame, as Motion's frame loop does+ animate(to, { duration = 300, ease: e = EASE_DEFAULT, startTime = performance.now() } = {}) {+ this.tween = { from: this.value, to, duration, ease: e.fn, start: startTime };+ jsValues.add(this);+ this.step(performance.now());+ if (!ticking && jsValues.size) {+ ticking = true;+ requestAnimationFrame(tick);+ }+ }+ step(now) {+ const tw = this.tween;+ if (!tw) return jsValues.delete(this);+ const p = Math.min(1, Math.max(0, (now - tw.start) / tw.duration));+ this.value = tw.from + (tw.to - tw.from) * tw.ease(p);+ this.apply(this.value);+ if (p >= 1) {+ this.tween = null;+ jsValues.delete(this);+ }+ }+}++// ---------- logo tracks (clerk.com's LogoTrack: 6 chips, 6 slots, useAnimate sequence on next()) ----------+const LEFT_SLOTS = [+ ["-1.5rem", "0rem", { duration: 0 }],+ ["5rem", "0rem"],+ ["10rem", "0rem"],+ ["calc(10rem + 3rem)", "3rem"],+ ["calc(10rem + 3rem)", "calc(5rem + 5rem)"],+ ["calc(10rem + 3rem)", "calc(10rem + 3rem)"],+];+const RIGHT_SLOTS = [+ ["calc(10rem + 3rem)", "calc(10rem + 3rem)", { duration: 0 }],+ ["calc(10rem + 3rem)", "calc(5rem + 5rem)"],+ ["calc(10rem + 3rem)", "3rem"],+ ["10rem", "0rem"],+ ["5rem", "0rem"],+ ["-1.5rem", "0rem"],+];++function logoTrack(container, slots, reduced) {+ const chips = [...container.children];+ const anims = new Map(); // chip → running WAAPI animation+ let count = 0; // clerk.com's useRef counter: never reset, so the next hover continues where this one stopped+ const track = {+ hovered: false, // the `hovered` prop as of the last render+ next() {+ if (!track.hovered || reduced.matches) return;+ count++;+ // Motion: animate() now, keyframes resolved (current values read) on the next frame, the WAAPI animations+ // created then and back-dated to now; the chip that wraps ({duration:0}) is set on that frame.+ const created = performance.now();+ const targets = chips.map((el, r) => slots[(r + count) % slots.length]);+ requestAnimationFrame(() => {+ chips.forEach((el, r) => {+ const [x, y, t = { duration: 1.2 }] = targets[r];+ const to = `translate(${x}, ${y})`;+ // a running step is stopped where it is (Motion commits the current value, then animates from it)+ const from = getComputedStyle(el).transform;+ const running = anims.get(el);+ if (running) {+ running.cancel();+ anims.delete(el);+ el.style.transform = from;+ }+ if (t.duration === 0) {+ el.style.transform = to;+ return;+ }+ const anim = el.animate({ transform: [from, to] }, { duration: t.duration * 1000, easing: EASE_STEP.css, fill: "both" });+ anim.startTime = created;+ anims.set(el, anim);+ anim.onfinish = () => {+ if (anims.get(el) !== anim) return;+ el.style.transform = to;+ anims.delete(el);+ anim.cancel();+ };+ });+ });+ },+ };+ return track;+}++// ---------- the streaks: clerk.com's MeteorGroup ----------+const W = 98, H = 192;+const PATH_LEFT = "M88.71 131.71L3.34314 46.3431C1.84285 44.8428 1 42.808 1 40.6863V0";+const PATH_CENTRE = "M49 292V124";+const PATH_RIGHT = "M9.29 131.71L94.6569 46.3431C96.1572 44.8428 97 42.808 97 40.6863V0";++// React runs a state update made outside an event (safeToRemove → AnimatePresence) in a scheduler task+const channel = new MessageChannel();+const tasks = [];+channel.port1.onmessage = () => tasks.shift()?.();+const postTask = (fn) => {+ tasks.push(fn);+ channel.port2.postMessage(0);+};++export function mount(slot, card) {+ const $ = (s) => slot.querySelector(s);+ const column = $(".sso-column");+ const reduced = window.matchMedia("(prefers-reduced-motion: reduce)");++ const glow = new WaapiValue($(".sso-glow"), "opacity", 0, String);+ const shine = new WaapiValue($(".sso-shine"), "transform", -4, (v) => `translate(${v}rem, ${v}rem)`);+ const logoOpacity = [...slot.querySelectorAll(".sso-logos")].map((el) => new WaapiValue(el, "opacity", 0.7, String));+ const cloudEl = $(".sso-cloud-active");+ const cloud = new JsValue(0, (v) => (cloudEl.style.opacity = String(v)));+ const left = logoTrack($(".sso-track--left .sso-logos"), LEFT_SLOTS, reduced);+ const right = logoTrack($(".sso-track--right .sso-logos"), RIGHT_SLOTS, reduced);++ // <AnimatePresence>{hovered && <MeteorGroup/>}</AnimatePresence>+ let meteor = null;+ let present = false; // usePresence()[0] of the mounted MeteorGroup+ let removing = false;+ const safeToRemove = () => {+ if (removing) return;+ removing = true;+ const m = meteor;+ postTask(() => {+ removing = false;+ if (meteor !== m) return;+ if (present) return; // re-hovered in between: AnimatePresence keeps it+ m.destroy();+ meteor = null;+ });+ };+ const mountMeteor = () =>+ createMeteor(column, {+ skip: 100,+ meteors: [+ { width: W, height: H, path: PATH_LEFT, delay: 700, repeat: 2800, onBegin() { left.next(); } },+ {+ width: W, height: H, path: PATH_CENTRE, repeat: 1400,+ onBegin() {+ if (!present) {+ safeToRemove();+ return false;+ }+ },+ },+ { width: W, height: H, path: PATH_RIGHT, repeat: 2800, delay: 2100, onBegin() { right.next(); } },+ ],+ });++ // Motion's WAAPI values, created on the frame after the state change and back-dated to it+ function animateWaapi(hovered, startTime) {+ if (reduced.matches) {+ glow.set(hovered ? 1 : 0);+ shine.set(hovered ? 0 : -4);+ logoOpacity.forEach((v) => v.set(hovered ? 1 : 0.7));+ return;+ }+ const t = { duration: 300, startTime };+ glow.animate(hovered ? 1 : 0, t);+ shine.animate(hovered ? 0 : -4, hovered ? { duration: 500, ease: EASE_SHINE, startTime } : t);+ logoOpacity.forEach((v) => v.animate(hovered ? 1 : 0.7, t));+ }++ // React's render after a hover change. The hover state lives in a zustand store read through+ // useSyncExternalStore, so React renders, commits and runs the effects synchronously, in a microtask right+ // after the pointer event: the MeteorGroup mounts or re-renders then (its canvas clock starts on the next frame,+ // once the glow image has loaded). Motion starts the declarative animations at the same moment and creates them+ // on the next frame.+ function commit(hovered, at) {+ left.hovered = right.hovered = hovered;+ if (hovered) {+ present = true;+ if (!reduced.matches) {+ if (meteor) meteor.refresh(); // still exiting: same instance, re-rendered+ else meteor = mountMeteor();+ }+ } else if (meteor) {+ present = false;+ meteor.refresh(); // MeteorGroup re-renders with isPresent = false+ }+ requestAnimationFrame(() => {+ animateWaapi(hovered, at);+ if (reduced.matches) cloud.set(hovered ? 1 : 0);+ else cloud.animate(hovered ? 1 : 0, { startTime: at });+ });+ }++ // ---------- hover (react-aria useHover on the card root: pointerenter/leave, touch ignored) ----------+ let hovered = false;+ const change = (h) => {+ hovered = h;+ const at = performance.now();+ queueMicrotask(() => commit(h, at));+ };+ card.addEventListener("pointerenter", (e) => {+ if (e.pointerType !== "touch" && !hovered) change(true);+ });+ card.addEventListener("pointerleave", (e) => {+ if (e.pointerType !== "touch" && hovered) change(false);+ });+}diff --git a/site/public/examples/stripe-bento/assets/img/hoodie-navy.png b/site/public/examples/stripe-bento/assets/img/hoodie-navy.pngdeleted file mode 100644index ddbc887..0000000Binary files a/site/public/examples/stripe-bento/assets/img/hoodie-navy.png and /dev/null differdiff --git a/site/public/examples/stripe-bento/assets/img/issuing_card_bg.png b/site/public/examples/stripe-bento/assets/img/issuing_card_bg.pngdeleted file mode 100644index 4293c5a..0000000Binary files a/site/public/examples/stripe-bento/assets/img/issuing_card_bg.png and /dev/null differdiff --git a/site/public/examples/stripe-bento/assets/img/issuing_card_fg.png b/site/public/examples/stripe-bento/assets/img/issuing_card_fg.pngdeleted file mode 100644index a6d8950..0000000Binary files a/site/public/examples/stripe-bento/assets/img/issuing_card_fg.png and /dev/null differdiff --git a/site/public/examples/stripe-bento/assets/img/point_spritesheet.png b/site/public/examples/stripe-bento/assets/img/point_spritesheet.pngdeleted file mode 100644index bb4e719..0000000Binary files a/site/public/examples/stripe-bento/assets/img/point_spritesheet.png and /dev/null differdiff --git a/site/public/examples/stripe-bento/assets/img/shirt-blue.png b/site/public/examples/stripe-bento/assets/img/shirt-blue.pngdeleted file mode 100644index a325a8e..0000000Binary files a/site/public/examples/stripe-bento/assets/img/shirt-blue.png and /dev/null differdiff --git a/site/public/examples/stripe-bento/src/widgets/crypto/globe.js b/site/public/examples/stripe-bento/src/widgets/crypto/globe.jsindex 25f4334..438493e 100644--- a/site/public/examples/stripe-bento/src/widgets/crypto/globe.js+++ b/site/public/examples/stripe-bento/src/widgets/crypto/globe.js@@ -790,7 +790,7 @@ export class Globe {}}- applyDragRelease({ speedX, speedY }) {+ applyDragRelease({ speedY }) {const tilts = this.dragRotate === "x" || this.dragRotate === "both";if (this.dragRotate === "y" || this.dragRotate === "both") {this.currentRotationSpeedY = Math.abs(speedY) > 5e-5 ? speedY : this.getAutoRotateTargetY();diff --git a/site/public/examples/workos-atlas/assets/icons/airtable.svg b/site/public/examples/workos-atlas/assets/icons/airtable.svgnew file mode 100644index 0000000..4e0e6bb--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/airtable.svg@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-7.999 -8 79.999 79.999">+ <path fill="#fc0" d="M28.578 5.906 4.717 15.78c-1.327.55-1.313 2.434.022 2.963l23.96 9.502a8.9 8.9 0 0 0 6.555 0l23.96-9.502c1.335-.53 1.35-2.414.022-2.963l-23.86-9.873a8.9 8.9 0 0 0-6.799 0"/>+ <path fill="#31c2f2" d="M34.103 33.433V57.17a1.6 1.6 0 0 0 2.188 1.486l26.7-10.364A1.6 1.6 0 0 0 64 46.806V23.07a1.6 1.6 0 0 0-2.188-1.486l-26.7 10.364a1.6 1.6 0 0 0-1.009 1.486"/>+ <path fill="#ed3049" d="m27.87 34.658-8.728 4.215-16.727 8.015c-1.06.512-2.414-.26-2.414-1.44V23.17c0-.426.218-.794.512-1.07a1.8 1.8 0 0 1 .405-.304c.4-.24.97-.304 1.455-.112l25.365 10.05c1.3.512 1.4 2.318.133 2.925"/>+ <path fill="#c62842" d="m27.87 34.658-7.924 3.826L.512 22.098a1.8 1.8 0 0 1 .405-.304c.4-.24.97-.304 1.455-.112l25.365 10.05c1.3.512 1.4 2.318.133 2.925"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/bitbucket.svg b/site/public/examples/workos-atlas/assets/icons/bitbucket.svgnew file mode 100644index 0000000..714c6ff--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/bitbucket.svg@@ -0,0 +1,10 @@+<svg width="72" height="72" viewBox="0 0 72 72" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M12.6037 13.5002C11.7184 13.4887 10.9914 14.1972 10.9801 15.0826C10.9789 15.1756 10.9857 15.2686 11.0007 15.3603L17.8066 56.6798C17.9816 57.7235 18.8807 58.4909 19.939 58.4998H52.5899C53.3841 58.5099 54.0659 57.9371 54.193 57.1529L60.9991 15.3684C61.1409 14.4943 60.5472 13.6708 59.6731 13.529C59.5814 13.5141 59.4886 13.5073 59.3956 13.5085L12.6037 13.5002ZM41.2623 43.3634H30.8411L28.0193 28.6203H43.7876L41.2623 43.3634Z" fill="#2684FF" style="fill:#2684FF;fill:color(display-p3 0.1490 0.5176 1.0000);fill-opacity:1;"/>+<path d="M58.7931 28.5995H43.7587L41.2354 43.331H30.8224L18.5272 57.9263C18.9168 58.2633 19.4138 58.4506 19.9288 58.4549H52.5615C53.3551 58.4652 54.0365 57.8926 54.1636 57.1092L58.7931 28.5995Z" fill="url(#paint0_linear_5907_10185)" style=""/>+<defs>+<linearGradient id="paint0_linear_5907_10185" x1="62.281" y1="32.7492" x2="44.9107" y2="57.4103" gradientUnits="userSpaceOnUse">+<stop offset="0.18" stop-color="#0052CC" style="stop-color:#0052CC;stop-color:color(display-p3 0.0000 0.3216 0.8000);stop-opacity:1;"/>+<stop offset="1" stop-color="#2684FF" style="stop-color:#2684FF;stop-color:color(display-p3 0.1490 0.5176 1.0000);stop-opacity:1;"/>+</linearGradient>+</defs>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/buffer.svg b/site/public/examples/workos-atlas/assets/icons/buffer.svgnew file mode 100644index 0000000..d797e85--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/buffer.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-52.46 -53.202 622.225 622.225">+ <path fill="#231F20" fill-rule="evenodd" clip-rule="evenodd" d="M38.208 122.6 257.471 9.021 479.098 122.6 257.471 236.577zM107.884 222.354l149.587 73.563 151.163-73.563 70.464 34.33-221.627 107.893L38.208 256.684zM107.884 350.354l149.587 81.12 151.163-81.12 70.464 37.662-221.627 118.783L38.208 388.016z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/close.svg b/site/public/examples/workos-atlas/assets/icons/close.svgnew file mode 100644index 0000000..26addf8--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/close.svg@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="-3.343 -4.71 33.429 33.429">+ <path fill="#4ec375" d="M13.371 20.37C5.875 20.37 0 17.135 0 13.005s5.875-7.366 13.371-7.366 13.372 3.237 13.372 7.366c0 4.13-5.875 7.367-13.372 7.367m0-12.566c-5.336 0-11.282 2.137-11.282 5.2s5.946 5.2 11.282 5.2 11.283-2.136 11.283-5.2-5.946-5.2-11.283-5.2"/>+ <path fill="#1463ff" d="M17.897 25.588c-3.351 0-7.639-3.436-10.68-8.9-1.726-3.099-2.775-6.37-2.959-9.217-.2-3.12.66-5.417 2.424-6.474s4.115-.68 6.618 1.057c2.286 1.59 4.492 4.169 6.218 7.267 3.748 6.734 3.982 13.628.535 15.691a4.14 4.14 0 0 1-2.16.576zM8.879 2.578c-.434 0-.823.096-1.149.295-1.023.611-1.529 2.236-1.387 4.455.163 2.522 1.116 5.464 2.683 8.28 2.666 4.793 7.425 9.066 9.982 7.532 2.558-1.534 1.37-7.939-1.3-12.731-1.566-2.817-3.547-5.144-5.57-6.548-1.211-.84-2.34-1.274-3.263-1.274z"/>+ <path fill="#ffbc00" d="M8.875 25.601a4.2 4.2 0 0 1-2.19-.59c-1.763-1.056-2.628-3.353-2.423-6.473.184-2.847 1.233-6.119 2.959-9.217C10.969 2.587 16.61-1.07 20.057.992c3.448 2.067 3.214 8.957-.535 15.691-1.725 3.099-3.932 5.677-6.217 7.267-1.572 1.092-3.084 1.647-4.43 1.647zM17.81 2.552c-2.658 0-6.49 3.731-8.783 7.848-1.567 2.817-2.52 5.755-2.683 8.28-.142 2.22.364 3.84 1.387 4.456 1.024.61 2.629.255 4.413-.984 2.026-1.408 4.003-3.735 5.57-6.548 2.666-4.792 3.857-11.201 1.3-12.731a2.3 2.3 0 0 0-1.204-.316z"/>+ <path fill="#4ec375" d="M13.371 18.204c-5.336 0-11.282-2.136-11.282-5.2H0c0 4.13 5.875 7.367 13.371 7.367z"/>+ <path fill="#1463ff" d="M13.852 5.27a14.4 14.4 0 0 0-1.71-1.418 8.7 8.7 0 0 0-1.637-.914l.694-2.045q1.03.408 2.11 1.16a16.7 16.7 0 0 1 2.235 1.89L13.856 5.27zm1.676 17.476c-.903-.503-1.843-1.253-2.754-2.158l-1.6 1.443c.936.94 1.897 1.711 2.85 2.292l1.508-1.577z"/>+ <path fill="#4ec375" d="M22.999 10.352C20.859 8.775 16.978 7.8 13.37 7.8V5.633c4.2 0 7.89 1.014 10.326 2.635z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/contentful.svg b/site/public/examples/workos-atlas/assets/icons/contentful.svgnew file mode 100644index 0000000..22674be--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/contentful.svg@@ -0,0 +1,8 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-52.45 -36.02 360.14 360.14">+ <path fill="#fae501" d="M87.333 200.777c-15.306-14.406-24.309-34.213-24.309-56.722s9.003-42.316 23.409-56.722c12.605-12.604 12.605-32.412 0-45.017s-32.412-12.605-45.017 0C16.206 68.426 0 104.44 0 144.055s16.206 75.629 42.316 101.739c12.605 12.605 32.413 12.605 45.017 0 11.705-12.605 11.705-32.413 0-45.017"/>+ <path fill="#4fb5e1" d="M87.333 87.333c14.406-15.306 34.213-24.309 56.722-24.309s42.316 9.003 56.722 23.409c12.604 12.605 32.412 12.605 45.017 0s12.605-32.412 0-45.017C219.684 16.206 183.67 0 144.055 0S68.426 16.206 42.316 42.316c-12.605 12.605-12.605 32.413 0 45.017 12.605 11.705 32.413 11.705 45.017 0"/>+ <path fill="#f05751" d="M200.777 200.777c-14.406 15.305-34.213 24.309-56.722 24.309s-42.316-9.004-56.722-23.41c-12.604-12.604-32.412-12.604-45.017 0-12.605 12.606-12.605 32.413 0 45.018 26.11 25.21 62.124 41.416 101.739 41.416s75.629-16.206 101.739-42.316c12.605-12.605 12.605-32.413 0-45.017-12.605-11.705-32.413-11.705-45.017 0"/>+ <circle cx="64.825" cy="64.825" r="31.512" fill="#0681b6"/>+ <circle cx="64.825" cy="223.285" r="31.512" fill="#cd4739"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/datadog.svg b/site/public/examples/workos-atlas/assets/icons/datadog.svgnew file mode 100644index 0000000..355ee0d--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/datadog.svg@@ -0,0 +1,3 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path fill-rule="evenodd" clip-rule="evenodd" d="M153.343 135.681L139.274 126.359L127.537 146.054L113.886 142.044L101.867 160.474L102.483 166.275L167.832 154.178L164.037 113.159L153.343 135.681ZM92.3995 117.996L102.884 116.548C104.581 117.313 105.762 117.605 107.796 118.125C110.963 118.954 114.631 119.75 120.062 117C121.326 116.371 123.958 113.953 125.023 112.574L167.981 104.745L172.363 158.027L98.7685 171.352L92.3995 117.996ZM172.197 98.7967L167.957 99.6082L159.81 15.0536L21.0032 31.2233L38.1038 170.636L54.3512 168.267C53.0537 166.406 51.0334 164.154 47.5833 161.271C42.7981 157.277 44.4906 150.494 47.3127 146.211C51.0472 138.973 70.2886 129.775 69.1984 118.206C68.8074 114 68.1419 108.524 64.2553 104.773C64.1092 106.33 64.3718 107.83 64.3718 107.83C64.3718 107.83 62.7761 105.784 61.9802 102.995C61.1903 101.925 60.5701 101.584 59.7308 100.156C59.1324 101.808 59.2114 103.725 59.2114 103.725C59.2114 103.725 57.906 100.626 57.6947 98.011C56.9205 99.1816 56.725 101.406 56.725 101.406C56.725 101.406 55.0286 96.521 55.4157 93.8902C54.6415 91.6007 52.3467 87.0573 52.9964 76.7305C57.2326 79.7125 66.558 79.0042 70.1918 73.6236C71.3985 71.8419 72.224 66.9771 69.5895 57.3924C67.897 51.2459 63.7063 42.0937 62.073 38.6216L61.8775 38.7625C62.7386 41.56 64.514 47.4247 65.1953 50.2678C67.2571 58.8923 67.8101 61.8941 66.8424 65.8701C66.0189 69.3262 64.044 71.588 59.0376 74.1156C54.0313 76.6512 47.3877 70.4809 46.9671 70.1396C42.1029 66.247 38.3408 59.8962 37.9201 56.8111C37.4837 53.4343 39.8575 51.4066 41.0543 48.6449C39.342 49.1369 37.4323 50.0099 37.4323 50.0099C37.4323 50.0099 39.7113 47.641 42.5216 45.5915C43.6848 44.8177 44.3681 44.3257 45.5945 43.3019C43.8191 43.2722 42.3774 43.3237 42.3774 43.3237C42.3774 43.3237 45.3378 41.7167 48.4068 40.5461C46.1613 40.4469 44.0126 40.5303 44.0126 40.5303C44.0126 40.5303 50.6187 37.5622 55.8363 35.3837C59.4247 33.9056 62.9301 34.3421 64.8991 37.2031C67.4842 40.9509 70.1997 42.9865 75.9546 44.2483C79.4876 42.675 80.562 41.8655 85.0015 40.6513C88.9099 36.3341 91.9788 35.7746 91.9788 35.7746C91.9788 35.7746 90.4562 37.1773 90.0494 39.3815C92.2652 37.6276 94.6943 36.1634 94.6943 36.1634C94.6943 36.1634 93.7543 37.33 92.8774 39.1831L93.0808 39.4867C95.666 37.9292 98.7053 36.7011 98.7053 36.7011C98.7053 36.7011 97.8364 37.8042 96.8173 39.2327C98.7665 39.2168 102.72 39.316 104.255 39.4906C113.314 39.691 115.194 29.771 118.67 28.527C123.022 26.9656 124.967 26.0212 132.385 33.3402C138.75 39.6236 143.723 50.8709 141.254 53.3906C139.185 55.4818 135.101 52.5752 130.574 46.9069C128.183 43.9051 126.374 40.3576 125.526 35.848C124.811 32.0427 122.029 29.8345 122.029 29.8345C122.029 29.8345 123.644 33.4414 123.644 36.6277C123.644 38.3677 123.861 44.8733 126.638 48.5238C126.364 49.0575 126.235 51.1646 125.931 51.5673C122.7 47.6449 115.762 44.8375 114.631 44.0102C118.46 47.1628 127.262 54.4044 130.643 61.3445C133.841 67.9076 131.957 73.9232 133.574 75.4806C134.034 75.927 140.451 83.9583 141.685 87.9938C143.838 95.0271 141.813 102.418 138.995 107.003L131.125 108.235C129.974 107.913 129.198 107.753 128.165 107.151C128.734 106.14 129.865 103.616 129.877 103.096L129.433 102.312C126.984 105.798 122.88 109.183 119.471 111.127C115.01 113.667 109.867 113.276 106.52 112.234C97.0188 109.29 88.035 102.84 85.8685 101.146C85.8685 101.146 85.8014 102.499 86.2102 102.802C88.6057 105.517 94.0939 110.427 99.3985 113.849L88.0903 115.099L93.4363 156.918C91.0664 157.26 90.6971 157.426 88.1021 157.797C85.8152 149.681 81.4408 144.381 76.6596 141.294C72.4432 138.572 66.6271 137.959 61.0599 139.066L60.7025 139.483C64.5732 139.078 69.1432 139.642 73.8375 142.627C78.4449 145.554 82.1577 153.113 83.5243 157.664C85.2741 163.481 86.4847 169.703 81.7746 176.298C78.4232 180.986 68.6396 183.577 60.736 177.973C62.8472 181.383 65.7009 184.173 69.5421 184.698C75.2456 185.476 80.6588 184.482 84.3854 180.639C87.5669 177.354 89.2535 170.483 88.8091 163.247L93.8431 162.513L95.66 175.501L178.997 165.42L172.197 98.7967ZM121.496 63.5269C121.263 64.0606 120.897 64.4098 121.446 66.1458L121.48 66.245L121.567 66.4692L121.796 66.989C122.785 69.0207 123.871 70.9372 125.686 71.9153C126.156 71.836 126.642 71.7824 127.146 71.7566C128.85 71.6812 129.926 71.953 130.61 72.3221C130.671 71.9808 130.685 71.4808 130.647 70.7448C130.515 68.1715 131.155 63.7948 126.231 61.4913C124.373 60.6243 121.766 60.8922 120.897 61.9734C121.055 61.9933 121.197 62.027 121.308 62.0647C122.621 62.527 121.731 62.9813 121.496 63.5269ZM135.294 87.5374C134.648 87.1803 131.631 87.3212 129.51 87.5751C125.469 88.0533 121.107 89.4619 120.151 90.2119C118.413 91.561 119.203 93.9141 120.486 94.8803C124.087 97.5825 127.243 99.3939 130.574 98.9534C132.62 98.6836 134.423 95.4298 135.701 92.4776C136.576 90.444 136.576 88.2497 135.294 87.5374ZM99.521 66.7133C100.66 65.626 93.8451 64.1975 88.5563 67.8203C84.6559 70.4928 84.5315 76.2226 88.266 79.4705C88.6393 79.7919 88.9474 80.02 89.2357 80.2065C90.3258 79.6907 91.5681 79.1689 92.9979 78.7026C95.4132 77.915 97.4216 77.5083 99.0726 77.292C99.8626 76.4052 100.781 74.8437 100.552 72.0165C100.24 68.1814 97.3466 68.7905 99.521 66.7133Z" fill="#632CA6"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/digitalocean.svg b/site/public/examples/workos-atlas/assets/icons/digitalocean.svgnew file mode 100644index 0000000..9072b58--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/digitalocean.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-16 -16 160 160">+ <path fill="#0080ff" d="M64.142 102.96H39.24V78.522h24.903ZM39.24 122.131H20.373v-19.173H39.24Zm-18.866-19.173H4.53V87.167h15.843Zm43.394 24.814v-24.814c26.41 0 46.784-25.94 36.597-53.388-3.775-10.15-11.694-18.42-22.26-22.181-27.167-9.772-53.2 10.527-53.2 36.468H0c0-41.354 40.37-74.064 84.52-60.53 19.242 6.017 34.334 21.055 40.37 40.23 13.581 43.985-19.245 84.214-61.123 84.214Zm0 0"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/discord.svg b/site/public/examples/workos-atlas/assets/icons/discord.svgnew file mode 100644index 0000000..04eb008--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/discord.svg@@ -0,0 +1,3 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M123.009 37C121.377 39.884 119.912 42.8674 118.58 45.9171C105.924 44.0276 93.0349 44.0276 80.346 45.9171C79.0468 42.8674 77.5483 39.884 75.9163 37C64.0265 39.0221 52.4365 42.5691 41.4458 47.5746C19.6646 79.6961 13.7697 110.989 16.7005 141.851C29.4562 151.232 43.7439 158.392 58.9642 162.967C62.3945 158.392 65.4253 153.519 68.0231 148.448C63.0939 146.624 58.3315 144.337 53.7686 141.685C54.9676 140.823 56.1333 139.928 57.2657 139.066C84.0095 151.597 114.983 151.597 141.76 139.066C142.892 139.995 144.058 140.89 145.257 141.685C140.694 144.37 135.931 146.624 130.969 148.481C133.567 153.552 136.598 158.425 140.028 163C155.248 158.425 169.536 151.298 182.292 141.917C185.755 106.116 176.363 75.0885 157.48 47.6077C146.522 42.6022 134.932 39.0552 123.043 37.0663L123.009 37ZM71.7533 122.856C63.527 122.856 56.6995 115.431 56.6995 106.249C56.6995 97.0663 63.2606 89.6076 71.7198 89.6076C80.1793 89.6076 86.9068 97.0994 86.7737 106.249C86.6405 115.398 80.1461 122.856 71.7533 122.856ZM127.239 122.856C118.979 122.856 112.219 115.431 112.219 106.249C112.219 97.0663 118.78 89.6076 127.239 89.6076C135.698 89.6076 142.393 97.0994 142.259 106.249C142.126 115.398 135.632 122.856 127.239 122.856Z" fill="#5865F2"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/dropbox.svg b/site/public/examples/workos-atlas/assets/icons/dropbox.svgnew file mode 100644index 0000000..ed58ae1--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/dropbox.svg@@ -0,0 +1,3 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M13.0268 5.19008L3 11.6501L9.94131 17.242L20 11.0402M3 22.7277L13.0268 29.3152L20 23.4661L9.94131 17.2314M20 23.4661L27.0061 29.3152L37 22.7914L30.0906 17.2314M37 11.7032L27.0061 5.17944L20 11.0285L30.0906 17.2314M20.0319 24.7178L13.0257 30.5339L10.0051 28.5736V30.791L20.0319 36.8005L30.0587 30.791V28.5736L27.038 30.5339" fill="#007EE5"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/front.svg b/site/public/examples/workos-atlas/assets/icons/front.svgnew file mode 100644index 0000000..599018d--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/front.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<path d="M12 59.0584H27.8235V27.7586H59.3724V12H12V59.0584Z" fill="#FF4802" style="fill:#FF4802;fill-opacity:1;"/>+<path d="M45.7262 59.9999C53.6098 59.9999 60.0007 53.609 60.0007 45.7255C60.0007 37.842 53.6098 31.4512 45.7262 31.4512C37.8427 31.4512 31.4518 37.842 31.4518 45.7255C31.4518 53.609 37.8427 59.9999 45.7262 59.9999Z" fill="#FF4802" style="fill:#FF4802;fill-opacity:1;"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/github.svg b/site/public/examples/workos-atlas/assets/icons/github.svgnew file mode 100644index 0000000..0607d48--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/github.svg@@ -0,0 +1,3 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path fill-rule="evenodd" clip-rule="evenodd" d="M100.069 18.3997C54.1431 18.3997 17.0168 55.7997 17.0168 102.069C17.0168 139.054 40.8049 170.361 73.8053 181.442C77.9312 182.275 79.4425 179.641 79.4425 177.426C79.4425 175.486 79.3065 168.838 79.3065 161.91C56.2035 166.898 51.3925 151.936 51.3925 151.936C47.6797 142.24 42.1785 139.747 42.1785 139.747C34.6169 134.622 42.7293 134.622 42.7293 134.622C51.1171 135.176 55.5184 143.21 55.5184 143.21C62.9423 155.953 74.9052 152.353 79.7179 150.136C80.4047 144.733 82.6062 140.993 84.9437 138.916C66.5174 136.976 47.1306 129.773 47.1306 97.635C47.1306 88.4924 50.4286 81.0124 55.6544 75.195C54.8299 73.1176 51.9416 64.5275 56.4806 53.0304C56.4806 53.0304 63.4931 50.8136 79.3048 61.6188C86.0744 59.7873 93.0557 58.8556 100.069 58.8478C107.081 58.8478 114.23 59.8185 120.831 61.6188C136.644 50.8136 143.657 53.0304 143.657 53.0304C148.196 64.5275 145.306 73.1176 144.481 75.195C149.845 81.0124 153.007 88.4924 153.007 97.635C153.007 129.773 133.62 136.837 115.056 138.916C118.082 141.548 120.693 146.534 120.693 154.43C120.693 165.65 120.557 174.655 120.557 177.424C120.557 179.641 122.07 182.275 126.194 181.443C159.195 170.359 182.983 139.054 182.983 102.069C183.119 55.7997 145.856 18.3997 100.069 18.3997Z" fill="#24292F"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/gitlab.svg b/site/public/examples/workos-atlas/assets/icons/gitlab.svgnew file mode 100644index 0000000..1b523fb--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/gitlab.svg@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<path d="M62.3024 30.7419L62.2294 30.547L54.8518 11.3027C54.7025 10.9249 54.4368 10.6043 54.0932 10.3875C53.8368 10.2234 53.5455 10.1216 53.2427 10.0903C52.9399 10.0591 52.634 10.0992 52.3495 10.2074C52.065 10.3157 51.8098 10.4891 51.6043 10.7137C51.3989 10.9384 51.249 11.2081 51.1665 11.5011L46.1867 26.7469H26.0203L21.0404 11.5011C20.9573 11.2085 20.807 10.9393 20.6015 10.7151C20.396 10.4909 20.1409 10.3178 19.8566 10.2096C19.5723 10.1014 19.2667 10.0612 18.9641 10.0921C18.6615 10.123 18.3703 10.2241 18.1137 10.3875C17.7701 10.6043 17.5044 10.9249 17.3551 11.3027L9.98105 30.5505L9.90449 30.7419C8.84284 33.5165 8.71205 36.561 9.53183 39.4165C10.3516 42.2719 12.0775 44.7834 14.4493 46.5723L14.4772 46.5931L14.5398 46.6419L25.7627 55.0529L31.3307 59.2602L34.7132 61.818C35.1101 62.1178 35.5939 62.28 36.0913 62.28C36.5887 62.28 37.0725 62.1178 37.4694 61.818L40.8519 59.2602L46.4198 55.0529L57.7228 46.5931L57.7541 46.5688C60.1258 44.7806 61.8519 42.2699 62.6723 39.4152C63.4927 36.5604 63.3629 33.5164 62.3024 30.7419Z" fill="#E24329" style="fill:#E24329;fill:color(display-p3 0.8863 0.2627 0.1608);fill-opacity:1;"/>+<path d="M62.3025 30.7418L62.2295 30.5469C58.635 31.2845 55.2481 32.808 52.3116 35.0083L36.1123 47.2578L46.4269 55.0529L57.7299 46.5931L57.7612 46.5687C60.1316 44.7796 61.8564 42.2685 62.6755 39.4138C63.4946 36.5592 63.3637 33.5156 62.3025 30.7418Z" fill="#FC6D26" style="fill:#FC6D26;fill:color(display-p3 0.9882 0.4275 0.1490);fill-opacity:1;"/>+<path d="M25.7626 55.0529L31.3305 59.2602L34.7131 61.818C35.1099 62.1177 35.5938 62.2799 36.0911 62.2799C36.5885 62.2799 37.0723 62.1177 37.4692 61.818L40.8517 59.2602L46.4197 55.0529L36.1051 47.2578L25.7626 55.0529Z" fill="#FCA326" style="fill:#FCA326;fill:color(display-p3 0.9882 0.6392 0.1490);fill-opacity:1;"/>+<path d="M19.8955 35.0083C16.96 32.8091 13.5742 31.2868 9.98105 30.5504L9.90449 30.7418C8.84284 33.5164 8.71205 36.561 9.53183 39.4164C10.3516 42.2718 12.0775 44.7833 14.4493 46.5722L14.4772 46.5931L14.5398 46.6418L25.7627 55.0529L36.0843 47.2578L19.8955 35.0083Z" fill="#FC6D26" style="fill:#FC6D26;fill:color(display-p3 0.9882 0.4275 0.1490);fill-opacity:1;"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/gmail.svg b/site/public/examples/workos-atlas/assets/icons/gmail.svgnew file mode 100644index 0000000..c939f9d--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/gmail.svg@@ -0,0 +1,10 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="72" height="73" viewBox="0 0 72 73" fill="none">+<rect x="10" y="16.6411" width="52.2" height="39.15" fill="url(#pattern0_8591_2586)" style=""/>+<defs>+<pattern id="pattern0_8591_2586" patternContentUnits="objectBoundingBox" width="1" height="1">+<use xlink:href="#image0_8591_2586" transform="scale(0.000976563 0.00130208)"/>+</pattern>+<image id="image0_8591_2586" width="1024" height="768" preserveAspectRatio="none" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAMACAYAAAC6uhUNAAAABGdBTUEAALGPC/xhBQAAACBjSFJNAAB6JgAAgIQAAPoAAACA6AAAdTAAAOpgAAA6mAAAF3CculE8AAAABmJLR0QA/wD/AP+gvaeTAAAAB3RJTUUH6AcDBhgLhxJ90gAAOOFJREFUeNrt3Xu83HV9J/73Z2ZOTm6IiKKGQCCk2IqiFqg3QBCQ1suvdbEBte52u8q6bVdtbbWKu03d2qrdXuhlq6itq7W7y637kApVQoIYEiBBuyJaFYmIRgUpd3I5M/P5/WHCLTk5l/nOzPfyfD4ePB4+TM7tM3NO5vs6r9dMCobuwoj2siOPXNVKvZ/IOZ4eKZZFbi2LlJdFjkNziqeniEMiojXHd92LiLsi0g8j8u0p4vs50ndT6m+LHNsi+rcduOjArx9z88273AoAAMD+5Mtjcqoz8VOtdv+wfr+1PKX8tJTzYTmlp0eK5RHx1Mhx8DyvW+6IiO9FxPdTzt/LKX0/5/TdVrv/g27qfGPy8ztvTWui71YYruQIivX5FSuOnGjnYyJaz8qRnxU5nhkpnhkRk2P6lKYi0r9E5K+kSF+O6H8l5/ZNL9669Ta3FgAANPBCP0faedXCIzt56tm5lZ6VIx2bcn52RPxERHTG9Gk9FBFfy5G+knK+ObXyV9r93s3pjPiOW0wAUAoXRrSXr1pxbM75pMjppIg4KSKeWpFP/18j4poU+epebl994tatN6WQuAEAQO0u+C+M9tSTJ56b+vklEXHq7uuWAyvy6W/Lka6JiA05p2sWXLvrZk0BAcDIXHvUYc9Kuf3KHPmkiDgxIp5Qj58KcVdOcU1K+epeirUn3/Kdr7q1AQCgmnatm3hO9OKlKeU9F/xPrMmXdndEbIgU1/RS+7KFL935dbe2AKDA6+JobTjq8Oe1cutVEfnsiPjJhtwxtuacLsupf9GLb/3OtSkiuzcAAEB57Vy34JhWr/+LkeK1EXF0M65b8q050j9GxGWddvfqdGp03RMEAHNyYUT70JUrfjYizoqIV0bEUxp+JLekyBelVrr4hbfc9kX3EAAAGL+cI02tmzgh5fyaFPk1OdKRDT+SH6TIn86RLu5s6F5lKiAA2K8vrFx5dIruv08p/dvIscyJ7PPHzDdzSh+Zak/97anf2PYj5wEAACN+RP7ZOKTb7vyHFPlNLvqnOaNI30mRP97tdT6+6MwdW52IACAiItYfccTCydR/VT+lc1PEac5k1nZGSp9u5f4FL7z1O2sdBwAADNeudRPHtfr9c3OkN0TEIicyK/3IsSmn9ImJ3tSn0pnxoACggTasXHl4K3pvyxFvjIgDfF8M5J9Tyn+9c+H2vz/15jsfcBwAAFCMfHk8YWrBxBtSym+OHM9yIgO5JyI+3Ol2z08/G98XADTAxpXLn51T+7cjxzkRMeF7oFD3RaS/3tWP95/67W/f4zgAAGCeF/4b4oDuzs6vRo7fifo8g39Z7Mo5/Z+c0vsnT9/VqFc/a0wAsGHl4SemSO+MiFeEmv+w3R+R/ocgAAAAXPiX+bgj4jMRcf7E6d1GzJprfyG88agVL8o5PhARJ7p/j9zdKcWfLsjtPz/+1lvvdRwAADDNlegX4qDuzs7bIuKtEXGgExm5dbmf3rngZVNbBAAVtGnFip/qt+MPIuIX3JdLEARE+uA9rc6fvvyWW3Y6DgAA2H3hvz4Wdrud34oUv+XCf/w3R450YT+1zlt42s5vCQAqYMNhhy1LnfbvRsq/EhEd9+FSuSUi3vbiW2/7jKMAAKDpptZ2To8UfxE5ftJplOumSZH/tt3u/W46NX4gACihy1etmjywv+t3ItI7ImKx+2yZ73Xp0/12/zdO+sZ3bnUYAAA0zY71k6va3d75keLlTqPU7o8U7+sc2P2TdHxMCQBKYsORh53USq0P5Yhnuo9Wxq7I6UO7Fj94npcOBACgCfJlsbi7sPOOSPHOiFjoRCrjpoj4jxOndzcJAMZo4/LlT8oL2n8UEf8+PLN/Vd0WuXXui7du/ZyjAACgrrpXtX+un1sfTpEPcxqV1E+RP9TOvXenM6KyT3Be2YvmjUce/os5pb+MiEPcFysvR04feeCh7b955g9/+KDjAACgNg90N8ai7kOd90fEfw6/tKyDH6Sc39k5o/cJAcAIrD962ZMnuwv+Jkd+lfte7fxLjv4bTrz19i2OAgCAqtu1duKEFPmTEfEMp1E36aJOe+rcdGrcIwAYkg1HrTg15fhkRBzqDldb3Yj0x5MHHfxfjr/xxinHAQBA1eT10en2O2+PHO+NiAVOpKa3c6TbU8q/NHFa9xoBQIG2HHfcxI6773xv+vEz/Lfc1RogxXUpem940be+e4vDAACgKnasn1zV7vU+GREvcBqN0I0Uv9+5q/v7aXX0BAAD2nTEEUf0W/lTEfEi963GeSBHvPnEW2/7lKMAAKD0V4JXts/KKX0sIg50Gg2T4/pe6rxu4ek7Sv1S56UOADauPPyVOdKnIuIJ7lFN/mZKF6Sp7tte9N3vbncYAACU7uHqxljUe6j9ZznSuU6j0f41Is6eOL27VgAw94v/t+ZIfxwRbfcjUsRX+628+sRbvnOz0wAAoCx2rJ08uh29CyPiOU6DiOhFivMmTut+QAAwC5evWjV5YH/XhyLSL7vv8DgmAQAAlIbKP9NeaKf8kfZdvV9Pq2OXAGAa649e9uQFvYmLI8dL3GXYz732k5Pbp958/LZtDzkMAABGLa+Phd1e5wMR8RanwX5s6PS6Z6Uz4w4BwONsXLn82Tna/xgRh7ufMOMP3YgvR26tPnHr1q87DQAARmXHuslntPu9CyPiWKfBzBfc+VvdVucVC1+6sxTXLaV4Sb0NKw87Pkd7nYt/Zv+NFMem1N+yYeWK1zsNAABGoXtl+6x2v3e9i39mK0c6qt3vXbPrcxPPLcl11Hhde+SRJ0fqXxae6Z/534tNAgAAGN5FnMo/g7snUrxi4rTuxsYGABtWrnh5irg4Iha5PzDgHdmrBAAAUDjP8k+BHoyIV0+c3r1yXJ/A2CYA16464udTxKUu/ilCjnhm6qfrTAIAAChK98r2We3o3eDin4IsiYjLule1Xz2uT2AsDYBrjzz8lyKlj0dE232AIdyrP5J29t76ou9+d7vDAABgrvLGWNTb3j4/5/Qmp8EQTKWcX9s5o3dJ7QOALxx5+KtaKV0aER23O0O8Y5sEAAAwZyr/jMiuiPj5idO7/zTKDzrSCcC1q1a8MKX0v1z8M2wmAQAAzJXKPyO0ICIumfpc58Wj/KAjawBcd+SRx/ZS/+qIOMhtTYz2Xu5VAgAAmJZn+WeM7upH6+TJ03d9tTYBwLWrDjsq91sbUsTT3L6MJwMwCQAAYG8q/5TA97rt7omLTo1vD/sDDX0CcMMRRzwt9VtXuvhnnHZPAjZtXLnidU4DAICIiO6V7de1o7fFxT9jdmin1/lsXhsHD/sDDbUBsOW44yZ23n3n2oh0stuU0jAJAABoNJV/Smpdp909M50a3WF9gKE2AHb+611/6eKf8v3EjzfsWjixecOqw49xGAAAzbJj7eTR3V7nOhf/lNBLu/3OB4f5AYYWAFx71BG/HCmf6zaknBmAVwkAAGgaz/JPBS5UfmPXlRO/Mqx3P5QJwLWrVrww+rE+IibdgpSeSQAAQL2vqVT+qZYdOdLJC06f2lz6AOCaFSue3m7H5og41O1GdTIArxIAAFDLKynP8k81bev0uyekl8W2It9poROAHNFqt/P/dvFP1XiVAACA+vEs/1TYsm6r8/Gci/2lfaHv7NqVh78zIr3fbUWlmQQAAFSayj+1uS9HeuuC06f+vHQBwIZVhx+T+mlLRCx0M1H9DMAkAACgilT+qZmd/dw6YfKMXTcV8c4KmQBcvmrVZPTT37v4py68SgAAQPV4ln9qaLKV+v8zXxgLShMAHJin3pcijnXbUDNLU8TfXXvUik9sWbZsseMAACinvD4WTq3tnJ9TujgiDnQi1Mzzuk/qrCniHQ08AfjCqiNOafXzVVHwEwpCqf5Rifhy5NbqE7du/brTAAAojx3rJp/R7vcuDL+QpN56keOUiTO6GwZ5JwNdtN98zDELWv38IRf/1F2KODal/haTAACA8uhe2T6r3e9d7+KfBmhHir/Jl8fk2AKAe3Y88I6IeIbbgoYwCQAAKAGVfxrqJ7oTnYFe2WLeE4DPH3XUYe3c/VqKWOJ2oGm8SgAAwHh4ln8a7qFO7v5UOiO+M583nncDoJ2757v4p6m8SgAAwOh5ln+IxVNp4gPzfeN5NQA2HHn4GSmlzzl7iIgUn5zcPvXm47dte8hhAAAUL6+Phd1e5wMR8RanARGR4rSJ07rrhh4A3HzMMQvu2f7Al8P2Hx79jWQSAAAwBCr/sE9f7Tyx+9x0fEzN5Y3mPAG4d/v9/8nFPzzW7knApo0rV7zOaQAAFKN7Zft17ehtcfEPe3nm1N0Tb5zrG82pAbD+iCMWLmjnb0WOZc4bpv2uMgkAABiAyj/MyrbO4u6q9KLYPts3mFMDYEHKv+biH2b6FyvesGvhxOYNqw4/xmEAAMzNjrWTR3d7netc/MOMlk1tn/gPc3mDWTcAPvvUpy5ZumThtyLiqc4ZZuWBHPHmE2+97VOOAgBgZt0r22fllD4WEQc6DZiV73cWd4+abQtg1g2AJUsX/qqLf5iTpSni7649asUntixbtthxAADsW14fC6fWds7PKV3s4h/m5OlTD02cO9u/PKsGwO7f/t8aEYc4X5g7rxIAALBvnuUfBvaDzvbuUelVMeNzkM2qAbD7t/8u/mGevEoAAMDePMs/FOJpU4tn1wKYsQFwYUT70JUrbomII5wrFMCrBAAADedZ/qHoS4z8rfaG3tFpTfT39/dmbAAcuuqIV7r4hyL/xfMqAQBAc3mWfxjGJUY6qndS+8yZ/t7ME4B+/JrjhKK/QeOZqZ+u27ByxeudBgDQFN0r22e1o3dDqPxD8dcYOc147b7fCcB1K5f/RC/aX485vFwgMEcmAQBA3S9MVP5hJN9qvX77GQtftvOb0/2F/TYAernz6y7+YdjfpiYBAEB9qfzDyKR26u33yQCnvbhff8xTli7Yvvi74XU4YVQeyBFvPvHW2z7lKACAOuhe2T4rp/Qx1xQwMnd3tneXT/eSgNM2ABZsX/KLvlFhpJamiL+79qgVF2xcvnyR4wAAqipvjEXdq9oX5JQudk0BI3VQb1H71dP94fQTgNQ/29nBOP7FjDfFgvYWkwAAoIp2rJ08uvtQZ1PO6U1OA8ZxOZGmvZbf5wTg+p889ODurs73I2LC8cHY3N+J9B+ff+u3/5ejAACqoHvFgtfmif6HI+IApwFjs7PT7j4tnRr3PP4P9tkA6O5s/xsX/zB2B0Qnvf3O03/mE9teddxixwEAlNXWU05ZeMdpJ5y/85tPeLuLfxi7yV6v/fP7+oN9BgA5pdXODMoh5/yG9kOtzd8/9QSTAACgdO487WeOXtJ+cPez/HsBMSjHNcS+r+n3CgDWH73sySniFEcG5ZEintlupevuPO2E1zsNAKAsfnj68WflyDdExHOcBpTqAuKM/E/xpBkDgInugtdERMeJQdnkpTni70wCAIBx21P5T9mz/ENJTUy1J35hxgCgFfn/c1ZQ4hjAJAAAGKPHVv6Bskop7z8A2HLccRM54iRHBSX/ZjYJAADGQOUfKuWUvP6x7f7HBAA77r7z+RGx1DlBFZgEAACjofIPlXTAVJ44btoAICJe6oygYjGASQAAMEQq/1BdqZ9fOm0AkFISAEAVv7FNAgCAIVD5h8o7dZ8BwJZlyxZHjhc4H6gqkwAAoBgq/1AbL86Xx+ReAcCOyc6LIx75A6CiMYBJAAAwAJV/qJXF3U7nBXsFAKmVXuJsoB5MAgCA+VD5hxpqxyl7/ucjLwmQ43lOBurk4UnAmVOLem9edtmNDzkTAGBftp5yysIl7Qc/ENlv/aF+lwWPXOs/+kkApXxQx+93kwAAYD9U/qHeUuRjHxMAbFy+/EkRcaijgbp+05sEAAB7U/mH+suRjsjr44kPBwD9ybZveKj/t75XCQAAIsKz/EPDpG6386yHA4BWfqQSANQ8BjAJAIBGU/mHBl4DpPSchwOAHEkAAA1iEgAAzaTyD83Uiv6xEbtfBSBFPCc7E2gYrxIAAE3hWf6h4Y/882MaALHKkUBTfxiYBABAnan8A5F+fM3f2vCMZxwQnvgDGv7zwCQAAOpI5R/Y7eB8WSxutXbu9PJ/QHiVAACoD8/yDzzezsnJQ1up1V/uKICHYwCTAACoNJV/YF/aqXdoq5daGgDAY5gEAEA1qfwD0z7GT3l5J/Xz8kgOA3g8rxIAAFXhWf6BGR/d57S8FSk0AID9/KAwCQCAMlP5B2YjRT60FTkvcxTA/n9YmAQAQBmp/AOzlVM6tJMiHZidBTDzjwyTAAAoCZV/YM5SPKEVKRY5CWDWMYBJAACMlco/ML8H8rGo1Q8BADA3JgEAMB4q/8AAFnVS5EXhZQCAOTMJAIBRUfkHCrC4FZE0AID5xwAmAQAwVCr/QCGP2yMtakU2AQAGYxIAAMOh8g8U9pg95UUdTwIIFMMkAACKovIPFP9wPRa3ImKhkwAK+7liEgAAA1H5B4ZkUSsiWs4BKJJJAADMj8o/MEStjjMAhsMkAABmS+UfGEkC4AiAocYAJgEAsF8q/4AAAKgNkwAA2DeVf2CUTACAETEJAIA9VP6BcdAAAEYbA5gEANBwKv+AAABoDJMAAJpK5R8YJxMAYExMAgBoDpV/oAw0AIDxxgAmAQDUnMo/IAAA2M0kAIC6UvkHysQEACgJkwAA6kPlHygjDQCgXDGASQAAFafyDwgAAGbJJACAqlL5B8rMBAAoKZMAAKpD5R+oAg0AoNwxgEkAACWn8g8IAAAKYhIAQFmp/ANVYgIAVIRJAADlofIPVJEGAFCtGMAkAIAxU/kHBAAAI2ISAMC4qPwDVWYCAFSUSQAAo6PyD9SBBgBQ7RjAJACAIVP5BwQAACVhEgDAsKj8A3ViAgDUhEkAAMVR+QfqSAMAqFcMYBIAwIBU/gEBAEBFmAQAMF8q/0CdmQAANWUSAMDsqfwDTaABANQ7BjAJAGAGKv+AAACgJkwCAJiOyj/QJCYAQEOYBADwCJV/oIk0AIBmxQAmAQCNp/IPCAAAGsIkAKC5VP6BJjMBABrKJACgSVT+ATQAgKbHACYBALWn8g8gAACICJMAgDpT+Qd4hAkAQESYBADUi8o/wN40AAAeHQOYBABUnso/gAAAYFZMAgCqS+UfYHomAAD7ZBIAUCUq/wAz0wAA2F8MYBIAUHoq/wACAIBCmAQAlJfKP8DsmQAAzIpJAECZqPwDzJ0GAMBcYgCTAICxU/kHEAAAjIRJAMD4qPwDzJ8JAMC8mAQAjJLKP8DgNAAABokBTAIAhk7lH0AAAFAKJgEAw6PyD1AcEwCAQpgEABRJ5R+geBoAAEXGACYBAANT+QcQAABUgkkAwPyp/AMMjwkAwFCYBADMhco/wPBpAAAMMwYwCQCYkco/gAAAoBZMAgCmp/IPMDomAAAjYRIA8Ggq/wCjpwEAMMoYwCQAQOUfQAAA0AwmAUCTqfwDjI8JAMBYmAQAzaLyDzB+GgAA44wBTAKABlD5BxAAABAmAUC9qfwDlIcJAEApmAQA9aLyD1A+GgAAZYoBTAKAGlD5BxAAADALJgFAlan8A5SXCQBAKZkEANWi8g9QfhoAAGWOAUwCgApQ+QcQAABQAJMAoMxU/gGqwwQAoBJMAoByUfkHqB4NAIAqxQAmAUAJqPwDCAAAGAGTAGCcVP4BqssEAKCSTAKA0VL5B6g+DQCAKscAJgHACKj8AwgAACgBkwBgmFT+AerDBACgFkwCgGKp/APUjwYAQJ1iAJMAoAAq/wACAAAqwCQAGITKP0B9mQAA1JJJADA3Kv8A9acBAFDnGMAkAJgFlX8AAQAANWASAOyPyj9Ac5gAADSCSQDwWCr/AM2jAQDQpBjAJAAIlX8AAQAAjWASAM2m8g/QXCYAAI1kEgBNo/IPgAYAQJNjAJMAaASVfwAEAACYBEDNqfwDsIcJAABhEgD1o/IPwONpAADwSAxgEgC1oPIPgAAAgBmZBEC1qfwDMB0TAAD2wSQAqkblH4CZaAAAMH0MYBIAlaDyD4AAAICBmQRAuan8AzBbJgAAzIJJAJSNyj8Ac6UBAMDsYwCTACgFlX8ABAAADJ1JAIyXyj8A82UCAMA8mATAqKn8AzCoVkTscgwAzCsGMAmAkVD5B6AAu1ofe/nHv9VLndudBQDzYRIAw6XyD8CgetHa9rb7Xvj11reffsJPvf8N1z7xrgNXbHIsAMzPw5OAT2x71XGLnQcMbusppyy847QTzk85XRwRBzoRAObjB73FN7zyrjMXXb/rkGe3IiJ2TCw94M9ec/kLr3nOG78QJgEAzDcGMAmAQqj8A1CA7j/uPOzz/+buM064Jy84KOJxrwJw5fG/cZJJAACDMAmAwaj8AzCo3ZX/r73v/p9+SY5Ie/7/vV4G0CQAgMGZBMBcqfwDUIRHV/4f/2etfb2BSQAAhcQAJgEwKyr/ABRgr8r/rAKAPUwCABiUSQDsn8o/AIOarvI/pwAgwiQAgCKYBMDjqfwDUIT9Vf7nHABEmAQAUFAMYBIAEaHyD0AhZqz8zysA2MMkAIBBmQTQdCr/AAxqtpX/gQKACJMAAIpgEkDzqPwDUIS5VP4HDgAiTAIAKCgGMAmgIVT+ASjAnCv/hQQAe5gEADAokwDqTuUfgEHNt/JfaAAQYRIAQBFMAqgflX8AijBI5b/wACDCJACAgmIAkwBqQuUfgAIMXPkfSgCwh0kAAIMyCaDqVP4BGFRRlf+hBgARJgEAFMEkgOpR+QegCEVW/oceAESYBABQUAxgEkBFqPwDUIDCK/8jCQD2MAkAYFAmAZSdyj8AgxpW5X+kAUCESQAARTAJoHxU/gEowjAr/yMPACJMAgAoKAYwCaAkVP4BKMDQK/9jCQD2MAkAYFAmAYybyj8AgxpV5X+sAUCESQAARTAJYPRU/gEowigr/2MPACJMAgAoKAYwCWBEVP4BKMDIK/+lCAD2MAkAYFAmAQybyj8AgxpX5b9UAUCESQAARTAJoHgq/wAUYZyV/9IFABE/ngScf9ZnXnDdMa+9JkwCAJhvDGASQEFU/gEoQHfdzkPHWvkvZQAQEZFTSp95wXtONgkAYBAmAQxK5R+AQe2p/J93//FjrfyXNgDYwyQAgMGZBDB3Kv8AFKFMlf/SBwARJgEAFBQDmAQwSyr/ABSgdJX/SgQAESYBABTDJICZqPwDMKiyVv4rEwDsYRIAwOBMAtibyj8ARShz5b9yAUCESQAABcUAJgHspvIPQAFKX/mvZAAQYRIAQDFMAlD5B2BQVan8VzYA2MMkAIDBmQQ0kco/AEWoUuW/8gFAhEkAAAXFACYBjaHyD0ABKlf5r0UAEGESAEAxTALqT+UfgEFVtfJfmwBgD5MAAAZnElBHKv8AFKHKlf/aBQARJgEAFBQDmATUhso/AAWofOW/lgFAhEkAAMUwCag+lX8ABlWXyn9tA4A9TAIAGJxJQBWp/ANQhDpV/msfAESYBABQUAxgElAZKv8AFKB2lf9GBAARJgEAFMMkoPxU/gEYVF0r/40JAPYwCQBgcCYBZaTyD0AR6lz5b1wAEGESAEBBMYBJQGmo/ANQgNpX/hsZAESYBABQDJOA8VP5B2BQTan8NzYA2MMkAIDBmQSMg8o/AEVoUuW/8QFAhEkAAAXFACYBI6PyD0ABGlf5FwDsedBmEgBAAUwChk/lH4BBNbXyLwB4HJMAAAZnEjAMKv8AFKHJlX8BwD6YBABQSAxgElAYlX8ACtD4yr8AYLoHbSYBABTAJGBwKv8ADErlXwAwKyYBAAzOJGA+VP4BKILKvwBgTkwCACgkBjAJmDWVfwAKoPIvAJjngzaTAAAKYBIwM5V/AAal8i8AKIRJAACDMwnYF5V/AIqg8i8AKJRJAACFxAAmAQ9T+QegACr/AoAhPWgzCQCgACYBKv8ADE7lXwAwEiYBAAyumZMAlX8AiqDyLwAYKZMAAAqJARo0CVD5B6AAKv8CgDE9aDMJAKAATZgEqPwDMCiVfwFAKZgEADC4ek4CVP4BKILKvwCgVEwCACgkBqjRJEDlH4ACqPwLAEr6oM0kAIAC1GESoPIPwKBU/gUAlWASAMDgqjkJUPkHoAgq/wKASjEJAKCQGKBCkwCVfwAKoPIvAKjogzaTAAAKUIVJgMo/AINS+RcA1IJJAACDK+ckQOUfgCKo/AsAasUkAIBCYoASTQJU/gEogMq/AKCmD9pMAgAoQBkmASr/AAxK5V8A0AgmAQAMbjyTAJV/AIqg8i8AaBSTAAAKiQFGOAlQ+QegACr/AoCGPmgzCQCgAKOYBKj8AzAolX8BAGESAEARhjMJUPkHoAgq/wIAHsUkAIBCYoACJwEq/wAUQOVfAMA+H7SZBABQgCImASr/AAxK5V8AwCyYBAAwuPlNAlT+ASiCyr8AgDkwCQCgkBhgDpMAlX8ACqDyLwBgXg/aTAIAKMBsJgEq/wAMSuVfAEABTAIAGNy+JwEq/wAUQeVfAECBTAIAKCQGeNQkQOUfgAKo/FdMxxFU5EHb7knAzSvO/NovX/HGpe3cPcypADBXP54ExKYcOSLiACcCwHz0orXt7fc9/67rdx3yEqdRHRoAFWMSAEABDnDxD8B8qfwLABghkwAAAGAMVP4FAIyDVwkAAABGxbP8CwAoAZMAAABgmFT+BQCUiEkAAAAwBCr/AgDKyCQAAAAoisq/AIAKMAkAAAAG8UOVfwEA1WESAAAAzMPuyv/px6v8CwCoEJMAAABgth5d+e9Hcp0oAKCKTAIAAID9UfkXAFAjJgEAAMA+qPwLAKgjkwAAAGAPlX8BAA1gEgAAAM2m8i8AoEFMAgAAoJFU/gUANJFJAAAANIfKPwIATAIAAKDmVP4RAPAwkwAAAKgllX8EAOzNJAAAAOpD5R8BADMyCQAAgGpT+UcAwKyZBAAAQCWp/CMAYO5MAgAAoDpU/hEAMDCTAAAAKDeVfwQAFMYkAAAASknlHwEAxTMJAACA8lD5RwDA0JkEAADAeKn8IwBgZEwCAABgLFT+EQAweiYBAAAwOir/CAAYO5MAAAAYLpV/BACUhkkAAAAMhco/AgDKxyQAAACKo/KPAIDSMwkAAIDBqPwjAKAyTAIAAGBeVP4RAFA9JgEAADB7Kv8IAKg8kwAAANg/lX8EANSGSQAAAOyTyj8CAOrHJAAAAB6h8o8AgNozCQAAoOlU/hEA0BgmAQAANJTKPwIAmsckAACAJlH5RwBA45kEAABQdyr/CABgN5MAAABqSuUfAQA8nkkAAAB1ovKPAABmYBIAAEDVqfwjAIBZMgkAAKCiVP4RAMBcmQQAAFAlKv8IAGBAJgEAAJSdyj8CACiISQAAACWl8o8AAIpmEgAAQJmo/CMAgCEzCQAAYNxU/hEAwIiYBAAAMCYq/wgAYNRMAgAAGCWVfwQAMGYmAQAADJvKPwIAKAmTAAAAhkTlHwEAlI1JAAAARVL5RwAAJWcSAADAoFT+EQBARZgEAAAwTyr/CACgakwCAACYC5V/BABQcSYBAADMROUfAQDUhEkAAADTUPlHAAB1YxIAAMCjqfwjAICaMwkAAEDlHwEANIRJAABAY6n8IwCApjEJAABoFpV/EADQcCYBAAD1p/IPAgCICJMAAIAaU/kHAQA8lkkAAEC9qPyDAAD2yyQAAKD6VP5BAACzYhIAAFBZKv8gAIC5MQkAAKgWlX8QAMBATAIAAMpP5R8EAFAIkwAAgNJS+QcBABTLJAAAoFxU/kEAAENlEgAAMH4q/yAAgJEwCQAAGBuVfxAAwGiZBAAAjJbKPwgAYKxMAgAAhk/lHwQAUAomAQAAQ6PyDwIAKBeTAACAYqn8gwAASs0kAABgcCr/IACASjAJAACYN5V/EABAtZgEAADMjco/CACg0kwCAABmpvIPAgCoBZMAAIBpqfyDAADqxSQAAOCxVP5BAAC1ZhIAAKDyDwIAaAiTAACgwVT+QQAAzWISAAA0jco/CACg0UwCAIAmUPkHAQAQJgEAQK2p/IMAAHg0kwAAoG5U/kEAAOyHSQAAUAcq/yAAAGbh0ZOAfrR7TgQAqIqco6/yDwIAYC7/eO6eBHzqzA/dlSLd5kQAgLJLkW77rQXP/ZHKPwgAgHn46lNf0G4tSMdGioucBgBQYpct6LR/estBT2g7ChAAAPN08BXX3/eUtZvPjoi3Za8SAACUSzen9HtPOWnzLxz42U3/6jhAAAAMKEXkQ67afH6rlV4cEbc6EQCgBG7POV7y1LU3rElrou84QAAAFOgpV96wpb2g9TyTAABgzC6b7HSe+9R1mzc6ChAAAENiEgAAjJHKPwgAgFEyCQAAxkDlHwQAwLiYBAAAI6LyDwIAYNxMAgCAIVL5BwEAUCYmAQDAEKj8gwAAKCuTAACgICr/IAAAys4kAAAYgMo/CACAKjEJAADmQeUfBABAVZkEAACzpPIPAgCg6kwCAID9UPkHAQBQJyYBAMA+qPyDAACoK5MAAGA3lX8QAAB1ZxIAAI2m8g8CAKBJTAIAoJFU/kEAADSVSQAANIbKPyAAgKYzCQCAWlP5BwQAwCNMAgCgllT+AQEAsG8mAQBQGyr/gAAA2D+TAACoNJV/QAAAzJ5JAABUkso/IAAA5sckAAAqQ+UfEAAAgzEJAIBSU/kHBABAcUwCAKCUVP4BAQAwHCYBAFAaKv+AAAAYLpMAABgrlX9AAACMjkkAAIyFyj8gAADGwyQAAEZG5R8QAADjZRIAAEOl8g8IAIDyMAkAgKFQ+QcEAEA5mQQAQGFU/gEBAFBuJgEAMBCVf0AAAFSHSQAAzIvKPyAAAKrJJAAAZk3lHxAAANVmEgAA+6XyDwgAgPowCQCAfVL5BwQAQD2ZBADAw1T+AQEAUG8mAQA0nMo/IAAAmsMkAICGUvkHBABAM5kEANAgKv+AAABoNpMAAGpO5R8QAADsYRIAQE2p/AMCAIB9MQkAoEZU/gEBAMD+mAQAUHEq/4AAAGC2TAIAqCiVf0AAADAfJgEAVIjKPyAAABiESQAAJafyDwgAAIpiEgBASan8AwIAgGEwCQCgRFT+AQEAwDCZBAAwZir/gAAAYFRMAgAYE5V/QAAAMA4mAQCMkMo/IAAAGCeTAACGTOUfEAAAlIVJAABDovIPCAAAysgkAIACqfwDAgCAMjMJAGBAKv+AAACgKkwCAJgnlX9AAABQRSYBAMyByj8gAACoMpMAAGag8g8IAADqwiQAgGmo/AMCAIA6MgkA4FFU/gEBAECdmQQANJ7KPyAAAGgKkwCAxlL5BwQAAE1kEgDQKCr/gADAEQBNZhIAUHsq/wACAIAfMwkAqC2VfwABAMDeTAIAakXlH0AAADA9kwCAylP5BxAAAMyOSQBAZan8AwgAAObOJACgUlT+AQQAAPNnEgBQeir/AAIAgGKYBACUlso/gAAAoHgmAQClovIPIAAAGB6TAICxU/kHEAAAjIZJAMDYqPwDCAAARs8kAGCkVP4BBAAA42MSADB0Kv8AAgCAcjAJABgalX8AAQBA+ZgEABRK5R9AAABQXiYBAANT+QcQAABUg0kAwLyp/AMIAACqxyQAYE5U/gEEAADVZRIAMCOVfwABAEA9mAQATEvlH0AAAFA/JgEAj6HyDyAAAKgvkwAAlX8AAQBAQ5gEAA2m8g8gAABoHpMAoGFU/gEEAADNZRIANIDKP4AAAIAIkwCg1lT+AQQAADyeSQBQMyr/AAIAAKZjEgDUgMo/gAAAgNkwCQAqTOUfQAAAwFyZBAAVo/IPIAAAYL5MAoAKUPkHEAAAUASTAKDEVP4BBAAAFM0kACgZlX8AAQAAw2ISAJSAyj+AAACAUTAJAMZI5R9AAADAqJkEACOm8g8gAABgXEwCgBFQ+QcQAABQBiYBwBCp/AMIAAAoG5MAoEg5xadV/gHqpeMIAOrj4Cuuvy9HnH3naSdcmyM+mCIWOBVgjro5pfcdsvaG30sR2XEA1IcGAEDNmAQAA3ik8u/iH0AAAEA1mAQAc6HyD1B/JgAANWYSAMyCyj9AQ2gAANScSQCwHyr/AAIAAOrGJAB4NJV/gOYxAQBoEJMAIFT+ARpLAwCgYUwCoNFU/gEEAAA0jUkANIvKPwAmAAANZhIAjaDyD0BEaAAANJ5JANSayj8AAgAAHsskAOpF5R+AxzMBAOBhJgFQCyr/AOyTBgAAj2ESAJWm8g+AAACAuTEJgGpR+QdgJiYAAEzLJAAqQeUfgFnRAABgv0wCoNRU/gEQAABQLJMAKBeVfwDmygQAgFkzCYBSUPkHYF40AACYE5MAGCuVfwAEAACMlkkAjJbKPwCDMgEAYN5MAmAkVP4BKIQGAAADMQmAoVL5B0AAAEC5mARAsVT+ASiaCQAAhTEJgEKo/AMwFBoAABTKJAAGovIPgAAAgGoxCYC5UfkHYNhMAAAYGpMAmBWVfwBGQgMAgKEyCYD9UvkHQAAAQL2YBMBjqfwDMGomAACMjEkARITKPwBjogEAwEiZBNBwKv8ACAAAaBaTAJpG5R+AcTMBAGBsTAJoCJV/AEpBAwCAsTIJoOZU/gEQAADAo5kEUDcq/wCUjQkAAKVhEkBNqPwDUEoaAACUikkAFafyD4AAAADmwiSAqlH5B6DsTAAAKC2TACpC5R+AStAAAKDUTAIoOZV/AAQAAFAkkwDKRuUfgKoxAQCgMkwCKAmVfwAqSQMAgEoxCWDMVP4BEAAAwCiZBDBqKv8AVJ0JAACVZRLAiKj8A1ALGgAAVJpJAEOm8g+AAAAAysQkgKKp/ANQNyYAANSGSQAFUfkHoJY0AACoFZMABqTyD4AAAACqxCSAuVL5B6DuTAAAqC2TAGZJ5R+ARtAAAKDWTAKYgco/AAIAAKgTkwAeT+UfgKYxAQCgMUwC2E3lH4BG0gAAoFFMAhpP5R8AAQAANIlJQPOo/APQdCYAADSWSUBjqPwDQGgAANBwJgG1p/IPAAIAAHiESUD9qPwDwGOZAADAbiYBtaHyDwD7oAEAAI9iElB5Kv8AIAAAgNkzCagelX8A2D8TAACYhklAZaj8A8AsaAAAwH6YBJSeyj8ACAAAoDgmAeWj8g8Ac2MCAACzZBJQGir/ADAPGgAAMAcmAWOn8g8AAgAAGB2TgNFT+QeAwZgAAMA8mQSMjMo/ABRAAwAABmASMHQq/wAgAACA8jAJKJ7KPwAUywQAAApiElAYlX8AGAINAAAokEnAwFT+AUAAAADVYRIwdyr/ADBcJgAAMCQHX3H9fRGx+s7TTzi3n+MvTAKm1Y2c3nPIVTd80G/9AWB4NAAAYMiesnbzBSYB07o953jJIetu+ICLfwAQAABA9UMAk4C9qPwDwGiZAADAiJgEPEzlHwDGQAMAAEas4ZMAlX8AEAAAQINCgAZOAlT+AWC8TAAAYEwaNAlQ+QeAEtAAAIAxq/kkQOUfAAQAAMDDIUANJwEq/wBQLiYAAFASNZoEqPwDQAlpAABAyVR8EqDyDwACAABg1iFABScBKv8AUG4mAABQUhWaBKj8A0AFaAAAQMmVfBKg8g8AAgAAoLAQoISTAJV/AKgWEwAAqIgSTQJU/gGggjQAAKBixjwJUPkHAAEAADCyEGAMkwCVfwCoNhMAAKioEU4CVP4BoAY0AACg4oY8CVD5BwABAABQmhBgCJMAlX8AqBcTAACoiQInASr/AFBDGgAAUDMDTgJU/gFAAAAAVCYEmMckQOUfAOrNBAAAamoOkwCVfwBoAA0AAKi5GSYBKv8AIAAAAGoTAuxjEqDyDwDNYgIAAA1x8BXX35cjzv7R6cdvioh4ytotf+a3/gAgAAAAaihF5Fi75U+dBAA0jwkAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAAAAAIAAAAAQAAAAAAAAgAAAABAAAAAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAACAAAAAAAAQAAAAAAACAAAAAEAAAAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAAAgAHAEAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAAACAAAAAEAAAAAAAAgAAAAAAAEAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAAAAAIAAAAAQAAAAAAAAgAAAABAAAAAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAACAAAAAAAAQAAAAAAACAAAAAEAAAAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAACAAAAAAAAEAAAAAIAAAAAAABAAAAAAAAIAAAAAQAAAAAAACAAAAAAAAQAAAAAgAAAAAAABAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAAAAAgAAAABAAAAAAAAIAAAAAEAAAAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAAACAAAAAEAAAAAAAAIAAAAAQAAAAAAACAAAAAAAAQAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAAAgAAAAAAAEAAAAAAAAgAAAABAAAAAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAIAAAAAAABAAAAACAAAAAAAAQAAAAAAACAAAAAEAAAAAAAAgAAAAAAAEAAAAAIAAAAAAAAQAAAAAgAAAAAAAEAAAAAIAAAAAAABAAAAAAAAIAAAAAYB4BQN8xAAAAQK31WxEx5RwAAACg1na2ImKncwAAAAABAAAAAFBpaWcrIt3rIAAAAKDO8j2tFP0fOQgAAACotbtaOScBAAAAANRZSj9qpRR3OAkAAACo8fV/7t/RipRucxQAAABQXznSt1v9nL/tKAAAAKC+UqRvt1qpv9VRAAAAQI3l2NqKiK86CQAAAKivHf0FX2td9e4n3BUR2xwHAAAA1NLtN73+7+9uRUTkHF92HgAAAFBLN0VEtCIiUsQ/Ow8AAACopS89HABEpI3OAwAAAOooXftwAJBavY0RkR0KAAAA1Ep/Z2/BdQ8HALufCPBfnAsAAADUylduev3f3/1wABARkVJc6VwAAACgPnKKz+353w8HAJHiCkcDAAAA9dHqp3/aKwB4aHLJ5yPiIccDAAAAtfDA3Qc+uGGvAGDTb6btEfmzzgcAAACqL+e4/JaXX7FzrwAgIiJFXOiIAAAAoPpS67HX+I8JABZPLf10RDzomAAAAKDSHphIrcunDQAuW5MeiojLnBMAAABUWb500+qLtk8bAERERD9/xEEBAABAdfVz66OP///2CgDWvWfp+oj4puMCAACASvrGF8+5eMOMAUCklCPHBc4LAAAAqidHfDhS5JkDgIiY7O68ICLudWwAAABQKfdFq/Wxff3BPgOAK9YcfF9E/I1zAwAAgOpIKf76xtUX3TvrACAiInL7/IjY5fgAAACgEnZ0UusvpvvDaQOAde9ZdFuO/LfODwAAAMovpbhg0+qLvjfnACAiotNpvTcitjtGAAAAKLUdndT64P7+wn4DgCvfuWRbpPiwcwQAAIAyS3++v9/+zxgARETsSt33RsSPHCYAAACU8NI/xR25lf5gpr83YwCw4V1PvDtFXuNIAQAAoHz6OZ033TP/zykAiIjoTS39cOT4f44VAAAAyiNF3LiylWb1BP6zCgCuXpO6qZ3eFBE9xwsAAACl0O1HPvei1RfN6lq9Ndv3etW7lmzOKc53vgAAADB+KeK/33jOpV+c7d9vzeWdL9215L9ExNcdMwAAAIxPjvhqp9V671zeZk4BwGVr0kMR6XURsctxAwAAwFjsbLVar9+0+qLtQwsAIiLWnbfkixHxX503AAAAjEGOd21efdE/z/XNWvP5WOveveSDEfkfnDoAAACMUEqf3nLOJX82nzdtzfMD5v5U91ci0i1OHwAAAIYvR3wzp/RvI0UeXQAQEVevOeieFPmsiPSAmwEAAACG6v5WP1594+qL7p3vO2gN8tGvOm/pl3OKsyOi67YAAACAoeilFK/f/LpLbh7knbQG/SzWv3vJ5TnSr7k9AAAAoHgp8ls2n33JZYO+n1YRn8z685ZckCL+0M0CAAAAxckR7918zqX/o4j31Srqk7rqvKXvjhz/3c0DAAAARUh/ceM5l/xuUe+tVeSntu68Je9IkS9wIwEAAMAAcnxoy9kXv7XId1loABAp5avevfTNOcWfuLUAAABgPtfW8VdbzrnkV+f7cn+jCQB2hwDr37307RH5fW41AAAAmNMl9X/bcvYlv170xf9wAoDd1p13wHsi0pvCSwQCAADATHqR49c3n33pfx3WB2gN87Nfd96Sj0YrXhER97ktAQAAYJ8e6Ef6hS2vveSvhvlBWsP+Kta9a+nnUsRJEekWtykAAAA8Ikd8M6L/wi+ec/E/DvtjtUbxBV113tIvT07tOC4iXermBQAAgIhI6TO9yd7PbDnnH74yig/XGdXXdcWag++LnF9z6h88+Fsp4vcjYoFbGwAAgAbamVM+78bVl/zJMJ7sbzqtkX6JKeX15y39o37k4yLFTW5zAAAAGuZfIscLbzz70j8e5cX/6AOA3a4+74CvbF+45Pkp4o/CqwQAAABQf92I9MGJVuunt7z2ki+N4xPojOsr3/SbaXtEvOOl73vwf0fOH40Uz3N/AAAAoG5SxI05x5u2vPbiL43z82iN+yDWnbfkiyd3lxyfI/5dRPzQXQMAAIBayHFXinjbEa3W88f1W/9H65ThTNasSf2I+MQpa+7+dKszcV6k+LWIWOTeAgAAQAVtj4i/zO3W+7asvujezSX5pDplOqGr1xx0T0T89svW3P9H3Yn0mxHx1ohY6L4DAABABeyKiI/38tTvfem1n95Wtk+uU8YT+9yaA+6IiN952e8/9Ffd6L8lUpwbEU9wXwIAAKCE7o2ICyZarfM3rb7oe2X9JDtlPsHPvWfx7RHx2z+35q7/tmti8k054tyIONp9CwAAgBL4Ro74cKe78KPX/9Kn7iv7J9upwolesebg+yLijyPnPzn1Dx84OeX0xoh4dUQscX8DAABghB6IiH9IKX908+pLvxApclU+8U6ljjmlvD7i8xHx+VetyYsf7Dzwikit1RH554QBAAAADMmDkdIV0e//n4l2+zObVl+0PSIizq7WF9Gp6ulftiY9FBEXRcRFP/fneXLX/Q+e3E/xsynHyyLimVGClzgEAACgkvoR8ZUU6cpI+Z/uPuChL9zy8it2Vv2L6tThlrniLWlnRFy5+7848Q/vOWiiP/GiyP0XRaSfTimeFRHL3YcBAADYh9sj4qaI+FKk2Nhd0Nv4z6/+v/fU7Yvs1PGW2/CuJ94dEZ/Z/V9ERJy55t4nTXXST6bUWplTOiLlfGSOeEpEPjgiPTkiDo4ftwYWRsQi938AAIBK254iduQc/Ujxo4i4a/d/d0TE1pzz1na7vXXXxNTX6nixvy//P2yb+Ic/79gnAAAAJXRFWHRkYXRlOmNyZWF0ZQAyMDI0LTA3LTAzVDA2OjI0OjExKzAwOjAwqHQHBwAAACV0RVh0ZGF0ZTptb2RpZnkAMjAyNC0wNy0wM1QwNjoyNDoxMSswMDowMNkpv7sAAAAASUVORK5CYII="/>+</defs>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/gong.svg b/site/public/examples/workos-atlas/assets/icons/gong.svgnew file mode 100644index 0000000..691002a--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/gong.svg@@ -0,0 +1,11 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" xmlns:graph="ns_graphs;" xmlns:i="ns_ai;" xmlns:x="ns_extend;" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Layer_1" x="0px" y="0px" viewBox="0 0 55.4 60" style="enable-background:new 0 0 55.4 60;">+ <style type="text/css">+ .st0{fill:#7B4FF5;}+ </style>++ <g>+ <path class="st0" d="M54.1,25.7H37.8c-0.9,0-1.6,1-1.3,1.8l3.9,10.1c0.2,0.4-0.2,0.9-0.7,0.9l-5-0.3c-0.2,0-0.4,0.1-0.6,0.3
 L30.3,44c-0.2,0.3-0.6,0.4-1,0.2l-5.8-3.9c-0.2-0.2-0.5-0.2-0.8,0l-8,5.4c-0.5,0.4-1.2-0.1-1-0.7L16,37c0.1-0.3-0.1-0.7-0.4-0.8
 l-4.2-1.7c-0.4-0.2-0.6-0.7-0.3-1l3.7-4.6c0.2-0.2,0.2-0.6,0-0.8l-3.1-4.5c-0.3-0.4,0-1,0.5-1l4.9-0.4c0.4,0,0.6-0.3,0.6-0.7
 l-0.4-6.8c0-0.5,0.5-0.8,0.9-0.7l6,2.5c0.3,0.1,0.6,0,0.8-0.2l4.2-4.6c0.3-0.4,0.9-0.3,1.1,0.2l2.5,6.4c0.3,0.8,1.3,1.1,2,0.6
 l9.8-7.3c1.1-0.8,0.4-2.6-1-2.4L37.3,10c-0.3,0-0.6-0.1-0.7-0.4l-3.4-8.7c-0.4-0.9-1.5-1.1-2.2-0.4l-7.4,8
 c-0.2,0.2-0.5,0.3-0.8,0.2l-9.7-4.1c-0.9-0.4-1.8,0.2-1.9,1.2l-0.4,10c0,0.4-0.3,0.6-0.6,0.6l-8.9,0.6c-1,0.1-1.6,1.2-1,2.1
 l5.9,8.7c0.2,0.2,0.2,0.6,0,0.8l-6,6.9C-0.3,36,0,37.1,0.8,37.4l6.9,3c0.3,0.1,0.5,0.5,0.4,0.8L3.7,58.3c-0.3,1.2,1.1,2.1,2.1,1.4
 l16.5-11.8c0.2-0.2,0.5-0.2,0.8,0l7.5,5.3c0.6,0.4,1.5,0.3,1.9-0.4l4.7-7.2c0.1-0.2,0.4-0.3,0.6-0.3l11.2,1.4
 c0.9,0.1,1.8-0.6,1.5-1.5l-4.7-12.1c-0.1-0.3,0-0.7,0.4-0.9l8.5-4C55.9,27.6,55.5,25.7,54.1,25.7z">+ </path>+ </g>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/google-drive.svg b/site/public/examples/workos-atlas/assets/icons/google-drive.svgnew file mode 100644index 0000000..a8f4581--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/google-drive.svg@@ -0,0 +1,16 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<g clip-path="url(#clip0_8613_1430)">+<path d="M13.9464 52.9724L16.2485 56.9486C16.7268 57.7858 17.4144 58.4435 18.2216 58.9218L26.4433 44.6909H10C10 45.6177 10.2392 46.5445 10.7175 47.3816L13.9464 52.9724Z" fill="#0066DA" style="fill:#0066DA;fill:color(display-p3 0.0000 0.4000 0.8549);fill-opacity:1;"/>+<path d="M36.1 27.9482L27.8783 13.7173C27.0711 14.1956 26.3835 14.8534 25.9052 15.6905L10.7175 41.9998C10.248 42.8188 10.0006 43.7464 10 44.6905H26.4433L36.1 27.9482Z" fill="#00AC47" style="fill:#00AC47;fill:color(display-p3 0.0000 0.6745 0.2784);fill-opacity:1;"/>+<path d="M53.9783 58.9218C54.7856 58.4435 55.4732 57.7858 55.9515 56.9486L56.9082 55.3043L61.4825 47.3816C61.9608 46.5445 62.2 45.6177 62.2 44.6909H45.7555L49.2546 51.5672L53.9783 58.9218Z" fill="#EA4335" style="fill:#EA4335;fill:color(display-p3 0.9176 0.2627 0.2078);fill-opacity:1;"/>+<path d="M36.1 27.9485L44.3217 13.7175C43.5144 13.2392 42.5876 13 41.6309 13H30.5691C29.6124 13 28.6856 13.2691 27.8784 13.7175L36.1 27.9485Z" fill="#00832D" style="fill:#00832D;fill:color(display-p3 0.0000 0.5137 0.1765);fill-opacity:1;"/>+<path d="M45.7567 44.6909H26.4433L18.2216 58.9218C19.0289 59.4002 19.9557 59.6394 20.9124 59.6394H51.2876C52.2443 59.6394 53.1711 59.3703 53.9784 58.9218L45.7567 44.6909Z" fill="#2684FC" style="fill:#2684FC;fill:color(display-p3 0.1490 0.5176 0.9882);fill-opacity:1;"/>+<path d="M53.8887 28.8451L46.2949 15.6905C45.8165 14.8534 45.1289 14.1956 44.3217 13.7173L36.1 27.9482L45.7567 44.6905H62.1701C62.1701 43.7637 61.9309 42.8369 61.4526 41.9998L53.8887 28.8451Z" fill="#FFBA00" style="fill:#FFBA00;fill:color(display-p3 1.0000 0.7294 0.0000);fill-opacity:1;"/>+</g>+<defs>+<clipPath id="clip0_8613_1430">+<rect width="52.2" height="46.6392" fill="white" style="fill:white;fill-opacity:1;" transform="translate(10 13)"/>+</clipPath>+</defs>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/google.svg b/site/public/examples/workos-atlas/assets/icons/google.svgnew file mode 100644index 0000000..b1d2db5--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/google.svg@@ -0,0 +1,6 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M176.448 101.871C176.448 96.6026 175.938 91.1648 175.088 86.0669H101.508V116.145H143.651C141.952 125.831 136.344 134.327 128.017 139.765L153.167 159.307C167.951 145.543 176.448 125.491 176.448 101.871Z" fill="#4280EF"/>+<path d="M101.508 178C122.58 178 140.253 171.033 153.168 159.138L128.018 139.765C121.051 144.523 112.044 147.242 101.508 147.242C81.1166 147.242 63.9536 133.478 57.6661 115.125L31.8365 135.007C45.0912 161.347 71.9404 178 101.508 178Z" fill="#34A353"/>+<path d="M57.6658 114.955C54.4371 105.269 54.4371 94.7337 57.6658 85.0476L31.8363 64.9957C20.7907 87.0867 20.7907 113.086 31.8363 135.007L57.6658 114.955Z" fill="#F6B704"/>+<path d="M101.508 52.9305C112.554 52.7606 123.43 57.0088 131.416 64.6558L153.677 42.2248C139.573 28.9702 120.881 21.833 101.508 22.003C71.9404 22.003 45.0912 38.6562 31.8365 64.9956L57.6661 85.0475C63.9536 66.525 81.1166 52.9305 101.508 52.9305Z" fill="#E54335"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/gusto.svg b/site/public/examples/workos-atlas/assets/icons/gusto.svgnew file mode 100644index 0000000..776ff42--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/gusto.svg@@ -0,0 +1,3 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M31.8642 24.2303V3.47601H26.2155V4.87232C24.3114 3.63469 22.09 3 19.8369 3C13.3314 3 8 8.33137 8 14.9004C8 21.4694 13.3314 26.8325 19.8686 26.8325C22.09 26.8325 24.2797 26.1978 26.1838 25.0236C26.1838 25.214 26.1838 25.3727 26.1838 25.4679C26.1838 28.9269 23.3911 31.7513 19.9321 31.7513C18.7579 31.7513 17.6155 31.4022 16.6317 30.7993L13.8391 35.6863C15.6797 36.797 17.7742 37.4 19.9321 37.4C26.4694 37.4 31.8642 32.0369 31.8642 25.4679C31.8642 25.214 31.8959 24.4841 31.8642 24.2303ZM19.8686 21.1838C16.4413 21.1838 13.617 18.3594 13.617 14.9004C13.617 11.4413 16.4096 8.61697 19.8686 8.61697C23.3277 8.61697 26.1203 11.4413 26.1203 14.9004C26.1203 18.3594 23.2959 21.1838 19.8686 21.1838Z" fill="#F45D48"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/hubspot.svg b/site/public/examples/workos-atlas/assets/icons/hubspot.svgnew file mode 100644index 0000000..f275c62--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/hubspot.svg@@ -0,0 +1,17 @@+<svg width="27px" height="28px" viewBox="0 0 27 28" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">+ <!-- Generator: Sketch 51.3 (57544) - http://www.bohemiancoding.com/sketch -->+ <title>+ ΘMarketing/Logos/Sprocket+ </title>+ <desc>+ Created with Sketch.+ </desc>+ <defs>+ </defs>+ <g id="MHE-Post-Launch-Updates" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">+ <g id="ΘMarketing/Logos/Sprocket" fill="#FF7A59">+ <path d="M19.614233,20.1771162 C17.5228041,20.1771162 15.8274241,18.4993457 15.8274241,16.4299995 C15.8274241,14.3602937 17.5228041,12.6825232 19.614233,12.6825232 C21.7056619,12.6825232 23.4010418,14.3602937 23.4010418,16.4299995 C23.4010418,18.4993457 21.7056619,20.1771162 19.614233,20.1771162 M20.7478775,9.21551429 L20.7478775,5.88190722 C21.6271788,5.47091457 22.243053,4.59067833 22.243053,3.56912967 L22.243053,3.49218091 C22.243053,2.08229273 21.0774338,0.928780545 19.6527478,0.928780545 L19.5753548,0.928780545 C18.1506688,0.928780545 16.9850496,2.08229273 16.9850496,3.49218091 L16.9850496,3.56912967 C16.9850496,4.59067833 17.6009238,5.47127414 18.4802251,5.88226679 L18.4802251,9.21551429 C17.1710836,9.4157968 15.9749432,9.95012321 14.9884545,10.7365107 L5.73944086,3.61659339 C5.80048326,3.3846684 5.84335828,3.14591151 5.84372163,2.89492912 C5.84517502,1.29842223 4.53930368,0.00215931486 2.92531356,1.87311107e-06 C1.31205014,-0.00179599501 0.00181863138,1.29087118 1.8932965e-06,2.88773765 C-0.00181484479,4.48460412 1.30405649,5.78086703 2.91804661,5.7826649 C3.44381061,5.78338405 3.93069642,5.63559929 4.35726652,5.39540411 L13.4551275,12.3995387 C12.6815604,13.5552084 12.2281026,14.9395668 12.2281026,16.4299995 C12.2281026,17.9901894 12.7262522,19.433518 13.5677653,20.6204705 L10.8012365,23.3586237 C10.5825013,23.2935408 10.3557723,23.2482346 10.1152362,23.2482346 C8.78938076,23.2482346 7.71423516,24.3118533 7.71423516,25.6239375 C7.71423516,26.9363812 8.78938076,28 10.1152362,28 C11.441455,28 12.5162373,26.9363812 12.5162373,25.6239375 C12.5162373,25.3866189 12.4704555,25.1618854 12.4046896,24.9454221 L15.1414238,22.2371135 C16.3837093,23.1752411 17.9308435,23.7390526 19.614233,23.7390526 C23.6935367,23.7390526 27,20.466573 27,16.4299995 C27,12.7756527 24.2872467,9.7566726 20.7478775,9.21551429" id="Marketing/Logos/Sprocket">+ </path>+ </g>+ </g>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/intercom.svg b/site/public/examples/workos-atlas/assets/icons/intercom.svgnew file mode 100644index 0000000..7b33c7c--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/intercom.svg@@ -0,0 +1,10 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_9335_4562)">+<path d="M33.6637 21.9105C33.6637 22.2493 33.5302 22.5742 33.2925 22.8137C33.0549 23.0532 32.7327 23.1878 32.3965 23.1878C32.0605 23.1878 31.7382 23.0532 31.5005 22.8137C31.2629 22.5742 31.1294 22.2493 31.1294 21.9105V10.5001C31.1294 10.1613 31.2629 9.83645 31.5005 9.59693C31.7382 9.3574 32.0605 9.22283 32.3965 9.22283C32.7327 9.22283 33.0549 9.3574 33.2925 9.59693C33.5302 9.83645 33.6637 10.1613 33.6637 10.5001V21.9105ZM33.2239 29.8167C33.0564 29.9855 28.3439 33.9438 19.7042 33.9438C11.0647 33.9438 6.38362 30.0067 6.18464 29.8377C6.05926 29.7312 5.95597 29.6007 5.88071 29.4538C5.80546 29.3068 5.75971 29.1465 5.74607 28.9817C5.73246 28.817 5.75124 28.6512 5.80134 28.4937C5.85144 28.3363 5.93187 28.1903 6.03804 28.0643C6.25674 27.8093 6.56662 27.6518 6.90012 27.626C7.23362 27.6003 7.56367 27.7087 7.81831 27.9272C7.89162 27.98 12.1014 31.421 19.6939 31.421C27.2862 31.421 31.5274 27.9588 31.5692 27.9272C31.8267 27.7105 32.1579 27.6037 32.4922 27.6293C32.8267 27.655 33.138 27.811 33.36 28.0643C33.5737 28.3157 33.6804 28.6418 33.6567 28.9718C33.6332 29.3018 33.4814 29.6093 33.2344 29.8272L33.2239 29.8167ZM5.73434 10.5001C5.75327 10.1603 5.90491 9.8418 6.15609 9.61435C6.40726 9.38688 6.73756 9.2689 7.07479 9.28617C7.38741 9.30407 7.68239 9.438 7.90284 9.66215C8.12329 9.8863 8.25359 10.1848 8.26861 10.5001V21.8895C8.26861 22.2282 8.13511 22.553 7.89747 22.7925C7.65984 23.0322 7.33754 23.1667 7.00147 23.1667C6.66541 23.1667 6.34311 23.0322 6.10547 22.7925C5.86784 22.553 5.73434 22.2282 5.73434 21.8895V10.5001ZM12.091 7.96673C12.1099 7.62692 12.2615 7.30848 12.5127 7.08103C12.7639 6.85357 13.0942 6.73558 13.4314 6.75285C13.744 6.77075 14.039 6.90468 14.2595 7.12883C14.4799 7.35298 14.6102 7.65147 14.6252 7.96673V24.8555C14.6252 25.1943 14.4917 25.5192 14.2541 25.7587C14.0165 25.9982 13.6942 26.1327 13.3581 26.1327C13.022 26.1327 12.6997 25.9982 12.4621 25.7587C12.2245 25.5192 12.091 25.1943 12.091 24.8555V7.96673ZM18.479 7.3334C18.479 6.99467 18.6125 6.6698 18.8502 6.43028C19.0879 6.19075 19.41 6.05618 19.7462 6.05618C20.0822 6.05618 20.4045 6.19075 20.6422 6.43028C20.8799 6.6698 21.0134 6.99467 21.0134 7.3334V25.7C21.0134 26.0387 20.8799 26.3635 20.6422 26.6032C20.4045 26.8427 20.0822 26.9772 19.7462 26.9772C19.41 26.9772 19.0879 26.8427 18.8502 26.6032C18.6125 26.3635 18.479 26.0387 18.479 25.7V7.3334ZM24.7624 7.96673C24.7624 7.628 24.8959 7.30313 25.1335 7.0636C25.371 6.82408 25.6934 6.68952 26.0295 6.68952C26.3655 6.68952 26.6879 6.82408 26.9255 7.0636C27.163 7.30313 27.2965 7.628 27.2965 7.96673V24.8555C27.2965 25.1943 27.163 25.5192 26.9255 25.7587C26.6879 25.9982 26.3655 26.1327 26.0295 26.1327C25.6934 26.1327 25.371 25.9982 25.1335 25.7587C24.8959 25.5192 24.7624 25.1943 24.7624 24.8555V7.96673ZM34.0094 1.00011H5.44112C4.81864 0.995935 4.20146 1.11557 3.62491 1.35215C3.04834 1.58873 2.52376 1.93762 2.08116 2.37883C1.63856 2.82005 1.28665 3.34492 1.04558 3.92342C0.804509 4.5019 0.67901 5.12263 0.67627 5.75008V34.25C0.67901 34.8773 0.804509 35.4982 1.04558 36.0767C1.28665 36.655 1.63856 37.18 2.08116 37.6212C2.52376 38.0623 3.04834 38.4113 3.62491 38.6478C4.20146 38.8845 4.81864 39.004 5.44112 38.9998H34.0094C34.6309 39.004 35.2472 38.8848 35.823 38.6488C36.399 38.413 36.923 38.065 37.3655 37.6248C37.808 37.1848 38.1602 36.6612 38.4019 36.0838C38.6435 35.5067 38.77 34.887 38.7742 34.2605V5.75008C38.7714 5.12353 38.6462 4.50367 38.4059 3.92587C38.1654 3.34807 37.8144 2.82367 37.3729 2.38258C36.9315 1.94151 36.408 1.5924 35.8327 1.35519C35.2574 1.11799 34.6414 0.997327 34.0197 1.00011" fill="#081D34"/>+</g>+<defs>+<clipPath id="clip0_9335_4562">+<rect width="38.6667" height="38" fill="white" transform="translate(0.526367 1)"/>+</clipPath>+</defs>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/jira.svg b/site/public/examples/workos-atlas/assets/icons/jira.svgnew file mode 100644index 0000000..aa19044--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/jira.svg@@ -0,0 +1,6 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<path d="M60.0188 11H34.864C34.864 17.0727 39.9531 22.0156 46.2054 22.0156H50.8583V26.323C50.8583 32.3956 55.9476 37.3387 62.1999 37.3387V13.1184C62.1999 11.918 61.2549 11 60.0188 11Z" fill="#2684FF" style="fill:#2684FF;fill-opacity:1;"/>+<path d="M47.5869 23.1455H22.432C22.432 29.2182 27.5211 34.1611 33.7735 34.1611H38.4264V38.5391C38.4264 44.6118 43.5157 49.5548 49.768 49.5548V25.2638C49.768 24.1341 48.8228 23.1455 47.5869 23.1455Z" fill="#2684FF" style="fill:#2684FF;fill-opacity:1;"/>+<path d="M35.155 35.3613H10C10 41.434 15.0891 46.3768 21.3415 46.3768H25.9945V50.6843C25.9945 56.757 31.0836 61.6998 37.3359 61.6998V37.4796C37.3359 36.2792 36.3183 35.3613 35.155 35.3613Z" fill="#2684FF" style="fill:#2684FF;fill-opacity:1;"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/linear.svg b/site/public/examples/workos-atlas/assets/icons/linear.svgnew file mode 100644index 0000000..e2484d7--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/linear.svg@@ -0,0 +1,5 @@+<svg xmlns="http://www.w3.org/2000/svg" fill="#222326" width="200" height="200" viewBox="0 0 100 100">+ <path+ d="M1.22541 61.5228c-.2225-.9485.90748-1.5459 1.59638-.857L39.3342 97.1782c.6889.6889.0915 1.8189-.857 1.5964C20.0515 94.4522 5.54779 79.9485 1.22541 61.5228ZM.00189135 46.8891c-.01764375.2833.08887215.5599.28957165.7606L52.3503 99.7085c.2007.2007.4773.3075.7606.2896 2.3692-.1476 4.6938-.46 6.9624-.9259.7645-.157 1.0301-1.0963.4782-1.6481L2.57595 39.4485c-.55186-.5519-1.49117-.2863-1.648174.4782-.465915 2.2686-.77832 4.5932-.92588465 6.9624ZM4.21093 29.7054c-.16649.3738-.08169.8106.20765 1.1l64.77602 64.776c.2894.2894.7262.3742 1.1.2077 1.7861-.7956 3.5171-1.6927 5.1855-2.684.5521-.328.6373-1.0867.1832-1.5407L8.43566 24.3367c-.45409-.4541-1.21271-.3689-1.54074.1832-.99132 1.6684-1.88843 3.3994-2.68399 5.1855ZM12.6587 18.074c-.3701-.3701-.393-.9637-.0443-1.3541C21.7795 6.45931 35.1114 0 49.9519 0 77.5927 0 100 22.4073 100 50.0481c0 14.8405-6.4593 28.1724-16.7199 37.3375-.3903.3487-.984.3258-1.3542-.0443L12.6587 18.074Z"+ />+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/linkedin.svg b/site/public/examples/workos-atlas/assets/icons/linkedin.svgnew file mode 100644index 0000000..22aeb91--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/linkedin.svg@@ -0,0 +1,11 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_9335_4596)">+<path fill-rule="evenodd" clip-rule="evenodd" d="M5.77778 37.9999H33.9722C36.1967 37.9999 38 36.1966 38 33.9721V5.77768C38 3.55316 36.1967 1.74988 33.9722 1.74988H5.77778C3.55326 1.74988 1.75 3.55316 1.75 5.77768V33.9721C1.75 36.1966 3.55326 37.9999 5.77778 37.9999Z" fill="#0A66C2"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M32.9657 32.9652H27.5864V23.8031C27.5864 21.2911 26.6319 19.8873 24.6437 19.8873C22.4807 19.8873 21.3506 21.3481 21.3506 23.8031V32.9652H16.1665V15.5115H21.3506V17.8625C21.3506 17.8625 22.9094 14.9783 26.6132 14.9783C30.3153 14.9783 32.9657 17.239 32.9657 21.9146V32.9652ZM9.98189 13.2261C8.21606 13.2261 6.78516 11.784 6.78516 10.0054C6.78516 8.22675 8.21606 6.78467 9.98189 6.78467C11.7477 6.78467 13.1777 8.22675 13.1777 10.0054C13.1777 11.784 11.7477 13.2261 9.98189 13.2261ZM7.30502 32.9652H12.7107V15.5115H7.30502V32.9652Z" fill="white"/>+</g>+<defs>+<clipPath id="clip0_9335_4596">+<rect width="40" height="40" fill="white"/>+</clipPath>+</defs>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/mailchimp.svg b/site/public/examples/workos-atlas/assets/icons/mailchimp.svgnew file mode 100644index 0000000..6dc2eb1--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/mailchimp.svg@@ -0,0 +1,16 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_9335_4563)">+<circle cx="20" cy="20" r="20" fill="#FFE01B"/>+<g clip-path="url(#clip1_9335_4563)">+<path fill-rule="evenodd" clip-rule="evenodd" d="M34.3688 24.3757C34.8423 24.3757 35.5835 24.9109 35.5835 26.2286C35.5835 27.5257 35.0482 29.008 34.9247 29.3374C32.9688 34.0109 28.3365 36.6257 22.8188 36.4609C20.4075 36.4716 18.0445 35.7855 16.0138 34.4853C13.9831 33.1851 12.3711 31.326 11.3717 29.1315C10.2188 29.1315 9.02469 28.6168 8.09822 27.7933C7.18463 27.0042 6.59748 25.9033 6.45116 24.7051C6.35192 23.8703 6.45066 23.0239 6.7394 22.2345L5.66881 21.308C0.727632 17.1286 16.1688 -0.10376 21.11 4.21977L22.7776 5.86683L23.7041 5.47565C28.0276 3.68448 31.5276 4.54918 31.5276 7.41095C31.5482 8.91389 30.6012 10.6639 29.0776 12.2492C29.6335 12.7433 30.0659 13.5462 30.3129 14.4727C30.5188 15.1521 30.5806 15.8315 30.6012 16.2845L30.6629 18.3433L31.2806 18.508C32.4335 18.8374 33.257 19.2698 33.6482 19.7021C34.06 20.1139 34.2659 20.5257 34.3276 21.0198C34.41 21.4109 34.3894 22.0904 33.8747 22.8727C33.8747 22.8727 34.0188 23.1609 34.1423 23.5727L34.3688 24.3757ZM34.4512 26.6815C34.5747 25.8992 34.3894 25.5904 34.1629 25.4462C33.9159 25.2815 33.607 25.3433 33.607 25.3433C33.607 25.3433 33.4835 24.4168 33.0923 23.5521C31.96 24.458 30.4982 25.0962 29.3865 25.4051C27.7619 25.8703 26.0706 26.0582 24.3835 25.9609C23.3129 25.8786 22.5923 25.5492 22.3247 26.4345C24.7953 27.3404 27.41 26.9492 27.41 26.9492C27.4512 26.9492 27.5129 26.9904 27.5129 27.0315C27.5129 27.0727 27.4923 27.1139 27.4512 27.1345C27.4512 27.1345 25.4541 28.0815 22.2629 27.0727C22.3453 27.8345 23.0865 28.1639 23.4159 28.308C23.8688 28.4727 24.3423 28.5551 24.3423 28.5551C28.2953 29.2345 31.9806 26.9698 32.8041 26.3933C32.8659 26.3521 32.907 26.3933 32.8659 26.4757C32.8407 26.5183 32.8132 26.5595 32.7835 26.5992C31.7541 27.9168 29.0365 29.4404 25.4747 29.4404C23.9306 29.4404 22.3865 28.8845 21.81 28.0404C20.9247 26.7227 21.7688 24.8286 23.2512 25.0139L23.8688 25.0962C25.7218 25.3021 28.3982 25.0345 30.5806 24.0051C32.5776 23.0786 33.3394 22.0492 33.2365 21.2051C33.1974 20.9464 33.0744 20.7077 32.8865 20.5257C32.3391 20.0726 31.6886 19.7615 30.9923 19.6198L30.21 19.4139C29.7982 19.2698 29.5923 19.1462 29.5512 18.3845L29.4482 16.3257C29.407 15.4815 29.3041 14.308 28.5835 13.8139C28.3997 13.6913 28.1865 13.6202 27.9659 13.608C27.7394 13.608 27.6365 13.6492 27.5747 13.6492C27.1629 13.7109 26.9159 13.9374 26.607 14.2051C25.7012 14.9668 24.9394 15.0904 24.0747 15.0286C23.5806 15.0286 23.0453 14.9462 22.4276 14.9051H22.057C20.6159 14.8227 19.0923 16.058 18.8247 17.8286C18.4747 20.2786 20.2453 21.5345 20.76 22.2757C20.8217 22.3786 20.9041 22.4815 20.9041 22.6257C20.9041 22.7698 20.8012 22.8727 20.6982 22.9757C19.9133 23.8632 19.3945 24.954 19.2015 26.123C19.0085 27.292 19.1491 28.4917 19.607 29.5845C20.8835 32.6109 24.8982 34.0315 28.7894 32.7345C30.2095 32.2634 31.4998 31.4667 32.557 30.408C33.5865 29.3168 34.2041 28.1433 34.4512 26.6815ZM27.9453 19.0845C27.76 18.858 27.6159 18.4668 27.5335 18.0345C27.3482 17.2521 27.3688 16.6757 27.8217 16.5933C28.2747 16.5315 28.5012 17.0051 28.6453 17.7874C28.7688 18.3227 28.7482 18.8168 28.6453 19.0845H27.9453ZM24.0335 19.7021C23.6431 19.5115 23.2119 19.4196 22.7776 19.4345C22.057 19.4757 21.4188 19.8051 21.2541 19.7845C21.1718 19.7845 21.1306 19.7433 21.1306 19.6815C21.0894 19.558 21.2953 19.3315 21.5218 19.1668C22.1806 18.6933 23.0453 18.5904 23.7659 18.8992C24.1159 19.0433 24.4453 19.3109 24.5894 19.5786C24.6718 19.7021 24.6923 19.8051 24.6512 19.8668C24.5688 19.9492 24.3629 19.8668 24.0335 19.7021ZM23.3747 20.0727C23.9717 20.0109 24.4041 20.2786 24.4865 20.4433C24.5482 20.5257 24.5276 20.5668 24.507 20.5874C24.4659 20.6492 24.3629 20.6492 24.157 20.6286C23.6926 20.5546 23.2168 20.6043 22.7776 20.7727C22.7776 20.7727 22.5718 20.8551 22.4688 20.8551C22.4415 20.8551 22.4153 20.8442 22.396 20.8249C22.3767 20.8056 22.3659 20.7794 22.3659 20.7521C22.3659 20.6492 22.4482 20.5462 22.5718 20.4227C22.805 20.2262 23.0919 20.1043 23.3953 20.0727H23.3747ZM26.6276 21.4727C26.3394 21.3286 26.1953 21.0404 26.2982 20.8139C26.4012 20.608 26.71 20.5462 26.9982 20.6904C27.2865 20.8345 27.4512 21.1227 27.3482 21.3286C27.2453 21.5345 26.9365 21.5962 26.6276 21.4727ZM28.4806 19.8257C28.7276 19.8257 28.8923 20.1139 28.8923 20.4433C28.8923 20.7521 28.6865 20.9992 28.4806 20.9992C28.2335 20.9992 28.0482 20.7315 28.0688 20.4227C28.0688 20.0933 28.2541 19.8257 28.4806 19.8257ZM16.2923 12.7845C16.2512 12.8462 16.3129 12.908 16.3747 12.8668C17.7867 11.8779 19.3888 11.1934 21.0794 10.8567C22.77 10.52 24.5122 10.5385 26.1953 10.9109C26.257 10.9109 26.2982 10.808 26.2365 10.7668C25.312 10.2872 24.2921 10.0199 23.2512 9.98448C23.21 9.98448 23.1688 9.9433 23.21 9.90212C23.3541 9.69624 23.5806 9.49036 23.7659 9.32565C23.807 9.30506 23.7659 9.22271 23.7247 9.22271C22.4482 9.30506 20.9865 9.92271 20.1423 10.4992C20.1012 10.5404 20.06 10.4992 20.06 10.4374C20.1217 10.1286 20.3276 9.71683 20.4512 9.51095C20.4512 9.46977 20.41 9.40801 20.3688 9.44918C19.0306 10.1286 17.507 11.3639 16.2923 12.7845ZM9.93057 19.5374C11.2908 15.7137 13.6855 12.3425 16.8482 9.79918C19.1541 7.86389 21.6453 6.48448 21.6453 6.48448C21.6453 6.48448 20.2865 4.91977 19.8747 4.79624C17.3835 4.11683 11.9894 7.86389 8.55116 12.7845C7.15116 14.7815 5.1541 18.3433 6.12175 20.1345C6.22469 20.3609 6.9041 20.958 7.2541 21.2462C7.87175 20.3815 8.81881 19.7433 9.93057 19.5374ZM11.7835 27.8757C13.5953 27.5668 14.0688 25.6109 13.7806 23.6551C13.4306 21.4727 11.9688 20.7109 10.9806 20.6492C10.6923 20.6492 10.4453 20.6492 10.2188 20.7109C8.44822 21.0815 7.4394 22.5845 7.64528 24.5609C7.80998 26.3521 9.62175 27.8551 11.2894 27.9168C11.4541 27.9168 11.6394 27.9168 11.8041 27.8757H11.7835ZM12.4835 25.6109C12.5659 25.6109 12.6688 25.5904 12.7306 25.6521C12.7306 25.6727 12.7717 25.7345 12.7306 25.8374C12.6688 25.9815 12.4217 26.1874 12.0306 26.1874C11.66 26.1462 11.207 25.8786 11.1659 25.158C11.1453 24.8286 11.2688 24.3962 11.3512 24.1698C11.4113 24.013 11.4277 23.8429 11.3987 23.6776C11.3697 23.5123 11.2963 23.3579 11.1863 23.2311C11.0764 23.1042 10.934 23.0096 10.7745 22.9574C10.615 22.9051 10.4443 22.8972 10.2806 22.9345C10.0415 22.9899 9.83412 23.138 9.7041 23.3462C9.59442 23.5255 9.51121 23.7197 9.45704 23.9227C9.37469 24.1286 9.25116 24.2109 9.14822 24.1904C9.10704 24.1904 9.06587 24.1492 9.02469 24.0668C8.92175 23.7786 9.0041 22.9962 9.51881 22.4198C9.68875 22.2409 9.89856 22.1048 10.1311 22.0225C10.3637 21.9402 10.6124 21.9141 10.857 21.9462C11.3923 22.008 11.8247 22.3168 12.0923 22.8315C12.4423 23.5109 12.1129 24.2109 11.9276 24.6433L11.8865 24.7668C11.7629 25.0551 11.7629 25.2815 11.8659 25.4462C11.9482 25.5904 12.0717 25.6521 12.2776 25.6521L12.4835 25.6315V25.6109Z" fill="black"/>+</g>+</g>+<defs>+<clipPath id="clip0_9335_4563">+<rect width="40" height="40" fill="white"/>+</clipPath>+<clipPath id="clip1_9335_4563">+<rect width="32.9412" height="32.9412" fill="white" transform="translate(3.5293 3.52942)"/>+</clipPath>+</defs>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/microsoft-teams.svg b/site/public/examples/workos-atlas/assets/icons/microsoft-teams.svgnew file mode 100644index 0000000..39837f7--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/microsoft-teams.svg@@ -0,0 +1,22 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 2228.833 2073.333">+ <path fill="#5059C9" d="M1554.637,777.5h575.713c54.391,0,98.483,44.092,98.483,98.483c0,0,0,0,0,0v524.398 c0,199.901-162.051,361.952-361.952,361.952h0h-1.711c-199.901,0.028-361.975-162-362.004-361.901c0-0.017,0-0.034,0-0.052V828.971 C1503.167,800.544,1526.211,777.5,1554.637,777.5L1554.637,777.5z"/>+ <circle fill="#5059C9" cx="1943.75" cy="440.583" r="233.25"/>+ <circle fill="#7B83EB" cx="1218.083" cy="336.917" r="336.917"/>+ <path fill="#7B83EB" d="M1667.323,777.5H717.01c-53.743,1.33-96.257,45.931-95.01,99.676v598.105 c-7.505,322.519,247.657,590.16,570.167,598.053c322.51-7.893,577.671-275.534,570.167-598.053V877.176 C1763.579,823.431,1721.066,778.83,1667.323,777.5z"/>+ <path opacity=".1" d="M1244,777.5v838.145c-0.258,38.435-23.549,72.964-59.09,87.598 c-11.316,4.787-23.478,7.254-35.765,7.257H667.613c-6.738-17.105-12.958-34.21-18.142-51.833 c-18.144-59.477-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1244z"/>+ <path opacity=".2" d="M1192.167,777.5v889.978c-0.002,12.287-2.47,24.449-7.257,35.765 c-14.634,35.541-49.163,58.833-87.598,59.09H691.975c-8.812-17.105-17.105-34.21-24.362-51.833 c-7.257-17.623-12.958-34.21-18.142-51.833c-18.144-59.476-27.402-121.307-27.472-183.49V877.02 c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z"/>+ <path opacity=".2" d="M1192.167,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855h-447.84 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1192.167z"/>+ <path opacity=".2" d="M1140.333,777.5v786.312c-0.395,52.223-42.632,94.46-94.855,94.855H649.472 c-18.144-59.476-27.402-121.307-27.472-183.49V877.02c-1.246-53.659,41.198-98.19,94.855-99.52H1140.333z"/>+ <path opacity=".1" d="M1244,509.522v163.275c-8.812,0.518-17.105,1.037-25.917,1.037 c-8.812,0-17.105-0.518-25.917-1.037c-17.496-1.161-34.848-3.937-51.833-8.293c-104.963-24.857-191.679-98.469-233.25-198.003 c-7.153-16.715-12.706-34.071-16.587-51.833h258.648C1201.449,414.866,1243.801,457.217,1244,509.522z"/>+ <path opacity=".2" d="M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z"/>+ <path opacity=".2" d="M1192.167,561.355v111.442c-17.496-1.161-34.848-3.937-51.833-8.293 c-104.963-24.857-191.679-98.469-233.25-198.003h190.228C1149.616,466.699,1191.968,509.051,1192.167,561.355z"/>+ <path opacity=".2" d="M1140.333,561.355v103.148c-104.963-24.857-191.679-98.469-233.25-198.003 h138.395C1097.783,466.699,1140.134,509.051,1140.333,561.355z"/>+ <linearGradient id="a" gradientUnits="userSpaceOnUse" x1="198.099" y1="1683.0726" x2="942.2344" y2="394.2607" gradientTransform="matrix(1 0 0 -1 0 2075.3333)">+ <stop offset="0" stop-color="#5a62c3"/>+ <stop offset=".5" stop-color="#4d55bd"/>+ <stop offset="1" stop-color="#3940ab"/>+ </linearGradient>+ <path fill="url(#a)" d="M95.01,466.5h950.312c52.473,0,95.01,42.538,95.01,95.01v950.312c0,52.473-42.538,95.01-95.01,95.01 H95.01c-52.473,0-95.01-42.538-95.01-95.01V561.51C0,509.038,42.538,466.5,95.01,466.5z"/>+ <path fill="#FFF" d="M820.211,828.193H630.241v517.297H509.211V828.193H320.123V727.844h500.088V828.193z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/microsoft.svg b/site/public/examples/workos-atlas/assets/icons/microsoft.svgnew file mode 100644index 0000000..ef8650c--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/microsoft.svg@@ -0,0 +1,6 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path d="M30.2826 30.2826H96.6801V96.6801H30.2826V30.2826Z" fill="#F35325"/>+<path d="M103.32 30.2826H169.717V96.6801H103.32V30.2826Z" fill="#81BC06"/>+<path d="M30.2826 103.32H96.6801V169.717H30.2826V103.32Z" fill="#05A6F0"/>+<path d="M103.32 103.32H169.717V169.717H103.32V103.32Z" fill="#FFBA08"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/netlify.svg b/site/public/examples/workos-atlas/assets/icons/netlify.svgnew file mode 100644index 0000000..ccf57d0--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/netlify.svg@@ -0,0 +1,22 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<g clip-path="url(#clip0_11018_27957)">+<g clip-path="url(#clip1_11018_27957)">+<path d="M18.8237 57.4828H18.1394L14.7175 54.0846V53.405L19.9644 48.1943H23.6144L24.1277 48.7041V52.2722L18.8237 57.4828Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M14.7175 18.8562V18.1766L18.1394 14.7783H18.8237L24.0706 19.9889V23.6137L23.6144 24.0668H19.9644L14.7175 18.8562Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M45.0011 46.4958H39.9824L39.5261 46.0427V34.4321C39.5261 32.3365 38.7277 30.7507 36.2183 30.694C34.9066 30.6374 33.4238 30.694 31.8839 30.7507L31.6558 30.9772V46.0427L31.2566 46.4392H26.2378L25.7816 46.0427V26.1631L26.1808 25.7666H37.473C41.8644 25.7666 45.4003 29.2781 45.4003 33.6392V46.0427L45.0011 46.4958Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M19.5081 39.0192H-0.509839L-0.909058 38.6227V33.6386L-0.509839 33.2422H19.5081L19.9073 33.6386V38.6227L19.5081 39.0192Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M71.6917 39.0192H51.6738L51.2745 38.6227V33.6386L51.6738 33.2422H71.6917L72.0909 33.6386V38.6227L71.6917 39.0192Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M32.6823 19.5362V4.6406L33.0816 4.24414H38.1003L38.4995 4.6406V19.5362L38.1573 19.9893H33.1386L32.6823 19.5362Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+<path d="M32.6823 67.6211V52.6689L33.0816 52.2725H38.1003L38.4995 52.6689V67.5645L38.1003 67.961H33.0816L32.6823 67.6211Z" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+</g>+</g>+<defs>+<clipPath id="clip0_11018_27957">+<rect width="72" height="72" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;"/>+</clipPath>+<clipPath id="clip1_11018_27957">+<rect width="73" height="64" fill="#00C7B7" style="fill:#00C7B7;fill-opacity:1;" transform="translate(-0.909058 4.13086)"/>+</clipPath>+</defs>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/notion.svg b/site/public/examples/workos-atlas/assets/icons/notion.svgnew file mode 100644index 0000000..f45fea3--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/notion.svg@@ -0,0 +1,11 @@+<svg width="40" height="40" viewBox="0 0 40 40" fill="none" xmlns="http://www.w3.org/2000/svg">+<g clip-path="url(#clip0_9356_2266)">+<path d="M4.22995 3.61655L24.5343 2.09079C26.999 1.85606 27.6445 2.03211 29.2289 3.14709L35.7427 7.72436C36.799 8.48724 37.1511 8.72197 37.1511 9.60222V34.6599C37.1511 36.2443 36.5643 37.1832 34.5691 37.3006L10.9785 38.709C9.45274 38.7677 8.74855 38.5916 7.98567 37.594L3.23234 31.4323C2.3521 30.2586 2 29.4371 2 28.4395V6.13992C2 4.84889 2.58683 3.73392 4.22995 3.61655Z" fill="white"/>+<path fill-rule="evenodd" clip-rule="evenodd" d="M24.5343 2.09084L4.22995 3.61659C2.58683 3.73396 2 4.84894 2 6.13996V28.4395C2 29.4371 2.3521 30.3174 3.23234 31.4323L7.98567 37.6527C8.74855 38.6503 9.51142 38.8851 10.9785 38.7677L34.5691 37.3593C36.5643 37.242 37.1511 36.303 37.1511 34.7186V9.60226C37.1511 8.7807 36.8577 8.54597 35.8601 7.84177C35.8014 7.78309 35.7427 7.78309 35.684 7.7244L29.2289 3.20581C27.7032 2.03215 27.0576 1.91479 24.5343 2.09084ZM11.5066 9.19148C9.57011 9.30884 9.15933 9.36753 8.04435 8.4286L5.28625 6.25733C4.99283 5.96391 5.1102 5.61182 5.87308 5.55313L25.4145 4.14474C27.0576 4.02737 27.8792 4.55552 28.5247 5.08367L31.8696 7.48967C32.0457 7.54835 32.3978 7.95914 31.9283 7.95914L11.7414 9.19148H11.5066ZM9.27669 34.4839V13.1819C9.27669 12.243 9.57011 11.8322 10.3917 11.7735L33.5715 10.4238C34.3343 10.3651 34.6864 10.8346 34.6864 11.7735V32.8994C34.6864 33.8383 34.5104 34.6012 33.278 34.6599L11.0959 35.9509C9.86352 36.0683 9.27669 35.5988 9.27669 34.4839ZM31.1655 14.3556C31.2828 15.0011 31.1655 15.6466 30.5199 15.7053L29.4636 15.94V31.6671C28.5247 32.1952 27.7032 32.4299 26.999 32.4299C25.884 32.4299 25.5906 32.0778 24.7103 31.0216L17.6684 19.9892V30.6108L19.8983 31.1389C19.8983 31.1389 19.8983 32.4299 18.1378 32.4299L13.2085 32.7234C13.0911 32.4299 13.2085 31.7258 13.6779 31.6084L14.9689 31.2563V17.1724L13.2085 16.9963C13.0911 16.3508 13.4432 15.4119 14.4408 15.3532L19.7223 15.0011L26.999 26.1509V16.2921L25.1211 16.0574C25.0037 15.2945 25.5319 14.7077 26.2361 14.649L31.1655 14.3556Z" fill="black"/>+</g>+<defs>+<clipPath id="clip0_9356_2266">+<rect width="40" height="40" fill="white"/>+</clipPath>+</defs>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/paypal.svg b/site/public/examples/workos-atlas/assets/icons/paypal.svgnew file mode 100644index 0000000..afc54e8--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/paypal.svg@@ -0,0 +1,9 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-8 -8.0001 80 80">+ <g transform="matrix(.123006 0 0 .123006 -29.423026 -14.127235)">+ <path d="M754.6 298.1c0 54.6-22.7 98.7-68 132.2s-108.6 50.2-190 50.2h-45L417.1 630H298.2L408 171.2h161c30 0 56.1 2.1 78.5 6.2 22.3 4.1 41.6 11.2 57.8 21.3 16 10.1 28.3 23.2 36.7 39.3 8.4 16 12.6 36.1 12.6 60.1z" fill="#009cde"/>+ <path d="M421.1 634.9H292l112.2-468.7H569c30.1 0 56.8 2.1 79.3 6.2 22.8 4.2 42.8 11.6 59.5 21.9 16.7 10.5 29.7 24.4 38.5 41.2s13.2 37.8 13.2 62.5c0 56-23.5 101.9-70 136.2-46 34-110.9 51.2-193 51.2h-41.1zm-116.6-9.8h108.7l34.5-149.5h48.9c79.9 0 142.9-16.6 187.1-49.3 21.9-16.2 38.6-35.2 49.5-56.4s16.4-45.4 16.4-71.8c0-23.1-4.1-42.6-12.1-58-8-15.3-19.7-27.8-34.9-37.4-15.6-9.7-34.5-16.6-56.1-20.6-21.9-4-48-6.1-77.6-6.1h-157z" fill="#fff"/>+ <path d="M701.8 247c0 54.6-22.7 98.7-68 132.2s-108.6 50.2-190 50.2h-45l-34.5 149.5H245.4L351.3 120h164.9c30 0 56.1 2.1 78.5 6.2 22.3 4.1 41.6 11.2 57.8 21.3 16 10.1 28.3 23.2 36.7 39.3 8.4 16 12.6 36.1 12.6 60.2z" fill="#0f3572"/>+ <path d="M368.2 583.8h-129l108.1-468.7h168.9c30.1 0 56.8 2.1 79.3 6.2 22.8 4.2 42.8 11.6 59.5 21.9 16.7 10.5 29.7 24.4 38.5 41.2s13.2 37.8 13.2 62.5c0 56-23.5 101.9-70 136.2-46 34-110.9 51.2-193 51.2h-41.1zm-116.6-9.9h108.8l34.5-149.5h48.9c79.9 0 142.9-16.6 187.1-49.3 21.9-16.2 38.6-35.2 49.5-56.4s16.4-45.4 16.4-71.8c0-23.1-4.1-42.6-12.1-58-8-15.3-19.7-27.8-34.9-37.4-15.6-9.7-34.5-16.6-56.1-20.6-21.9-4-48-6.1-77.6-6.1h-161zm328-310.6c-.9 14-3.7 24.3-12.3 36.2-8.5 11.9-18.5 19.6-31.9 26-8.1 3.8-16.5 6.3-25.3 7.5s-19.3 1.9-31.6 1.9h-59.1l33.1-118.6h53.7c13.7 0 24.7.2 33 2.1 8.3 1.8 15.1 4.3 20.2 7.4 7.1 4.2 12.8 9.3 16.1 15.8 4.1 7.6 4.6 12.5 4.1 21.7z" fill="#fff"/>+ </g>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/pipedrive.svg b/site/public/examples/workos-atlas/assets/icons/pipedrive.svgnew file mode 100644index 0000000..5e46365--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/pipedrive.svg@@ -0,0 +1,11 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<g clip-path="url(#clip0_11018_27861)">+<path d="M27.5522 27.7734C27.5522 34.2367 30.831 41.2091 38.0463 41.2091C43.3973 41.2091 48.8075 37.0316 48.8075 27.6786C48.8075 19.4784 44.5545 13.9734 38.2244 13.9734C33.0663 13.9734 27.5522 17.5968 27.5522 27.7734ZM40.7663 2C53.7035 2 62.4025 12.2465 62.4025 27.4989C62.4025 42.5117 53.2386 52.9928 40.1382 52.9928C33.8922 52.9928 29.8914 50.3176 27.7994 48.3811C27.8143 48.8403 27.8242 49.3544 27.8242 49.9034V70.2616H14.4221V16.0197C14.4221 15.2311 14.1699 14.9815 13.3885 14.9815H8.77942V3.10301H20.0253C25.2031 3.10301 26.5285 5.73822 26.7807 7.76956C28.8825 5.41384 33.2394 2 40.7663 2Z" fill="#017737" style="fill:#017737;fill-opacity:1;"/>+</g>+<defs>+<clipPath id="clip0_11018_27861">+<rect width="72" height="72" fill="#017737" style="fill:#017737;fill-opacity:1;"/>+</clipPath>+</defs>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/quickbooks.svg b/site/public/examples/workos-atlas/assets/icons/quickbooks.svgnew file mode 100644index 0000000..2abc813--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/quickbooks.svg@@ -0,0 +1,5 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 62 62">+<path d="m30.77 61.54c16.99 0 30.77-13.78 30.77-30.77s-13.78-30.77-30.77-30.77-30.77 13.78-30.77 30.77 13.77 30.77 30.77 30.77z" fill="#2ca01c"/>+ <path d="m20.51 18.8c-6.61 0-11.97 5.36-11.97 11.97s5.35 11.96 11.97 11.96h1.71v-4.44h-1.71c-4.15 0-7.52-3.37-7.52-7.52s3.37-7.52 7.52-7.52h4.11v23.25c0 2.45 1.99 4.44 4.44 4.44v-32.14zm20.52 23.93c6.61 0 11.97-5.36 11.97-11.96s-5.35-11.96-11.97-11.96h-1.71v4.44h1.71c4.15 0 7.52 3.37 7.52 7.52s-3.37 7.52-7.52 7.52h-4.11v-23.25c0-2.45-1.99-4.44-4.44-4.44v32.13h8.55s0 0 0 0z" fill="#fff"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/ramp.svg b/site/public/examples/workos-atlas/assets/icons/ramp.svgnew file mode 100644index 0000000..ed0d5c2--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/ramp.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-8.6875 -13.9375 86.875 86.875">+ <path fill="#000" d="M69.5,58.7V59l-37.9,0v-0.3c5.5-3.1,9.2-6.2,12.6-9.5h15.6L69.5,58.7z M60.2,9.4L50.6,0h-0.3c0,0,0.2,17.5-16,33.5C18.5,49.1,0,49.2,0,49.2v0.3L9.8,59c0,0,18.3,0.2,34.4-15.7C60.3,27.6,60.2,9.4,60.2,9.4z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/salesforce.svg b/site/public/examples/workos-atlas/assets/icons/salesforce.svgnew file mode 100644index 0000000..f9f8edb--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/salesforce.svg@@ -0,0 +1,3 @@+<svg width="200" height="200" viewBox="0 0 200 200" fill="none" xmlns="http://www.w3.org/2000/svg">+<path fill-rule="evenodd" clip-rule="evenodd" d="M86.044 55.1488C91.312 49.6648 98.644 46.2688 106.744 46.2688C117.544 46.2688 126.904 52.2688 131.944 61.2088C136.418 59.2088 141.264 58.1764 146.164 58.1788C165.604 58.1788 181.384 74.0788 181.384 93.6988C181.384 113.319 165.604 129.219 146.164 129.219C143.788 129.219 141.472 128.98 139.204 128.529C134.794 136.389 126.364 141.729 116.764 141.729C112.856 141.737 108.997 140.85 105.484 139.137C101.014 149.637 90.604 157.017 78.484 157.017C65.824 157.017 55.084 149.037 50.944 137.817C49.1014 138.206 47.2232 138.401 45.34 138.4C30.28 138.4 18.1 126.04 18.1 110.86C18.1 100.66 23.584 91.78 31.72 86.98C29.9939 83.0038 29.1055 78.7147 29.11 74.38C29.11 56.86 43.33 42.7 60.85 42.7C71.11 42.7 80.29 47.59 86.05 55.18" fill="#00A1E0"/>+</svg>diff --git a/site/public/examples/workos-atlas/assets/icons/sentry.svg b/site/public/examples/workos-atlas/assets/icons/sentry.svgnew file mode 100644index 0000000..b88c069--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/sentry.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" viewBox="0 0 72 72" fill="none">+<path d="M40.3116 12.6786C39.8192 11.8613 39.1239 11.1853 38.2932 10.7159C37.4625 10.2466 36.5245 10 35.5704 10C34.6163 10 33.6784 10.2466 32.8477 10.7159C32.017 11.1853 31.3217 11.8613 30.8293 12.6786L23.0301 26.0367C28.9883 29.0115 34.0649 33.493 37.7556 39.0363C41.4463 44.5796 43.6228 50.9919 44.0689 57.6365H38.5929C38.1475 51.9409 36.2226 46.4602 33.0087 41.737C29.7947 37.0137 25.403 33.2116 20.2684 30.7068L13.05 43.1879C15.9365 44.4824 18.4513 46.482 20.363 49.0026C22.2747 51.5233 23.522 54.4841 23.9902 57.6128H11.4143C11.2651 57.6023 11.1209 57.5548 10.9947 57.4746C10.8685 57.3944 10.7643 57.2841 10.6914 57.1535C10.6185 57.023 10.5792 56.8764 10.5771 56.7269C10.575 56.5773 10.6101 56.4297 10.6794 56.2972L14.1641 50.3707C12.9835 49.3857 11.6342 48.6227 10.1816 48.1187L6.73237 54.0451C6.37329 54.661 6.14018 55.3421 6.04658 56.0489C5.95298 56.7557 6.00075 57.474 6.18712 58.1621C6.3735 58.8503 6.69475 59.4945 7.13223 60.0575C7.56971 60.6204 8.11469 61.0908 8.73551 61.4413C9.55347 61.9022 10.4754 62.1469 11.4143 62.1525H28.6365C28.9564 58.2055 28.2515 54.2429 26.5902 50.6483C24.929 47.0538 22.3676 43.9491 19.1542 41.6351L21.8922 36.894C25.9476 39.6793 29.2066 43.474 31.3475 47.9035C33.4885 52.333 34.4374 57.2442 34.1007 62.1525H48.6916C49.0314 54.7171 47.4138 47.3228 44.0006 40.7085C40.5873 34.0942 35.4979 28.4915 29.241 24.4603L34.7763 14.978C34.8996 14.7714 35.0996 14.6218 35.3327 14.5618C35.5658 14.5019 35.8131 14.5365 36.0208 14.658C36.649 15.0017 60.0703 55.8704 60.5089 56.3446C60.5862 56.4831 60.6255 56.6396 60.6228 56.7982C60.6202 56.9568 60.5758 57.1119 60.494 57.2478C60.4122 57.3837 60.296 57.4956 60.1571 57.5722C60.0182 57.6488 59.8615 57.6873 59.7029 57.6839H54.0609C54.132 59.1932 54.132 60.6985 54.0609 62.1999H59.7266C60.446 62.2046 61.1593 62.0666 61.825 61.7938C62.4907 61.521 63.0958 61.1189 63.605 60.6107C64.1143 60.1025 64.5177 59.4984 64.792 58.8332C65.0662 58.1681 65.2058 57.4552 65.2026 56.7357C65.2033 55.7854 64.9496 54.8523 64.4678 54.0333L40.3116 12.6786Z" fill="#362D59" style="fill:#362D59;fill-opacity:1;"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/snowflake.svg b/site/public/examples/workos-atlas/assets/icons/snowflake.svgnew file mode 100644index 0000000..c3d1686--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/snowflake.svg@@ -0,0 +1,7 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" id="Layer_1" data-name="Layer 1" viewBox="0 0 146.36 139.16">+ <defs>+ <style>.cls-1{fill:#29b5e8;fill-rule:evenodd;}</style>+ </defs>+ <path class="cls-1" d="M134.81,60.1l-16.47,9.49L134.81,79a8.65,8.65,0,1,1-8.67,15l-29.51-17a8.68,8.68,0,0,1-4.33-7.75,8.48,8.48,0,0,1,.31-2,8.68,8.68,0,0,1,4-5.19l29.51-16.94A8.69,8.69,0,0,1,138,48.31,8.58,8.58,0,0,1,134.81,60.1Zm-15.59,46L89.72,89.13a8.72,8.72,0,0,0-13.06,7.48v33.9a8.69,8.69,0,0,0,17.37,0v-19L110.54,121a8.66,8.66,0,1,0,8.68-15Zm-34-33.16L72.92,85.09a2.44,2.44,0,0,1-1.54.65H67.77a2.51,2.51,0,0,1-1.54-.65L54,72.9a2.45,2.45,0,0,1-.64-1.52v-3.6A2.5,2.5,0,0,1,54,66.25L66.23,54.06a2.5,2.5,0,0,1,1.54-.64h3.61a2.45,2.45,0,0,1,1.54.64L85.18,66.25a2.49,2.49,0,0,1,.63,1.53v3.6A2.44,2.44,0,0,1,85.18,72.9Zm-9.8-3.38A2.59,2.59,0,0,0,74.73,68l-3.55-3.51a2.51,2.51,0,0,0-1.54-.64h-.13a2.46,2.46,0,0,0-1.53.64L64.43,68a2.51,2.51,0,0,0-.63,1.55v.13a2.41,2.41,0,0,0,.63,1.52L68,74.7a2.48,2.48,0,0,0,1.53.64h.13a2.51,2.51,0,0,0,1.54-.64l3.55-3.53a2.49,2.49,0,0,0,.65-1.52ZM19.93,33.08,49.44,50a8.73,8.73,0,0,0,13.07-7.49V8.64a8.69,8.69,0,0,0-17.37,0v19l-16.53-9.5a8.65,8.65,0,1,0-8.68,15ZM84.69,51.16a8.64,8.64,0,0,0,5-1.13l29.5-17a8.65,8.65,0,1,0-8.68-15L94,27.61v-19a8.69,8.69,0,0,0-17.37,0v33.9A8.66,8.66,0,0,0,84.69,51.16ZM54.48,88a8.58,8.58,0,0,0-5,1.13L19.93,106.06a8.66,8.66,0,1,0,8.68,15l16.53-9.49v19a8.69,8.69,0,0,0,17.37,0V96.61A8.65,8.65,0,0,0,54.48,88Zm-8-15.87a8.61,8.61,0,0,0-4-10L13,45.14A8.69,8.69,0,0,0,1.17,48.31,8.59,8.59,0,0,0,4.35,60.1l16.47,9.49L4.35,79A8.65,8.65,0,1,0,13,94l29.48-17A8.59,8.59,0,0,0,46.47,72.13Zm93.15-56.22H138.3v1.63h1.32c.61,0,1-.28,1-.8S140.26,15.91,139.62,15.91Zm-2.94-1.5h3c1.62,0,2.7.89,2.7,2.27a2.16,2.16,0,0,1-1.08,1.9l1.17,1.68v.34h-1.69L139.62,19H138.3V20.6h-1.62Zm8.3,3.22a5.48,5.48,0,0,0-5.58-5.83c-3.31,0-5.51,2.39-5.51,5.83,0,3.28,2.2,5.82,5.51,5.82A5.47,5.47,0,0,0,145,17.63Zm1.38,0c0,3.89-2.6,7.14-7,7.14s-6.89-3.28-6.89-7.14,2.57-7.14,6.89-7.14S146.36,13.73,146.36,17.63Z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/stripe.svg b/site/public/examples/workos-atlas/assets/icons/stripe.svgnew file mode 100644index 0000000..0d73952--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/stripe.svg@@ -0,0 +1,11 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200" viewBox="0 0 200 200" fill="none">+<g clip-path="url(#clip0_255_2)">+<path fill-rule="evenodd" clip-rule="evenodd" d="M89.8937 70.1148C89.8937 63.907 95.0594 61.5054 103.406 61.5054C117.22 61.8039 130.775 65.3114 143 71.7506V34.2772C130.394 29.3232 116.949 26.8536 103.406 27.0045C71.2341 27.0045 49.6562 43.8562 49.6562 71.9953C49.6562 116.021 110.112 108.871 110.112 127.847C110.112 135.27 103.768 137.572 94.8419 137.572C81.6786 137.572 64.6773 132.125 51.3419 124.875V162.838C65.0716 168.812 79.8735 171.929 94.8464 172C127.911 172 150.703 155.665 150.703 127.036C150.703 79.5217 89.8937 88.0087 89.8937 70.1239V70.1148Z" fill="#635BFF"/>+</g>+<defs>+<clipPath id="clip0_255_2">+<rect width="145" height="145" fill="#635BFF" transform="translate(27 27)"/>+</clipPath>+</defs>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/survey-monkey.svg b/site/public/examples/workos-atlas/assets/icons/survey-monkey.svgnew file mode 100644index 0000000..2dfe8a5--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/survey-monkey.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-64.013 -64.063 640.125 640.125">+ <path d="M452.7 360.1c-4.6 0-8.8-1.8-11.9-4.6 1.1-9.3 1.8-18.7 1.9-28.2 2.9-1.9 6.3-3.1 10-3.1 9.8 0 17.8 8.1 17.8 18 .1 9.9-7.9 17.9-17.8 17.9m-393.4 0c-9.9 0-17.8-8-17.8-17.8v-.1c0-9.9 8-18 17.8-18 3.7 0 7.1 1.2 10 3.1.1 9.5.8 18.9 1.9 28.2-3.3 3-7.5 4.6-11.9 4.6m392.2-78.7c-5 0-9.8.7-14.5 1.8-17.8-70.7-75.5-125.4-147.6-138.3-3.2-.6-6.1-1-9.4-1.4.5-17.7 1.4-38.2 27.3-56.6l-4.1-10.4s-50.5 15.8-56.3 59.2c-2.5-11.8-26.1-26.6-37.7-29.4l-5.8 9.4s15.5 7.8 19.2 29.2c-72.1 13-129.8 67.6-147.6 138.3-4.7-1.2-9.6-1.8-14.5-1.8-33.4 0-60.5 27.2-60.5 60.8S27.1 403 60.5 403c7.6 0 15.1-1.5 22.1-4.3 5.2 12.9 11.8 25.3 19.7 36.8l50.2-34-.4-.6c-13.3-17.2-21.4-42.4-22.8-67.6-1.5-27.7 5.2-55.3 22.8-71.5 36.3-31.1 75.8-16.9 100.6 12.9h6.7c24.8-29.8 64.3-44 100.6-12.9 17.6 16.2 24.3 43.7 22.8 71.5-1.4 25.1-9.5 50.4-22.8 67.6l-.4.5 50.2 34c7.9-11.5 14.5-23.8 19.7-36.8 7 2.8 14.5 4.2 22.1 4.3 33.3 0 60.5-27.3 60.5-60.8-.1-33.5-27.2-60.7-60.6-60.7" style="fill-rule:evenodd;clip-rule:evenodd;fill:#00bf6f"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/typeform.svg b/site/public/examples/workos-atlas/assets/icons/typeform.svgnew file mode 100644index 0000000..59c3e57--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/typeform.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-32.625 -32.245 321.25 321.25">+ <path fill="#262627" d="M121.24.474c33.019-2.718 56.734 6.045 82.25 31.547 27.549 27.532 45.864 63.212 50.8 101.218 5.492 42.266-2.062 73.807-25.326 96.898-22.247 22.08-54.74 29.364-98.146 25.735l-1.797-.158c-36.963-3.398-63.107-15.517-88.438-41.171C13.526 187.14-.732 156.026.029 123.37c.372-15.987 4.901-29.612 13.635-42.98 5.726-8.765 11.54-15.602 23.704-28.14l4.06-4.158 4.474-4.536C74.73 14.58 93.707 2.741 121.24.475m80.288 33.51C176.586 9.057 153.672.59 121.468 3.241c-27.14 2.234-45.78 14.091-74.95 43.635l-2.11 2.141c-14.21 14.448-20.87 21.835-26.738 30.378l-.854 1.26-.828 1.252c-8.461 12.95-12.824 26.078-13.184 41.528-.743 31.846 13.194 62.258 39.754 89.157 25.267 25.59 51.225 37.4 88.49 40.514l1.85.148c41.744 3.21 72.867-4.002 94.11-25.087 22.57-22.402 29.92-53.088 24.53-94.57-4.855-37.382-22.884-72.503-50.01-99.613M166.984 93.39v13.56h-28.797v77.712h-14.345V106.95H95.045V93.39z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/icons/zendesk-sell.svg b/site/public/examples/workos-atlas/assets/icons/zendesk-sell.svgnew file mode 100644index 0000000..38d1095--- /dev/null+++ b/site/public/examples/workos-atlas/assets/icons/zendesk-sell.svg@@ -0,0 +1,4 @@+<?xml version="1.0" encoding="utf-8"?>+<svg xmlns="http://www.w3.org/2000/svg" viewBox="-32 -63 320 320">+ <path fill="#03363d" d="M118.25 51.233v142.773H0zm0-51.233c0 32.644-26.481 59.125-59.125 59.125S0 32.645 0 0zm19.5 194.006c0-32.677 26.449-59.125 59.125-59.125S256 161.361 256 194.006zm0-51.266V0H256z"/>+</svg>\ No newline at end of filediff --git a/site/public/examples/workos-atlas/assets/img/bot-384.webp b/site/public/examples/workos-atlas/assets/img/bot-384.webpnew file mode 100644index 0000000..36b7fe9Binary files /dev/null and b/site/public/examples/workos-atlas/assets/img/bot-384.webp differdiff --git a/site/public/examples/workos-atlas/assets/img/bot-750.webp b/site/public/examples/workos-atlas/assets/img/bot-750.webpnew file mode 100644index 0000000..c566575Binary files /dev/null and b/site/public/examples/workos-atlas/assets/img/bot-750.webp differdiff --git a/site/public/examples/workos-atlas/assets/img/bot-face-mask.png b/site/public/examples/workos-atlas/assets/img/bot-face-mask.pngnew file mode 100644index 0000000..0cbe33cBinary files /dev/null and b/site/public/examples/workos-atlas/assets/img/bot-face-mask.png differdiff --git a/site/public/examples/workos-atlas/assets/img/bot-face-shadow-384.webp b/site/public/examples/workos-atlas/assets/img/bot-face-shadow-384.webpnew file mode 100644index 0000000..461c4c3Binary files /dev/null and b/site/public/examples/workos-atlas/assets/img/bot-face-shadow-384.webp differdiff --git a/site/public/examples/workos-atlas/assets/img/bot-face-shadow-750.webp b/site/public/examples/workos-atlas/assets/img/bot-face-shadow-750.webpnew file mode 100644index 0000000..1e4f2a9Binary files /dev/null and b/site/public/examples/workos-atlas/assets/img/bot-face-shadow-750.webp differdiff --git a/site/public/examples/workos-atlas/index.html b/site/public/examples/workos-atlas/index.htmlnew file mode 100644index 0000000..0f92df7--- /dev/null+++ b/site/public/examples/workos-atlas/index.html@@ -0,0 +1,73 @@+<!doctype html>+<html lang="en">+<head>+ <meta charset="utf-8">+ <meta name="viewport" content="width=device-width, initial-scale=1">+ <title>workos.com/atlas “Connected to all your tools”, rebuilt with motion-clone</title>+ <meta name="robots" content="noindex">+ <link rel="stylesheet" href="./src/atlas.css">+ <script type="module" src="./src/atlas.js"></script>+</head>+<body>+ <main class="page">+ <div class="atlas-tools" role="img" aria-label="Atlas reaching out from its antenna to a dome of more than 150 services — Google Drive, GitHub, Notion, Salesforce, Linear, Jira, Gmail, Stripe and more — connecting to a few at a time and bringing the answers back.">+ <div class="atlas-tools__content" aria-hidden="true">+ <div class="atlas-tools__stage">++ <div class="atlas-tools__botLayer" style="left:100px;top:200px;--bot-size:336px;--bot-clip:0px">+ <div class="atlas-tools__bot" style="width:336px">+ <img alt="Atlas Robot" draggable="false" loading="lazy" width="336" height="336" decoding="async"+ srcset="./assets/img/bot-384.webp 1x, ./assets/img/bot-750.webp 2x" src="./assets/img/bot-750.webp">+ <div class="atlas-tools__facePlate">+ <div class="atlas-tools__faceFade">+ <div class="bot-face" aria-hidden="true">+ <div class="bot-face-gradient" style="background:radial-gradient(ellipse 92% 88% at 50% 60%, #117AAE 0%, #003B90 40%, #002555 72%, transparent 100%);opacity:0.8"></div>+ <div class="bot-eye-slot">+ <div class="bot-eye-track">+ <div class="bot-eye">+ <div class="bot-eye-glow"></div>+ <div class="bot-eye-core"><div class="bot-eye-core-body"></div><div class="bot-eye-core-pupil"></div></div>+ </div>+ </div>+ </div>+ <div class="bot-eye-slot">+ <div class="bot-eye-track">+ <div class="bot-eye">+ <div class="bot-eye-glow"></div>+ <div class="bot-eye-core"><div class="bot-eye-core-body"></div><div class="bot-eye-core-pupil"></div></div>+ </div>+ </div>+ </div>+ </div>+ </div>+ </div>+ <img class="atlas-tools__faceShadow" alt="" draggable="false" loading="lazy" width="336" height="336" decoding="async"+ srcset="./assets/img/bot-face-shadow-384.webp 1x, ./assets/img/bot-face-shadow-750.webp 2x" src="./assets/img/bot-face-shadow-750.webp">+ </div>+ <div class="atlas-tools__glare" aria-hidden="true" style="opacity:0"></div>+ <div class="atlas-tools__glareStreak" aria-hidden="true" style="opacity:0"></div>+ </div>++ <div class="atlas-tools__laptop" aria-hidden="true" style="left:138.504px;bottom:-16px;--lid-scale:0.65">+ <div class="atlas-tools__macbook">+ <div class="atlas-tools__shadowLayer">+ <div class="atlas-tools__groundShadow" style="opacity:0.62;transform:scale(0.84, 0.9)"></div>+ </div>+ <div class="atlas-tools__lid" style="transform:rotateX(60deg)">+ <div class="atlas-tools__lidBack">+ <svg class="atlas-tools__emblem" viewBox="0 0 23 28" fill="none" xmlns="http://www.w3.org/2000/svg" aria-hidden="true">+ <path d="M0 13.9997C0 14.4385 0.115482 14.8774 0.338749 15.2546L4.38833 22.2682C4.80407 22.9842 5.43537 23.5693 6.22065 23.8311C7.76812 24.3469 9.36948 23.6848 10.1317 22.3606L11.1094 20.6669L7.2523 13.9997L11.325 6.93986L12.3027 5.24612C12.5953 4.738 12.9879 4.32226 13.4499 3.99121H13.0264H7.16761C6.06668 3.99121 5.05043 4.57632 4.50382 5.53098L0.338749 12.7448C0.115482 13.122 0 13.5609 0 13.9997Z" fill="currentColor"/>+ <path d="M23.0963 13.9996C23.0963 13.5608 22.9809 13.122 22.7576 12.7447L18.6541 5.63872C17.8919 4.32222 16.2906 3.66012 14.7431 4.16824C13.9578 4.43 13.3265 5.01511 12.9108 5.7311L11.9869 7.32476L15.844 13.9996L11.7714 21.0595L10.7936 22.7532C10.5011 23.2536 10.1084 23.6771 9.64648 24.0081H10.0699H15.9287C17.0297 24.0081 18.0459 23.423 18.5925 22.4684L22.7576 15.2546C22.9809 14.8773 23.0963 14.4385 23.0963 13.9996Z" fill="currentColor"/>+ </svg>+ </div>+ </div>+ </div>+ </div>++ <!-- generated by src/atlas.js: the field below the chips (lines, halos), 38 chips, the field above (rings, ripples) -->+ </div>+ </div>+ </div>+ </main>+</body>+</html>diff --git a/site/public/examples/workos-atlas/src/atlas.css b/site/public/examples/workos-atlas/src/atlas.cssnew file mode 100644index 0000000..85534c7--- /dev/null+++ b/site/public/examples/workos-atlas/src/atlas.css@@ -0,0 +1,152 @@+/* workos.com/atlas, "Connected to all your tools": the robot, the dome of integrations and the+ antenna links. Values copied from the original's CSS module (SignalDome) and the global bot-face+ rules; the frame is the original's GraphicFrame (536 x 536, scaled down below that width). */++*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; border: 0 solid; }+img, svg, video, canvas { display: block; vertical-align: middle; }+img { max-width: 100%; height: auto; color: transparent; }++html { background: #fff; -webkit-text-size-adjust: 100%; }+body { background: #fff; }++.page {+ min-height: 100vh;+ display: grid;+ place-items: center;+ padding: 48px 24px;+}++/* GraphicFrame root */+.atlas-tools {+ --frame-source-width: 536px;+ --frame-source-height: 536px;+ --frame-aspect-ratio: 536 / 536;+ --frame-max-width: 536px;+ --frame-scale: 1;+ width: 100%;+ max-width: var(--frame-max-width);+ -webkit-user-select: none;+ user-select: none;+ aspect-ratio: var(--frame-aspect-ratio);+ margin: 0 auto;+ position: relative;+ /* On workos.com the frame sits at y = 1804.84 px (1440x900); the same sub-pixel phase here makes the+ chips, lines and robot rasterise on the same pixel grid. */+ top: 0.84375px;+ container-type: inline-size;+}+.atlas-tools__content {+ width: var(--frame-source-width);+ height: var(--frame-source-height);+ transform: scale(var(--frame-scale));+ transform-origin: 0 0;+ position: absolute;+ top: 0;+ left: 0;+}++/* SignalDome */+.atlas-tools__stage { --dome-stroke: 1.5px; position: absolute; inset: 0; }+.atlas-tools__field { pointer-events: none; will-change: transform; position: absolute; top: 0; left: 0; overflow: visible; }+.atlas-tools__wire, .atlas-tools__contact, .atlas-tools__ripple { fill: none; stroke-width: calc(var(--dome-stroke) / var(--frame-scale, 1)); }+.atlas-tools__halo { fill: #fff; }+.atlas-tools__slot { position: absolute; }+.atlas-tools__raised { z-index: 1; }+.atlas-tools__chip {+ will-change: transform;+ background: #fff;+ border-radius: 50%;+ place-items: center;+ width: 100%;+ height: 100%;+ display: grid;+ box-shadow: inset 0 0 0 1px #29363d12, 0 1px 1px #29363d08, 0 3px 6px -2px #29363d12;+}+.atlas-tools__chip img { object-fit: contain; pointer-events: none; width: 52%; height: 52%; scale: var(--icon-scale, 1); display: block; }+.atlas-tools__horizon { opacity: calc(.52 * var(--chip-strength, 1)); }+@media (prefers-contrast: more) {+ .atlas-tools__horizon { opacity: calc(.8 * var(--chip-strength, 1)); }+}++.atlas-tools__botLayer { --bot-clip: 0px; width: var(--bot-size); height: var(--bot-size); clip-path: inset(0 0 var(--bot-clip) 0); position: absolute; }+.atlas-tools__glare {+ width: 52.22%; height: 30%;+ filter: blur(calc(var(--bot-size) * .0194));+ pointer-events: none;+ background: radial-gradient(128% 104% at 50% 28%, #e9f6ff9e 0%, #cde9ff6b 22%, #b4ddff42 42%, #a0d4ff1f 60%, #98d0ff08 76%, #96d0ff00 88%);+ position: absolute; top: 37.22%; left: 24.44%;+}+.atlas-tools__glareStreak {+ width: 36.67%; height: 13.33%;+ filter: blur(calc(var(--bot-size) * .0111));+ pointer-events: none;+ background: radial-gradient(58% 60% at 50% 40%, #f4fbff94 0%, #dcf1ff4d 40%, #c8e8ff17 66%, #c8e8ff00 82%);+ position: absolute; top: 40.56%; left: 32.22%;+}++.atlas-tools__laptop { width: 400px; height: 260px; transform: scale(var(--lid-scale)); transform-origin: 0 100%; perspective: 1500px; perspective-origin: 50% -40px; position: absolute; }+.atlas-tools__macbook { transform-style: preserve-3d; z-index: 3; position: absolute; inset: 0; }+.atlas-tools__shadowLayer { pointer-events: none; position: absolute; bottom: -17px; left: 50%; transform: translate3d(-50%, 0, -16px); }+.atlas-tools__groundShadow {+ filter: blur(2px);+ background: radial-gradient(42% 20%, #0000004d 0% 50%, #00000024 60%, #0000 72%), radial-gradient(52% 20% at 50% 52%, #0000004d 0% 50%, #0000000d 54%, #0000 78%);+ border-radius: 50%;+ width: 850px; height: 30px;+}+.atlas-tools__lid { transform-origin: 50% 100%; transform-style: flat; backface-visibility: hidden; z-index: 4; width: 400px; height: 260px; position: absolute; top: 0; left: 0; }+.atlas-tools__lidBack {+ background: radial-gradient(120% 90% at 50% -18%, #ffffffb3, #fff0 52%), linear-gradient(#e4e7ea 0%, #cfd3d8 34%, #bcc1c7 62%, #a9aeb5 84%, #9ba0a8 100%);+ border-radius: 14px 14px 12px 12px;+ position: absolute; inset: 0; overflow: hidden;+ box-shadow: inset 0 1.5px #00000014, inset 0 -14px 24px -6px #0000001a, inset 0 0 1px 2px #00000014, inset 0 -2px 1px #0003;+}+.atlas-tools__emblem {+ color: #484f586b;+ filter: drop-shadow(0 1px #ffffffb3) drop-shadow(0 -1px 1.5px #00000040);+ width: 50px; height: auto;+ position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);+}++/* The robot (BotImage + BotFace): image, black face plate masked to the visor, animated screen,+ two eyes, then the visor shadow on top. */+.atlas-tools__bot { position: relative; aspect-ratio: 1; max-width: 100%; transform-origin: bottom center; }+.atlas-tools__bot > img { width: 100%; height: 100%; }+.atlas-tools__bot > .atlas-tools__faceShadow { position: absolute; inset: 0; }+.atlas-tools__facePlate {+ position: absolute; inset: 0;+ background-color: #000;+ -webkit-mask-image: url(../assets/img/bot-face-mask.png);+ mask-image: url(../assets/img/bot-face-mask.png);+ -webkit-mask-size: cover;+ mask-size: cover;+}+.atlas-tools__faceFade { position: absolute; inset: 0; }++.bot-face {+ position: relative; top: 30%; left: 25%; z-index: 2; /* relative: the original's .bot-face rule wins over Tailwind's .absolute */+ display: flex; height: 33%; width: 50%;+ align-items: center; justify-content: center; gap: 25%;+ overflow: hidden;+}+.bot-face-gradient { z-index: 0; transition: opacity .7s; position: absolute; inset: 0; }+.bot-face-gradient > .shader { width: 100%; height: 100%; opacity: .8; }+.bot-face-gradient canvas { width: 100%; height: 100%; display: block; }+.bot-eye-slot { z-index: 1; flex-shrink: 0; width: 15%; height: 38%; position: relative; overflow: visible; }+.bot-eye-track, .bot-eye { will-change: transform; position: absolute; inset: 0; overflow: visible; }+.bot-eye { transform-origin: center 78%; }+.bot-eye-glow, .bot-eye-core { transition: filter .7s; }+.bot-eye-glow {+ background: radial-gradient(ellipse 46% 50% at 50% 46%, hsl(var(--eye-hue, 200) 100% 83% / .5) 0%, hsl(var(--eye-hue, 200) 94% 68% / .24) 38%, hsl(var(--eye-hue, 200) 82% 56% / .08) 60%, hsl(var(--eye-hue, 200) 82% 56% / 0) 74%);+ filter: blur(5px);+ z-index: 0; border-radius: 50%;+ position: absolute; inset: -70% -90%;+}+.bot-eye-core { filter: blur(.6px); z-index: 1; border-radius: 50%; position: absolute; inset: 0; overflow: hidden; }+.bot-eye-core-body {+ background: radial-gradient(ellipse 25% 26.667% at 50% 49.583%, hsl(var(--eye-hue, 200) 100% 95% / .95) 0%, hsl(var(--eye-hue, 200) 95% 81% / .78) 48%, hsl(var(--eye-hue, 200) 93% 68% / .26) 78%, hsl(var(--eye-hue, 200) 93% 68% / 0) 100%);+ position: absolute; inset: -70%;+}+.bot-eye-core-pupil {+ background: radial-gradient(ellipse 17.5% 18.333% at 50% 46.667%, #fff 0%, hsl(var(--eye-hue, 200) 100% 97% / .92) 34%, hsl(var(--eye-hue, 200) 100% 92% / 0) 100%);+ position: absolute; inset: -70%;+}diff --git a/site/public/examples/workos-atlas/src/atlas.js b/site/public/examples/workos-atlas/src/atlas.jsnew file mode 100644index 0000000..2c6613b--- /dev/null+++ b/site/public/examples/workos-atlas/src/atlas.js@@ -0,0 +1,500 @@+// workos.com/atlas, "Connected to all your tools" (SignalDome): Atlas the robot at a laptop under a+// dome of 38 integration chips. When the visual is 60% in view the chips spring out from the antenna,+// the laptop lid opens, the screen glare comes on and the eyes start reading. While it stays in view,+// every 1.65-2.18 s the antenna reaches out to one more chip (picked from a shuffled bag, away from the+// links still alive, preferring another ring and another brand hue): a line draws in, the chip swells+// inside a ring in its brand colour, a ripple goes out, and the link fades about 5 s later.+// Layout, timings, easings and the picking rules are the original's; see .motion-clone/workos-atlas.++import { springEasing, tween, waapi, springFollower } from "./motion.js";+import { mountFaceShader } from "./face.js";++const ICONS = "./assets/icons/";++const LAYOUT = {+ frameW: 536,+ frameH: 536,+ botSize: 336,+ services: [+ [["salesforce", "Salesforce"], ["github", "GitHub"], ["google-drive", "Google Drive"], ["notion", "Notion"], ["linear", "Linear"]],+ [["gitlab", "GitLab"], ["snowflake", "Snowflake"], ["jira", "Jira"], ["hubspot", "HubSpot"], ["datadog", "Datadog"], ["gmail", "Gmail"], ["stripe", "Stripe"], ["sentry", "Sentry"]],+ [["mailchimp", "Mailchimp"], ["dropbox", "Dropbox"], ["quickbooks", "QuickBooks"], ["discord", "Discord"], ["airtable", "Airtable"], ["linkedin", "LinkedIn"], ["zendesk-sell", "Zendesk"], ["microsoft-teams", "Microsoft Teams"], ["intercom", "Intercom"], ["gong", "Gong"], ["front", "Front"]],+ [["typeform", "Typeform"], ["bitbucket", "Bitbucket"], ["netlify", "Netlify"], ["google", "Google"], ["digitalocean", "DigitalOcean"], ["ramp", "Ramp"], ["microsoft", "Microsoft"], ["pipedrive", "Pipedrive"], ["paypal", "PayPal"], ["survey-monkey", "SurveyMonkey"], ["gusto", "Gusto"], ["buffer", "Buffer"], ["close", "Close"], ["contentful", "Contentful"]],+ ].map((ring) => ring.map(([slug, name]) => ({ slug, name }))),+ ringDropPx: 40,+ laptop: { widthPx: 260, bottomPx: -16 },+ rings: [+ { r: 110, chip: 44, fromDeg: 20, toDeg: 160 },+ { r: 160, chip: 37, fromDeg: 11, toDeg: 169 },+ { r: 210, chip: 30, fromDeg: 5.5, toDeg: 174.5 },+ { r: 245, chip: 22, fromDeg: 2.3, toDeg: 177.7, horizon: true },+ ],+};++// How much of each logo's box is ink, to even out their optical size (--icon-scale).+const ICON_METRICS = { airtable: { box: 0.735, ink: 0.564, max: 0.8 }, bitbucket: { box: 0.659, ink: 0.584, max: 0.695 }, buffer: { box: 0.756, ink: 0.524, max: 0.805 }, close: { box: 0.781, ink: 0.543, max: 0.805 }, contentful: { box: 0.756, ink: 0.537, max: 0.805 }, datadog: { box: 0.825, ink: 0.539, max: 0.849 }, digitalocean: { box: 0.801, ink: 0.54, max: 0.805 }, discord: { box: 0.733, ink: 0.617, max: 0.835 }, dropbox: { box: 0.818, ink: 0.579, max: 0.85 }, front: { box: 0.675, ink: 0.611, max: 0.667 }, github: { box: 0.831, ink: 0.555, max: 0.83 }, gitlab: { box: 0.744, ink: 0.572, max: 0.753 }, gmail: { box: 0.625, ink: 0.511, max: 0.715 }, gong: { box: 0.962, ink: 0.579, max: 0.998 }, google: { box: 0.773, ink: 0.559, max: 0.781 }, "google-drive": { box: 0.686, ink: 0.566, max: 0.725 }, gusto: { box: 0.718, ink: 0.55, max: 0.863 }, hubspot: { box: 0.981, ink: 0.553, max: 1 }, intercom: { box: 0.953, ink: 0.854, max: 0.952 }, jira: { box: 0.719, ink: 0.499, max: 0.73 }, linear: { box: 1, ink: 0.784, max: 1 }, linkedin: { box: 0.906, ink: 0.902, max: 0.906 }, mailchimp: { box: 1, ink: 0.892, max: 1 }, microsoft: { box: 0.703, ink: 0.672, max: 0.703 }, "microsoft-teams": { box: 0.968, ink: 0.799, max: 1 }, netlify: { box: 0.942, ink: 0.4, max: 1 }, notion: { box: 0.903, ink: 0.864, max: 0.92 }, paypal: { box: 0.805, ink: 0.648, max: 0.805 }, pipedrive: { box: 0.842, ink: 0.623, max: 0.949 }, quickbooks: { box: 0.994, ink: 0.883, max: 0.993 }, ramp: { box: 0.74, ink: 0.411, max: 0.805 }, salesforce: { box: 0.686, ink: 0.58, max: 0.816 }, sentry: { box: 0.777, ink: 0.456, max: 0.822 }, snowflake: { box: 0.975, ink: 0.658, max: 1 }, stripe: { box: 0.612, ink: 0.507, max: 0.725 }, "survey-monkey": { box: 0.673, ink: 0.401, max: 0.805 }, typeform: { box: 0.801, ink: 0.226, max: 0.805 }, "zendesk-sell": { box: 0.7, ink: 0.532, max: 0.8 } };++// Brand colours; null = no usable hue (falls back to the neutral #29363d).+const BRAND = { airtable: "#ed3049", bitbucket: "#2684ff", buffer: null, close: "#1463ff", contentful: "#f05751", datadog: "#632ca6", digitalocean: "#0080ff", discord: "#5865f2", dropbox: "#007ee5", front: "#ff4802", github: null, gitlab: "#e24329", gmail: "#ea4335", gong: "#7b4ff5", google: "#e54335", "google-drive": "#ffba00", gusto: "#f45d48", hubspot: "#ff7a59", intercom: "#081d34", jira: "#2684ff", linear: null, linkedin: "#0a66c2", mailchimp: "#ffe01b", microsoft: "#f35325", "microsoft-teams": "#5059c9", netlify: "#00c7b7", notion: null, paypal: "#009cde", quickbooks: "#2ca01c", ramp: null, salesforce: "#00a1e0", sentry: "#362d59", snowflake: "#29b5e8", stripe: "#635bff", pipedrive: "#017737", "survey-monkey": null, typeform: null, "zendesk-sell": "#03363d" };+const NEUTRAL = "#29363d";++// Seconds. Every link: reach (line draws in), then the chip swells and a ripple goes out, it holds,+// then releases (line and ring fade).+const T = { reachS: 0.63, firmS: 0.24, rippleS: 0.62 * 1.5, swellS: 0.83 * 1.5, holdS: 1.875, releaseS: 0.8 * 1.5 };+const EVERY = { everyS: Math.max(1.1 * 1.5, T.reachS + T.rippleS), stretch: 0.32 };+const SETTLE_S = Math.max(T.rippleS, T.swellS);+const SWELL_TIMES = [0, 0.2, 0.56, 1];+const SWELL_EASE = ["outCubic", "linear", "inOutQuad"];++const round = (v, d = 2) => Math.round(v * 10 ** d) / 10 ** d;++// ---------- colour: brand hex -> OKLCH at L 0.58, C 0.17 (gamut-mapped by lowering chroma) ----------+const toLinear = (c) => (c <= 0.04045 ? c / 12.92 : ((c + 0.055) / 1.055) ** 2.4);+function hexToOklch(hex) {+ let h = hex.replace("#", "");+ h = h.length === 3 ? [...h].map((c) => c + c).join("") : h.slice(0, 6);+ const [r, g, b] = [0, 2, 4].map((i) => toLinear(parseInt(h.slice(i, i + 2), 16) / 255));+ const l = Math.cbrt(0.4122214708 * r + 0.5363325363 * g + 0.0514459929 * b);+ const m = Math.cbrt(0.2119034982 * r + 0.6806995451 * g + 0.1073969566 * b);+ const s = Math.cbrt(0.0883024619 * r + 0.2817188376 * g + 0.6299787005 * b);+ const A = 1.9779984951 * l - 2.428592205 * m + 0.4505937099 * s;+ const B = 0.0259040371 * l + 0.7827717662 * m - 0.808675766 * s;+ return { l: 0.2104542553 * l + 0.793617785 * m - 0.0040720468 * s, c: Math.hypot(A, B), h: Math.atan2(B, A) };+}+function oklchToLinear({ l, c, h }) {+ const a = Math.cos(h) * c, b = Math.sin(h) * c;+ const L = (l + 0.3963377774 * a + 0.2158037573 * b) ** 3;+ const M = (l - 0.1055613458 * a - 0.0638541728 * b) ** 3;+ const S = (l - 0.0894841775 * a - 1.291485548 * b) ** 3;+ return [4.0767416621 * L - 3.3077115913 * M + 0.2309699292 * S, -1.2684380046 * L + 2.6097574011 * M - 0.3413193965 * S, -0.0041960863 * L - 0.7034186147 * M + 1.707614701 * S];+}+const inGamut = (rgb) => rgb.every((v) => v >= -1e-4 && v <= 1.0001);+const lerp = (a, b, t) => a + (b - a) * t;+function linkColor(slug) {+ const o = hexToOklch(BRAND[slug] ?? NEUTRAL);+ const grey = o.c < 0.025;+ const target = { l: lerp(o.l, 0.58, 1), c: grey ? o.c : lerp(o.c, 0.17, 1), h: o.h };+ let { c } = target, rgb = oklchToLinear(target);+ while (!inGamut(rgb) && c > 0) { c = Math.max(0, c - 0.002); rgb = oklchToLinear({ ...target, c }); }+ return "#" + rgb.map((v) => {+ const x = Math.min(1, Math.max(0, v));+ return Math.round(255 * Math.min(1, Math.max(0, x <= 0.0031308 ? 12.92 * x : 1.055 * x ** (1 / 2.4) - 0.055))).toString(16).padStart(2, "0");+ }).join("");+}+function brandHue(slug) {+ const o = hexToOklch(BRAND[slug] ?? NEUTRAL);+ return o.c < 0.025 ? null : ((180 * o.h) / Math.PI + 360) % 360;+}++// ---------- geometry ----------+function computeLayout(L) {+ const { frameW, frameH, botSize, rings, services, ringDropPx } = L;+ const botLeft = (frameW - botSize) / 2, botTop = frameH - botSize;+ const ox = botLeft + 0.5015 * botSize, oy = botTop + 0.0879 * botSize; // antenna tip+ const cy = oy + ringDropPx; // the dome's centre sits a little below the antenna+ const nodes = [];+ rings.forEach((ring, ri) => {+ const list = services[ri], span = ring.toDeg - ring.fromDeg;+ list.forEach((service, i) => {+ const f = list.length > 1 ? i / (list.length - 1) : 0.5;+ const a = ((ring.toDeg - span * f) * Math.PI) / 180;+ const x = round(ox + ring.r * Math.cos(a)), y = round(cy - ring.r * Math.sin(a));+ let strength = 1;+ if (ring.horizon) { // the outer ring fades toward both ends+ const d = Math.abs(2 * f - 1);+ if (d > 0.5) { const k = (d - 0.5) / 0.5; strength = round(1 - k * k * (3 - 2 * k) * 0.38, 3); }+ }+ nodes.push({ id: `${ri}-${service.slug}`, service, ring: ri, x, y, size: ring.chip, radius: round(Math.hypot(x - ox, y - oy)), horizon: ring.horizon === true, strength });+ });+ });+ const ballR = 0.0317 * botSize;+ const routes = [];+ for (const n of nodes) {+ if (n.horizon) continue;+ const dx = n.x - ox, dy = n.y - oy, ux = dx / n.radius, uy = dy / n.radius, reach = n.radius - n.size / 2 - 5;+ routes.push({ nodeId: n.id, slug: n.service.slug, x1: round(ox + ux * ballR), y1: round(oy + uy * ballR), x2: round(ox + ux * reach), y2: round(oy + uy * reach), chipX: n.x, chipY: n.y, chipR: n.size / 2, length: round(reach - ballR), angleDeg: round((180 * Math.atan2(-dy, dx)) / Math.PI, 1), ring: n.ring });+ }+ let minR = Infinity, maxR = -Infinity;+ for (const n of nodes) { minR = Math.min(minR, n.radius); maxR = Math.max(maxR, n.radius); }+ const range = maxR - minR || 1;+ for (const n of nodes) n.enter = { fromX: (ox - n.x) * 0.18, fromY: (oy - n.y) * 0.18, delay: ((n.radius - minR) / range) * 0.38 };+ return { ox, oy, ballR, botLeft, botTop, nodes, routes };+}++// ---------- picking the next chip ----------+const angleGap = (a, b) => { const d = Math.abs(a - b) % 360; return Math.min(d, 360 - d); };+const farFromAll = (r, others) => others.every((o) => angleGap(r.angleDeg, o.angleDeg) >= 40);+function score(r, active) {+ const sameRing = active.filter((o) => o.ring === r.ring).length;+ const hue = brandHue(r.slug);+ let nearestHue = 180, bothGrey = 0;+ for (const o of active) {+ const oh = brandHue(o.slug);+ if (hue === null || oh === null) { if (hue === oh) bothGrey += 1; continue; }+ nearestHue = Math.min(nearestHue, angleGap(hue, oh));+ }+ return -100 * sameRing - 60 * bothGrey + Math.min(nearestHue, 30);+}+function shuffle(list, rand) {+ const a = [...list];+ for (let i = a.length - 1; i > 0; i -= 1) { const j = Math.floor(rand() * (i + 1)); [a[i], a[j]] = [a[j], a[i]]; }+ return a;+}+function createPicker(routes, rand = Math.random) {+ let bag = [];+ const recent = [];+ const memory = Math.min(8, Math.floor(routes.length / 2) - 1);+ const candidates = (active, keep) => {+ const skip = recent.slice(recent.length - keep);+ return bag.filter((r) => farFromAll(r, active) && !skip.includes(r));+ };+ return (active) => {+ if (bag.length === 0) bag = shuffle(routes, rand);+ let list = candidates(active, memory);+ if (list.length === 0) { bag = [...bag, ...shuffle(routes, rand)]; list = candidates(active, memory); }+ if (list.length === 0) list = candidates(active, 0);+ if (list.length === 0) return null;+ const best = list.reduce((a, b) => (score(b, active) > score(a, active) ? b : a));+ const i = bag.indexOf(best);+ if (i !== -1) bag.splice(i, 1);+ recent.push(best);+ if (recent.length > memory) recent.shift();+ return best;+ };+}+// Reduced motion: three fixed links, one per ring, 40 degrees apart.+function staticRoutes(routes) {+ const rings = [...new Set(routes.map((r) => r.ring))].sort();+ const out = [];+ let grew = true;+ while (out.length < 3 && grew) {+ grew = false;+ for (const ring of rings) {+ if (out.length === 3) break;+ const r = routes.find((x) => x.ring === ring && !out.includes(x) && farFromAll(x, out));+ if (r) { out.push(r); grew = true; }+ }+ }+ return out;+}++// ---------- DOM ----------+const SVG = "http://www.w3.org/2000/svg";+const svgEl = (tag, attrs = {}) => { const e = document.createElementNS(SVG, tag); for (const k in attrs) e.setAttribute(k, attrs[k]); return e; };+const lineD = (r) => `M ${r.x1} ${r.y1} L ${r.x2} ${r.y2}`;+let uid = 0;++// The line fades in over its first 24 px (or a third) from the antenna: a gradient mask.+function lineMask(defsParent, route, W, H) {+ const id = `atlas-mask-${uid++}`;+ const f = Math.min(24, 0.34 * route.length) / route.length;+ const grad = svgEl("linearGradient", { id: `${id}g`, gradientUnits: "userSpaceOnUse", x1: route.x1, y1: route.y1, x2: route.x1 + (route.x2 - route.x1) * f, y2: route.y1 + (route.y2 - route.y1) * f });+ grad.append(svgEl("stop", { offset: "0", "stop-color": "black" }), svgEl("stop", { offset: "1", "stop-color": "white" }));+ const mask = svgEl("mask", { id, maskUnits: "userSpaceOnUse", x: 0, y: 0, width: W, height: H });+ mask.append(svgEl("rect", { x: 0, y: 0, width: W, height: H, fill: `url(#${id}g)` }));+ defsParent.append(grad, mask);+ return id;+}++function init(root) {+ const layout = computeLayout(LAYOUT);+ const { frameW: W, frameH: H, botSize, laptop } = LAYOUT;+ const stage = root.querySelector(".atlas-tools__stage");+ const botLayer = stage.querySelector(".atlas-tools__botLayer");+ botLayer.style.cssText = `left:${layout.botLeft}px;top:${layout.botTop}px;--bot-size:${botSize}px;--bot-clip:${Math.max(0, laptop.bottomPx)}px`;+ const laptopEl = stage.querySelector(".atlas-tools__laptop");+ laptopEl.style.cssText = `left:${layout.ox - laptop.widthPx / 2}px;bottom:${laptop.bottomPx}px;--lid-scale:${laptop.widthPx / 400}`;+ const lid = stage.querySelector(".atlas-tools__lid");+ const groundShadow = stage.querySelector(".atlas-tools__groundShadow");+ const glare = stage.querySelector(".atlas-tools__glare");+ const glareStreak = stage.querySelector(".atlas-tools__glareStreak");++ const fieldBelow = svgEl("svg", { class: "atlas-tools__field", width: W, height: H, viewBox: `0 0 ${W} ${H}`, "aria-hidden": "true" });+ const fieldAbove = svgEl("svg", { class: "atlas-tools__field", width: W, height: H, viewBox: `0 0 ${W} ${H}`, "aria-hidden": "true" });+ stage.append(fieldBelow);++ // chips+ const slots = new Map();+ for (const n of layout.nodes) {+ const slot = document.createElement("div");+ slot.className = "atlas-tools__slot" + (n.horizon ? " atlas-tools__horizon" : "");+ const m = ICON_METRICS[n.service.slug];+ const iconScale = m ? Math.min(0.73 / Math.sqrt(m.box * m.ink), 0.9 / m.max) : 1;+ slot.style.cssText = `left:${n.x - n.size / 2}px;top:${n.y - n.size / 2}px;width:${n.size}px;height:${n.size}px;--icon-scale:${iconScale};--chip-strength:${n.strength}`;+ const mover = document.createElement("div");+ mover.style.cssText = `width:100%;height:100%;opacity:0;transform:translate(${n.enter.fromX}px, ${n.enter.fromY}px) scale(0.55)`;+ const chip = document.createElement("div");+ chip.className = "atlas-tools__chip";+ chip.style.transform = "scale(1)";+ const img = document.createElement("img");+ img.alt = "";+ img.draggable = false;+ img.width = img.height = n.size;+ img.decoding = "async";+ img.loading = "lazy";+ img.src = `${ICONS}${n.service.slug}.svg`;+ chip.append(img);+ mover.append(chip);+ slot.append(mover);+ stage.append(slot);+ slots.set(n.id, { node: n, slot, mover, chip, anims: [] });+ }+ stage.append(fieldAbove);++ const reduced = matchMedia("(prefers-reduced-motion: reduce)").matches;+ const eyes = createEyes(root);+ let entered = false;++ // ---------- entrance (and its reverse when the visual is scrolled back below the fold) ----------+ const iconSpring = springEasing({ bounce: 0.32, visualDuration: 0.45 });+ const lidSpring = springEasing({ stiffness: 90, damping: 18, mass: 1 });+ const live = new WeakMap();+ // Like Framer Motion's WAAPI path: when an animation finishes, its end value is written to the+ // inline style and the animation is cancelled (so nothing stays composited after the entrance).+ const run = (el, key, anim, end) => {+ const m = live.get(el) ?? {};+ m[key]?.cancel();+ m[key] = anim;+ live.set(el, m);+ anim.finished.then(() => { if (m[key] !== anim) return; el.style[key] = end; anim.cancel(); delete m[key]; }, () => {});+ };+ const current = (el, prop) => getComputedStyle(el)[prop];+ const setReading = (on, animated) => {+ const shadowTo = on ? { opacity: 1, transform: "scale(1, 1)" } : { opacity: 0.62, transform: "scale(0.84, 0.9)" };+ const lidTo = on ? "rotateX(-20deg)" : "rotateX(60deg)";+ if (!animated) {+ lid.style.transform = lidTo;+ groundShadow.style.opacity = shadowTo.opacity;+ groundShadow.style.transform = shadowTo.transform;+ glare.style.opacity = glareStreak.style.opacity = on ? 1 : 0;+ } else {+ run(lid, "transform", lid.animate([{ transform: current(lid, "transform") }, { transform: lidTo }], { duration: lidSpring.duration, easing: lidSpring.easing, fill: "both" }), lidTo);+ run(groundShadow, "opacity", waapi(groundShadow, "opacity", [current(groundShadow, "opacity"), shadowTo.opacity], { duration: 0.6, ease: "easeOut" }), shadowTo.opacity);+ run(groundShadow, "transform", waapi(groundShadow, "transform", [current(groundShadow, "transform"), shadowTo.transform], { duration: 0.6, ease: "easeOut" }), shadowTo.transform);+ run(glare, "opacity", waapi(glare, "opacity", [current(glare, "opacity"), on ? 1 : 0], { duration: 0.5, delay: on ? 0.25 : 0 }), on ? 1 : 0);+ run(glareStreak, "opacity", waapi(glareStreak, "opacity", [current(glareStreak, "opacity"), on ? 1 : 0], { duration: 0.5, delay: on ? 0.3 : 0 }), on ? 1 : 0);+ }+ eyes.setReading(on);+ };+ const setEntered = (on) => {+ if (on === entered) return;+ entered = on;+ for (const { node, mover } of slots.values()) {+ const delay = on ? node.enter.delay : 0;+ const to = on ? "translate(0px, 0px) scale(1)" : `translate(${node.enter.fromX}px, ${node.enter.fromY}px) scale(0.55)`;+ run(mover, "transform", mover.animate([{ transform: current(mover, "transform") }, { transform: to }], { duration: iconSpring.duration, delay: delay * 1000, easing: iconSpring.easing, fill: "both" }), to);+ run(mover, "opacity", waapi(mover, "opacity", [current(mover, "opacity"), on ? 1 : 0], { duration: 0.22, delay, ease: "swift" }), on ? 1 : 0);+ }+ if (!reduced) setReading(on, true);+ };+ if (reduced) setReading(true, false); // the reduced-motion page shows the open laptop from the start++ // ---------- links ----------+ let links = [];+ let timer = 0, picker = null, key = 0;+ const removeLink = (l) => {+ for (const a of l.anims) if (a.stop) a.stop(); else a.cancel();+ l.below.remove();+ l.above.remove();+ const s = slots.get(l.route.nodeId);+ s.slot.classList.remove("atlas-tools__raised");+ };+ function addLink(route) {+ const color = linkColor(route.slug);+ const connectedAtS = T.reachS, releaseAtS = connectedAtS + SETTLE_S + T.holdS, lifetimeS = releaseAtS + T.releaseS;+ const l = { key: key++, route, anims: [], expiresAt: performance.now() + 1000 * lifetimeS };+ // below the chips: the line (masked near the antenna) and a white halo that swells with the chip+ l.below = svgEl("g");+ const maskId = lineMask(l.below, route, W, H);+ const wrap = svgEl("g", { mask: `url(#${maskId})` });+ const len = route.length;+ const path = svgEl("path", { class: "atlas-tools__wire", d: lineD(route), stroke: color, "stroke-dasharray": `${len} ${len}`, "stroke-dashoffset": len, "stroke-opacity": 0.26 });+ wrap.append(path);+ const hr = route.chipR + 5;+ const halo = svgEl("circle", { class: "atlas-tools__halo", cx: route.chipX, cy: route.chipY, r: hr });+ l.below.append(wrap, halo);+ fieldBelow.append(l.below);+ l.anims.push(tween([len, 0], { duration: T.reachS, ease: "inOutQuad", onUpdate: (v) => path.setAttribute("stroke-dashoffset", v) }));+ l.anims.push(tween([0.26, 0.26, 0.46, 0.46, 0], { duration: lifetimeS, times: [0, T.reachS / lifetimeS, (T.reachS + T.firmS) / lifetimeS, releaseAtS / lifetimeS, 1], ease: ["linear", "outCubic", "linear", "inOutQuad"], onUpdate: (v) => path.setAttribute("stroke-opacity", v) }));+ l.anims.push(tween([hr, 1.22 * hr, 1.22 * hr, hr], { duration: T.swellS, delay: connectedAtS, times: SWELL_TIMES, ease: SWELL_EASE, onUpdate: (v) => halo.setAttribute("r", v) }));+ // above the chips: the coloured contact ring and a ripple+ const big = 1.22 * hr, ringDur = releaseAtS - connectedAtS + T.releaseS;+ const [t1, t2, t3] = SWELL_TIMES.slice(1).map((t) => (t * T.swellS) / ringDur);+ l.above = svgEl("g");+ const contact = svgEl("circle", { class: "atlas-tools__contact", cx: route.chipX, cy: route.chipY, stroke: color, "stroke-opacity": 0, r: 0.88 * hr });+ const ripple = svgEl("circle", { class: "atlas-tools__ripple", cx: route.chipX, cy: route.chipY, stroke: color, "stroke-opacity": 0, r: big });+ l.above.append(contact, ripple);+ fieldAbove.append(l.above);+ const ringOpts = { duration: ringDur, delay: connectedAtS, times: [0, t1, t2, t3, (releaseAtS - connectedAtS) / ringDur, 1], ease: ["outCubic", "linear", "inOutQuad", "linear", "inOutQuad"] };+ l.anims.push(tween([0, 0.85, 0.85, 0.85, 0.85, 0], { ...ringOpts, onUpdate: (v) => contact.setAttribute("stroke-opacity", v) }));+ l.anims.push(tween([0.88 * hr, big, big, hr, hr, 1.06 * hr], { ...ringOpts, onUpdate: (v) => contact.setAttribute("r", v) }));+ const rippleOpts = { duration: T.rippleS, delay: connectedAtS, times: [0, 0.1, 1], ease: ["linear", "outCubic"] };+ l.anims.push(tween([0, 0.5, 0], { ...rippleOpts, onUpdate: (v) => ripple.setAttribute("stroke-opacity", v) }));+ l.anims.push(tween([big, 1.06 * big, 1.5 * big], { ...rippleOpts, onUpdate: (v) => ripple.setAttribute("r", v) }));+ // the chip comes to the front and swells with the halo+ const s = slots.get(route.nodeId);+ s.slot.classList.add("atlas-tools__raised");+ const swell = waapi(s.chip, "transform", ["scale(1)", "scale(1.22)", "scale(1.22)", "scale(1)"], { duration: T.swellS, delay: connectedAtS, times: SWELL_TIMES, ease: SWELL_EASE, fill: "both" });+ swell.finished.then(() => swell.cancel(), () => {});+ l.anims.push(swell);+ return l;+ }+ function step() {+ const now = performance.now();+ const alive = [];+ for (const l of links) { if (l.expiresAt > now) alive.push(l); else removeLink(l); }+ const route = picker(alive.map((l) => l.route));+ if (route) alive.push(addLink(route));+ links = alive;+ timer = setTimeout(step, 1000 * EVERY.everyS * (1 + EVERY.stretch * Math.random()));+ }+ const startLoop = () => { if (timer || reduced || document.hidden) return; picker = createPicker(layout.routes); step(); };+ const stopLoop = () => { clearTimeout(timer); timer = 0; links.forEach(removeLink); links = []; };++ if (reduced) {+ for (const route of staticRoutes(layout.routes)) {+ const color = linkColor(route.slug);+ const g = svgEl("g");+ const maskId = lineMask(g, route, W, H);+ g.append(svgEl("path", { class: "atlas-tools__wire", mask: `url(#${maskId})`, d: lineD(route), stroke: color, "stroke-opacity": 0.46 }));+ fieldBelow.append(g);+ fieldAbove.append(svgEl("circle", { class: "atlas-tools__contact", cx: route.chipX, cy: route.chipY, r: route.chipR + 5, stroke: color, "stroke-opacity": 0.85 }));+ }+ }++ // ---------- triggers: 60% of the visual in view (Framer Motion's viewport amount 0.6) ----------+ let inView = false, pageVisible = !document.hidden;+ const sync = () => (inView && pageVisible ? startLoop() : stopLoop());+ new IntersectionObserver((entries) => {+ for (const e of entries) {+ if (e.isIntersecting === inView) continue;+ inView = e.isIntersecting;+ if (inView) setEntered(true);+ else if (e.boundingClientRect.top > 0) setEntered(false); // replays when scrolled back in from above+ sync();+ }+ }, { threshold: 0.6 }).observe(root);+ document.addEventListener("visibilitychange", () => { pageVisible = !document.hidden; sync(); });+}++// ---------- the face: screen, eyes (reading the laptop once entered) and blinks ----------+function createEyes(root) {+ const plate = root.querySelector(".atlas-tools__facePlate");+ const face = root.querySelector(".bot-face");+ const gradient = face.querySelector(".bot-face-gradient");+ const staticPlate = gradient.getAttribute("style");+ const [leftSlot, rightSlot] = face.querySelectorAll(".bot-eye-slot");+ const parts = (slot) => ({+ track: slot.querySelector(".bot-eye-track"),+ eye: slot.querySelector(".bot-eye"),+ glow: slot.querySelector(".bot-eye-glow"),+ body: slot.querySelector(".bot-eye-core-body"),+ pupil: slot.querySelector(".bot-eye-core-pupil"),+ });+ const L = parts(leftSlot), R = parts(rightSlot);+ const tr = (x, y) => (x === 0 && y === 0 ? "none" : `translateX(${x}px) translateY(${y}px)`);+ // each eye looks with a spring (stiffness 220, damping 28, mass 0.32); its layers move by parallax+ const look = (p) => {+ const s = { x: 0, y: 0 };+ const paint = () => {+ p.track.style.transform = tr(0.4 * s.x, 0.4 * s.y);+ p.glow.style.transform = tr(0.7 * s.x * 0.45, 0.7 * s.y * 0.45);+ p.body.style.transform = tr(0.7 * s.x * 0.9, 0.7 * s.y * 0.9);+ p.pupil.style.transform = tr(0.7 * s.x * 1.7, 0.7 * s.y * 1.7);+ };+ const cfg = { stiffness: 220, damping: 28, mass: 0.32 };+ return { x: springFollower(cfg, (v) => { s.x = v; paint(); }), y: springFollower(cfg, (v) => { s.y = v; paint(); }) };+ };+ const lookL = look(L), lookR = look(R);+ // the target values themselves are animated (Framer's animate(motionValue)): tween objects+ const targets = { x: 0, y: 0 };+ let targetAnims = [];+ const setX = (v) => { targets.x = v; lookL.x.set(v); lookR.x.set(v); };+ const setY = (v) => { targets.y = v; lookL.y.set(v); lookR.y.set(v); };+ const stopTargets = () => { targetAnims.forEach((a) => a.stop()); targetAnims = []; };+ const animX = (values, opts) => { stopTargets(); targetAnims = [tween(values, { ...opts, onUpdate: setX })]; };++ let near = false, reading = false, readTimers = new Set(), blinkTimers = new Set(), stopScreen = null;+ const later = (set, fn, ms) => { const id = setTimeout(() => { set.delete(id); fn(); }, ms); set.add(id); return id; };+ const clear = (set) => { set.forEach(clearTimeout); set.clear(); };++ let blink = null, openness = 1;+ const blinkTo = (closed) => {+ blink?.stop();+ blink = tween([openness, closed ? 0.22 : 1], { duration: closed ? 0.07 : 0.14, ease: closed ? "swift" : "outCubic", onUpdate: (v) => {+ openness = v;+ for (const p of [L, R]) p.eye.style.transform = v === 1 ? "none" : `scaleY(${v})`;+ } });+ };+ const scheduleBlink = () => later(blinkTimers, () => { blinkTo(true); later(blinkTimers, () => { blinkTo(false); later(blinkTimers, scheduleBlink, 230); }, 70); }, 4e3 + Math.random() ** 1.35 * 7e3);++ // Reading: the eyes drop to a line on the laptop and sweep across it, jump, drift or rest.+ const LINES = [0.82, 1.05, 1.28];+ const startReading = () => {+ const r = leftSlot.getBoundingClientRect(); // screen px, as the original measures it+ const maxX = 0.32 * r.width * 0.95, lineH = 0.26 * r.height;+ let stopped = false, line = 0;+ const rnd = (a, b) => a + Math.random() * (b - a);+ const clampX = (v) => Math.max(-maxX, Math.min(maxX, v));+ const lineY = (i) => LINES[i % LINES.length] * lineH + rnd(-0.06, 0.06) * lineH;+ stopTargets(); setX(0); setY(lineY(0));+ const next = () => {+ if (stopped) return;+ const t = Math.random();+ if (t < 0.68) setY(lineY((line += 1))); else if (t < 0.82) setY(lineY((line += 2)));+ const pick = Math.random();+ let wait;+ if (pick < 0.5) { // sweep: snap right, then read across to the left+ const from = targets.x, right = clampX(rnd(0.82, 1) * maxX), left = clampX(-rnd(0.82, 1) * maxX), snap = rnd(0.16, 0.28), total = snap + rnd(1.5, 2.6);+ animX([from, right, left], { duration: total, times: [0, snap / total, 1], ease: ["easeOut", "easeInOut"] });+ wait = 1e3 * total + rnd(180, 520);+ } else if (pick < 0.78) { stopTargets(); setX(rnd(-0.9, 0.9) * maxX); wait = rnd(650, 1500); }+ else if (pick < 0.92) { const from = targets.x; animX([from, clampX(from + rnd(-0.35, 0.35) * maxX)], { duration: rnd(0.6, 1.1), ease: "easeInOut" }); wait = rnd(500, 1e3); }+ else { stopTargets(); setX(rnd(-0.18, 0.18) * maxX); wait = rnd(900, 1800); }+ later(readTimers, next, wait);+ };+ next();+ return () => { stopped = true; clear(readTimers); stopTargets(); setX(0); setY(0); };+ };+ let stopRead = null;+ const update = () => {+ const wantRead = reading && near;+ if (wantRead && !stopRead) stopRead = startReading();+ if (!wantRead && stopRead) { stopRead(); stopRead = null; }+ };++ // The face plate fades in when the page starts; the live screen replaces the static gradient while+ // the face is within 100px of the viewport.+ const fade = plate.querySelector(".atlas-tools__faceFade");+ const fadeIn = fade.animate([{ opacity: 0 }, { opacity: 1 }], { duration: 400, easing: "cubic-bezier(0.33, 1, 0.68, 1)", fill: "both" });+ fadeIn.finished.then(() => { fade.style.opacity = "1"; fadeIn.cancel(); }, () => {});+ new IntersectionObserver(([e]) => {+ if (e.isIntersecting === near) return;+ near = e.isIntersecting;+ if (near) {+ gradient.removeAttribute("style");+ stopScreen = mountFaceShader(gradient);+ scheduleBlink();+ } else {+ stopScreen?.(); stopScreen = null;+ gradient.setAttribute("style", staticPlate);+ clear(blinkTimers);+ blinkTo(false);+ }+ update();+ }, { rootMargin: "100px" }).observe(plate);++ return { setReading(on) { reading = on; update(); } };+}++// GraphicFrame: the 536px drawing scales down with its container below that width.+function frame(root) {+ const fit = () => {+ const w = root.getBoundingClientRect().width;+ if (w > 0) { root.__frameScale = Math.min(1, w / 536); root.style.setProperty("--frame-scale", root.__frameScale); }+ };+ fit();+ new ResizeObserver(fit).observe(root);+}++for (const root of document.querySelectorAll(".atlas-tools")) { frame(root); init(root); }diff --git a/site/public/examples/workos-atlas/src/face.js b/site/public/examples/workos-atlas/src/face.jsnew file mode 100644index 0000000..f679ee9--- /dev/null+++ b/site/public/examples/workos-atlas/src/face.js@@ -0,0 +1,684 @@+// The robot's screen: a slowly flowing blue gradient seen through a CRT filter. On workos.com it is+// drawn by the "shaders" library on WebGPU (FlowingGradient into a texture, then CRTScreen); these are+// the WGSL modules it generated, with the same uniforms. Without WebGPU nothing is drawn and the+// black face plate shows through, exactly as on the original.++const RTT_WGSL = /* wgsl */ `+struct _Output {+ @builtin(position) pos: vec4f,+ @location(0) uv: vec2f,+}++@vertex fn item(@builtin(vertex_index) vertexIndex: u32) -> _Output {+ const pos = array<vec2f, 3>(vec2f(-1, -1), vec2f(3, -1), vec2f(-1, 3));+ const uv = array<vec2f, 3>(vec2f(0, 1), vec2f(2, 1), vec2f(0, -1));++ return _Output(vec4f(pos[vertexIndex], 0, 1), uv[vertexIndex]);+}++fn overComposite(base: vec4f, blended: vec3f, overlayAlpha: f32) -> vec4f {+ let baseWeight = (base.w * (1f - overlayAlpha));+ let finalAlpha = (overlayAlpha + baseWeight);+ let rgb = ((blended * overlayAlpha) + (base.xyz * baseWeight));+ return vec4f(rgb, finalAlpha);+}++fn blend_normal(base: vec4f, overlay: vec4f, opacity: f32) -> vec4f {+ let overlayAlpha = (overlay.w * opacity);+ return overComposite(base, overlay.xyz, overlayAlpha);+}++fn flowingCompose(base: vec4f, litScale: f32) -> vec4f {+ let lit = clamp((base.xyz * litScale), vec3f(), vec3f(1));+ return vec4f(lit, base.w);+}++fn p3ToSRGB(p3: vec3f) -> vec3f {+ let r = (((p3.x * 1.2249401f) - (p3.y * 0.2249404f)) - (p3.z * 0f));+ let g = (((p3.x * -0.0420569f) + (p3.y * 1.0420571f)) + (p3.z * 0f));+ let b = (((p3.x * -0.0196376f) - (p3.y * 0.0786361f)) + (p3.z * 1.0982735f));+ return vec3f(r, g, b);+}++fn rgbToOklab(rgb: vec3f) -> vec3f {+ let r = rgb.x;+ let g = rgb.y;+ let b = rgb.z;+ let l = (((r * 0.4122214708f) + (g * 0.5363325363f)) + (b * 0.0514459929f));+ let m = ((r * 0.2119034982f) + ((g * 0.6806995451f) + (b * 0.1073969566f)));+ let s = (((r * 0.0883024619f) + (g * 0.2817188376f)) + (b * 0.6299787005f));+ let l_ = (sign(l) * pow(abs(l), 0.3333333333333333f));+ let m_ = (sign(m) * pow(abs(m), 0.3333333333333333f));+ let s_ = (sign(s) * pow(abs(s), 0.3333333333333333f));+ return vec3f((((l_ * 0.2104542553f) + (m_ * 0.793617785f)) - (s_ * 0.0040720468f)), (((l_ * 1.9779984951f) - (m_ * 2.428592205f)) + (s_ * 0.4505937099f)), (((l_ * 0.0259040371f) + (m_ * 0.7827717662f)) - (s_ * 0.808675766f)));+}++fn oklabToOklch(lab: vec3f) -> vec3f {+ let L = lab.x;+ let a = lab.y;+ let b = lab.z;+ let C = sqrt(((a * a) + (b * b)));+ let h = atan2(b, a);+ return vec3f(L, C, h);+}++fn awMix(a: vec3f, b: vec3f, wA: f32, wB: f32, sw: f32) -> vec3f {+ return (((a * wA) + (b * wB)) / sw);+}++fn oklchToOklab(lch: vec3f) -> vec3f {+ let L = lch.x;+ let C = lch.y;+ let h = lch.z;+ return vec3f(L, (C * cos(h)), (C * sin(h)));+}++fn oklabToRgb(lab: vec3f) -> vec3f {+ let L = lab.x;+ let a = lab.y;+ let b = lab.z;+ let l_ = ((L + (a * 0.3963377774f)) + (b * 0.2158037573f));+ let m_ = ((L - (a * 0.1055613458f)) - (b * 0.0638541728f));+ let s_ = ((L - (a * 0.0894841775f)) - (b * 1.291485548f));+ let l = pow(l_, 3f);+ let m = pow(m_, 3f);+ let s = pow(s_, 3f);+ return vec3f((((l * 4.0767416621f) - (m * 3.3077115913f)) + (s * 0.2309699292f)), (((l * -1.2684380046f) + (m * 2.6097574011f)) - (s * 0.3413193965f)), (((l * -0.0041960863f) - (m * 0.7034186147f)) + (s * 1.707614701f)));+}++fn sRGBToP3(srgb: vec3f) -> vec3f {+ let r = (((srgb.x * 0.8224621f) + (srgb.y * 0.177538f)) + (srgb.z * 0f));+ let g = (((srgb.x * 0.0331941f) + (srgb.y * 0.9668058f)) + (srgb.z * 0f));+ let b = (((srgb.x * 0.0170826f) + (srgb.y * 0.0723974f)) + (srgb.z * 0.9105199f));+ return vec3f(r, g, b);+}++fn mixColors(colorA: vec4f, colorB: vec4f, t: f32) -> vec4f {+ let weightA = (colorA.w * (1f - t));+ let weightB = (colorB.w * t);+ let totalWeight = (weightA + weightB);+ let safeWeight = max(totalWeight, 1e-3f);+ let oklchA = oklabToOklch(rgbToOklab(p3ToSRGB(colorA.xyz)));+ let oklchB = oklabToOklch(rgbToOklab(p3ToSRGB(colorB.xyz)));+ let mixed = awMix(oklchA, oklchB, weightA, weightB, safeWeight);+ let rgb = sRGBToP3(oklabToRgb(oklchToOklab(mixed)));+ return vec4f(rgb, totalWeight);+}++struct struct_1 {+ colorA: vec4f,+ colorB: vec4f,+ colorC: vec4f,+ colorD: vec4f,+ colorSpace: f32,+ speed: f32,+ distortion: f32,+ seed: f32,+ _opacity: f32,+ _animTime: f32,+}++struct padded {+ pixelSize: f32,+ colorShift: f32,+ scanlineIntensity: f32,+ scanlineFrequency: f32,+ brightness: f32,+ contrast: f32,+ vignetteIntensity: f32,+ vignetteRadius: f32,+ _opacity: f32,+ _pad0: f32,+ _pad1: f32,+ _pad2: f32,+}++struct padded_1 {+ _opacity: f32,+ _pad0: f32,+ _pad1: f32,+ _pad2: f32,+}++struct struct_2 {+ time: f32,+ viewportSize: vec2f,+ logicalViewportSize: vec2f,+ aspect: f32,+ pointer: vec2f,+ pointerActive: f32,+}++struct combined {+ gradient: struct_1,+ crt: padded,+ root: padded_1,+ _sys: struct_2,+}++@group(0) @binding(0) var<uniform> uniforms: combined;++fn mxFade(t: f32) -> f32 {+ return (((t * t) * t) * ((t * ((t * 6f) - 15f)) + 10f));+}++fn mxRotl32(x: u32, k: i32) -> u32 {+ return ((x << u32(k)) | (x >> u32((32i - k))));+}++fn mxBjfinal(a0: u32, b0: u32, c0: u32) -> u32 {+ var a = a0;+ var b = b0;+ var c = c0;+ c = (c ^ b);+ c = (c - mxRotl32(b, 14i));+ a = (a ^ c);+ a = (a - mxRotl32(c, 11i));+ b = (b ^ a);+ b = (b - mxRotl32(a, 25i));+ c = (c ^ b);+ c = (c - mxRotl32(b, 16i));+ a = (a ^ c);+ a = (a - mxRotl32(c, 4i));+ b = (b ^ a);+ b = (b - mxRotl32(a, 14i));+ c = (c ^ b);+ c = (c - mxRotl32(b, 24i));+ return c;+}++fn mxHashInt2(x: i32, y: i32, z: i32) -> u32 {+ const len = 3u;+ let seed = ((3735928559u + (len << 2u)) + 13u);+ let a = (seed + u32(x));+ let b = (seed + u32(y));+ let c = (seed + u32(z));+ return mxBjfinal(a, b, c);+}++fn mxGradientFloat3(hash: u32, x: f32, y: f32, z: f32) -> f32 {+ let h = (hash & 15u);+ let u = select(y, x, (h < 8u));+ let inner = select(z, x, ((h == 12u) || (h == 14u)));+ let v = select(inner, y, (h < 4u));+ let uu = select(u, -(u), ((h & 1u) != 0u));+ let vv = select(v, -(v), ((h & 2u) != 0u));+ return (uu + vv);+}++fn mxTrilerp(v0: f32, v1: f32, v2: f32, v3: f32, v4: f32, v5: f32, v6: f32, v7: f32, s: f32, t: f32, r: f32) -> f32 {+ let s1 = (1f - s);+ let t1 = (1f - t);+ let r1 = (1f - r);+ return ((r1 * ((t1 * ((v0 * s1) + (v1 * s))) + (t * ((v2 * s1) + (v3 * s))))) + (r * ((t1 * ((v4 * s1) + (v5 * s))) + (t * ((v6 * s1) + (v7 * s))))));+}++fn mxGradientScale3d(v: f32) -> f32 {+ return (0.982f * v);+}++fn mxPerlinNoiseFloat3(p: vec3f) -> f32 {+ let X = i32(floor(p.x));+ let Y = i32(floor(p.y));+ let Z = i32(floor(p.z));+ let fx = (p.x - f32(X));+ let fy = (p.y - f32(Y));+ let fz = (p.z - f32(Z));+ let u = mxFade(fx);+ let v = mxFade(fy);+ let w = mxFade(fz);+ let result = mxTrilerp(mxGradientFloat3(mxHashInt2(X, Y, Z), fx, fy, fz), mxGradientFloat3(mxHashInt2((X + 1i), Y, Z), (fx - 1f), fy, fz), mxGradientFloat3(mxHashInt2(X, (Y + 1i), Z), fx, (fy - 1f), fz), mxGradientFloat3(mxHashInt2((X + 1i), (Y + 1i), Z), (fx - 1f), (fy - 1f), fz), mxGradientFloat3(mxHashInt2(X, Y, (Z + 1i)), fx, fy, (fz - 1f)), mxGradientFloat3(mxHashInt2((X + 1i), Y, (Z + 1i)), (fx - 1f), fy, (fz - 1f)), mxGradientFloat3(mxHashInt2(X, (Y + 1i), (Z + 1i)), fx, (fy - 1f), (fz - 1f)), mxGradientFloat3(mxHashInt2((X + 1i), (Y + 1i), (Z + 1i)), (fx - 1f), (fy - 1f), (fz - 1f)), u, v, w);+ return mxGradientScale3d(result);+}++fn mxNoiseFloat3(p: vec3f) -> f32 {+ return mxPerlinNoiseFloat3(p);+}++fn flowingFactors(baseUV: vec2f, viewport: vec2f, distortion: f32, seed: f32, animTime: f32) -> vec3f {+ let t = (animTime * 0.075f);+ let aspect = (viewport.x / viewport.y);+ let uv0 = (baseUV - 0.5f);+ let seedOff = (seed * 0.17f);+ let noiseVal = mxNoiseFloat3(vec3f(((uv0.x * 0.8f) + (t * 0.4f)), ((uv0.y * 0.8f) - (t * 0.25f)), seedOff));+ let angle = ((noiseVal * 12.566370614359172f) * distortion);+ let uvCorr = vec2f(uv0.x, (uv0.y / aspect));+ let ca = cos(angle);+ let sa = sin(angle);+ let rotX = ((uvCorr.x * ca) - (uvCorr.y * sa));+ let rotY = (((uvCorr.x * sa) + (uvCorr.y * ca)) * aspect);+ let ws = (t * 2f);+ let warpX = (rotX + ((sin(((rotY * 5f) + ws)) / 50f) * distortion));+ let warpY = (rotY + ((sin(((warpX * 7.5f) + ws)) / 25f) * distortion));+ let wp1 = vec3f((warpX * 2f), (warpY * 2f), ((t * 0.5f) + seedOff));+ let wx1 = mxNoiseFloat3((wp1 + vec3f(5.199999809265137, 1.2999999523162842, 0)));+ let wy1 = mxNoiseFloat3((wp1 + vec3f(1.7000000476837158, 9.199999809265137, 0)));+ let dw1X = (warpX + ((wx1 * 0.25f) * distortion));+ let dw1Y = (warpY + ((wy1 * 0.25f) * distortion));+ let wp2 = vec3f((dw1X * 1.5f), (dw1Y * 1.5f), ((t * 0.3f) + seedOff));+ let wx2 = mxNoiseFloat3((wp2 + vec3f(8.300000190734863, 2.799999952316284, 0)));+ let wy2 = mxNoiseFloat3((wp2 + vec3f(3.0999999046325684, 7.400000095367432, 0)));+ let dw2X = (dw1X + ((wx2 * 0.2f) * distortion));+ let dw2Y = (dw1Y + ((wy2 * 0.2f) * distortion));+ let zoneNoise = mxNoiseFloat3(vec3f((dw2X * 1.8f), (dw2Y * 1.8f), ((t * 0.3f) + seedOff)));+ let edgeHardness = pow(((wx1 * 0.5f) + 0.5f), 1.5f);+ let edgeWidth = mix(0.5f, 8e-3f, edgeHardness);+ let t1 = smoothstep((edgeWidth * -1f), edgeWidth, zoneNoise);+ let t2 = smoothstep((edgeWidth * -1f), edgeWidth, wy1);+ let foldMask1 = (1f - abs(((t1 * 2f) - 1f)));+ let foldMask2 = (1f - abs(((t2 * 2f) - 1f)));+ let foldHighlight = (max(foldMask1, foldMask2) * edgeHardness);+ let surfaceLight = ((((wx2 * 0.5f) + 0.5f) * 0.12f) + 0.94f);+ let litScale = (surfaceLight * (1f + (foldHighlight * 0.35f)));+ return vec3f(t1, t2, litScale);+}++struct rtt_rtt_0_Input {+ @location(0) uv: vec2f,+}++@fragment fn rtt_rtt_0(in: rtt_rtt_0_Input) -> @location(0) vec4f {+ var uv = in.uv;+ return blend_normal(vec4f(0.0, 0.0, 0.0, 0.0), flowingCompose(mixColors(mixColors(uniforms.gradient.colorA, uniforms.gradient.colorB, (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).x), mixColors(uniforms.gradient.colorC, uniforms.gradient.colorD, (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).x), (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).y), (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).z), 1.0);+}+`;++const FINAL_WGSL = /* wgsl */ `+struct _Output {+ @builtin(position) pos: vec4f,+ @location(0) uv: vec2f,+}++@vertex fn item(@builtin(vertex_index) vertexIndex: u32) -> _Output {+ const pos = array<vec2f, 3>(vec2f(-1, -1), vec2f(3, -1), vec2f(-1, 3));+ const uv = array<vec2f, 3>(vec2f(0, 1), vec2f(2, 1), vec2f(0, -1));++ return _Output(vec4f(pos[vertexIndex], 0, 1), uv[vertexIndex]);+}++fn flowingCompose(base: vec4f, litScale: f32) -> vec4f {+ let lit = clamp((base.xyz * litScale), vec3f(), vec3f(1));+ return vec4f(lit, base.w);+}++fn p3ToSRGB(p3: vec3f) -> vec3f {+ let r = (((p3.x * 1.2249401f) - (p3.y * 0.2249404f)) - (p3.z * 0f));+ let g = (((p3.x * -0.0420569f) + (p3.y * 1.0420571f)) + (p3.z * 0f));+ let b = (((p3.x * -0.0196376f) - (p3.y * 0.0786361f)) + (p3.z * 1.0982735f));+ return vec3f(r, g, b);+}++fn rgbToOklab(rgb: vec3f) -> vec3f {+ let r = rgb.x;+ let g = rgb.y;+ let b = rgb.z;+ let l = (((r * 0.4122214708f) + (g * 0.5363325363f)) + (b * 0.0514459929f));+ let m = ((r * 0.2119034982f) + ((g * 0.6806995451f) + (b * 0.1073969566f)));+ let s = (((r * 0.0883024619f) + (g * 0.2817188376f)) + (b * 0.6299787005f));+ let l_ = (sign(l) * pow(abs(l), 0.3333333333333333f));+ let m_ = (sign(m) * pow(abs(m), 0.3333333333333333f));+ let s_ = (sign(s) * pow(abs(s), 0.3333333333333333f));+ return vec3f((((l_ * 0.2104542553f) + (m_ * 0.793617785f)) - (s_ * 0.0040720468f)), (((l_ * 1.9779984951f) - (m_ * 2.428592205f)) + (s_ * 0.4505937099f)), (((l_ * 0.0259040371f) + (m_ * 0.7827717662f)) - (s_ * 0.808675766f)));+}++fn oklabToOklch(lab: vec3f) -> vec3f {+ let L = lab.x;+ let a = lab.y;+ let b = lab.z;+ let C = sqrt(((a * a) + (b * b)));+ let h = atan2(b, a);+ return vec3f(L, C, h);+}++fn awMix(a: vec3f, b: vec3f, wA: f32, wB: f32, sw: f32) -> vec3f {+ return (((a * wA) + (b * wB)) / sw);+}++fn oklchToOklab(lch: vec3f) -> vec3f {+ let L = lch.x;+ let C = lch.y;+ let h = lch.z;+ return vec3f(L, (C * cos(h)), (C * sin(h)));+}++fn oklabToRgb(lab: vec3f) -> vec3f {+ let L = lab.x;+ let a = lab.y;+ let b = lab.z;+ let l_ = ((L + (a * 0.3963377774f)) + (b * 0.2158037573f));+ let m_ = ((L - (a * 0.1055613458f)) - (b * 0.0638541728f));+ let s_ = ((L - (a * 0.0894841775f)) - (b * 1.291485548f));+ let l = pow(l_, 3f);+ let m = pow(m_, 3f);+ let s = pow(s_, 3f);+ return vec3f((((l * 4.0767416621f) - (m * 3.3077115913f)) + (s * 0.2309699292f)), (((l * -1.2684380046f) + (m * 2.6097574011f)) - (s * 0.3413193965f)), (((l * -0.0041960863f) - (m * 0.7034186147f)) + (s * 1.707614701f)));+}++fn sRGBToP3(srgb: vec3f) -> vec3f {+ let r = (((srgb.x * 0.8224621f) + (srgb.y * 0.177538f)) + (srgb.z * 0f));+ let g = (((srgb.x * 0.0331941f) + (srgb.y * 0.9668058f)) + (srgb.z * 0f));+ let b = (((srgb.x * 0.0170826f) + (srgb.y * 0.0723974f)) + (srgb.z * 0.9105199f));+ return vec3f(r, g, b);+}++fn mixColors(colorA: vec4f, colorB: vec4f, t: f32) -> vec4f {+ let weightA = (colorA.w * (1f - t));+ let weightB = (colorB.w * t);+ let totalWeight = (weightA + weightB);+ let safeWeight = max(totalWeight, 1e-3f);+ let oklchA = oklabToOklch(rgbToOklab(p3ToSRGB(colorA.xyz)));+ let oklchB = oklabToOklch(rgbToOklab(p3ToSRGB(colorB.xyz)));+ let mixed = awMix(oklchA, oklchB, weightA, weightB, safeWeight);+ let rgb = sRGBToP3(oklabToRgb(oklchToOklab(mixed)));+ return vec4f(rgb, totalWeight);+}++struct struct_1 {+ colorA: vec4f,+ colorB: vec4f,+ colorC: vec4f,+ colorD: vec4f,+ colorSpace: f32,+ speed: f32,+ distortion: f32,+ seed: f32,+ _opacity: f32,+ _animTime: f32,+}++struct padded {+ pixelSize: f32,+ colorShift: f32,+ scanlineIntensity: f32,+ scanlineFrequency: f32,+ brightness: f32,+ contrast: f32,+ vignetteIntensity: f32,+ vignetteRadius: f32,+ _opacity: f32,+ _pad0: f32,+ _pad1: f32,+ _pad2: f32,+}++struct padded_1 {+ _opacity: f32,+ _pad0: f32,+ _pad1: f32,+ _pad2: f32,+}++struct struct_2 {+ time: f32,+ viewportSize: vec2f,+ logicalViewportSize: vec2f,+ aspect: f32,+ pointer: vec2f,+ pointerActive: f32,+}++struct combined {+ gradient: struct_1,+ crt: padded,+ root: padded_1,+ _sys: struct_2,+}++@group(0) @binding(0) var<uniform> uniforms: combined;++fn mxFade(t: f32) -> f32 {+ return (((t * t) * t) * ((t * ((t * 6f) - 15f)) + 10f));+}++fn mxRotl32(x: u32, k: i32) -> u32 {+ return ((x << u32(k)) | (x >> u32((32i - k))));+}++fn mxBjfinal(a0: u32, b0: u32, c0: u32) -> u32 {+ var a = a0;+ var b = b0;+ var c = c0;+ c = (c ^ b);+ c = (c - mxRotl32(b, 14i));+ a = (a ^ c);+ a = (a - mxRotl32(c, 11i));+ b = (b ^ a);+ b = (b - mxRotl32(a, 25i));+ c = (c ^ b);+ c = (c - mxRotl32(b, 16i));+ a = (a ^ c);+ a = (a - mxRotl32(c, 4i));+ b = (b ^ a);+ b = (b - mxRotl32(a, 14i));+ c = (c ^ b);+ c = (c - mxRotl32(b, 24i));+ return c;+}++fn mxHashInt2(x: i32, y: i32, z: i32) -> u32 {+ const len = 3u;+ let seed = ((3735928559u + (len << 2u)) + 13u);+ let a = (seed + u32(x));+ let b = (seed + u32(y));+ let c = (seed + u32(z));+ return mxBjfinal(a, b, c);+}++fn mxGradientFloat3(hash: u32, x: f32, y: f32, z: f32) -> f32 {+ let h = (hash & 15u);+ let u = select(y, x, (h < 8u));+ let inner = select(z, x, ((h == 12u) || (h == 14u)));+ let v = select(inner, y, (h < 4u));+ let uu = select(u, -(u), ((h & 1u) != 0u));+ let vv = select(v, -(v), ((h & 2u) != 0u));+ return (uu + vv);+}++fn mxTrilerp(v0: f32, v1: f32, v2: f32, v3: f32, v4: f32, v5: f32, v6: f32, v7: f32, s: f32, t: f32, r: f32) -> f32 {+ let s1 = (1f - s);+ let t1 = (1f - t);+ let r1 = (1f - r);+ return ((r1 * ((t1 * ((v0 * s1) + (v1 * s))) + (t * ((v2 * s1) + (v3 * s))))) + (r * ((t1 * ((v4 * s1) + (v5 * s))) + (t * ((v6 * s1) + (v7 * s))))));+}++fn mxGradientScale3d(v: f32) -> f32 {+ return (0.982f * v);+}++fn mxPerlinNoiseFloat3(p: vec3f) -> f32 {+ let X = i32(floor(p.x));+ let Y = i32(floor(p.y));+ let Z = i32(floor(p.z));+ let fx = (p.x - f32(X));+ let fy = (p.y - f32(Y));+ let fz = (p.z - f32(Z));+ let u = mxFade(fx);+ let v = mxFade(fy);+ let w = mxFade(fz);+ let result = mxTrilerp(mxGradientFloat3(mxHashInt2(X, Y, Z), fx, fy, fz), mxGradientFloat3(mxHashInt2((X + 1i), Y, Z), (fx - 1f), fy, fz), mxGradientFloat3(mxHashInt2(X, (Y + 1i), Z), fx, (fy - 1f), fz), mxGradientFloat3(mxHashInt2((X + 1i), (Y + 1i), Z), (fx - 1f), (fy - 1f), fz), mxGradientFloat3(mxHashInt2(X, Y, (Z + 1i)), fx, fy, (fz - 1f)), mxGradientFloat3(mxHashInt2((X + 1i), Y, (Z + 1i)), (fx - 1f), fy, (fz - 1f)), mxGradientFloat3(mxHashInt2(X, (Y + 1i), (Z + 1i)), fx, (fy - 1f), (fz - 1f)), mxGradientFloat3(mxHashInt2((X + 1i), (Y + 1i), (Z + 1i)), (fx - 1f), (fy - 1f), (fz - 1f)), u, v, w);+ return mxGradientScale3d(result);+}++fn mxNoiseFloat3(p: vec3f) -> f32 {+ return mxPerlinNoiseFloat3(p);+}++fn flowingFactors(baseUV: vec2f, viewport: vec2f, distortion: f32, seed: f32, animTime: f32) -> vec3f {+ let t = (animTime * 0.075f);+ let aspect = (viewport.x / viewport.y);+ let uv0 = (baseUV - 0.5f);+ let seedOff = (seed * 0.17f);+ let noiseVal = mxNoiseFloat3(vec3f(((uv0.x * 0.8f) + (t * 0.4f)), ((uv0.y * 0.8f) - (t * 0.25f)), seedOff));+ let angle = ((noiseVal * 12.566370614359172f) * distortion);+ let uvCorr = vec2f(uv0.x, (uv0.y / aspect));+ let ca = cos(angle);+ let sa = sin(angle);+ let rotX = ((uvCorr.x * ca) - (uvCorr.y * sa));+ let rotY = (((uvCorr.x * sa) + (uvCorr.y * ca)) * aspect);+ let ws = (t * 2f);+ let warpX = (rotX + ((sin(((rotY * 5f) + ws)) / 50f) * distortion));+ let warpY = (rotY + ((sin(((warpX * 7.5f) + ws)) / 25f) * distortion));+ let wp1 = vec3f((warpX * 2f), (warpY * 2f), ((t * 0.5f) + seedOff));+ let wx1 = mxNoiseFloat3((wp1 + vec3f(5.199999809265137, 1.2999999523162842, 0)));+ let wy1 = mxNoiseFloat3((wp1 + vec3f(1.7000000476837158, 9.199999809265137, 0)));+ let dw1X = (warpX + ((wx1 * 0.25f) * distortion));+ let dw1Y = (warpY + ((wy1 * 0.25f) * distortion));+ let wp2 = vec3f((dw1X * 1.5f), (dw1Y * 1.5f), ((t * 0.3f) + seedOff));+ let wx2 = mxNoiseFloat3((wp2 + vec3f(8.300000190734863, 2.799999952316284, 0)));+ let wy2 = mxNoiseFloat3((wp2 + vec3f(3.0999999046325684, 7.400000095367432, 0)));+ let dw2X = (dw1X + ((wx2 * 0.2f) * distortion));+ let dw2Y = (dw1Y + ((wy2 * 0.2f) * distortion));+ let zoneNoise = mxNoiseFloat3(vec3f((dw2X * 1.8f), (dw2Y * 1.8f), ((t * 0.3f) + seedOff)));+ let edgeHardness = pow(((wx1 * 0.5f) + 0.5f), 1.5f);+ let edgeWidth = mix(0.5f, 8e-3f, edgeHardness);+ let t1 = smoothstep((edgeWidth * -1f), edgeWidth, zoneNoise);+ let t2 = smoothstep((edgeWidth * -1f), edgeWidth, wy1);+ let foldMask1 = (1f - abs(((t1 * 2f) - 1f)));+ let foldMask2 = (1f - abs(((t2 * 2f) - 1f)));+ let foldHighlight = (max(foldMask1, foldMask2) * edgeHardness);+ let surfaceLight = ((((wx2 * 0.5f) + 0.5f) * 0.12f) + 0.94f);+ let litScale = (surfaceLight * (1f + (foldHighlight * 0.35f)));+ return vec3f(t1, t2, litScale);+}++fn unpremultiplyAlpha(color: vec4f) -> vec4f {+ let alpha = color.w;+ let straightRGB = select(vec3f(), (color.xyz / alpha), (alpha > 1e-3f));+ return vec4f(straightRGB, alpha);+}++fn crtCompose(redSample: vec4f, greenSample: vec4f, blueSample: vec4f, uv: vec2f, aspect: f32, pixelSize: f32, scanlineIntensity: f32, scanlineFrequency: f32, brightness: f32, contrast: f32, vignetteIntensity: f32, vignetteRadius: f32) -> vec4f {+ let baseColor = vec3f(redSample.x, greenSample.y, blueSample.z);+ let adjustedColor = ((((baseColor - vec3f(0.5)) * contrast) + vec3f(0.5)) * brightness);+ let scanlinePosition = (uv.y * scanlineFrequency);+ let scanlineWave = sin((scanlinePosition * 6.28318f));+ let scanlineEffect = (1f - (scanlineIntensity * ((scanlineWave * 0.5f) + 0.5f)));+ let scanlinedColor = (adjustedColor * scanlineEffect);+ let phosphorScale = (pixelSize * 0.5f);+ let pixelPhase = fract((uv * phosphorScale));+ let redMask = ((sin((pixelPhase.x * 6.28318f)) * 0.1f) + 0.95f);+ let greenMask = ((sin(((pixelPhase.x * 6.28318f) + 2.09f)) * 0.1f) + 0.95f);+ let blueMask = ((sin(((pixelPhase.x * 6.28318f) + 4.18f)) * 0.1f) + 0.95f);+ let phosphorColor = vec3f((scanlinedColor.x * redMask), (scanlinedColor.y * greenMask), (scanlinedColor.z * blueMask));+ let centeredUV = (uv - vec2f(0.5));+ let aspectCorrectedUV = vec2f((centeredUV.x * aspect), centeredUV.y);+ let vignetteDistance = length(aspectCorrectedUV);+ let innerEdge = (1f - (vignetteRadius * 0.9f));+ let outerEdge = (innerEdge + 0.5f);+ let vignetteValue = (1f - smoothstep(innerEdge, outerEdge, vignetteDistance));+ let vignette = mix(1f, vignetteValue, vignetteIntensity);+ let finalColor = (phosphorColor * vignette);+ return vec4f(finalColor.x, finalColor.y, finalColor.z, 1f);+}++fn crtSampleUV(uv: vec2f, colorShift: f32, dir: f32) -> vec2f {+ let scaledColorShift = (colorShift * 2e-3f);+ return vec2f((uv.x + (scaledColorShift * dir)), uv.y);+}++fn tone_linear(color: vec3f) -> vec3f {+ return vec3f(color.x, color.y, color.z);+}++fn linearToSrgb(color: vec3f) -> vec3f {+ let a = ((pow(color, vec3f(0.41666001081466675)) * 1.055f) - 0.055f);+ let b = (color * 12.92f);+ let factor = (color <= vec3f(0.0031308000907301903));+ return select(a, b, factor);+}++@group(1) @binding(0) var rtt_0: texture_2d<f32>;++@group(2) @binding(0) var linearClamp: sampler;++struct final_Input {+ @location(0) uv: vec2f,+}++@fragment fn final_1(in: final_Input) -> @location(0) vec4f {+ var uv = in.uv;+ var composed_0 = mix(flowingCompose(mixColors(mixColors(uniforms.gradient.colorA, uniforms.gradient.colorB, (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).x), mixColors(uniforms.gradient.colorC, uniforms.gradient.colorD, (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).x), (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).y), (flowingFactors(uv, uniforms._sys.viewportSize, uniforms.gradient.distortion, uniforms.gradient.seed, uniforms.gradient._animTime)).z), unpremultiplyAlpha(crtCompose(textureSample(rtt_0, linearClamp, crtSampleUV(uv, uniforms.crt.colorShift, 1.0)), textureSample(rtt_0, linearClamp, uv), textureSample(rtt_0, linearClamp, crtSampleUV(uv, uniforms.crt.colorShift, -1.0)), uv, uniforms._sys.aspect, uniforms.crt.pixelSize, uniforms.crt.scanlineIntensity, uniforms.crt.scanlineFrequency, uniforms.crt.brightness, uniforms.crt.contrast, uniforms.crt.vignetteIntensity, uniforms.crt.vignetteRadius)), uniforms.crt._opacity);+ return vec4f(linearToSrgb(tone_linear(composed_0.rgb)) * composed_0.a, composed_0.a);+}+`;++// uniforms (combined struct, 208 bytes), constants as traced on workos.com+const COLORS = [+ 0.00328449, 0.0178861, 0.0840526, 1, // colorA #002555 (linear Display P3)+ 0.0391623, 0.188344, 0.399579, 1, // colorB #117AAE+ 0.00776463, 0.0422833, 0.257105, 1, // colorC #003B90+ 0.00776463, 0.0422833, 0.257105, 1, // colorD #003B90+];+const SPEED = 10;++// Mounts the canvas into host and starts drawing; returns a function that removes it again.+export function mountFaceShader(host) {+ const shader = document.createElement("div");+ shader.className = "shader";+ const canvas = document.createElement("canvas");+ canvas.dataset.renderer = "shaders";+ shader.append(canvas);+ host.append(shader);+ let stopped = false, raf = 0, device = null;+ start().catch(() => {});+ return () => {+ stopped = true;+ cancelAnimationFrame(raf);+ shader.remove();+ device?.destroy();+ };++ async function start() {+ if (!navigator.gpu) return;+ const adapter = await navigator.gpu.requestAdapter();+ if (!adapter || stopped) return;+ device = await adapter.requestDevice();+ if (stopped) return device.destroy();++ // canvas size: CSS size of the face screen x min(devicePixelRatio, 2), as the library does+ const cssW = host.offsetWidth || 168, cssH = host.offsetHeight || 111;+ const dpr = Math.min(window.devicePixelRatio || 1, 2);+ const w = Math.max(1, Math.round(cssW * dpr)), h = Math.max(1, Math.round(cssH * dpr));+ canvas.width = w;+ canvas.height = h;+ const ctx = canvas.getContext("webgpu");+ const format = navigator.gpu.getPreferredCanvasFormat();+ ctx.configure({ device, format, alphaMode: "premultiplied" });++ const ubuf = device.createBuffer({ size: 208, usage: GPUBufferUsage.UNIFORM | GPUBufferUsage.COPY_DST });+ const u = new Float32Array(52);+ u.set(COLORS, 0);+ u[16] = 1; u[17] = SPEED; u[18] = 0; u[19] = 52; u[20] = 1; // colorSpace, speed, distortion, seed, opacity+ u.set([117, 6.3, 0.2, 200, 1.5, 1, 1, 0.72, 1], 24); // CRT pixelSize, colorShift, scanlineIntensity/Frequency, brightness, contrast, vignetteIntensity/Radius, opacity+ u[36] = 1;+ u[42] = w; u[43] = h; u[44] = cssW; u[45] = cssH; u[46] = w / h; u[48] = 0.5; u[49] = 0.5;++ const rtt = device.createTexture({ size: [w, h], format: "rgba16float", usage: GPUTextureUsage.RENDER_ATTACHMENT | GPUTextureUsage.TEXTURE_BINDING });+ const sampler = device.createSampler({ magFilter: "linear", minFilter: "linear", mipmapFilter: "linear", addressModeU: "clamp-to-edge", addressModeV: "clamp-to-edge" });+ const mod1 = device.createShaderModule({ code: RTT_WGSL });+ const mod2 = device.createShaderModule({ code: FINAL_WGSL });+ const p1 = device.createRenderPipeline({ layout: "auto", vertex: { module: mod1, entryPoint: "item" }, fragment: { module: mod1, entryPoint: "rtt_rtt_0", targets: [{ format: "rgba16float" }] } });+ const p2 = device.createRenderPipeline({ layout: "auto", vertex: { module: mod2, entryPoint: "item" }, fragment: { module: mod2, entryPoint: "final_1", targets: [{ format }] } });+ const bg1 = device.createBindGroup({ layout: p1.getBindGroupLayout(0), entries: [{ binding: 0, resource: { buffer: ubuf } }] });+ const bg2u = device.createBindGroup({ layout: p2.getBindGroupLayout(0), entries: [{ binding: 0, resource: { buffer: ubuf } }] });+ const bg2t = device.createBindGroup({ layout: p2.getBindGroupLayout(1), entries: [{ binding: 0, resource: rtt.createView() }] });+ const bg2s = device.createBindGroup({ layout: p2.getBindGroupLayout(2), entries: [{ binding: 0, resource: sampler }] });++ const t0 = performance.now();+ const frame = (now) => {+ if (stopped) return;+ const t = Math.max(0, (now - t0) / 1000);+ u[40] = t; // _sys.time, seconds+ u[21] = t * SPEED; // _animTime+ device.queue.writeBuffer(ubuf, 0, u.buffer, 0, 208);+ const enc = device.createCommandEncoder();+ let pass = enc.beginRenderPass({ colorAttachments: [{ view: rtt.createView(), loadOp: "clear", storeOp: "store", clearValue: [0, 0, 0, 0] }] });+ pass.setPipeline(p1); pass.setBindGroup(0, bg1); pass.draw(3); pass.end();+ pass = enc.beginRenderPass({ colorAttachments: [{ view: ctx.getCurrentTexture().createView(), loadOp: "clear", storeOp: "store", clearValue: [0, 0, 0, 0] }] });+ pass.setPipeline(p2); pass.setBindGroup(0, bg2u); pass.setBindGroup(1, bg2t); pass.setBindGroup(2, bg2s); pass.draw(3); pass.end();+ device.queue.submit([enc.finish()]);+ raf = requestAnimationFrame(frame);+ };+ raf = requestAnimationFrame(frame);+ }+}diff --git a/site/public/examples/workos-atlas/src/motion.js b/site/public/examples/workos-atlas/src/motion.jsnew file mode 100644index 0000000..63aafbe--- /dev/null+++ b/site/public/examples/workos-atlas/src/motion.js@@ -0,0 +1,172 @@+// A small subset of what the original gets from Framer Motion: cubic-bezier easings, the spring+// solver (same formulas, rest thresholds and 50 ms duration search), springs turned into WAAPI+// linear() easings, and a rAF tween for SVG attributes and motion values.++export const EASE = {+ linear: [0, 0, 1, 1],+ easeIn: [0.42, 0, 1, 1],+ easeOut: [0, 0, 0.58, 1],+ easeInOut: [0.42, 0, 0.58, 1],+ swift: [0.2, 0, 0, 1],+ outCubic: [0.33, 1, 0.68, 1],+ inOutQuad: [0.45, 0, 0.55, 1],+};++const css = (e) => (e[0] === 0 && e[1] === 0 && e[2] === 1 && e[3] === 1 ? "linear" : `cubic-bezier(${e.join(", ")})`);+export const cssEase = (e) => css(typeof e === "string" ? EASE[e] : e);++// cubic-bezier solver (binary subdivision, like Framer Motion's)+export function bezier(e) {+ const [x1, y1, x2, y2] = typeof e === "string" ? EASE[e] : e;+ if (x1 === y1 && x2 === y2) return (t) => t;+ const calc = (t, a1, a2) => (((1 - 3 * a2 + 3 * a1) * t + (3 * a2 - 6 * a1)) * t + 3 * a1) * t;+ const solve = (x) => {+ let lo = 0, hi = 1, t = 0, cur;+ for (let i = 0; i < 12; i++) {+ t = lo + (hi - lo) / 2;+ cur = calc(t, x1, x2) - x;+ if (cur > 0) hi = t; else lo = t;+ if (Math.abs(cur) <= 1e-7) break;+ }+ return t;+ };+ return (x) => (x === 0 || x === 1 ? x : calc(solve(x), y1, y2));+}++// Spring generator: options in Framer Motion's units (stiffness, damping, mass, or bounce ++// visualDuration). Returns value(tMs) and done(tMs) for keyframes [from, to].+export function springGenerator({ from = 0, to = 1, velocity = 0, stiffness = 100, damping = 10, mass = 1, bounce, visualDuration, restDelta, restSpeed }) {+ if (visualDuration !== undefined) {+ const root = (2 * Math.PI) / (visualDuration * 1.2);+ stiffness = root * root;+ damping = 2 * Math.min(1, Math.max(0.05, 1 - (bounce || 0))) * Math.sqrt(stiffness);+ mass = 1;+ }+ const delta = to - from;+ const granular = Math.abs(delta) < 5;+ restSpeed ??= granular ? 0.01 : 2;+ restDelta ??= granular ? 0.005 : 0.5;+ const zeta = damping / (2 * Math.sqrt(stiffness * mass));+ const w0 = Math.sqrt(stiffness / mass) / 1000; // per ms+ const v0 = -velocity / 1000; // Framer passes -velocity (units per second) in ms+ let resolve;+ if (zeta < 1) {+ const wd = w0 * Math.sqrt(1 - zeta * zeta);+ resolve = (t) => {+ const env = Math.exp(-zeta * w0 * t);+ return to - env * (((v0 + zeta * w0 * delta) / wd) * Math.sin(wd * t) + delta * Math.cos(wd * t));+ };+ } else if (zeta === 1) {+ resolve = (t) => to - Math.exp(-w0 * t) * (delta + (v0 + w0 * delta) * t);+ } else {+ const wd = w0 * Math.sqrt(zeta * zeta - 1);+ resolve = (t) => {+ const env = Math.exp(-zeta * w0 * t);+ const f = Math.min(wd * t, 300);+ return to - (env * ((v0 + zeta * w0 * delta) * Math.sinh(f) + wd * delta * Math.cosh(f))) / wd;+ };+ }+ const done = (t) => {+ const cur = resolve(t);+ let vel = 0;+ if (zeta < 1) vel = t === 0 ? v0 * 1000 : (cur - resolve(Math.max(0, t - 5))) / (Math.min(t, 5) / 1000);+ return Math.abs(vel) <= restSpeed && Math.abs(to - cur) <= restDelta;+ };+ let duration = 0;+ while (!done(duration) && duration < 20000) duration += 50;+ return { value: (t) => (t >= duration || done(t) ? to : resolve(t)), done, duration };+}++// A spring as a WAAPI easing over a 0..100 progress (Framer animates complex strings on 0..100).+export function springEasing(opts) {+ const g = springGenerator({ ...opts, from: 0, to: 100 });+ const n = Math.max(Math.round(g.duration / 10), 2);+ const pts = [];+ for (let i = 0; i < n; i++) pts.push(+(g.value((i / (n - 1)) * g.duration) / 100).toFixed(5));+ return { easing: `linear(${pts.join(", ")})`, duration: g.duration };+}++// WAAPI keyframes from Framer-style values/times/ease arrays.+export function waapi(el, prop, values, { duration, delay = 0, times, ease = "easeOut", fill = "both" }) {+ const n = values.length;+ const eases = Array.isArray(ease) && typeof ease[0] !== "number" ? ease : null;+ const frames = values.map((v, i) => {+ const f = { [prop]: v, offset: times ? times[i] : n === 1 ? 1 : i / (n - 1) };+ if (i < n - 1) f.easing = eases ? cssEase(eases[i]) : cssEase(ease);+ return f;+ });+ return el.animate(frames, { duration: duration * 1000, delay: delay * 1000, fill, easing: "linear" });+}++// rAF tween of numbers through keyframes (times + per-segment ease), for SVG attributes.+const running = new Set();+let rafId = 0;+function tick(now) {+ for (const a of [...running]) a.step(now);+ rafId = running.size ? requestAnimationFrame(tick) : 0;+}+export function tween(values, { duration, delay = 0, times, ease = "easeInOut", onUpdate, onComplete }) {+ const n = values.length;+ times ??= values.map((_, i) => i / (n - 1));+ const eases = (Array.isArray(ease) && typeof ease[0] !== "number" ? ease : Array(n - 1).fill(ease)).map(bezier);+ const start = performance.now() + delay * 1000;+ const total = duration * 1000;+ const at = (p) => {+ if (p <= 0) return values[0];+ if (p >= 1) return values[n - 1];+ let i = 1;+ while (i < n - 1 && times[i] < p) i++;+ const span = times[i] - times[i - 1];+ const local = span > 0 ? (p - times[i - 1]) / span : 1;+ return values[i - 1] + (values[i] - values[i - 1]) * eases[i - 1](local);+ };+ const anim = {+ stopped: false,+ step(now) {+ if (anim.stopped) return;+ const p = total > 0 ? (now - start) / total : now >= start ? 1 : 0;+ onUpdate(at(Math.min(1, p)));+ if (p >= 1) { running.delete(anim); onComplete?.(); }+ },+ stop() { anim.stopped = true; running.delete(anim); },+ };+ onUpdate(values[0]);+ running.add(anim);+ if (!rafId) rafId = requestAnimationFrame(tick);+ return anim;+}++// A value that follows a target with a spring, like Framer Motion's useSpring: a change of the+// target restarts the spring after the frame has rendered (frame.postRender), from the current+// value and velocity, so the spring keeps integrating while the target itself is animating.+export function springFollower({ stiffness, damping, mass }, onUpdate) {+ let value = 0, target = 0, gen = null, t0 = 0, pending = false, active = false;+ const velocityAt = (t) => (gen ? (gen.value(t) - gen.value(Math.max(0, t - 5))) / (Math.min(Math.max(t, 1), 5) / 1000) : 0);+ const f = {+ get: () => target,+ set(v) {+ target = v;+ pending = true;+ if (!active) { active = true; running.add(f); if (!rafId) rafId = requestAnimationFrame(tick); }+ },+ step(now) {+ if (gen) {+ const t = Math.max(0, now - t0);+ value = gen.value(t);+ onUpdate(value);+ if (pending) {+ const vel = velocityAt(t);+ gen = springGenerator({ from: value, to: target, velocity: vel, stiffness, damping, mass, restDelta: 0.001, restSpeed: 0.01 });+ t0 = now;+ pending = false;+ } else if (t >= gen.duration) gen = null;+ } else if (pending) {+ gen = springGenerator({ from: value, to: target, velocity: 0, stiffness, damping, mass, restDelta: 0.001, restSpeed: 0.01 });+ t0 = now;+ pending = false;+ }+ if (!gen && !pending) { active = false; running.delete(f); }+ },+ };+ return f;+}diff --git a/site/public/media/clerk-advanced-security/poster.webp b/site/public/media/clerk-advanced-security/poster.webpnew file mode 100644index 0000000..f59612aBinary files /dev/null and b/site/public/media/clerk-advanced-security/poster.webp differdiff --git a/site/public/media/clerk-api-keys/poster.webp b/site/public/media/clerk-api-keys/poster.webpnew file mode 100644index 0000000..f433622Binary files /dev/null and b/site/public/media/clerk-api-keys/poster.webp differdiff --git a/site/public/media/clerk-bot-detection/poster.webp b/site/public/media/clerk-bot-detection/poster.webpnew file mode 100644index 0000000..7d34422Binary files /dev/null and b/site/public/media/clerk-bot-detection/poster.webp differdiff --git a/site/public/media/clerk-fraud/poster.webp b/site/public/media/clerk-fraud/poster.webpnew file mode 100644index 0000000..d1deea5Binary files /dev/null and b/site/public/media/clerk-fraud/poster.webp differdiff --git a/site/public/media/clerk-magic-links/poster.webp b/site/public/media/clerk-magic-links/poster.webpnew file mode 100644index 0000000..f39b3cbBinary files /dev/null and b/site/public/media/clerk-magic-links/poster.webp differdiff --git a/site/public/media/clerk-mfa/poster.webp b/site/public/media/clerk-mfa/poster.webpnew file mode 100644index 0000000..3884056Binary files /dev/null and b/site/public/media/clerk-mfa/poster.webp differdiff --git a/site/public/media/clerk-otp/poster.webp b/site/public/media/clerk-otp/poster.webpnew file mode 100644index 0000000..bed5fbaBinary files /dev/null and b/site/public/media/clerk-otp/poster.webp differdiff --git a/site/public/media/clerk-passwords/poster.webp b/site/public/media/clerk-passwords/poster.webpnew file mode 100644index 0000000..844cbc5Binary files /dev/null and b/site/public/media/clerk-passwords/poster.webp differdiff --git a/site/public/media/clerk-session-management/poster.webp b/site/public/media/clerk-session-management/poster.webpnew file mode 100644index 0000000..bda1184Binary files /dev/null and b/site/public/media/clerk-session-management/poster.webp differdiff --git a/site/public/media/clerk-social-sign-on/poster.webp b/site/public/media/clerk-social-sign-on/poster.webpnew file mode 100644index 0000000..f647dadBinary files /dev/null and b/site/public/media/clerk-social-sign-on/poster.webp differdiff --git a/site/public/media/entrance-clone.mp4 b/site/public/media/entrance-clone.mp4deleted file mode 100644index 7d25aa9..0000000Binary files a/site/public/media/entrance-clone.mp4 and /dev/null differdiff --git a/site/public/media/entrance-ref.mp4 b/site/public/media/entrance-ref.mp4deleted file mode 100644index 93ba985..0000000Binary files a/site/public/media/entrance-ref.mp4 and /dev/null differdiff --git a/site/public/media/hover-agentic-commerce-clone.mp4 b/site/public/media/hover-agentic-commerce-clone.mp4deleted file mode 100644index 0e08d96..0000000Binary files a/site/public/media/hover-agentic-commerce-clone.mp4 and /dev/null differdiff --git a/site/public/media/hover-agentic-commerce-ref.mp4 b/site/public/media/hover-agentic-commerce-ref.mp4deleted file mode 100644index 011c317..0000000Binary files a/site/public/media/hover-agentic-commerce-ref.mp4 and /dev/null differdiff --git a/site/public/media/hover-crypto-clone.mp4 b/site/public/media/hover-crypto-clone.mp4deleted file mode 100644index 370777b..0000000Binary files a/site/public/media/hover-crypto-clone.mp4 and /dev/null differdiff --git a/site/public/media/hover-crypto-ref.mp4 b/site/public/media/hover-crypto-ref.mp4deleted file mode 100644index 55a0b27..0000000Binary files a/site/public/media/hover-crypto-ref.mp4 and /dev/null differdiff --git a/site/public/media/hover-issuing-clone.mp4 b/site/public/media/hover-issuing-clone.mp4deleted file mode 100644index 86e4e55..0000000Binary files a/site/public/media/hover-issuing-clone.mp4 and /dev/null differdiff --git a/site/public/media/hover-issuing-ref.mp4 b/site/public/media/hover-issuing-ref.mp4deleted file mode 100644index c6fa6ab..0000000Binary files a/site/public/media/hover-issuing-ref.mp4 and /dev/null differdiff --git a/site/public/media/stripe-agentic-commerce/compare.mp4 b/site/public/media/stripe-agentic-commerce/compare.mp4new file mode 100644index 0000000..a4f8442Binary files /dev/null and b/site/public/media/stripe-agentic-commerce/compare.mp4 differdiff --git a/site/public/media/stripe-agentic-commerce/poster.webp b/site/public/media/stripe-agentic-commerce/poster.webpnew file mode 100644index 0000000..9d6b631Binary files /dev/null and b/site/public/media/stripe-agentic-commerce/poster.webp differdiff --git a/site/public/media/stripe-bento/compare.mp4 b/site/public/media/stripe-bento/compare.mp4new file mode 100644index 0000000..64be94bBinary files /dev/null and b/site/public/media/stripe-bento/compare.mp4 differdiff --git a/site/public/media/stripe-bento/poster.webp b/site/public/media/stripe-bento/poster.webpnew file mode 100644index 0000000..8904cecBinary files /dev/null and b/site/public/media/stripe-bento/poster.webp differdiff --git a/site/public/media/stripe-crypto/compare.mp4 b/site/public/media/stripe-crypto/compare.mp4new file mode 100644index 0000000..fe3c293Binary files /dev/null and b/site/public/media/stripe-crypto/compare.mp4 differdiff --git a/site/public/media/stripe-crypto/poster.webp b/site/public/media/stripe-crypto/poster.webpnew file mode 100644index 0000000..eb7093bBinary files /dev/null and b/site/public/media/stripe-crypto/poster.webp differdiff --git a/site/public/media/stripe-issuing/compare.mp4 b/site/public/media/stripe-issuing/compare.mp4new file mode 100644index 0000000..f6f166eBinary files /dev/null and b/site/public/media/stripe-issuing/compare.mp4 differdiff --git a/site/public/media/stripe-issuing/poster.webp b/site/public/media/stripe-issuing/poster.webpnew file mode 100644index 0000000..f0d538dBinary files /dev/null and b/site/public/media/stripe-issuing/poster.webp differdiff --git a/site/public/media/sheet-issuing-hover.webp b/site/public/media/stripe-issuing/sheet.webpsimilarity index 100%rename from site/public/media/sheet-issuing-hover.webprename to site/public/media/stripe-issuing/sheet.webpdiff --git a/site/public/media/workos-atlas/compare.mp4 b/site/public/media/workos-atlas/compare.mp4new file mode 100644index 0000000..85fe3b9Binary files /dev/null and b/site/public/media/workos-atlas/compare.mp4 differdiff --git a/site/public/media/workos-atlas/poster.webp b/site/public/media/workos-atlas/poster.webpnew file mode 100644index 0000000..63f08feBinary files /dev/null and b/site/public/media/workos-atlas/poster.webp differdiff --git a/site/scripts/_clerk-posters.ts b/site/scripts/_clerk-posters.tsnew file mode 100644index 0000000..9e158f7--- /dev/null+++ b/site/scripts/_clerk-posters.ts@@ -0,0 +1,23 @@+import { chromium } from "playwright";+import { execFileSync } from "node:child_process";+import { mkdirSync, rmSync } from "node:fs";+const browser = await chromium.launch({ channel: "chromium", args: ["--enable-gpu", "--use-angle=metal", "--ignore-gpu-blocklist"] });+const page = await browser.newPage({ viewport: { width: 900, height: 700 }, deviceScaleFactor: 2 });+for (const card of process.argv.slice(2)) {+ await page.goto(`http://localhost:3000/examples/clerk-bento/?card=${card}&embed`);+ await page.waitForSelector('html[data-widgets="ready"]');+ await page.evaluate(() => document.fonts.ready);+ await page.waitForTimeout(800);+ const v = (await page.locator(`.clerk-card--${card}`).boundingBox())!;+ const s = (await page.locator(`.clerk-card--${card} .clerk-card__visual`).boundingBox())!;+ const h = Math.min(s.height, v.height, (v.width * 3) / 4);+ const w = (h * 4) / 3;+ const clip = { x: s.x + (s.width - w) / 2, y: Math.max(v.y, Math.min(s.y + (s.height - h) / 2, v.y + v.height - h)), width: w, height: h };+ mkdirSync(`public/media/clerk-${card}`, { recursive: true });+ const png = `public/media/clerk-${card}/poster.png`;+ await page.screenshot({ path: png, clip });+ execFileSync("cwebp", ["-quiet", "-q", "86", "-m", "6", "-sharp_yuv", "-resize", "288", "0", png, "-o", png.replace(".png", ".webp")]);+ rmSync(png);+ console.log(card, clip);+}+await browser.close();diff --git a/site/scripts/record-media.ts b/site/scripts/record-media.tsnew file mode 100644index 0000000..67ccb03--- /dev/null+++ b/site/scripts/record-media.ts@@ -0,0 +1,381 @@+// Films the original and the clone the same way (same browser, viewport, scroll, pointer path and+// timing) at 2x device pixels and 60 fps, for the site and the README.+//+// bun run preview # serves the site on http://localhost:8787+// bun run media [--only stripe-issuing,…] [--site http://localhost:8787] [--keep <dir>]+//+// For each clip in CLIPS: public/media/<slug>/compare.mp4 (both recordings in one file) and+// poster.webp (see src/examples.ts).+// Then the README animations in ../.github/assets/.+// Needs Playwright's Chromium (bunx playwright install chromium), ffmpeg, cwebp and webpmux on PATH.+import { chromium, type Browser } from "playwright";+import { spawnSync } from "node:child_process";+import { mkdirSync, mkdtempSync, readdirSync, rmSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { parseArgs } from "node:util";++type Clip = {+ slug: string;+ reference: string;+ clone: string; // path on the local site+ select: string[]; // what to film: the crop is these elements' union plus PAD, on both pages+ trigger: "scroll" | "hover"; // scroll: the entrance as they scroll into view; hover: HOVER_PATH over the first+ pin?: number; // Math.random returns this from just before the trigger, so random picks come out the same on both pages+};++const bento = (card: string) => `.modular-solutions-bento__card-${card}`;+const CLIPS: Clip[] = [+ { slug: "stripe-bento", reference: "https://stripe.com/", clone: "/examples/stripe-bento/", select: ["agentic-commerce", "issuing", "crypto"].map(bento), trigger: "scroll" },+ { slug: "stripe-agentic-commerce", reference: "https://stripe.com/", clone: "/examples/stripe-bento/", select: [bento("agentic-commerce")], trigger: "hover" },+ { slug: "stripe-issuing", reference: "https://stripe.com/", clone: "/examples/stripe-bento/", select: [bento("issuing")], trigger: "hover" },+ { slug: "stripe-crypto", reference: "https://stripe.com/", clone: "/examples/stripe-bento/", select: [bento("crypto")], trigger: "hover" },+ { slug: "workos-atlas", reference: "https://workos.com/atlas", clone: "/examples/workos-atlas/", select: ['[aria-label^="Atlas reaching out"]'], trigger: "scroll", pin: 0.37 },+];++const { values: args } = parseArgs({+ options: {+ only: { type: "string" },+ site: { type: "string", default: "http://localhost:8787" },+ keep: { type: "string" },+ },+});++const ROOT = join(import.meta.dirname, "..");+const README_ASSETS = join(ROOT, "..", ".github", "assets");+const WORK = args.keep ?? mkdtempSync(join(tmpdir(), "record-media-"));++const VIEWPORT = { width: 1440, height: 900 };+const SCALE = 2;+const FPS = 60;+const TOP = 112; // where the filmed elements sit in the viewport+const PAD = 10; // CSS px kept around them; the bento hover growth (3.55 px a side) stays inside+const ENTRANCE_MS = 5800;+const ENTRANCE_LEAD_MS = 300; // at most this much before content first appears is kept+const HOVER_MS = 5000;+const COMPARE_WIDTH = 1120; // compare.mp4, in px: 2x the page column+const COMPARE_GAP = 24;+const COMPARE_HOLD_MS = 1000; // the last frame is held this long before the loop starts again+// Pointer path, as fractions of the element's box: in from the left, hold, across, hold, out to the+// right. Times in ms from the start of the clip.+const HOVER_PATH: [number, number, number][] = [+ [0, -0.12, 0.55],+ [500, -0.12, 0.55],+ [850, 0.35, 0.42],+ [1850, 0.35, 0.42],+ [2850, 0.7, 0.7],+ [3350, 0.7, 0.7],+ [3700, 1.12, 0.82],+];++// A visible pointer, so viewers can see what the hover clips react to. Drawn in the page, ignored by+// hit testing, identical on both sites.+const CURSOR = `addEventListener("DOMContentLoaded", () => {+ const el = document.createElement("div");+ el.innerHTML = '<svg width="22" height="28" viewBox="0 0 22 28" xmlns="http://www.w3.org/2000/svg"><path d="M2 2v20.5l5.4-5.2 3.6 8.4 3.5-1.5-3.6-8.3H18z" fill="#0a0a0a" stroke="#fff" stroke-width="1.6" stroke-linejoin="round"/></svg>';+ el.style.cssText = "position:fixed;left:0;top:0;z-index:2147483647;pointer-events:none;display:none;filter:drop-shadow(0 1px 2px rgb(0 0 0 / .3))";+ document.documentElement.append(el);+ addEventListener("mousemove", (e) => { el.style.display = "block"; el.style.transform = "translate(" + (e.clientX - 2) + "px," + (e.clientY - 2) + "px)"; }, { capture: true, passive: true });+});`;++// Example pages hold little more than the clone itself; pad them so it starts below the fold and+// lazy-mounts on scroll, as it does on the original page.+const PUSH_DOWN = `addEventListener("DOMContentLoaded", () => { document.body.style.padding = "1800px 0 900px"; });`;++type Box = { x: number; y: number; width: number; height: number };+type Take = { frames: { file: string; t: number }[]; start: number; ms: number; clip: Box; small: number };+type Side = "reference" | "clone";+const SIDES: Side[] = ["reference", "clone"];++const sleep = (ms: number) => new Promise((r) => setTimeout(r, ms));++function run(cmd: string, argv: string[]) {+ const r = spawnSync(cmd, argv, { maxBuffer: 1 << 30 });+ if (r.status !== 0) throw new Error(`${cmd} failed: ${r.stderr?.toString().slice(-2000)}`);+ return r.stdout;+}++async function film(browser: Browser, clip: Clip, side: Side): Promise<Take> {+ const context = await browser.newContext({ viewport: VIEWPORT, deviceScaleFactor: SCALE });+ await context.addInitScript(CURSOR);+ if (side === "clone") await context.addInitScript(PUSH_DOWN);+ const page = await context.newPage();+ await page.goto(side === "clone" ? new URL(clip.clone, args.site).href : clip.reference, { waitUntil: "load", timeout: 60_000 });++ // The screencast delivers frames at the window's size in CSS px, whatever the device scale. So the+ // window is made SCALE times larger and the emulated 1440x900 view is zoomed to fill it: the page+ // still lays out at 1440x900 and the frames come out in device pixels. Playwright re-applies its own+ // emulation now and then (a cross-site navigation swaps the renderer), so this runs again right+ // before filming and every frame's size is checked.+ const cdp = await context.newCDPSession(page);+ const zoom = async () => {+ const { windowId } = await cdp.send("Browser.getWindowForTarget");+ await cdp.send("Browser.setWindowBounds", { windowId, bounds: { width: VIEWPORT.width * SCALE, height: VIEWPORT.height * SCALE + 200 } });+ await cdp.send("Emulation.setDeviceMetricsOverride", { ...VIEWPORT, deviceScaleFactor: SCALE, mobile: false, scale: SCALE });+ };+ await page.evaluate(() => document.fonts.ready);+ await sleep(1500);++ const boxes: Box[] = await page.evaluate(+ (sels) =>+ sels.map((s) => {+ const r = document.querySelector(s)!.getBoundingClientRect();+ return { x: r.x, y: r.y + scrollY, width: r.width, height: r.height };+ }),+ clip.select,+ );+ const left = Math.min(...boxes.map((b) => b.x));+ const right = Math.max(...boxes.map((b) => b.x + b.width));+ const top = Math.min(...boxes.map((b) => b.y));+ const bottom = Math.max(...boxes.map((b) => b.y + b.height));+ const crop = { x: left - PAD, y: TOP - PAD, width: right - left + 2 * PAD, height: bottom - top + 2 * PAD };+ const scrollY = top - TOP;+ const scrollIn = () => page.evaluate((y) => window.scrollTo({ top: y, behavior: "instant" }), scrollY);+ // Pinned after load: the pages' other code calls Math.random a different number of times, so a seed+ // would not line the picks up.+ if (clip.pin !== undefined) await page.evaluate((v) => (Math.random = () => v), clip.pin);++ if (clip.trigger === "hover") {+ await scrollIn();+ await sleep(6000); // let the entrance finish+ }++ const dir = join(WORK, `${clip.slug}-${side}`);+ rmSync(dir, { recursive: true, force: true });+ mkdirSync(dir, { recursive: true });+ const frames: Take["frames"] = [];+ let recording = false;+ let wide = 0;+ let small = 0;+ const seen: number[] = [];+ cdp.on("Page.screencastFrame", (f) => {+ void cdp.send("Page.screencastFrameAck", { sessionId: f.sessionId }).catch(() => {});+ const ok = f.metadata.deviceWidth >= VIEWPORT.width * SCALE;+ seen.push(f.metadata.deviceWidth);+ if (!recording) return void (wide = ok ? wide + 1 : 0);+ if (!ok) small++;+ const file = join(dir, `${String(frames.length).padStart(5, "0")}.jpg`);+ writeFileSync(file, Buffer.from(f.data, "base64"));+ frames.push({ file, t: (f.metadata.timestamp ?? Date.now() / 1000) * 1000 });+ });+ await cdp.send("Page.startScreencast", { format: "jpeg", quality: 95 });+ // Frames only come when the page paints, and the zoom only lands with a new frame, so a page at+ // rest gets a speck in its corner that repaints every frame until the zoom has landed.+ await page.evaluate(() => {+ const el = document.createElement("div");+ el.id = "record-media-tick";+ el.style.cssText = "position:fixed;left:0;bottom:0;width:1px;height:1px;z-index:2147483647;pointer-events:none";+ document.documentElement.append(el);+ let n = 0;+ const tick = () => {+ if (!el.isConnected) return;+ el.style.background = n++ % 2 ? "rgb(255 255 255 / .01)" : "rgb(255 255 255 / .02)";+ requestAnimationFrame(tick);+ };+ tick();+ });+ for (let i = 0; wide < 5; i++) {+ if (i === 20) throw new Error(`${clip.slug} ${side}: the window would not zoom (frame widths: ${seen.slice(-12).join(" ") || "none"})`);+ await zoom();+ await sleep(250);+ }+ await page.evaluate(() => document.getElementById("record-media-tick")?.remove());+ recording = true;+ await sleep(300);++ let start: number;+ let ms: number;+ if (clip.trigger === "scroll") {+ await scrollIn();+ await page.evaluate(() => new Promise((r) => requestAnimationFrame(() => requestAnimationFrame(r))));+ start = Date.now(); // the elements are on screen, not yet mounted+ ms = ENTRANCE_MS + 2500;+ await sleep(ms);+ } else {+ // Mouse input lands in the zoomed window's coordinates, so CSS px are scaled up to match.+ const box = boxes[0];+ const at = (fx: number, fy: number) => ({ x: (box.x + box.width * fx) * SCALE, y: (box.y - scrollY + box.height * fy) * SCALE });+ const p0 = at(HOVER_PATH[0][1], HOVER_PATH[0][2]);+ await page.mouse.move(p0.x, p0.y);+ start = Date.now();+ ms = HOVER_MS;+ for (;;) {+ const t = Date.now() - start;+ const i = HOVER_PATH.findIndex(([when]) => when > t);+ if (i < 0) break;+ const [t0, x0, y0] = HOVER_PATH[i - 1];+ const [t1, x1, y1] = HOVER_PATH[i];+ const k = (t - t0) / (t1 - t0);+ const e = k * k * (3 - 2 * k); // smoothstep: the pointer speeds up and settles like a hand+ const p = at(x0 + (x1 - x0) * e, y0 + (y1 - y0) * e);+ await page.mouse.move(p.x, p.y);+ await sleep(8);+ }+ await sleep(HOVER_MS - (Date.now() - start) + 500);+ }+ await cdp.send("Page.stopScreencast");+ await context.close();+ return { frames, start, ms, clip: crop, small };+}++// Screencast frames arrive only when the page changes: hold each until the next, crop, and resample+// to a constant 60 fps. Writes a visually lossless master with t=0 at the take's start.+function master(take: Take, out: string) {+ const first = Math.max(0, take.frames.findLastIndex((f) => f.t <= take.start));+ const frames = take.frames.slice(first);+ const list = frames.map((f, i) => {+ const t = i === 0 ? take.start : f.t;+ const next = i + 1 < frames.length ? frames[i + 1].t : take.start + take.ms;+ return `file '${f.file}'\nduration ${Math.max(0.001, (next - t) / 1000).toFixed(4)}`;+ });+ list.push(`file '${frames.at(-1)!.file}'`);+ writeFileSync(`${out}.txt`, list.join("\n") + "\n");+ const c = take.clip;+ const crop = `crop=${Math.round(c.width * SCALE)}:${Math.round(c.height * SCALE)}:${Math.round(c.x * SCALE)}:${Math.round(c.y * SCALE)}`;+ run("ffmpeg", ["-y", "-v", "error", "-f", "concat", "-safe", "0", "-i", `${out}.txt`, "-vf", `${crop},fps=${FPS},format=yuv444p`, "-t", (take.ms / 1000).toFixed(3), "-c:v", "libx264", "-crf", "6", "-preset", "fast", out]);+}++// When content first appears after the scroll, in ms: the first frame that differs from the empty+// elements by more than a sliver. The two entrances are lined up on it, since the lazy loading+// before it depends on the network.+const dims = (file: string) =>+ run("ffprobe", ["-v", "error", "-select_streams", "v", "-show_entries", "stream=width,height", "-of", "csv=p=0", file]).toString().trim().split(",").map(Number);++function contentAppears(file: string): number {+ const [w, h] = dims(file);+ const sw = 96;+ const sh = Math.round((h / w) * sw / 2) * 2;+ const raw = run("ffmpeg", ["-v", "error", "-i", file, "-vf", `scale=${sw}:${sh},format=gray`, "-f", "rawvideo", "-"]);+ const size = sw * sh;+ const from = Math.round(0.15 * FPS); // after the jump scroll has painted+ const base = raw.subarray(from * size, (from + 1) * size);+ for (let i = from + 1; (i + 1) * size <= raw.length; i++) {+ let changed = 0;+ for (let p = 0; p < size; p++) if (Math.abs(raw[i * size + p] - base[p]) > 12) changed++;+ if (changed / size > 0.01) return (i / FPS) * 1000;+ }+ throw new Error(`no content appeared in ${file}`);+}++// The original and the clone in one file, so the page never has to keep two videos in step: side by+// side, or stacked when the recordings are wider than tall.+function compareMp4(panels: { file: string; from: number }[], ms: number, out: string) {+ const [w, h] = dims(panels[0].file);+ const side = w <= h;+ const pw = side ? (COMPARE_WIDTH - COMPARE_GAP) / 2 : COMPARE_WIDTH;+ const fit = `scale=${pw}:${Math.round((pw * h) / w / 2) * 2}:flags=lanczos,setsar=1`;+ // the gap takes the colour of the original's page, from its top-left corner+ const rgb = run("ffmpeg", ["-v", "error", "-ss", (panels[0].from / 1000).toFixed(3), "-i", panels[0].file, "-frames:v", "1", "-vf", "format=rgb24,crop=1:1:1:1", "-f", "rawvideo", "-pix_fmt", "rgb24", "-"]);+ const bg = `0x${[...rgb.subarray(0, 3)].map((c) => c.toString(16).padStart(2, "0")).join("")}`;+ const gap = side ? `pad=iw+${COMPARE_GAP}:ih:0:0:${bg}` : `pad=iw:ih+${COMPARE_GAP}:0:0:${bg}`;+ const argv = ["-y", "-v", "error"];+ for (const p of panels) argv.push("-ss", (p.from / 1000).toFixed(3), "-t", (ms / 1000).toFixed(3), "-i", p.file);+ const graph = `[0:v]${fit},${gap}[a];[1:v]${fit}[b];[a][b]${side ? "hstack" : "vstack"},tpad=stop_mode=clone:stop_duration=${COMPARE_HOLD_MS / 1000},format=yuv420p[out]`;+ run("ffmpeg", [...argv, "-filter_complex", graph, "-map", "[out]", "-an", "-c:v", "libx264", "-preset", "slow", "-crf", "24", "-movflags", "+faststart", out]);+}++const poster = (src: string, at: number, out: string) => {+ const png = `${out}.png`;+ run("ffmpeg", ["-y", "-v", "error", "-ss", (at / 1000).toFixed(3), "-i", src, "-frames:v", "1", png]);+ run("cwebp", ["-quiet", "-q", "88", "-m", "6", "-sharp_yuv", png, "-o", out]);+ rmSync(png);+};++// A caption strip for the README animations: white, label on the left, `width` px wide.+async function strip(browser: Browser, label: string, note: string, width: number) {+ const out = join(WORK, `strip-${label}-${width}-${note.length}.png`);+ const page = await browser.newPage({ viewport: { width: width / 2, height: 30 }, deviceScaleFactor: 2 });+ await page.setContent(`<body style="margin:0;background:#fff;font:600 11px/32px -apple-system,BlinkMacSystemFont,'Inter',sans-serif;color:#0a0a0a;padding:0 5px;-webkit-font-smoothing:antialiased">+ ${label} <span style="color:#8a8a8a;font-weight:400">· ${note}</span></body>`);+ await page.screenshot({ path: out });+ await page.close();+ return out;+}++// README animation: each panel under its caption strip, stacked or side by side, 20 fps. libwebp's+// animation encoder carries "similar" blocks over from the previous frame, which leaves a patchwork+// on slow gradients and saves little here (the particles change everywhere), so every frame is+// encoded on its own and the frames are muxed.+function readmeWebp(panels: { file: string; from: number; strip: string }[], layout: "stack" | "side", width: number, ms: number, out: string) {+ const fps = 20;+ const dir = join(WORK, `readme-${Date.now()}`);+ mkdirSync(dir);+ const pw = layout === "stack" ? width : width / panels.length;+ const argv = ["-y", "-v", "error"];+ for (const p of panels) argv.push("-ss", (p.from / 1000).toFixed(3), "-t", (ms / 1000).toFixed(3), "-i", p.file);+ for (const p of panels) argv.push("-framerate", String(fps), "-loop", "1", "-i", p.strip);+ const n = panels.length;+ const graph = panels.flatMap((_, k) => [`[${k}:v]fps=${fps},scale=${pw}:-2:flags=lanczos[v${k}]`, `[${n + k}:v][v${k}]vstack=shortest=1[p${k}]`]);+ graph.push(`${panels.map((_, k) => `[p${k}]`).join("")}${layout === "stack" ? "vstack" : "hstack"}=inputs=${n},format=rgb24[out]`);+ run("ffmpeg", [...argv, "-filter_complex", graph.join(";"), "-map", "[out]", "-t", (ms / 1000).toFixed(3), join(dir, "%04d.png")]);+ const pngs = readdirSync(dir).sort().map((f) => join(dir, f));+ run("sh", ["-c", `ls "${dir}"/*.png | xargs -P 8 -I{} cwebp -quiet -q 72 -m 4 -sharp_yuv {} -o {}.webp`]);+ run("webpmux", [...pngs.flatMap((f) => ["-frame", `${f}.webp`, `+${1000 / fps}+0+0+0-b`]), "-loop", "0", "-o", out]);+ rmSync(dir, { recursive: true });+}++const only = args.only?.split(",");+const browser = await chromium.launch({ channel: "chromium", args: ["--enable-gpu", "--use-angle=metal", "--ignore-gpu-blocklist", "--enable-unsafe-webgpu"] });+console.log("work dir:", WORK);+const masters: Record<string, { file: string; from: number }> = {};++for (const clip of CLIPS) {+ if (only && !only.includes(clip.slug)) continue;+ const out = join(ROOT, "public", "media", clip.slug);+ mkdirSync(out, { recursive: true });+ const takes: Record<string, { file: string; appear: number }> = {};+ for (const side of SIDES) {+ // A busy page (stripe.com is heavy) sometimes renders at half speed for a while, and the pointer+ // and frames lag behind; the zoom can also drop mid-take. Film again when either happens.+ let take: Take;+ for (let attempt = 1; ; attempt++) {+ take = await film(browser, clip, side);+ const t0 = take.start;+ const fps = take.frames.filter((f) => f.t >= t0 && f.t < t0 + take.ms).length / (take.ms / 1000);+ console.log(`${clip.slug} ${side}: ${fps.toFixed(0)} fps${take.small ? `, ${take.small} frames at 1x` : ""}`);+ if ((fps >= 50 && !take.small) || attempt === 4) break;+ }+ if (take!.small) throw new Error(`${clip.slug} ${side}: frames kept coming out at 1x`);+ const file = join(WORK, `${clip.slug}-${side}.mkv`);+ master(take!, file);+ takes[side] = { file, appear: clip.trigger === "scroll" ? contentAppears(file) : 0 };+ }+ const lead = Math.min(ENTRANCE_LEAD_MS, ...SIDES.map((s) => takes[s].appear));+ const ms = clip.trigger === "scroll" ? ENTRANCE_MS : HOVER_MS;+ for (const side of SIDES) masters[`${clip.slug}-${side}`] = { file: takes[side].file, from: takes[side].appear - lead };+ compareMp4(SIDES.map((side) => masters[`${clip.slug}-${side}`]), ms, join(out, "compare.mp4"));+ // At rest: the end of an entrance, the start of a hover.+ poster(takes.clone.file, clip.trigger === "scroll" ? takes.clone.appear - lead + ms - 100 : 0, join(out, "poster.webp"));+}++if (masters["stripe-bento-reference"]) {+ const w = 960;+ readmeWebp(+ [+ { ...masters["stripe-bento-reference"], strip: await strip(browser, "stripe.com", "the original", w) },+ { ...masters["stripe-bento-clone"], strip: await strip(browser, "motion-clone", "the copy, filmed the same way", w) },+ ],+ "stack",+ w,+ 4800,+ join(README_ASSETS, "entrance.webp"),+ );+ console.log("README entrance.webp");+}+if (masters["stripe-issuing-reference"]) {+ const w = 720;+ readmeWebp(+ [+ { ...masters["stripe-issuing-reference"], strip: await strip(browser, "stripe.com", "original", w / 2) },+ { ...masters["stripe-issuing-clone"], strip: await strip(browser, "motion-clone", "copy", w / 2) },+ ],+ "side",+ w,+ HOVER_MS,+ join(README_ASSETS, "hover.webp"),+ );+ console.log("README hover.webp");+}++await browser.close();+if (!args.keep) rmSync(WORK, { recursive: true, force: true });diff --git a/site/src/app/globals.css b/site/src/app/globals.cssindex 4461c23..65a8771 100644--- a/site/src/app/globals.css+++ b/site/src/app/globals.css@@ -129,46 +129,76 @@ blockquote.rule cite { display: block; margin-top: 6px; color: var(--muted); fon/* ---------- figures ---------- */.figure { margin: 34px 0 0; }-.figure--wide { margin-right: calc(-1 * var(--side) - 56px); }-@media (max-width: 900px) { .figure--wide { margin-right: 0; } }.figure__caption { margin-top: 10px; font-size: 12.5px; color: var(--muted); display: flex; justify-content: space-between; gap: 16px; }.figure__caption button, .figure__caption a { color: var(--muted); font-size: 12.5px; background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; white-space: nowrap; font-family: inherit; }.figure__caption button:hover, .figure__caption a:hover { color: var(--fg); }-.live { position: relative; overflow: hidden; background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); }-.live iframe { position: absolute; top: 0; left: 0; border: 0; transform-origin: 0 0; background: #fff; }-.live__badge { position: absolute; left: 12px; bottom: 10px; z-index: 1; font-size: 11px; letter-spacing: 0.02em; color: var(--muted); background: rgba(255,255,255,0.85); padding: 2px 7px; border-radius: 99px; box-shadow: 0 0 0 1px var(--rule); pointer-events: none; }-.live__badge b { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: #16a34a; vertical-align: 1px; }--.compare { position: relative; overflow: hidden; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); background: #fff; touch-action: pan-y; cursor: ew-resize; user-select: none; }-.compare video { display: block; width: 100%; height: auto; }-.compare__top { position: absolute; inset: 0; }-.compare__line { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: var(--fg); pointer-events: none; }-.compare__line::after { content: "↔"; position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 28px; height: 28px; border-radius: 50%; background: var(--fg); color: #fff; font-size: 13px; display: grid; place-items: center; }-.compare__label { position: absolute; top: 10px; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: rgba(23,23,23,0.82); color: #fff; pointer-events: none; }-.compare__label--left { left: 10px; }-.compare__label--right { right: 10px; }-.compare input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }+/* the original and the clone in one video: side by side, labelled underneath */+.compare { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); background: #f9fbfe; }+.figure__caption--pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }+.livecard { display: flex; justify-content: center; overflow: hidden; border-radius: 10px; background: #131316; }+.livecard iframe { flex: none; border: 0; transform-origin: top center; }.sheet { display: block; width: 100%; height: auto; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule); }-/* card sections: live card next to its comparison */-.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }-@media (max-width: 640px) { .pair { grid-template-columns: 1fr; } }-.pair__label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }-/* ---------- install / commands ---------- */.cmd { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 8px; background: #171717; color: #fafafa; font-family: var(--font-mono), monospace; font-size: 13.5px; overflow-x: auto; }.cmd span::before { content: "$ "; color: #8a8a8a; }.cmd button { flex: none; background: #2a2a2a; color: #d4d4d4; border: 0; border-radius: 5px; padding: 4px 9px; font: inherit; font-size: 12px; cursor: pointer; }.cmd button:hover { background: #3a3a3a; color: #fff; }--.prompts { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }-.prompt__label { font-size: 12.5px; color: var(--muted); margin-bottom: 5px; }-.prompt__text { padding: 11px 14px; border-radius: 8px; background: var(--panel); box-shadow: 0 0 0 1px var(--rule); font-size: 14px; }-.prompt__text .slash { font-family: var(--font-mono), monospace; font-size: 0.9em; color: var(--accent); margin-right: 6px; }-.prompt__text b { font-weight: 600; }+.lede + .cmd { margin-top: 22px; }+.main > p.hint { margin: 10px 0 0; font-size: 13.5px; color: var(--muted); }++/* prompts: one panel, label column on the left */+.prompts { margin-top: 20px; padding: 6px 16px; border-radius: 10px; background: var(--panel); box-shadow: 0 0 0 1px var(--rule); }+.prompts > div { display: grid; grid-template-columns: 104px 1fr; gap: 12px; padding: 10px 0; font-size: 14px; }+.prompts > div + div { border-top: 1px solid #f0f0ee; }+.prompt__label { color: var(--muted); font-size: 13px; }+.prompt__text .slash { color: var(--faint); }+.prompt__text code { background: #f0f0ee; padding: 1px 5px; border-radius: 4px; }+@media (max-width: 520px) { .prompts > div { grid-template-columns: 1fr; gap: 2px; } }++/* example thumbnails at the top of the examples, one per example */+.strip { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }+.strip a { display: block; width: 96px; height: 72px; border-radius: 8px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--rule); transition: box-shadow 0.2s; }+.strip a:hover { box-shadow: 0 0 0 1px var(--faint); }+.strip img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; display: block; }++/* numbered steps */+.steps { list-style: none; margin: 22px 0 0; padding: 0; border-top: 1px solid var(--rule); }+.steps li { display: grid; grid-template-columns: 28px 1fr; gap: 8px; padding: 11px 0; border-bottom: 1px solid var(--rule); }+.steps__n { color: var(--faint); font-size: 13.5px; font-variant-numeric: tabular-nums; padding-top: 1px; }+.steps p { margin: 0; color: #404040; }+.steps b { color: var(--fg); font-weight: 600; }++/* examples */+.example__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }+.example h3 span { font-weight: 400; color: var(--muted); }+.example .figure { margin-top: 16px; }++/* "details": what an example does and its numbers, on hover or focus */+.tip { position: relative; flex: none; }+.tip__btn { font: inherit; font-size: 12.5px; color: var(--muted); background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted var(--faint); text-underline-offset: 3px; }+.tip:hover .tip__btn, .tip:focus-within .tip__btn { color: var(--fg); }+.tip__box {+ position: absolute; z-index: 30; right: 0; top: calc(100% + 8px); width: 320px; padding: 14px 16px 4px;+ background: #fff; border-radius: 10px; box-shadow: 0 0 0 1px var(--rule), 0 12px 32px -10px rgb(0 0 0 / 0.18);+ font-size: 13px; line-height: 1.5; color: #404040;+ opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;+}+.tip__box::before { content: ""; position: absolute; left: 0; right: 0; top: -8px; height: 8px; } /* keeps the hover across the gap */+.tip:hover .tip__box, .tip:focus-within .tip__box { opacity: 1; visibility: visible; transform: none; }+.tip__box p { margin: 0 0 10px; }+.tip__note { color: var(--muted); }+.tip__rows { margin: 0; border-top: 1px solid var(--rule); }+.tip__rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--rule); }+.tip__rows div:first-child { border-top: 0; }+.tip__rows dt { font-weight: 600; color: var(--fg); }+.tip__rows dt span { display: block; font-weight: 400; font-size: 12px; color: var(--muted); }+.tip__rows dd { margin: 0; white-space: nowrap; color: var(--fg); font-variant-numeric: tabular-nums; }+@media (prefers-reduced-motion: reduce) { .tip__box { transition: none; } }+.figure--sheet { max-width: 420px; }/* FAQ */.faq { margin-top: 22px; border-top: 1px solid var(--rule); }diff --git a/site/src/app/page.tsx b/site/src/app/page.tsxindex 332a2b4..00bc7c8 100644--- a/site/src/app/page.tsx+++ b/site/src/app/page.tsx@@ -1,22 +1,42 @@import { CompareVideo } from "@/components/CompareVideo";import { CopyCommand } from "@/components/CopyCommand";-import { LiveExample } from "@/components/LiveExample";+import { LiveCard } from "@/components/LiveCard";import { Nav, type NavItem } from "@/components/Nav";import { Sidenote } from "@/components/Sidenote";+import { examples, media, type Example } from "@/examples";const REPO = "https://github.com/NiazMorshed2007/motion-clone";const INSTALL = "npx skills add NiazMorshed2007/motion-clone -g";const sections: NavItem[] = [- { id: "measure", label: "Measure, don’t eyeball" },- { id: "levels", label: "Three levels of done" },- { id: "numbers", label: "Where the numbers come from" },- { id: "evidence", label: "Reading the evidence" },- { id: "cards", label: "Three cards, up close" },- { id: "prompt", label: "Writing a prompt" },- { id: "install", label: "Install" },+ { id: "how", label: "How it works" },+ { id: "use", label: "Using it" },+ { id: "close", label: "How close" },{ id: "limits", label: "Limits" },{ id: "questions", label: "Questions" },+ { id: "examples", label: "Examples" },+];++const steps: [string, string][] = [+ ["Record.", "It films the original in a real browser, at a fixed size and frame rate, and collects every animation the page declares."],+ ["Write it down.", "One row per moving part: when it starts, how long it takes, how far it goes, on which curve."],+ ["Rebuild.", "In your code, with what the project already uses: CSS, Framer Motion, GSAP, three.js."],+ ["Compare.", "It films the copy with the exact same command, so any difference is in the copy, not the camera. Then it compares timing, pixels and easing curves."],+ ["Repeat.", "It fixes the biggest gap and films again, usually two to five rounds. Anything still failing is reported with its numbers."],+];++const prompts: [string, React.ReactNode][] = [+ ["From a site", <>the hero entrance on https://example.com, into components/Hero.tsx</>],+ ["From a video", <>this loader, 0:03 to 0:05 of ~/Downloads/loader.mov</>],+ ["Pixel-exact", <>the card hover in this gif, <code>match it exactly</code></>],+ ["Add your own", <>the logo marquee on https://example.com, <code>with our logos and pause on hover</code></>],+];++const faq: [string, string][] = [+ ["Does it copy the other site’s code?", "It reads what the browser receives: CSS, keyframes and, for canvas, what the page sends to the GPU. Then it writes its own version in your stack. Licences still apply to whatever you copy."],+ ["Which frameworks does it write?", "Whatever your project already uses. It reads package.json and your components first, and won’t add GSAP to a project that animates with CSS."],+ ["Can it clone scroll animations?", "Yes. Scroll-linked motion is compared by scroll position instead of time."],+ ["What if something won’t match?", "After five rounds it stops and tells you which part failed, with its numbers and the reason. It never quietly lowers the bar."],];function Section({ id, n, title, children }: { id: string; n: number; title: string; children: React.ReactNode }) {@@ -31,18 +51,9 @@ function Section({ id, n, title, children }: { id: string; n: number; title: str);}-function Rows({ rows, head }: { rows: [string, React.ReactNode, React.ReactNode?][]; head?: [string, string, string?] }) {+function Rows({ rows }: { rows: [string, React.ReactNode, React.ReactNode?][] }) {return (<table className="kv">- {head && (- <thead>- <tr>- <th>{head[0]}</th>- <th>{head[1]}</th>- {head[2] !== undefined && <th className="num">{head[2]}</th>}- </tr>- </thead>- )}<tbody>{rows.map(([k, v, num]) => (<tr key={k}>@@ -56,6 +67,32 @@ function Rows({ rows, head }: { rows: [string, React.ReactNode, React.ReactNode?);}+// What an example does and how close it came, kept out of the way: shown on hovering or focusing "details".+function Details({ e }: { e: Example }) {+ const id = `${e.slug}-details`;+ return (+ <div className="tip">+ <button type="button" className="tip__btn" aria-describedby={id}>+ details+ </button>+ <div role="tooltip" id={id} className="tip__box">+ <p>{e.about}</p>+ {e.note && <p className="tip__note">{e.note}</p>}+ <dl className="tip__rows">+ {e.results.map(([k, how, num]) => (+ <div key={k}>+ <dt>+ {k} <span>{how}</span>+ </dt>+ <dd>{num}</dd>+ </div>+ ))}+ </dl>+ </div>+ </div>+ );+}+export default function Home() {return (<div className="page" id="top">@@ -67,7 +104,7 @@ export default function Home() {motion-clone <span>· a skill for Claude Code</span></h1><div className="masthead__links">- <a href={REPO} aria-label="GitHub repository">GitHub</a>+ <a href={REPO}>GitHub</a></div></header>@@ -75,254 +112,160 @@ export default function Home() {Point Claude at an animation, and it rebuilds it <em>frame by frame</em>, then proves the copy moves the same.</p>+ <CopyCommand command={INSTALL} />+ <p className="hint">+ Then, in Claude Code, type <code>/motion-clone</code> and say what to copy. <a href="#use">How to ask ↓</a>+ </p>+<div className="meta"><span>/motion-clone</span>- <span><a href="#cards">3 cards, all live</a></span>+ <span><a href="#examples">{examples.length} live examples ↓</a></span><span>by <a href="https://github.com/NiazMorshed2007">Niaz</a></span>- <span>29 October 2026</span>- <span><a href="#install">Install ↓</a></span></div><p>- Copying an animation by eye goes the same way every time. The copy looks right in a screenshot and feels wrong in motion. The easing is a little sharper, the second line starts a beat late, the card lifts four pixels instead of six. Nobody can say what is off, so nobody fixes it.- </p>- <p>- motion-clone is a skill for Claude Code that treats an animation as something to <em>measure</em>. It records the reference, whether that is a live site, a screen recording or a gif, reads it frame by frame and writes down every timing and easing. Then it rebuilds the animation in your codebase, records the copy the same way and compares the two until the numbers agree.+ Copying an animation by eye rarely works. The copy looks right in a screenshot and feels off in motion: the easing is a bit sharper, a line starts a beat late. Nobody can say what’s wrong, so nobody fixes it.</p>-- <figure className="figure figure--wide">- <LiveExample title="Three stripe.com cards, rebuilt by motion-clone, running live" />- <figcaption className="sr-only">Three cards from the stripe.com homepage, rebuilt by motion-clone.</figcaption>- </figure>-<p>- These are three cards from the stripe.com homepage, rebuilt by the skill, one agent per card.- <Sidenote n={1}>- The cards here use Inter. stripe.com uses its licensed Söhne, and the clone was verified with the original font before this public build swapped it.- </Sidenote>{" "}- What you see above is the clone, running live. Hover a card: it grows six pixels, the title and the button slide out of the way and the border lights up where your pointer is. The Visa card tilts towards you, the particle ring pulls in near your pointer and the globe’s dots brighten.+ motion-clone <em>measures</em> instead. Claude records the original, whether it’s a live site, a screen recording or a gif, writes down every timing and easing, and rebuilds it in your code. Then it records the copy the same way and compares the two until the numbers agree.</p>- <figure className="figure figure--wide">- <CompareVideo reference="/media/entrance-ref.mp4" clone="/media/entrance-clone.mp4" width={1252} height={696} label="Entrance" />+ <figure className="figure">+ <CompareVideo src={media("stripe-bento", "compare.mp4")} width={560} height={634} label="Three cards loading on stripe.com, and below them the copy doing the same" /><figcaption className="figure__caption">- <span>The entrance, recorded on stripe.com and on the clone with the same command. Drag the line.</span>+ <span>Top: stripe.com. Bottom: the copy, recorded the same way.</span></figcaption></figure>- <Section id="measure" n={1} title="Measure, don’t eyeball">- <p>The skill rests on one rule, near the top of its instructions:</p>- <blockquote className="rule">- <p>The deliverable is code in the user’s project plus evidence (numbers and side-by-side sheets), never “it looks about right”.</p>- <cite>SKILL.md</cite>- </blockquote>- <p>Every clone runs the same loop, and the loop doesn’t end until the comparison passes.</p>- <Rows- rows={[- ["Capture", "Records the reference in a headless browser at a fixed viewport and frame rate: a video, numbered frames, every CSS and Web Animations API animation it can find, and the position of chosen elements on every frame."],- ["Spec", "Writes one row per element per property: when it starts, how long it runs, from where to where, with which easing. A row with a question mark means the frames haven’t been read yet."],- ["Build", "Implements it in your stack, with what the project already uses: CSS, Framer Motion, GSAP, three.js."],- ["Verify", "Records the clone with the exact command used for the reference, then compares timing, pixels and the easing curve, and builds side-by-side sheets."],- ["Repeat", "Fixes the smallest thing the evidence points at and records again. Two to five rounds is normal. A row that still fails after five is reported with its numbers and the reason, not hidden."],- ]}- />- <p>- The capture is the part that makes this work. The reference and the clone are recorded by the same script with the same viewport, crop, trigger, duration and frame rate. When the two differ, the difference is in the clone, not in how it was filmed.- </p>- </Section>-- <Section id="levels" n={2} title="Three levels of done">- <p>The words in your prompt pick how close the copy has to be, and that decides what gets checked.</p>- <Rows- rows={[- ["Motion-faithful", <>The default. Trigger, order, stagger, the timing of every step to within 80 ms, the easing family, and how far things move relative to their size. Copy, colours and fonts can be yours.</>],- ["Pixel-faithful", <>Say <em>match it exactly</em> or <em>pixel-perfect</em>. Everything above, plus fonts, sizes, colours, spacing and assets, with at most 2 % of pixels differing on average.</>],- ["Mixed", <>Say <em>clone this and add that</em>. The cloned parts are held to one of the levels above; your additions live in their own components and are checked only for not breaking the motion.</>],- ]}- />- <p>You can also narrow the target: one section, one widget, or a time range of a video, like <em>0:12 to 0:15</em>. It clones exactly that and leaves the rest of the page alone.</p>- </Section>+ <p>+ Three cards from the stripe.com homepage, rebuilt by the skill, one agent per card. You can try each one live in the <a href="#examples">examples</a> at the end of the page.+ <Sidenote n={1}>Each took its agent 28 to 40 minutes, from the first recording to the final report.</Sidenote>+ </p>- <Section id="numbers" n={3} title="Where the numbers come from">- <p>Most of an animation’s spec is sitting in the page, if you know where to look. The skill reads its sources in this order and stops at the first one that answers:</p>- <Rows- rows={[- ["Declared", "CSS animations, transitions and Web Animations that ran under the target, with their durations, delays and per-keyframe easings. When these exist they are the spec."],- ["Tracked", "The position, size, opacity and transform of chosen elements on every animation frame, fitted against a table of named easings. It reports the best fit, the overshoot and whether the motion looks like a spring."],- ["Read", "For video, gifs and canvas: the first frame where something changes and the last, and where the midpoint lands. Past halfway at a third of the time is an ease-out; a quarter or less is an ease-in."],- ]}- />+ <Section id="how" n={1} title="How it works">+ <p>Every clone runs the same loop, and it doesn’t stop until the comparison passes.</p>+ <ol className="steps">+ {steps.map(([title, body], i) => (+ <li key={title}>+ <span className="steps__n">{String(i + 1).padStart(2, "0")}</span>+ <p><b>{title}</b> {body}</p>+ </li>+ ))}+ </ol><p>- For WebGL graphics, like the three canvases in these cards, the pixels are the only output, so the skill reads the scripts the page loaded to recover the shaders, constants and timings, and rebuilds the scene from those.+ For canvas and WebGL, pixels aren’t enough. The skill also records what the page sends to the GPU: shaders, uniforms and the three.js scene, on a clock it steps frame by frame, so two recordings come out identical.+ <Sidenote n={2}>Random particles included: it seeds the page’s random numbers too.</Sidenote></p>- </Section>-- <Section id="evidence" n={4} title="Reading the evidence">- <p>Each round ends with numbers and a sheet. The numbers say <em>that</em> something is off; the sheet says <em>what</em>.</p>- <figure className="figure">+ <figure className="figure figure--sheet">{/* eslint-disable-next-line @next/next/no-img-element */}- <img className="sheet" src="/media/sheet-issuing-hover.webp" alt="A comparison sheet: four moments of the card issuing hover, stripe.com on the left, the clone in the middle, and on the right the pixels that differ, in red. Only thin outlines of the card's edge and the title differ." width={816} height={975} loading="lazy" />+ <img className="sheet" src={media("stripe-issuing", "sheet.webp")} alt="A comparison sheet: the card issuing hover on stripe.com, in the copy, and in red the pixels that differ. Only thin outlines of the card's edge and the title differ." width={816} height={975} loading="lazy" /><figcaption className="figure__caption">- <span>Hovering the card issuing card: stripe.com, the clone, and in red the pixels that differ. 0.91 % differ on average.</span>+ <span>Every round ends with a sheet like this: the original, the copy, and in red the pixels that differ.</span></figcaption></figure>- <p>For the hover shared by all three cards, the same measurement on both pages:</p>- <Rows- head={["", "stripe.com → clone", "difference"]}- rows={[- ["Title shift", "ease-out-expo, starts 38 → 34 ms, settles in 643 → 633 ms", "0.13 px"],- ["Button shift", "same curve, (3.55, −6) px", "0.08 px"],- ["Icon arrows", "ease-out-expo, settles in 397 → 383 ms", "0.05 px"],- ["Border glow", "follows the pointer to the card’s edge", "6.6 of 290 px"],- ["Card growth", "6 px taller, 3.55 px wider, clipped open", "0 px"],- ]}- /></Section>- <Section id="cards" n={5} title="Three cards, up close">- <p>- Each card was cloned by its own agent running the skill, in parallel, in 28 to 40 minutes.- <Sidenote n={2}>Measured as the agent’s working time, from the first recording to the final report.</Sidenote>{" "}- On the left of each card below is the clone, live. On the right, both recordings of the same pointer path: in, hold, across, out.- </p>-- <h3>Agentic commerce</h3>- <div className="pair figure figure--wide">- <div>- <div className="pair__label">Live clone</div>- <LiveExample card="agentic-commerce" title="Agentic commerce card, live clone" />- </div>- <div>- <div className="pair__label">Recorded: stripe.com | clone</div>- <CompareVideo reference="/media/hover-agentic-commerce-ref.mp4" clone="/media/hover-agentic-commerce-clone.mp4" width={420} height={696} label="Agentic commerce hover" />- </div>+ <Section id="use" n={2} title="Using it">+ <p>In Claude Code, say what to clone, where it is and where it should go:</p>+ <div className="prompts">+ {prompts.map(([label, text]) => (+ <div key={label}>+ <span className="prompt__label">{label}</span>+ <span className="prompt__text"><span className="slash">/motion-clone</span> {text}</span>+ </div>+ ))}</div><p>- A chat plays once when the card comes into view. The question rises in at 0.25 s, the answer’s seventeen words fade in 60 ms apart, and two products rise 20 px into place at 1.4 s. Behind it, ten thousand points pull into a ring with a clockwise sweep and relax again, and the ones near your pointer are pulled back onto it.+ It runs on <a href="https://bun.sh">Bun</a>, on macOS or Linux. The first run downloads Chromium and ffmpeg, about 250 MB. No API keys. When you install it, the <a href="https://skills.sh">skills CLI</a> asks which agents to set up; add <code>-a claude-code</code> to skip that.+ <Sidenote n={3}>Other agents that read SKILL.md can install it too, but it has only been tested with Claude Code.</Sidenote></p>- <Rows- rows={[- ["Chat timing", "every step within Stripe’s own spread between two recordings", "≤ 43 ms"],- ["Chat layout", "52 of 52 elements in the same place, same styles", "≤ 0.05 px"],- ["Particle ring", "tightens past half at 1.44 s (Stripe: 1.44–1.48 s), relaxed by 4.24 s", "pass"],- ["Whole card", "pixel difference, entrance to pointer, vs stripe.com against itself", "0.9–1.2 %"],- ]}- />+ </Section>- <h3>Card issuing</h3>- <div className="pair figure figure--wide">- <div>- <div className="pair__label">Live clone</div>- <LiveExample card="issuing" title="Card issuing card, live clone" />- </div>- <div>- <div className="pair__label">Recorded: stripe.com | clone</div>- <CompareVideo reference="/media/hover-issuing-ref.mp4" clone="/media/hover-issuing-clone.mp4" width={420} height={696} label="Card issuing hover" />- </div>- </div>- <p>- A three.js scene: a folded ribbon of colour drifts behind a Visa card that is drawn separately and combined in a final pass. On hover the card tilts towards the pointer, up to 27°, easing in with no overshoot, and lies flat again when you leave.- </p>+ <Section id="close" n={3} title="How close">+ <p>Your words decide how close the copy has to be.</p><Rowsrows={[- ["At rest", "pixels that differ (stripe.com vs itself: 0.10 %)", "0.03–0.05 %"],- ["Tilt", "settled pose at three pointer positions", "≤ 0.4 px"],- ["Hover in and out", "tilt curve and pixels, within the noise of two Stripe recordings", "pass"],- ["Entrance", "fades in earlier than on Stripe’s heavier page", "−210 ms"],+ ["Moves the same", <>The default. Same trigger, order and timing, within 80 ms, the same kind of easing and distance. Text, colours and fonts can be yours.</>],+ ["Looks the same", <>Say <em>match it exactly</em>. Fonts, sizes, colours and spacing too, with at most 2 % of pixels off.</>],+ ["Yours on top", <>Say <em>clone this and add…</em> The cloned parts match; your additions stay separate.</>],]}/>-- <h3>Stablecoins and crypto</h3>- <div className="pair figure figure--wide">- <div>- <div className="pair__label">Live clone</div>- <LiveExample card="crypto" title="Stablecoins and crypto card, live clone" />- </div>- <div>- <div className="pair__label">Recorded: stripe.com | clone</div>- <CompareVideo reference="/media/hover-crypto-ref.mp4" clone="/media/hover-crypto-clone.mp4" width={420} height={696} label="Crypto hover" />- </div>- </div>- <p>- A dotted globe built from a land map turns slowly, faster over the Pacific. Arcs fly between 69 cities with a label riding each one, a random amount in USDC, USDB or cash. On hover the dots brighten in a corona around the globe’s edge.- <Sidenote n={3}>- The arcs, amounts and dot sizes are random on every load, on stripe.com too, so they are compared by their timing, not their pixels.- </Sidenote>- </p>- <Rows- rows={[- ["Globe pose", "start angle, tilt, centre and camera", "exact"],- ["Rotation", "per rendered frame", "0.0016°"],- ["Arcs and labels", "spawn, line growth, label intro and travel, within Stripe’s spread", "pass"],- ["Hover glow", "the same value on every rendered frame", "identical"],- ]}- />- </Section>-- <Section id="prompt" n={6} title="Writing a prompt">- <p>Name the thing, where it is, and where it should go. The skill infers the rest from your request and your repo, and asks only when two readings would lead to different work.</p>- <div className="prompts">- {[- ["From a live site", <>the hero entrance on <b>https://example.com</b>, into <b>components/Hero.tsx</b></>],- ["From a video", <>this loader, <b>0:03 to 0:05</b> of ~/Downloads/loader.mov</>],- ["Pixel-exact", <>the card hover in this gif, <b>match it exactly</b></>],- ["With your own parts", <>the logo marquee from https://example.com, <b>with our logos and pause on hover</b></>],- ].map(([label, text]) => (- <div key={label as string}>- <div className="prompt__label">{label}</div>- <div className="prompt__text"><span className="slash">/motion-clone</span>{text}</div>- </div>- ))}- </div></Section>- <Section id="install" n={7} title="Install">- <CopyCommand command={INSTALL} />- <p>- The <a href="https://skills.sh">skills CLI</a> asks which agents to set up; add <code>-a claude-code</code> to skip the question. Then, in Claude Code, type <code>/motion-clone</code> followed by what you want cloned.- </p>- <p>- The scripts run on <a href="https://bun.sh">Bun</a>. The first run downloads Playwright’s Chromium and a static ffmpeg into the skill’s folder, about 250 MB, and nothing after that. No API keys.- <Sidenote n={4}>The skills CLI can install it for other agents that read SKILL.md, but it has only been tested with Claude Code.</Sidenote>- </p>- </Section>-- <Section id="limits" n={8} title="Limits">+ <Section id="limits" n={4} title="Limits"><ul className="list">- <li>WebGL and canvas are compared as pixels. Random content, like particles, never matches exactly, so it is judged against two recordings of the reference instead.</li>- <li>Headless browsers draw WebGL in software. Frame pacing in the recordings differs from a real screen, mostly on heavy pages.</li><li>Pages behind a login, YouTube and Loom can’t be recorded directly. Hand it a screen recording.</li>- <li>Physics springs are fitted from their overshoot and settle time, not read from the source.</li>- <li>It clones what you point it at. Fonts, images and code from another site still belong to their owners; make sure you may use what you copy.</li>+ <li>Physics springs are fitted from how they overshoot and settle, not read from the source.</li>+ <li>Web workers are traced, but their clocks run in real time. A canvas inside an iframe needs the iframe’s own URL.</li>+ <li>It copies what you point it at. Fonts, images and code still belong to their owners.</li></ul></Section>- <Section id="questions" n={9} title="Questions">+ <Section id="questions" n={5} title="Questions"><div className="faq">- <details>- <summary>Does it copy the other site’s code?</summary>- <p>It reads what the browser receives: CSS, keyframes and, for canvas graphics, the scripts that draw them. It writes its own implementation in your stack. The licences of whatever you copy still apply.</p>- </details>- <details>- <summary>Which frameworks does it write?</summary>- <p>Whatever your project already uses. It reads package.json and your existing components first, and won’t add GSAP to a project that animates with CSS.</p>- </details>- <details>- <summary>Can it clone scroll-driven animations?</summary>- <p>Yes. Scroll-linked motion is compared by scroll position instead of time, with the same stepped scroll on both pages.</p>- </details>- <details>- <summary>What if it can’t get a row to pass?</summary>- <p>After five rounds it stops and reports that row with its last numbers and the reason, such as a missing font or a physics spring it approximated. It never loosens a threshold quietly.</p>- </details>+ {faq.map(([q, a]) => (+ <details key={q}>+ <summary>{q}</summary>+ <p>{a}</p>+ </details>+ ))}</div></Section>+ <Section id="examples" n={6} title="Examples">+ <p>+ Hover a clerk.com card to play it; the copies use the free Geist font, so only the lettering differs. For stripe.com and workos.com, the original plays on the left and the copy on the+ right.+ </p>+ <nav className="strip" aria-label="Examples">+ {examples.map((e) => (+ <a key={e.slug} href={`#${e.slug}`} title={e.title}>+ {/* eslint-disable-next-line @next/next/no-img-element */}+ <img src={media(e.slug, "poster.webp")} alt={e.title} />+ </a>+ ))}+ </nav>+ {examples.map((e) => (+ <div key={e.slug} id={e.slug} className="example">+ <div className="example__head">+ <h3>+ {e.title} <span>from <a href={e.source.url}>{e.source.name}</a></span>+ </h3>+ <Details e={e} />+ </div>+ {e.show.kind === "video" ? (+ <figure className="figure">+ <CompareVideo src={media(e.slug, "compare.mp4")} width={e.show.width} height={e.show.height} label={`${e.title}: ${e.source.name} on the left, the copy on the right`} />+ <figcaption className="figure__caption figure__caption--pair">+ <span>{e.source.name}</span>+ <span>the copy · <a href={e.live} target="_blank" rel="noreferrer">try it live ↗</a></span>+ </figcaption>+ </figure>+ ) : (+ <figure className="figure">+ <LiveCard src={`${e.live}&embed`} width={e.show.width} height={e.show.height} label={`${e.title}, the copy, running live`} />+ <figcaption className="figure__caption">+ <span>+ the copy, hover it ·{" "}+ <a href={e.live} target="_blank" rel="noreferrer">+ open on its own ↗+ </a>+ </span>+ <a href={e.source.url} target="_blank" rel="noreferrer">+ the original on {e.source.name} ↗+ </a>+ </figcaption>+ </figure>+ )}+ </div>+ ))}+ </Section>+<footer className="footer"><span><a href={REPO}>GitHub</a> · MIT licence · built with motion-clone</span>- <span>The examples recreate three cards from stripe.com as a study of the technique. Not affiliated with or endorsed by Stripe. Stripe and Visa are trademarks of their respective owners.</span>+ <span>The examples recreate parts of stripe.com, workos.com and clerk.com as a study of the technique. Not affiliated with or endorsed by Stripe, WorkOS or Clerk. All trademarks belong to their owners.</span></footer></main></div>diff --git a/site/src/components/CompareVideo.tsx b/site/src/components/CompareVideo.tsxindex f544c8b..4728feb 100644--- a/site/src/components/CompareVideo.tsx+++ b/site/src/components/CompareVideo.tsx@@ -1,56 +1,24 @@"use client";-import { useEffect, useRef, useState } from "react";+import { useEffect, useRef } from "react";-// Two recordings made with the same capture command, stacked: the reference on the left of the-// line, the clone on the right. Drag (or use the arrow keys) to move the line. Both videos play-// only while on screen and are kept on the same frame.+// The original and the clone, recorded the same way and put side by side (or stacked) in one video+// file, so both halves always show the same moment. Plays only while on screen.-export function CompareVideo({ reference, clone, width, height, label }: { reference: string; clone: string; width: number; height: number; label: string }) {- const box = useRef<HTMLDivElement>(null);- const top = useRef<HTMLVideoElement>(null);- const bottom = useRef<HTMLVideoElement>(null);- const [pos, setPos] = useState(50);+export function CompareVideo({ src, width, height, label }: { src: string; width: number; height: number; label: string }) {+ const video = useRef<HTMLVideoElement>(null);useEffect(() => {- const el = box.current;- const a = top.current;- const b = bottom.current;- if (!el || !a || !b) return;- const reduce = matchMedia("(prefers-reduced-motion: reduce)").matches;- let syncId = 0;- const play = () => {- if (reduce) return;- b.currentTime = a.currentTime;- void a.play().catch(() => {});- void b.play().catch(() => {});- syncId = window.setInterval(() => {- if (Math.abs(a.currentTime - b.currentTime) > 0.04) b.currentTime = a.currentTime;- }, 400);- };- const pause = () => {- a.pause();- b.pause();- clearInterval(syncId);- };- const io = new IntersectionObserver(([e]) => (e.isIntersecting ? play() : pause()), { threshold: 0.3 });- io.observe(el);- return () => {- io.disconnect();- pause();- };+ const v = video.current;+ if (!v) return;+ if (matchMedia("(prefers-reduced-motion: reduce)").matches) {+ v.controls = true;+ return;+ }+ const io = new IntersectionObserver(([e]) => (e.isIntersecting ? void v.play().catch(() => {}) : v.pause()), { threshold: 0.3 });+ io.observe(v);+ return () => io.disconnect();}, []);- return (- <div ref={box} className="compare" style={{ aspectRatio: `${width} / ${height}` }}>- <video ref={bottom} src={clone} muted playsInline loop preload="metadata" width={width} height={height} aria-hidden="true" />- <div className="compare__top" style={{ clipPath: `inset(0 ${100 - pos}% 0 0)` }}>- <video ref={top} src={reference} muted playsInline loop preload="metadata" width={width} height={height} aria-hidden="true" />- </div>- <div className="compare__line" style={{ left: `${pos}%` }} />- <span className="compare__label compare__label--left">stripe.com</span>- <span className="compare__label compare__label--right">clone</span>- <input type="range" min={0} max={100} step={0.5} value={pos} onChange={(e) => setPos(Number(e.target.value))} aria-label={`${label}: drag to compare stripe.com (left) with the clone (right)`} />- </div>- );+ return <video ref={video} className="compare" src={src} muted playsInline loop preload="metadata" width={width} height={height} aria-label={label} />;}diff --git a/site/src/components/LiveCard.tsx b/site/src/components/LiveCard.tsxnew file mode 100644index 0000000..7f7949d--- /dev/null+++ b/site/src/components/LiveCard.tsx@@ -0,0 +1,25 @@+"use client";++import { useEffect, useRef, useState } from "react";++// The clone itself, running in the page: hover it to play. Shown at its real size, scaled down only+// when the column is narrower.++export function LiveCard({ src, width, height, label }: { src: string; width: number; height: number; label: string }) {+ const box = useRef<HTMLDivElement>(null);+ const [scale, setScale] = useState(1);++ useEffect(() => {+ const el = box.current;+ if (!el) return;+ const ro = new ResizeObserver(([e]) => setScale(Math.min(1, e.contentRect.width / width)));+ ro.observe(el);+ return () => ro.disconnect();+ }, [width]);++ return (+ <div ref={box} className="livecard" style={{ height: height * scale }}>+ <iframe src={src} title={label} width={width} height={height} loading="lazy" style={{ transform: `scale(${scale})` }} />+ </div>+ );+}diff --git a/site/src/components/LiveExample.tsx b/site/src/components/LiveExample.tsxdeleted file mode 100644index 3a047b8..0000000--- a/site/src/components/LiveExample.tsx+++ /dev/null@@ -1,69 +0,0 @@-"use client";--import { useEffect, useRef, useState } from "react";--// The clone, running live in an iframe. The cards switch to their desktop layout and hover-// behaviour from a 940px viewport, so the iframe is always laid out at least that wide and-// scaled (row) or cropped (single card) to fit. The iframe loads when it scrolls into view,-// so the entrance plays when the reader gets there.--const ROW = { width: 1300, height: 712 };-const CARD = { width: 960, height: 712, crop: 440 };--type Card = "agentic-commerce" | "issuing" | "crypto";--export function LiveExample({ card, title }: { card?: Card; title: string }) {- const box = useRef<HTMLDivElement>(null);- const [scale, setScale] = useState(0);- const [visible, setVisible] = useState(false);- const [run, setRun] = useState(0);-- const frameWidth = card ? CARD.crop : ROW.width;- const src = `/examples/stripe-bento/${card ? `?card=${card}` : ""}`;-- useEffect(() => {- const el = box.current;- if (!el) return;- const ro = new ResizeObserver(([e]) => setScale(Math.min(1, e.contentRect.width / frameWidth)));- ro.observe(el);- const io = new IntersectionObserver(- ([e]) => {- if (e.isIntersecting) {- setVisible(true);- io.disconnect();- }- },- { threshold: 0.35 },- );- io.observe(el);- return () => {- ro.disconnect();- io.disconnect();- };- }, [frameWidth]);-- const height = (card ? CARD.height : ROW.height) * scale;- const offsetX = card ? ((CARD.width - CARD.crop) / 2) * scale : 0;-- return (- <div className="figure-live">- <div ref={box} className="live" style={{ height: height || undefined, aspectRatio: height ? undefined : `${frameWidth} / ${card ? CARD.height : ROW.height}`, maxWidth: card ? CARD.crop : undefined }}>- {visible && scale > 0 && (- <iframe- key={run}- src={src}- title={title}- width={card ? CARD.width : ROW.width}- height={card ? CARD.height : ROW.height}- style={{ transform: `translateX(${-offsetX}px) scale(${scale})` }}- />- )}- <span className="live__badge"><b />live clone</span>- </div>- <div className="figure__caption" style={{ maxWidth: card ? CARD.crop : undefined }}>- <button type="button" onClick={() => setRun((n) => n + 1)}>Replay entrance</button>- <a href={src} target="_blank" rel="noreferrer">Open full size ↗</a>- </div>- </div>- );-}diff --git a/site/src/examples.ts b/site/src/examples.tsnew file mode 100644index 0000000..05cba1f--- /dev/null+++ b/site/src/examples.ts@@ -0,0 +1,236 @@+// The examples on the home page, in order. To add one:+// 1. put the clone, as a standalone page, in public/examples/<name>/+// 2. put its media in public/media/<slug>/: poster.webp (the clone at rest, for the thumbnail) and,+// for a recorded example, compare.mp4 (the original and the clone recorded the same way, side by+// side in one file). scripts/record-media.ts makes both.+// 3. add an entry here.++export type Example = {+ slug: string;+ title: string;+ source: { name: string; url: string };+ /** What it does, in a sentence or two. */+ about: string;+ /** Shown as a margin note next to `about`. */+ note?: string;+ /** What the page shows: "video", compare.mp4 at this size in CSS px (the file is 2x); or "live", the+ * clone itself in an iframe of this size (`live` with &embed). */+ show: { kind: "video" | "live"; width: number; height: number };+ /** The clone running on its own. */+ live: string;+ /** What was measured, how, and the number. */+ results: [string, string, string][];+};++const CLERK = { name: "clerk.com", url: "https://clerk.com/" };++export const examples: Example[] = [+ {+ slug: "stripe-agentic-commerce",+ title: "Agentic commerce",+ source: { name: "stripe.com", url: "https://stripe.com/" },+ about:+ "A chat writes itself in when the card comes into view, word by word, then two products rise into place. Behind it, ten thousand particles pull into a ring and reach for your pointer.",+ show: { kind: "video", width: 560, height: 454 },+ live: "/examples/stripe-bento/?card=agentic-commerce",+ results: [+ ["Chat timing", "every step, within stripe.com’s own spread", "≤ 43 ms"],+ ["Chat layout", "52 of 52 elements in place", "≤ 0.05 px"],+ ["Particle ring", "tightens at 1.44 s (stripe.com: 1.44–1.48 s)", "pass"],+ ],+ },+ {+ slug: "stripe-issuing",+ title: "Card issuing",+ source: { name: "stripe.com", url: "https://stripe.com/" },+ about:+ "A three.js ribbon of colour drifts behind a Visa card. Hover it and the card tilts toward your pointer, up to 27°, then lies flat again when you leave.",+ show: { kind: "video", width: 560, height: 454 },+ live: "/examples/stripe-bento/?card=issuing",+ results: [+ ["At rest", "pixels that differ (stripe.com vs itself: 0.10 %)", "0.03–0.05 %"],+ ["Tilt", "settled pose at three pointer positions", "≤ 0.4 px"],+ ["Hover in and out", "within the noise of two stripe.com recordings", "pass"],+ ],+ },+ {+ slug: "stripe-crypto",+ title: "Stablecoins and crypto",+ source: { name: "stripe.com", url: "https://stripe.com/" },+ about:+ "A dotted globe turns slowly while payments fly between 69 cities, each with a random amount riding the arc. Hover it and the dots brighten around the edge.",+ note: "The arcs and amounts are random on every load, on stripe.com too, so they are compared by timing, not pixels.",+ show: { kind: "video", width: 560, height: 454 },+ live: "/examples/stripe-bento/?card=crypto",+ results: [+ ["Globe pose", "start angle, tilt, centre and camera", "exact"],+ ["Rotation", "per rendered frame", "0.0016°"],+ ["Arcs and labels", "within stripe.com’s own spread", "pass"],+ ],+ },+ {+ slug: "workos-atlas",+ title: "Connected to all your tools",+ source: { name: "workos.com", url: "https://workos.com/atlas" },+ about:+ "Atlas, the WorkOS robot, sits at a laptop under a dome of app icons. As it scrolls into view the icons spring out of its antenna and the laptop opens. Then every couple of seconds a line reaches out to another app, which swells inside a ring of its brand colour.",+ note: "Which app it reaches next is random, on workos.com too. For the recording both pages got the same random numbers, so they pick the same apps.",+ show: { kind: "video", width: 560, height: 274 },+ live: "/examples/workos-atlas/",+ results: [+ ["Frame match", "pixels that differ, over 10 s with the same picks", "0.05 %"],+ ["Entrance", "icons, lid and glare after scroll-in", "≤ 33 ms"],+ ["Links", "draw-in, ring and fade of each connection", "≤ 10 ms"],+ ],+ },+ {+ slug: "clerk-mfa",+ title: "Multifactor authentication",+ source: CLERK,+ about:+ "A cyan cursor steps across six code tiles, typing a random digit into each. When the sixth is filled the tiles flash a cyan ring and fade, and a new code starts.",+ note: "The digits are random, on clerk.com too. The copy draws them with the same formula, so the same random numbers give the same code.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=mfa",+ results: [+ ["Loop timing", "start of each code, over 3 codes", "≤ 20 ms"],+ ["Frame match", "pixels that differ over 8 s of hovering", "0.50 %"],+ ["Same digits", "same random numbers, same code", "pass"],+ ],+ },+ {+ slug: "clerk-session-management",+ title: "Session management",+ source: CLERK,+ about:+ "The laptop lid swings open, the Clerk logo lights up on its screen and the device details slide into focus, while a light streak runs along the circuit every two seconds. Move away and everything folds back.",+ note: "The light streak is clerk.com’s own canvas code, ported line for line. It draws the same pixels, byte for byte.",+ show: { kind: "live", width: 443, height: 576 },+ live: "/examples/clerk-bento/?card=session-management",+ results: [+ ["Timing", "start of every animation, hover in and out", "0 ms"],+ ["Frame match", "frames that differ outside the text, over 6.8 s", "1 of 171"],+ ["Light streak", "canvas pixels against clerk.com’s", "identical"],+ ],+ },+ {+ slug: "clerk-otp",+ title: "Email and SMS passcodes",+ source: CLERK,+ about:+ "The phone lifts as its lock and SMS badges turn cyan, then a security alert with your passcode springs down from the top of the screen. It stays while you hover and slides back when you leave.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=otp",+ results: [+ ["Timing", "hover in and out", "≤ 3.4 ms"],+ ["Spring", "overshoot of the alert (clerk.com: 1.5 %)", "1.5 %"],+ ["Frame match", "pixels that differ in the visual", "0.59 %"],+ ],+ },+ {+ slug: "clerk-fraud",+ title: "Fraud and abuse prevention",+ source: CLERK,+ about:+ "The spinner in the “Fraudulent sign-ups detected” pill starts turning, four blocked sign-ups appear one after another with a red ✕, and a red-orange light streak runs down the timeline every 3 s. Move away and it all rewinds.",+ note: "It even copies a quirk of clerk.com’s animation library: leave and come back in the very frame a row finishes, and that row’s email stays hidden.",+ show: { kind: "live", width: 443, height: 576 },+ live: "/examples/clerk-bento/?card=fraud",+ results: [+ ["Timing", "start and end of every move", "≤ 40 ms"],+ ["Frame match", "pixels that differ outside the text", "0.004 %"],+ ["Easing", "all 22 animated values, frame by frame", "pass"],+ ],+ },+ {+ slug: "clerk-magic-links",+ title: "Magic links",+ source: CLERK,+ about:+ "A scan line sweeps the code to reveal a new one while the avatar outline draws itself in cyan. A check mark pops in, then the profile swings away like a wheel and a new user swings in. It repeats every 5.2 s while you hover.",+ note: "The code, the scrambling letters and the next user are random, on clerk.com too. The copy uses the same algorithm, so the same random numbers give the same result.",+ show: { kind: "live", width: 443, height: 576 },+ live: "/examples/clerk-bento/?card=magic-links",+ results: [+ ["Timing", "start and end of every moving part", "0 ms"],+ ["Frame match", "pixels that differ over a full loop", "0.25 %"],+ ["Loop", "new user at 3.6 s, again every 5.2 s", "pass"],+ ],+ },+ {+ slug: "clerk-social-sign-on",+ title: "Social sign-on",+ source: CLERK,+ about:+ "The cloud lights up cyan as light streaks run through the circuit. Each streak that leaves the box slides that side’s sign-in logos one step along. Move away and the light fades; the logos stay where they stopped.",+ note: "The streaks are clerk.com’s own canvas code, and they are what moves the logos, so the two can’t drift apart.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=social-sign-on",+ results: [+ ["Timing", "every animation, hover in, out and back in", "0 ms"],+ ["Frame match", "pixels that differ in the visual", "0.00 %"],+ ["Logo steps", "same frames as clerk.com, also when you leave mid-step", "pass"],+ ],+ },+ {+ slug: "clerk-advanced-security",+ title: "Advanced security",+ source: CLERK,+ about:+ "The fingerprint draws itself in cyan, a glow ring fades in and pulses, and a field of tiny dots ripples out from the button before the side panels slide apart.",+ note: "The dot field is clerk.com’s own WebGL shader, copied unchanged. Its sparkle comes from each dot’s position, so it is the same on every hover.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=advanced-security",+ results: [+ ["Timing", "start and end of every motion, hover in and out", "≤ 40 ms"],+ ["Frame match", "pixels that differ in the visual", "≤ 0.06 %"],+ ["Dot field", "same shader and same dots as clerk.com", "pass"],+ ],+ },+ {+ slug: "clerk-bot-detection",+ title: "Bot detection",+ source: CLERK,+ about:+ "A dark radar starts scanning: the dots fade out and back in a new layout, and a cyan crosshair with a light beam swings onto one of them and locks on. It picks a new dot about every 2.3 s while you hover.",+ note: "The dot it locks onto is random, on clerk.com too. The copy uses the same formula, so the same random numbers pick the same dot.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=bot-detection",+ results: [+ ["Hover in", "every moving part over two scans", "identical"],+ ["Frame match", "pixels that differ in the visual", "0.04 %"],+ ["Hover out", "leaving mid-scan, mid-fade and coming back", "pass"],+ ],+ },+ {+ slug: "clerk-passwords",+ title: "Passwords",+ source: CLERK,+ about:+ "The password field lights up with a cyan border and ten dots type in one after another. Then the keyhole dial turns a quarter to unlock and stays there until you move away.",+ show: { kind: "live", width: 443, height: 308 },+ live: "/examples/clerk-bento/?card=passwords",+ results: [+ ["Timing", "start of each motion, hover in and out", "≤ 19 ms"],+ ["At rest and held", "pixels that differ in the visual", "0 px"],+ ["Frame match", "mean, over every recording", "≤ 0.18 %"],+ ],+ },+ {+ slug: "clerk-api-keys",+ title: "API keys",+ source: CLERK,+ about:+ "A laptop opens to sign in. A progress bar fills, pulses of light run from the laptop through an “Authenticating…” badge to three servers, and their 144 status lights blink at random. Move away and everything powers down.",+ note: "The lights follow clerk.com’s own blink recipe: given the same random numbers, they blink in exactly the same rhythm.",+ show: { kind: "live", width: 845, height: 328 },+ live: "/examples/clerk-bento/?card=api-keys",+ results: [+ ["Frame match", "frames identical outside the text", "167 of 171"],+ ["Motion", "laptop, lid and progress bar against clerk.com", "≤ 0.06 px"],+ ["Random lights", "144 lights for 20 s, same random numbers", "0 differ"],+ ],+ },+];++export const media = (slug: string, file: string) => `/media/${slug}/${file}`;diff --git a/skills/motion-clone/SKILL.md b/skills/motion-clone/SKILL.mdindex 18b66ad..b0e8ab4 100644--- a/skills/motion-clone/SKILL.md+++ b/skills/motion-clone/SKILL.md@@ -1,6 +1,6 @@---name: motion-clone-description: Clone a section, widget, page or animation from any reference (a live website URL, a screen recording, an mp4/mov/webm, a gif, a Lottie file, a prototype export) frame by frame into the user's own codebase, then record the clone and verify it against the reference frame by frame, iterating until timing, easing, sequence and layout match. Use whenever the user wants to clone, copy, replicate, recreate, port or "steal" a hero, section, widget, marquee, carousel, hover effect, page transition, loader, scroll animation or interaction from a site or video, says "make it look/feel/move like this", "same animation as", "match this exactly", or hands over a gif/video and asks to build it, including when they also want to add their own content, colours or extra features on top, or only want part of the reference (one section, one widget, a few seconds). Pixel-level matching of fonts, colours and spacing is done only when they ask for it.+description: Clone a section, widget, page or animation from any reference (a live website URL, a screen recording, an mp4/mov/webm, a gif, a Lottie file, a prototype export) frame by frame into the user's own codebase, then record the clone and verify it against the reference frame by frame, iterating until timing, easing, sequence and layout match. Use whenever the user wants to clone, copy, replicate, recreate, port or "steal" a hero, section, widget, marquee, carousel, hover effect, page transition, loader, scroll animation or interaction from a site or video, says "make it look/feel/move like this", "same animation as", "match this exactly", or hands over a gif/video and asks to build it, including when they also want to add their own content, colours or extra features on top, or only want part of the reference (one section, one widget, a few seconds). Covers canvas, WebGL, WebGPU and three.js / 3D scenes (shaders, particles, globes, glTF models) as well as CSS and JS motion. Pixel-level matching of fonts, colours and spacing is done only when they ask for it.---# motion-clone@@ -49,13 +49,14 @@ Read `references/capture.md` for the recipe for your source type. In short:- **Website**: `capture.ts --url … --out ref --selector <section> --trigger load|scroll|hover|click|none --duration … --track "<moving elements>"`. You get `video.webm`, `frames/`, `inspect.json` (declared animations, keyframes, computed styles, fonts, detected libraries) and `track.json` (per animation frame position, size, opacity, transform of each tracked element). For CSS/WAAPI motion `inspect.json` often contains the exact durations, delays and easings: use them, it beats estimating.- **Video or gif**: `frames.ts --in file --out ref/frames --fps 10..30 --start … --end … --crop …`. Probe first with `--probe`, then view a few frames to find the crop of the widget you are cloning.+- **Canvas, WebGL, WebGPU, 3D** (`inspect.json › canvases` shows one, or the page uses three.js, Pixi, Babylon, Spline…): add `--clock virtual --gl --assets` to the capture and read `gl/summary.md` (`gl.ts summary <out>`). You get the shader sources, every constant uniform, the scene graph, the render passes, the textures and models, and each animated uniform or object property as a channel in `gl-track.json`. The virtual clock makes every frame exact and every capture identical, random particles included. Read `references/webgl.md`.- **Lottie / Rive / prototype export**: the file is the spec; read it, do not re-derive it from pixels.Then build labelled sheets and look at them: `sheet.ts filmstrip --frames ref/frames --out ref/sheets`. Read every sheet with the image viewer. This is the frame-by-frame inspection the user asked for; do not skip it or sample only the first sheet.### 3. Write the motion spec-Fill `spec.md` using the template in `references/analysis.md`. One row per element per property: trigger, start time, duration, delay or stagger, from → to, easing, notes. Get the numbers from, in order of preference: `inspect.json` animations and keyframes → `easing.ts` on `track.json` → reading frames (first frame where it changes, last frame where it changes, overshoot or not). Also note the static facts the motion depends on: element sizes and positions, z-order, overflow clipping, transform origins, and for pixel-faithful work fonts, colours, spacing and assets.+Fill `spec.md` using the template in `references/analysis.md`. One row per element per property: trigger, start time, duration, delay or stagger, from → to, easing, notes. Get the numbers from, in order of preference: `inspect.json` animations and keyframes → `easing.ts` on `track.json`, or on `gl-track.json --channel` for canvas → reading frames (first frame where it changes, last frame where it changes, overshoot or not). Also note the static facts the motion depends on: element sizes and positions, z-order, overflow clipping, transform origins, and for pixel-faithful work fonts, colours, spacing and assets.The spec is the contract between the reference and the clone. Every row becomes a check in step 5. If a row has a "?" you have not finished reading the frames.@@ -75,9 +76,11 @@ bun <skill>/scripts/sheet.ts compare --ref ref/frames --clone clone-N/frames --dbun <skill>/scripts/easing.ts --track clone-N/track.json --selector "<el>" --prop <translateY|opacity|…> --compare-track ref/track.json```+For canvas work, also run `gl.ts compare --ref ref --clone clone-N`, which checks canvas settings, draw structure and every animated channel.+Read `references/verify.md` for how to read the report, the pass criteria for each fidelity level and the fixes that each kind of failure usually needs. Look at the compare sheets yourself, every round; the numbers tell you that something is off, the sheets tell you what.-Loop until every spec row passes. Each round: change the smallest thing the evidence points at, re-capture, re-compare. Expect 2 to 5 rounds. If after 5 rounds a row still fails, stop and report it with its numbers and the reason (missing font, WebGL, a physics spring you approximated), do not quietly lower the threshold or drop the row.+Loop until every spec row passes. Each round: change the smallest thing the evidence points at, re-capture, re-compare. Expect 2 to 5 rounds. If after 5 rounds a row still fails, stop and report it with its numbers and the reason (missing font, a shader or model the user may not copy, a physics spring you approximated), do not quietly lower the threshold or drop the row.### 6. Report@@ -98,3 +101,5 @@ The final message must stand alone:- Scroll-driven motion: it is a function of scroll position, not time. Capture both with the same `--scroll-steps` and `--scroll-ms`, and compare per scroll position (the track's `scrollY`), not per second.- JS libraries (GSAP, Framer Motion springs): `--playback-rate` does not slow them. Use `track.json` and `easing.ts` (it reports overshoot and "spring-like") and tune spring parameters by the overshoot and settle time.- Videos of someone else's screen have a cursor, a browser chrome and compression noise: crop them out and raise `--pixel-threshold` a little (0.15) rather than chasing noise.+- Canvas and WebGL captured on the real clock: frames drop in software GL and random content differs on every load, so the comparison measures the machine. Capture both sides with `--clock virtual` and the same `--seed`.+- Rebuilding a shader from screenshots: the trace already has its source and every constant. Read `gl/shaders/` and the fixed uniforms before writing GLSL.diff --git a/skills/motion-clone/references/analysis.md b/skills/motion-clone/references/analysis.mdindex 637fb7f..6a47735 100644--- a/skills/motion-clone/references/analysis.md+++ b/skills/motion-clone/references/analysis.md@@ -19,6 +19,7 @@ Reference capture: .motion-clone/<name>/ref (command: …)| # | element | property | from → to | start ms | duration ms | easing | stagger / repeat | source || 1 | h1 | opacity | 0 → 1 | 200 | 700 | cubic-bezier(.16,1,.3,1) | – | inspect.json || 2 | h1 | translateY | 40px → 0 | 200 | 700 | same | – | inspect.json |+| 2b | canvas card | three:Card.rotation.x | 0 → 0.26 rad | 30 | 630 | ease-in-out (lag 0.004/ms) | follows pointer | gl-track.json + easing.ts --channel || 3 | p | opacity, translateY | 0→1, 30px→0 | 400 | 700 | same | +200 ms after h1 | track.json + easing.ts || 4 | .cta | opacity, translateY | 0→1, 24px→0 | 600 | 600 | same | +200 ms | frames #15–#30 |@@ -36,8 +37,9 @@ what is new, where it lives, how it is kept out of the compared region or why it1. **`inspect.json › animations`** (websites with CSS/WAAPI motion): `timing.delay`, `timing.duration`, per-keyframe `easing`, `iterations`, `direction`. Transitions show up as `CSSTransition` with `transitionProperty`. Copy them.2. **`track.json` + `easing.ts`** (websites, any technology): per element and property, prints delay, visible duration, overshoot and the best-fitting named easing with its fitted duration. Run it for every moving element and property (`translateY`, `opacity`, `scale`, `x`, `w`…). Overshoot > 2 % means a spring or a back easing; note the overshoot percentage and the settle time, the implementation notes say how to map them.-3. **Frames** (videos, gifs, canvas): for each element find the first frame where it changes and the last frame where it changes; `start = first/fps`, `duration = (last − first + 1)/fps`. Judge the easing from where the midpoint lands: if the element has covered more than half of its distance at a third of the duration it is an ease-out; less than a quarter, an ease-in; symmetric, ease-in-out; constant steps, linear. Overshoot past the final position then return: back/spring. `compare.ts` prints an activity curve per set that shows these shapes as bars even without a track.-4. **Staggers**: the gap between the start frames of siblings. Note whether it is a constant (each +80 ms), grows (ease on the stagger), or is per-character/per-word (text reveals).+3. **`gl-track.json` + `easing.ts --channel`** (canvas, WebGL, 3D, captured with `--gl`): uniforms and scene-graph values (camera, object transforms, material uniforms) per rendered frame. `gl.ts summary` lists the animated ones by kind (`clock`, `transition`, `there-and-back`, `oscillation`, `steps`) with their change windows, and the fixed uniforms are constants to copy as they are. See `references/webgl.md`.+4. **Frames** (videos, gifs, and canvas when there is no trace): for each element find the first frame where it changes and the last frame where it changes; `start = first/fps`, `duration = (last − first + 1)/fps`. Judge the easing from where the midpoint lands: if the element has covered more than half of its distance at a third of the duration it is an ease-out; less than a quarter, an ease-in; symmetric, ease-in-out; constant steps, linear. Overshoot past the final position then return: back/spring. `compare.ts` prints an activity curve per set that shows these shapes as bars even without a track.+5. **Staggers**: the gap between the start frames of siblings. Note whether it is a constant (each +80 ms), grows (ease on the stagger), or is per-character/per-word (text reveals).## Patterns worth recognising@@ -58,6 +60,10 @@ Most landing-page motion is one of these; naming it saves rounds.| spring | overshoots then settles, sometimes twice | stiffness/damping; see implementation notes || loader / skeleton pulse | opacity or gradient position oscillates | period 1–2 s, ease-in-out, infinite alternate || page transition | old view exits, new view enters, often with a shared element | 300–600 ms, exit shorter than enter |+| shader clock | a canvas that never rests; a `clock` channel such as `u_time` | its rate (+1000/s = ms, +1/s = seconds) and the shader that uses it |+| uniform tween | a `transition` channel on a uniform (`u_hover`, `u_progress`) | duration and easing like any tween; the shader maps 0→1 to pixels |+| pointer lag (WebGL) | a value chasing the pointer, slower for longer moves | per-frame or per-ms rate `k`; `x += (target − x)·k` |+| keyframed model (glTF) | an `AnimationMixer` in `gl.ts summary` | clip name, duration, loop, timeScale: play the same clip |## How to read a sheetdiff --git a/skills/motion-clone/references/capture.md b/skills/motion-clone/references/capture.mdindex 30c4870..8657e9e 100644--- a/skills/motion-clone/references/capture.md+++ b/skills/motion-clone/references/capture.md@@ -29,7 +29,8 @@ Triggers:Useful options:- `--pre-js "document.querySelector('.cookie button')?.click()"` dismisses overlays or opens the state you need before the trigger.-- `--playback-rate 0.25` slows CSS animations and transitions 4x (CDP). The frames then have 4x the time resolution (`--fps 100` works). JS-driven motion ignores it.+- `--playback-rate 0.25` slows CSS animations and transitions 4x (CDP). The frames then have 4x the time resolution (`--fps 100` works). JS-driven motion ignores it; use `--clock virtual` for that.+- `--clock virtual` runs the page on a clock the capturer advances frame by frame, so every frame is exact (any `--fps`, for CSS and JS motion alike) and repeated captures are identical. `--seed N` seeds `Math.random`. Use both for canvas, WebGL, particles, and anything random or heavy; see `references/webgl.md`.- `--reduced-motion reduce` shows what the site does for users who turn motion off; clone that path too when the project cares about accessibility.- `--color-scheme dark` when the reference is dark-mode.- `--clip x,y,w,h` when the element grows or moves outside its initial box; measure the box on `final.png`.@@ -43,10 +44,17 @@ What you get and what each is for:| `inspect.json › keyframes` | `@keyframes` rules found in reachable stylesheets (cross-origin sheets are listed as unreadable). || `inspect.json › nodes` | rect and the motion-relevant computed styles of up to 150 nodes under the target: fonts, colours, radii, shadows, overflow, transforms. The static side of the spec. || `inspect.json › libs` | gsap, framer-motion, lottie, webgl, lenis, webflow, scroll-driven CSS… tells you where the motion is defined and which capture limits apply. |+| `inspect.json › canvases` | every canvas with its context type (`webgl2`, `2d`, `webgpu`), drawing-buffer size and CSS box. || `track.json` | one sample per animation frame (≈16 ms) per tracked selector: `x y w h opacity transform`. Feed it to `easing.ts`. || `frames/` + `frames.json` | the pictures; `triggerFrame` is where t=0 of the motion sits. |+| `gl/`, `gl-track.json`, `three/` (`--gl`) | shaders, programs, draw calls, passes, textures, scene graphs and every animated uniform or scene value as a channel; `bun gl.ts summary <out>` reads it. See `references/webgl.md`. |+| `assets/` (`--assets`) | the page's models, scene files, shader files, sampled textures and scripts. |-Limits: WebGL and canvas content is captured as pixels only (no track); iframes are not inspected; sites that block headless browsers need a real browser (see below) or a screen recording.+## Canvas, WebGL and 3D++Add `--clock virtual --gl` (and `--assets` when the scene loads files) to the capture of anything drawn on a canvas, then read `gl/summary.md`. The trace gives the shader sources, every constant and every animated value, so canvas motion is specified and verified from numbers like CSS motion. `references/webgl.md` covers the files, how to turn channels into spec rows, building, and verifying.++Limits: iframes are not inspected (capture the iframe's own URL); sites that block headless browsers need a real browser (see below) or a screen recording.### Through a real browser instead@@ -75,4 +83,4 @@ bun <skill>/scripts/sheet.ts filmstrip --frames .motion-clone/<name>/ref/frames## Capturing the clone-Reuse the reference command verbatim, swapping `--url` and `--out`. If the reference came from a video, capture the clone with `capture.ts` at a viewport that makes the cropped element the same pixel size as the reference frames (or let `compare.ts` rescale, which is slightly lossy). Always keep `--fps`, `--duration`, `--pre-roll`, trigger and scroll parameters identical.+Reuse the reference command verbatim, swapping `--url` and `--out`. If the reference came from a video, capture the clone with `capture.ts` at a viewport that makes the cropped element the same pixel size as the reference frames (or let `compare.ts` rescale, which is slightly lossy). Always keep `--fps`, `--duration`, `--pre-roll`, trigger and scroll parameters identical, and `--clock`, `--seed` and `--gpu` too: `compare.ts` reads both `capture.json` files and warns when they differ.diff --git a/skills/motion-clone/references/implementation.md b/skills/motion-clone/references/implementation.mdindex ea3cd0c..129baf9 100644--- a/skills/motion-clone/references/implementation.md+++ b/skills/motion-clone/references/implementation.md@@ -47,6 +47,8 @@ const child = { hidden: { opacity: 0, y: 32 }, show: { opacity: 1, y: 0, transit**Loops and idle**: `animation-iteration-count: infinite; animation-direction: alternate` for pulses; measure one period from the activity curve.+**Canvas, WebGL, 3D**: rebuild from the trace, not from the pixels (`references/webgl.md › Building`). Use the same engine and version, renderer settings and context attributes, port the user-authored shaders with their fixed uniforms, map the traced blend state to the material, and drive each animated uniform with the timing and easing its channel showed. A per-frame lag `x += (target − x) · k` stays frame-rate independent as `x += (target − x) · (1 − (1 − k) ** (dt / 16.67))`.+## Details that make or break the match- `transform-origin`: scale-ins grow from the anchor (a menu from its button corner, a modal from centre). Read `nodes › transform-origin` in `inspect.json` if it was non-default.diff --git a/skills/motion-clone/references/verify.md b/skills/motion-clone/references/verify.mdindex 2ef4937..830d038 100644--- a/skills/motion-clone/references/verify.md+++ b/skills/motion-clone/references/verify.md@@ -33,6 +33,12 @@ Pixel-faithful adds:Mixed: the cloned region passes one of the above with `--region` limited to it; the additions are shown on a sheet and described.+Canvas, WebGL, 3D (captured with `--clock virtual --gl`, see `references/webgl.md`):++- `gl.ts compare --ref ref --clone clone-N`: every animated channel in the reference has a clone channel of the same kind, start and end within 0.08 s, mean error ≤ 5 % of the reference's range (`--map` when names differ); canvas attributes, renderer settings and draw structure (primitive, vertex count, blend state, cadence) the same, or the difference explained+- the clock rate of every `clock` channel the same (`gl.ts channels`)+- pixels as above. If the clone ports the reference's generator, the seeded random gives the same particles and the sharp mismatch applies. If not, judge with `compare.ts --blur 4` and report the sharp number next to it+## Reading failures → usual fix| Symptom | Usual cause | Fix |@@ -51,8 +57,16 @@ Mixed: the cloned region passes one of the above with `--region` limited to it;## When to stop- Stop when every spec row passes its criteria and the latest sheets look the same state-by-state. Say so with the numbers.-- Stop after 5 rounds without progress on a row, or when the remaining difference is outside your control (font licence, WebGL shader, third-party embed, physics you approximated). Report the row, its last numbers, and the reason. Never relax thresholds silently; if you think the user would accept a looser bar, say which and why.-- If the reference itself is inconsistent between captures (randomised content, A/B variants, network-dependent lazy loading), capture it twice and compare it against itself to learn the noise floor before judging the clone.+- Stop after 5 rounds without progress on a row, or when the remaining difference is outside your control (font licence, a shader or model the user may not copy, third-party embed, physics you approximated). Report the row, its last numbers, and the reason. Never relax thresholds silently; if you think the user would accept a looser bar, say which and why.+- If the reference itself is inconsistent between captures (randomised content, A/B variants, network-dependent lazy loading), capture it with `--clock virtual` (same seed) first: that removes timing and randomness, and two captures come out identical. Whatever still differs (A/B variants, server-side randomness) is the noise floor; measure it by comparing the reference against itself before judging the clone.++| Symptom (canvas) | Usual cause | Fix |+|---|---|---|+| same shapes, colours slightly off everywhere | colour management: `outputColorSpace`, texture colour space, tone mapping, three.js revision | copy the renderer settings from `gl.ts summary`; same revision |+| edges harder or softer | `antialias`, pixel ratio, `premultipliedAlpha` | copy the context attributes and pixel ratio |+| motion matches but looks steppier or smoother | render cadence (reference draws every other frame) or per-frame lag at a different rate | compare draws per frame in `gl.ts compare`; match cadence and `k` |+| particles in different places, same density | different random order or seed | port the generator's call order, or verify with `--blur` |+| channel missing in the clone | value baked into the shader, or a different uniform name | `--map ref=clone`, or expose it as a uniform |## Report blockdiff --git a/skills/motion-clone/references/webgl.md b/skills/motion-clone/references/webgl.mdnew file mode 100644index 0000000..2f35cda--- /dev/null+++ b/skills/motion-clone/references/webgl.md@@ -0,0 +1,100 @@+# Canvas, WebGL and 3D++A canvas only shows pixels, but everything that made them went through a few hundred API calls: shader sources, uniform values, draw calls, textures, a scene graph. `capture.ts --gl` records those calls, and `--clock virtual` makes the recording repeatable frame for frame. Together they turn a WebGL scene into the same kind of evidence a CSS animation gives you: exact constants to copy, curves to fit, and a comparison that can fail.++## Capture++```bash+bun <skill>/scripts/capture.ts --url https://example.com --out .motion-clone/<name>/ref \+ --viewport 1440x900 --selector ".hero" --trigger move --target ".hero canvas" --path "0.5,0.5;0.2,0.3;0.8,0.7" \+ --duration 3000 --clock virtual --gl --assets+bun <skill>/scripts/gl.ts summary .motion-clone/<name>/ref+```++| Flag | What it does | When |+|---|---|---|+| `--clock virtual` | The page runs on a clock the capturer advances: `performance.now`, `Date`, timers, `requestAnimationFrame` (a steady 60 Hz, `--raf-hz`), CSS / WAAPI animations, `<video>`, `Event.timeStamp`. Each frame is screenshotted at exactly t = k/fps however long it took to render, the network and workers look instant, and two captures of the same page are byte-identical. | Always, for canvas and WebGL. It also helps any JS-driven motion. |+| `--seed N` | Seeds `Math.random` in the page and its workers (default 1 with the virtual clock). The same seed gives the same particles, arcs and noise. | Random content. Use the same seed for reference and clone. |+| `--gl` | Traces WebGL 1/2, WebGPU, canvas 2D and the scene graphs of three.js, Pixi, PlayCanvas, Babylon and OGL, including OffscreenCanvas in workers. | Any canvas. |+| `--gl-buffers 16` | Also dumps vertex and index buffers (first upload, up to 16 MB). | Particles and point clouds whose positions you want exactly. |+| `--assets` | Saves models (glb, gltf, hdr, ktx2, drc, usdz, splat…), Spline, Rive, Lottie and Unicorn Studio files, shader files, the textures the GPU sampled (by URL) and every script. | Scenes built from files; finding the code that drives a channel. |+| `--gpu hardware` | Real GPU instead of SwiftShader (macOS: ANGLE/Metal, about 10× faster; Linux: Vulkan, needs drivers, untested here) and WebGPU enabled. | WebGPU pages, heavy scenes. Capture reference and clone with the same mode; `compare.ts` warns otherwise. |++Without `--clock virtual`, a heavy scene in software GL drops frames and its timing drifts. Random content then differs on every load, so you can only judge it against a second recording of the reference.++## What you get++| File | Read it for |+|---|---|+| `gl/summary.md` | Start here. Canvases (size, CSS size, pixel ratio, `antialias` / `alpha` / `premultipliedAlpha`), engine and version, renderer settings, scene tree, every drawn program with its fixed and animated uniforms and attributes, one frame's passes per canvas, textures, and animated channels. |+| `gl/shaders/` | The GLSL of every program as compiled (`p3-<label>.vert/.frag`) and WGSL modules (`m12-….wgsl`). For three.js these include three's injected prefix (`#define`s, built-in uniforms and attributes); the clean `vertexShader` / `fragmentShader` are in `three/scene-N.json`. |+| `gl/gl.json` | Everything in the summary in full: uniform types and final values, attribute layouts (buffer, size, type, stride, divisor), blend / depth / cull state, textures with source URL, framebuffers and the textures they write, three.js renderer settings, `AnimationMixer` clips with keyframes, loader URLs, the canvas 2D files. `constants` holds every uniform and scene value that never changed. |+| `gl-track.json` | One sample per rendered frame with every value that changed: uniforms (`p3:ShaderMaterial.u_progress`, vectors as `.x .y .z .w`, matrices as `[i]`), scene graph values (`three:s0/Card#12.rotation.x`, `three:s0/mat:ShaderMaterial#8.u_hover`, `pixi:…`, `babylon:…`, `playcanvas:…`, `ogl:…`) and WebGPU uniform buffer floats (`gpu:gb3@0[4]`). `channels` gives each one's kind, range and change window. |+| `gl/draws.json` | Every draw call of every frame: program, primitive, count, instances, target framebuffer, bound textures, state. Use it to see render cadence (every frame or every other frame) and pass order. |+| `three/scene-N.json` | The whole three.js scene in three's JSON format, with geometry, materials (ShaderMaterial source and uniforms) and embedded images. `new THREE.ObjectLoader().parse(json)` loads it back. |+| `gl/buffers/`, `gl/textures/` | Buffer dumps (`b7.Float32.bin`) and canvas-generated textures as PNG. |+| `gl/canvas2d-c1.txt` | Canvas 2D: the full call list of every 15th frame (`arc(172.3, 132.5, 8, 0, 6.283)`, `fillStyle=(hsl(30 80% 60%))`), with call counts per frame in `draws.json`. |+| `assets/` + `assets.json` | The files above, named by URL hash. |++## Reading the trace into the spec++Spec rows come from channels the same way DOM rows come from `track.json`:++| Channel kind | Means | Spec row |+|---|---|---|+| `clock` | Moves at a constant rate the whole time, e.g. `u_time` +1000/s or a rotation +0.3 rad/s | "drive `u_time` with elapsed ms" plus the rate; nothing to ease |+| `transition` | Goes from one rest value to another | from → to, start, duration, easing: `easing.ts --track gl-track.json --channel <key>` |+| `there-and-back` | Rises and falls once, as on hover in and out or a pointer pass | split at the turn and fit each half with `--from-ms` / `--to-ms` |+| `oscillation` | Repeats, with `periodMs` | period, amplitude, waveform (read the shader or script) |+| `steps` | A few jumps | the values and when they happen (state machines, timelines) |++- **Fixed uniforms are constants to copy, not guess**: `u_twistFrequencyX=0.059`, `u_glowAmount=3.86`, and `u_resolution` (which tells you the drawing-buffer size the shader expects).+- **Find the code that drives a channel**: `grep -l u_scatterPower assets/scripts/*` and read around it. Bundled code keeps uniform names and constants even when everything else is minified.+- **Pointer-follow motion** in WebGL is usually a lag, `x += (target − x) · k` per frame or `1 − exp(−rate·dt)` per ms. It looks like an ease-out whose length depends on how far the pointer moved. Fit it with `easing.ts` over a single pointer leg. If `k` is per frame, the motion depends on frame rate, which `--raf-hz` controls.+- **Render cadence**: a program at 0.5 draws per frame renders every other frame. Copy it, because it changes how lagged and stepped motion looks.+- **Passes**: `framebuffer f4 → texture t5` followed by a screen pass sampling `t5` is a post-processing chain. Rebuild it as render targets, or as an `EffectComposer` / pass chain in the stack you use.+- **Glb / gltf scenes with an `AnimationMixer`**: the clip is the spec, as with Lottie. Load the same file from `assets/models/` and play the clip names, `timeScale`, loop mode and weights shown in the summary.+- **Spline, Rive, Unicorn Studio and Lottie on canvas**: the scene file is the spec. Embed the runtime when the licence allows. Otherwise rebuild from the file.++## Building++- **Same engine and version** when the user's stack allows (`three.js r178` in the summary). three.js changed colour management in r152 (`outputColorSpace`, sRGB textures) and lighting units in r155, so a different revision changes colours even with identical shaders. Copy `outputColorSpace`, `toneMapping`, `toneMappingExposure`, clear colour and alpha, and `autoClear` from the summary.+- **Canvas setup**: copy the context attributes (`antialias`, `alpha`, `premultipliedAlpha`) and the pixel ratio. A ratio of 1 on a 2x screen means the site caps it (`setPixelRatio(Math.min(devicePixelRatio, …))`).+- **Shaders**: port the user-authored part. For three.js that is `vertexShader` / `fragmentShader` in `three/scene-N.json`. For raw WebGL, regl or OGL it is the source in `gl/shaders/` as it is. Keep uniform names unless the project has a convention, since `gl.ts compare` matches channels by name (`--map` otherwise).+- **Blend state → three.js material**:++ | traced state | three.js |+ |---|---|+ | `blend SRC_ALPHA,ONE_MINUS_SRC_ALPHA,ONE,ONE_MINUS_SRC_ALPHA` | `NormalBlending` (default, `transparent: true`) |+ | `blend ONE,ONE_MINUS_SRC_ALPHA,ONE,ONE_MINUS_SRC_ALPHA` | `NormalBlending` with `premultipliedAlpha: true` |+ | `blend SRC_ALPHA,ONE,ONE,ONE` / `blend ONE,ONE` | `AdditiveBlending` (straight / premultiplied) |+ | `blend DST_COLOR,ONE_MINUS_SRC_ALPHA,ZERO,ONE` | `MultiplyBlending` with `premultipliedAlpha: true` |+ | anything else | `CustomBlending` with `blendSrc` / `blendDst` / `blendSrcAlpha` / `blendDstAlpha` / `blendEquation` |+ | `no-blend`, `no-depth-write`, `cull` | `transparent: false` or `NoBlending`, `depthWrite: false`, `side: FrontSide` |++- **Geometry**: `PlaneGeometry{…}` and `SphereGeometry{radius, widthSegments…}` give constructor parameters. Custom `BufferGeometry` gives its attribute names and vertex count; dump it with `--gl-buffers` when it is data (point clouds) rather than code.+- **Randomness**: port the generator with its calls in the same order and both pages see the same seeded `Math.random`, so particles land in the same places. When that isn't possible, load the dumped buffer for verification only, or judge with `compare.ts --blur`.+- **Frame-rate independence**: when the reference lerps per frame, keep the per-frame constant at 60 Hz, or convert it to `1 − (1 − k)^(dt / 16.67)` and say so in the report.++## Verifying++Capture the clone with the reference command, changing only `--url` and `--out`, then:++```bash+bun <skill>/scripts/compare.ts --ref ref/frames --clone clone-1/frames --out compare-1 # pixels and timing+bun <skill>/scripts/gl.ts compare --ref ref --clone clone-1 --grep "<canvas or scene filter>" # canvas settings, draw structure, every channel+bun <skill>/scripts/easing.ts --track clone-1/gl-track.json --channel u_hover --compare-track ref/gl-track.json+```++- With `--clock virtual` the reference's noise floor is 0 %: two captures are identical, so every mismatch is the clone's.+- `gl.ts compare` fails a channel when its start or end is more than 80 ms off, its kind differs, or its mean error is over 5 % of the reference's range. It also lists canvas attribute, renderer setting and draw-structure differences: a missing pass, a different primitive count, a blend mode, a render cadence.+- When the content is stochastic and you did not port the generator, `compare.ts --blur 4` compares density, colour and motion, not dot positions. Report both numbers, sharp and blurred.++## Limits that remain++- Workers are seeded and traced (OffscreenCanvas included), but their clocks run in real time and workers started by workers are not reached. Main-thread waits on worker replies are still made deterministic.+- Canvases inside iframes are recorded in their frame but not exported. Capture the iframe's URL directly.+- WebGPU uniforms are raw buffer floats (`gpu:gb3@0[4]`) without names. Match them to WGSL struct fields by offset.+- Compute passes and GPU-side simulation (particles advanced in a shader) show up as their inputs only (uniforms and buffers). The motion lives in the shader you copy.+- Spector.js (`captureCanvas()` returns a JSON of one frame with full state per call) complements this for single-frame deep dives. The trace here is built for motion over time.+- Shaders, models and textures belong to their authors, like fonts and images. Read them to understand the effect, and copy them only when the user may.diff --git a/skills/motion-clone/scripts/capture.ts b/skills/motion-clone/scripts/capture.tsindex 8e39cd7..d5b002c 100644--- a/skills/motion-clone/scripts/capture.ts+++ b/skills/motion-clone/scripts/capture.ts@@ -3,10 +3,13 @@// and a per-frame track of chosen elements (position, size, opacity, transform).//// Usage: bun capture.ts --url <url|file.html> --out <dir> [options]-import { chromium, type Page } from "playwright";-import { join } from "node:path";-import { existsSync, readFileSync, renameSync, readdirSync, statSync } from "node:fs";-import { ensureDir, ffmpeg, num, pad, parseArgs, parseRect, parseSize, usage, writeJson, abs } from "./lib.ts";+import { chromium, type Page, type Request, type Response } from "playwright";+import { PNG } from "pngjs";+import { join, basename } from "node:path";+import { createHash } from "node:crypto";+import { existsSync, readFileSync, renameSync, readdirSync, statSync, writeFileSync, rmSync, unlinkSync } from "node:fs";+import { ensureDir, ffmpeg, num, pad, parseArgs, parseRect, parseSize, usage, writeJson, abs, SCRIPTS_DIR } from "./lib.ts";+import { writeGlArtifacts } from "./gl.ts";const HELP = `capture.ts — record a page and dump everything needed to clone its motion.@@ -50,13 +53,31 @@ How to start the motion--pre-roll MS frames to keep before the trigger, default 200Output- --fps N extracted frame rate, default 25 (the video is 25 fps; higher only helps with --playback-rate)+ --fps N extracted frame rate, default 25 (the video is 25 fps; higher only helps with --playback-rate+ or --clock virtual)--playback-rate R slow CSS/WAAPI animations with CDP (0.25 = 4x slower). JS-driven motion is not affected.--track "CSS, CSS" elements sampled every animation frame → track.json (default: --selector, if any)--no-video skip the video and frames (inspection + track only)--headed show the browser (needs a display)-Writes to <out>/: video.webm, frames/NNNN.png, frames.json, inspect.json, track.json, capture.json+Canvas, WebGL and 3D (see references/webgl.md)+ --clock virtual deterministic capture: the page runs on a virtual clock (performance.now, Date, timers,+ rAF, CSS/WAAPI animations, event timestamps) that is advanced frame by frame and+ screenshotted, so frame k is exactly t = k/fps whatever the GPU or machine load, and+ two captures of the same page are identical. Works for JS-driven motion too, at any fps.+ --seed N seed Math.random (default 1 with --clock virtual). Same seed, same particles.+ --raf-hz N virtual clock frame rate seen by the page, default 60+ --network-wait MS virtual clock: wait up to MS for in-flight requests before each frame, default 3000+ --gl trace WebGL/WebGL2/WebGPU/canvas 2D and three.js: shaders, programs, draw calls, passes,+ textures, buffers, uniforms and scene graph per frame → gl/, gl-track.json+ --gl-buffers MB with --gl, also dump vertex/index buffer contents (first upload) up to MB, default off+ --gpu MODE software (default, SwiftShader: identical everywhere) | hardware (real GPU, fast, and+ WebGPU enabled). Record reference and clone with the same mode.+ --assets save the page's 3D models, textures, shader files, Lottie/Rive/Spline files and scripts+ → assets/ + assets.json++Writes to <out>/: video.webm (video.mp4 with --clock virtual), frames/NNNN.png, frames.json, inspect.json,+track.json, capture.json, and with --gl: gl/gl.json, gl/shaders/, gl/draws.json, gl-track.json, three/`;const a = parseArgs(process.argv.slice(2));@@ -93,6 +114,28 @@ async function pointAt(page: Page, sel: string, fx: number, fy: number) {const preJs = a["pre-js"] ? (existsSync(String(a["pre-js"])) ? readFileSync(String(a["pre-js"]), "utf8") : String(a["pre-js"])) : undefined;+const virtual = a.clock === "virtual";+if (a.clock && a.clock !== "virtual" && a.clock !== "real") throw new Error(`--clock must be virtual or real, got ${a.clock}`);+const seed: number | null = a.seed !== undefined ? num(a.seed, 1) : virtual ? 1 : null;+const rafHz = num(a["raf-hz"], 60);+const networkWait = num(a["network-wait"], 3000);+const wantGl = !!a.gl;+const glBuffersMb = a["gl-buffers"] === undefined ? 0 : num(a["gl-buffers"], 16);+const gpuMode = a.gpu === true ? "hardware" : String(a.gpu ?? "software");+if (gpuMode !== "hardware" && gpuMode !== "software") throw new Error(`--gpu must be hardware or software, got ${a.gpu}`);+const wantAssets = !!a.assets;+if (virtual && rate !== 1) console.error("--playback-rate is ignored with --clock virtual: every frame is exact, raise --fps instead");+const inpage = (file: string, cfg: object) => `(${readFileSync(join(SCRIPTS_DIR, "inpage", file), "utf8").trim().replace(/;$/, "")})(${JSON.stringify(cfg)});`;++// records which context each canvas got, so inspection never has to call getContext itself+const CTX_PROBE = `(() => {+ for (const C of [self.HTMLCanvasElement, self.OffscreenCanvas]) {+ if (!C) continue;+ const g = C.prototype.getContext;+ C.prototype.getContext = function (type) { const c = g.apply(this, arguments); if (c && !this.__mcCtx) try { this.__mcCtx = String(type); } catch {} return c; };+ }+})();`;+// ---------- in-page tracker (installed before any script runs so load-triggered motion is caught) ----------const TRACKER = `(() => {const sels = __SELS__;@@ -125,7 +168,19 @@ const INSPECT = `(sel) => {const has = (c) => { try { return !!c(); } catch { return false; } };if (has(() => w.gsap)) libs.push('gsap' + (has(() => w.ScrollTrigger) ? '+ScrollTrigger' : ''));if (has(() => w.lottie || w.bodymovin || document.querySelector('lottie-player,dotlottie-player,[data-lottie],.lottie'))) libs.push('lottie');- if (has(() => w.THREE || [...document.querySelectorAll('canvas')].some(c => c.getContext && (c.getContext('webgl2') || c.getContext('webgl'))))) libs.push('webgl/three');+ const canvases = [...document.querySelectorAll('canvas')].map(c => ({ el: desc(c), context: c.__mcCtx || null, size: [c.width, c.height], css: (() => { const r = c.getBoundingClientRect(); return [Math.round(r.x), Math.round(r.y), Math.round(r.width), Math.round(r.height)]; })() }));+ if (has(() => w.__THREE__ || w.THREE)) libs.push('three.js r' + (w.__THREE__ || (w.THREE && w.THREE.REVISION) || '?'));+ if (canvases.some(c => /webgl/.test(c.context || ''))) libs.push('webgl canvas');+ if (canvases.some(c => c.context === 'webgpu')) libs.push('webgpu canvas');+ if (canvases.some(c => c.context === '2d')) libs.push('canvas 2d');+ if (has(() => w.BABYLON)) libs.push('babylon.js');+ if (has(() => w.pc && w.pc.Application)) libs.push('playcanvas');+ if (has(() => w.PIXI || w.__PIXI_APP__ || w.__PIXI_RENDERER__)) libs.push('pixi.js');+ if (has(() => document.querySelector('spline-viewer') || [...document.scripts].some(s => /splinetool|spline\\.design/.test(s.src)) || performance.getEntriesByType('resource').some(e => /\\.splinecode/.test(e.name)))) libs.push('spline');+ if (has(() => w.UnicornStudio || document.querySelector('[data-us-project]'))) libs.push('unicorn studio');+ if (has(() => w.VANTA)) libs.push('vanta.js');+ if (has(() => w.createREGL)) libs.push('regl');+ if (has(() => performance.getEntriesByType('resource').some(e => /\\.(glb|gltf|hdr|exr|ktx2|drc|usdz|splat)(\\?|$)/i.test(e.name)))) libs.push('3d assets (glb/gltf/hdr/ktx2…)');if (has(() => w.rive || document.querySelector('canvas[data-rive], .rive-canvas'))) libs.push('rive');if (has(() => w.anime)) libs.push('anime.js');if (has(() => w.Lenis || document.documentElement.classList.contains('lenis'))) libs.push('lenis smooth-scroll');@@ -169,7 +224,7 @@ const INSPECT = `(sel) => {}}const rect = root ? root.getBoundingClientRect() : null;- return { url: location.href, title: document.title, viewport: [innerWidth, innerHeight], scrollY, devicePixelRatio, libs, fonts,+ return { url: location.href, title: document.title, viewport: [innerWidth, innerHeight], scrollY, devicePixelRatio, libs, fonts, canvases,target: sel ? { selector: sel, found: !!root, rect: rect && [Math.round(rect.x), Math.round(rect.y), Math.round(rect.width), Math.round(rect.height)] } : null,animations: anims, keyframes, nodes };}`;@@ -227,66 +282,308 @@ async function runTrigger(page: Page): Promise<number> {}}-const browser = await chromium.launch({ headless: !a.headed });+// Virtual clock: the trigger as input events scheduled at virtual times (ms after the trigger), so a+// pointer path or a stepped scroll lands on the same frames every capture.+type Action = { at: number; run: () => Promise<unknown> };+async function scrollTarget(page: Page): Promise<number> {+ if (a["scroll-to"] !== undefined && a["scroll-to"] !== true && /^\d+$/.test(String(a["scroll-to"]))) return Number(a["scroll-to"]);+ const sel = (a["scroll-to"] && a["scroll-to"] !== true) ? String(a["scroll-to"]) : selector;+ if (!sel) throw new Error("--scroll-to or --selector needed for a scroll trigger");+ return page.evaluate((s) => { const el = document.querySelector(s); if (!el) throw new Error("not found: " + s); return window.scrollY + el.getBoundingClientRect().top - innerHeight * 0.25; }, sel);+}+async function planTrigger(page: Page): Promise<Action[]> {+ const tick = 1000 / rafHz;+ const glide = (pts: { x: number; y: number }[]): Action[] => {+ const acts: Action[] = [];+ const steps = Math.max(1, Math.round(pathMs / tick));+ for (let i = 1; i < pts.length; i++) for (let k = 1; k <= steps; k++) {+ const f = k / steps, p0 = pts[i - 1], p1 = pts[i];+ acts.push({ at: (i - 1) * pathMs + f * pathMs, run: () => page.mouse.move(p0.x + (p1.x - p0.x) * f, p0.y + (p1.y - p0.y) * f) });+ }+ return acts;+ };+ switch (trigger) {+ case "load": case "none": return [];+ case "hover": { if (!target) throw new Error("--target or --selector needed for hover"); const pt = await pointAt(page, target, hoverAt[0], hoverAt[1]); return [{ at: 0, run: () => page.mouse.move(pt.x, pt.y) }]; }+ case "leave": return [{ at: 0, run: () => page.mouse.move(leaveTo[0], leaveTo[1]) }];+ case "click": { if (!target) throw new Error("--target or --selector needed for click"); return [{ at: 0, run: () => page.click(target, { timeout: 10000, noWaitAfter: true }) }]; }+ case "move": case "drag": {+ if (!target) throw new Error(`--target or --selector needed for ${trigger}`);+ const pts = [] as { x: number; y: number }[];+ for (const [fx, fy] of movePath) pts.push(await pointAt(page, target, fx, fy));+ const acts = glide(pts);+ acts.unshift({ at: 0, run: async () => { await page.mouse.move(pts[0].x, pts[0].y); if (trigger === "drag") await page.mouse.down(); } });+ if (trigger === "drag") acts.push({ at: acts[acts.length - 1].at, run: () => page.mouse.up() });+ return acts;+ }+ case "scroll": {+ const steps = num(a["scroll-steps"], 12);+ const ms = num(a["scroll-ms"], 600);+ const from = await page.evaluate(() => window.scrollY);+ const delta = ((await scrollTarget(page)) - from) / steps;+ const acts: Action[] = [{ at: 0, run: () => page.mouse.move(viewport.width / 2, viewport.height / 2) }];+ for (let i = 0; i < steps; i++) acts.push({ at: (i * ms) / steps, run: () => page.mouse.wheel(0, delta) });+ return acts;+ }+ default: throw new Error(`unknown trigger ${trigger}`);+ }+}++const launchArgs: string[] = [];+if (gpuMode === "hardware") {+ launchArgs.push("--enable-gpu", "--ignore-gpu-blocklist", "--enable-unsafe-webgpu");+ if (process.platform === "darwin") launchArgs.push("--use-angle=metal");+ else if (process.platform === "linux") launchArgs.push("--use-angle=vulkan", "--enable-features=Vulkan,VulkanFromANGLE,DefaultANGLEVulkan");+}+if (virtual) launchArgs.push("--disable-smooth-scrolling"); // wheel scrolling animates on the compositor's real clock otherwise+const browser = await chromium.launch({ headless: !a.headed, args: launchArgs });const context = await browser.newContext({viewport, deviceScaleFactor: scale,colorScheme: a["color-scheme"] || undefined,reducedMotion: a["reduced-motion"] || "no-preference",- recordVideo: wantVideo ? { dir: join(out, ".video"), size: viewport } : undefined,+ recordVideo: wantVideo && !virtual ? { dir: join(out, ".video"), size: viewport } : undefined,});+// order matters: the clock replaces the time APIs first, the GL tracer wraps rAF on top, the tracker samples last+await context.addInitScript(CTX_PROBE);+if (virtual || seed !== null) await context.addInitScript(inpage("clock.js", { virtual, seed, rafHz, freezeAtStart: virtual }));+if (wantGl) await context.addInitScript(inpage("gl-hooks.js", { dumpBuffers: glBuffersMb * 1024 * 1024 }));if (trackSelectors.length) await context.addInitScript(TRACKER.replace("__SELS__", JSON.stringify(trackSelectors)));const page = await context.newPage();const tPageCreated = Date.now();-if (rate !== 1) {++// Workers: init scripts never reach them, and page.on("worker") fires after their code ran. A second CDP+// session auto-attaches with waitForDebuggerOnStart, evaluates the seed (and tracer) inside each new+// worker, then lets it run. Playwright's session can't address child sessions, hence the non-flat+// Target.sendMessageToTarget transport. Workers started by workers are not reached.+const workerSessions: { sessionId: string; url: string; idx: number }[] = [];+let workerEval: (sessionId: string, expression: string) => Promise<any> = async () => null;+if ((seed !== null || wantGl) && !a["no-workers"]) {+ const cdp = await context.newCDPSession(page);+ let msgId = 0;+ const waiting = new Map<number, (m: any) => void>();+ const send = (sessionId: string, method: string, params: object = {}) => new Promise<any>((res) => {+ const id = ++msgId;+ waiting.set(id, res);+ cdp.send("Target.sendMessageToTarget" as any, { sessionId, message: JSON.stringify({ id, method, params }) } as any).catch(() => { waiting.delete(id); res(null); });+ setTimeout(() => { if (waiting.delete(id)) res(null); }, 10000);+ });+ cdp.on("Target.receivedMessageFromTarget" as any, (e: any) => {+ try { const m = JSON.parse(e.message); if (m.id && waiting.has(m.id)) { waiting.get(m.id)!(m); waiting.delete(m.id); } } catch {}+ });+ cdp.on("Target.attachedToTarget" as any, async (e: any) => {+ const { sessionId, targetInfo, waitingForDebugger } = e;+ if (targetInfo.type === "worker") {+ const idx = workerSessions.length;+ workerSessions.push({ sessionId, url: targetInfo.url, idx });+ const parts = [];+ if (seed !== null) parts.push(inpage("clock.js", { virtual: false, seed: (seed + 7919 * (idx + 1)) >>> 0 }));+ if (wantGl) parts.push(inpage("gl-hooks.js", { dumpBuffers: glBuffersMb * 1024 * 1024, idPrefix: `w${idx}.` }));+ await send(sessionId, "Runtime.evaluate", { expression: parts.join("\n") });+ }+ if (waitingForDebugger) await send(sessionId, "Runtime.runIfWaitingForDebugger");+ });+ workerEval = async (sessionId, expression) => {+ const r = await send(sessionId, "Runtime.evaluate", { expression, returnByValue: true });+ return r?.result?.result?.value ?? null;+ };+ await cdp.send("Target.setAutoAttach" as any, { autoAttach: true, waitForDebuggerOnStart: true, flatten: false } as any);+}+if (rate !== 1 && !virtual) {const cdp = await context.newCDPSession(page);await cdp.send("Animation.enable");await cdp.send("Animation.setPlaybackRate", { playbackRate: rate });}+// network bookkeeping: in-flight requests (virtual clock waits for them) and assets to save+const inflight = new Map<Request, number>();+page.on("request", (r) => inflight.set(r, Date.now()));+page.on("requestfinished", (r) => inflight.delete(r));+page.on("requestfailed", (r) => inflight.delete(r));+async function networkQuiet() {+ const until = Date.now() + networkWait;+ while (Date.now() < until) {+ const busy = [...inflight.values()].some((t) => Date.now() - t < 10000) // long-polls and streams don't count+ || (virtual && (await page.evaluate(() => (window as any).__mcClock?.busy?.() ?? 0).catch(() => 0)) > 0); // workers still computing+ if (!busy) return;+ await new Promise((r) => setTimeout(r, 10));+ }+}+const ASSET_RE = /\.(glb|gltf|bin|hdr|exr|ktx2?|basis|drc|splinecode|riv|lottie|usdz|fbx|obj|mtl|ply|vrm|splat|ksplat|spz|glsl|vert|frag|vs|fs|wgsl)(\?|#|$)/i;+const assetJobs: Promise<void>[] = [];+const assetIndex: any[] = [];+const imageResponses = new Map<string, Response>();+async function saveAsset(res: Response, kind: string) {+ try {+ if (res.status() !== 200) return;+ const body = await res.body();+ const url = res.url();+ const name = (basename(new URL(url).pathname) || "index").replace(/[^\w.\-]+/g, "_").slice(-80);+ const file = join(kind, createHash("sha1").update(url).digest("hex").slice(0, 6) + "-" + name);+ writeFileSync(join(ensureDir(join(out, "assets", kind)), basename(file)), body);+ assetIndex.push({ kind, url, file: join("assets", file), bytes: body.length, contentType: res.headers()["content-type"] });+ } catch (e) { /* bodies of redirects, aborted or evicted responses are not available */ }+}+if (wantAssets) {+ rmSync(join(out, "assets"), { recursive: true, force: true });+ page.on("response", (res) => {+ const url = res.url();+ if (!/^https?:/.test(url)) return;+ const ct = res.headers()["content-type"] || "";+ if (ASSET_RE.test(url) || /^model\//.test(ct)) assetJobs.push(saveAsset(res, /\.(glsl|vert|frag|vs|fs|wgsl)(\?|#|$)/i.test(url) ? "shaders" : "models"));+ else if (/^image\//.test(ct)) imageResponses.set(url, res);+ else if (/javascript|ecmascript/.test(ct) || /\.m?js(\?|#|$)/.test(url)) assetJobs.push(saveAsset(res, "scripts"));+ else if (/json/.test(ct) && /lottie|anim|scene|spline|unicorn|project|rive/i.test(url)) assetJobs.push(saveAsset(res, "data"));+ });+}+let tTrigger = Date.now();let perfAtTrigger: number | null = null; // page clock at the trigger, so track.json has t=0 at the trigger-await page.goto(url, { waitUntil: trigger === "load" ? "commit" : "load", timeout: 60000 });-if (trigger !== "load") {- await page.waitForTimeout(waitBefore);+let frames: any = null;+const framesDir = join(out, "frames");+const clipOf = async () => {+ let c = parseRect(a.clip);+ if (!c && selector) {+ const r = await page.evaluate((s) => { const el = document.querySelector(s); if (!el) return null; const b = el.getBoundingClientRect(); return { x: b.x, y: b.y, width: b.width, height: b.height }; }, selector);+ if (r) c = { x: Math.max(0, Math.floor(r.x - padPx)), y: Math.max(0, Math.floor(r.y - padPx)), width: Math.ceil(Math.min(viewport.width - r.x + padPx, r.width + 2 * padPx)), height: Math.ceil(Math.min(viewport.height - r.y + padPx, r.height + 2 * padPx)) };+ }+ return c;+};+// settle time before the trigger: real waiting, or the same amount of virtual time+const settle = async (ms: number) => {+ if (!virtual) return page.waitForTimeout(ms);+ for (let left = ms; left > 0; left -= 100) { await page.evaluate((x) => (window as any).__mcClock.advance(x), Math.min(100, left)); await networkQuiet(); }+};+async function prepareTrigger() {+ await settle(waitBefore);if (preJs) await page.evaluate(preJs);if (selector && trigger !== "scroll") {const found = await page.$(selector);if (!found) throw new Error(`selector not found: ${selector}`);await found.scrollIntoViewIfNeeded();- await page.waitForTimeout(300);+ await settle(300);} else if (trigger === "scroll" && selector) {// start just below the fold so the element enters the viewport during the scrollawait page.evaluate((s) => { const el = document.querySelector(s); if (el) window.scrollTo(0, Math.max(0, window.scrollY + el.getBoundingClientRect().top - innerHeight - 20)); }, selector);- await page.waitForTimeout(300);+ await settle(300);}- if (preHover) { const pt = await pointAt(page, preHover, hoverAt[0], hoverAt[1]); await page.mouse.move(pt.x, pt.y); await page.waitForTimeout(preHoverMs); }- perfAtTrigger = await page.evaluate(() => performance.now());- tTrigger = await runTrigger(page);+ if (preHover) { const pt = await pointAt(page, preHover, hoverAt[0], hoverAt[1]); await page.mouse.move(pt.x, pt.y); await settle(preHoverMs); }}-await page.waitForTimeout(duration / rate);-// crop rect, measured after the motion (use --clip if the element moves a lot)-let clip = parseRect(a.clip);-if (!clip && selector) {- const r = await page.evaluate((s) => { const el = document.querySelector(s); if (!el) return null; const b = el.getBoundingClientRect(); return { x: b.x, y: b.y, width: b.width, height: b.height }; }, selector);- if (r) clip = { x: Math.max(0, Math.floor(r.x - padPx)), y: Math.max(0, Math.floor(r.y - padPx)), width: Math.ceil(Math.min(viewport.width - r.x + padPx, r.width + 2 * padPx)), height: Math.ceil(Math.min(viewport.height - r.y + padPx, r.height + 2 * padPx)) };+if (!virtual) {+ await page.goto(url, { waitUntil: trigger === "load" ? "commit" : "load", timeout: 60000 });+ if (trigger !== "load") {+ await prepareTrigger();+ perfAtTrigger = await page.evaluate(() => performance.now());+ tTrigger = await runTrigger(page);+ }+ await page.waitForTimeout(duration / rate);+} else {+ // ---------- virtual clock: step, screenshot, repeat ----------+ // The clock is frozen from the first script on and only moves when advanced, so the network looks instant+ // and every capture of the page passes through the same states. load: t=0 is navigation. Other triggers:+ // --wait-before and the other settle times pass as virtual time, then pre-roll frames, then the trigger.+ await page.goto(url, { waitUntil: "load", timeout: 60000 });+ await networkQuiet();+ let pre = 0;+ if (trigger !== "load") { await prepareTrigger(); pre = preRoll; }+ const start: number = await page.evaluate(() => (window as any).__mcClock.now());+ const at0 = start + pre;+ perfAtTrigger = at0;+ const plan = (await planTrigger(page)).map((x) => ({ ...x, at: at0 + x.at })).sort((x, y) => x.at - y.at);+ const frameMs = 1000 / fps;+ const total = Math.round((pre + duration) / frameMs) + 1;+ const rawDir = ensureDir(join(out, ".raw"));+ for (const f of readdirSync(rawDir)) unlinkSync(join(rawDir, f));+ let now = start;+ const advanceTo = async (t: number) => { if (t > now + 1e-6) now = await page.evaluate((ms) => (window as any).__mcClock.advance(ms), t - now); };+ for (let k = 0; k < total; k++) {+ const ft = start + k * frameMs;+ while (plan.length && plan[0].at <= ft) { const act = plan.shift()!; await advanceTo(act.at); await act.run(); }+ await advanceTo(ft);+ await networkQuiet();+ if (wantVideo) await page.screenshot({ path: join(rawDir, `${pad(k + 1)}.png`), animations: "allow", caret: "initial" });+ }+ for (const act of plan) { await advanceTo(act.at); await act.run(); } // e.g. a drag release after the window+ if (wantVideo) {+ const clip = await clipOf();+ ensureDir(framesDir);+ for (const f of readdirSync(framesDir)) if (f.endsWith(".png")) unlinkSync(join(framesDir, f));+ for (const f of readdirSync(rawDir).sort()) {+ const png = PNG.sync.read(readFileSync(join(rawDir, f)));+ if (!clip) { writeFileSync(join(framesDir, f), PNG.sync.write(png)); continue; }+ const x = Math.round(clip.x * scale), y = Math.round(clip.y * scale);+ const cw = Math.min(Math.round(clip.width * scale), png.width - x), ch = Math.min(Math.round(clip.height * scale), png.height - y);+ const o = new PNG({ width: cw, height: ch });+ PNG.bitblt(png, o, x, y, cw, ch, 0, 0);+ writeFileSync(join(framesDir, f), PNG.sync.write(o));+ }+ rmSync(rawDir, { recursive: true, force: true });+ try {+ ffmpeg(["-y", "-framerate", String(fps), "-i", join(framesDir, "%04d.png"), "-vf", "pad=ceil(iw/2)*2:ceil(ih/2)*2", "-pix_fmt", "yuv420p", "-c:v", "libx264", "-crf", "18", join(out, "video.mp4")], { quiet: true });+ } catch (e) { console.error("video.mp4 not written: " + String(e).split("\n")[0]); }+ frames = { fps, count: total, playbackRate: 1, preRollMs: pre, triggerFrame: Math.round((pre / 1000) * fps), clip, viewport, scale, clock: "virtual", seed, rafHz,+ note: "frame i is exactly the page state at t = i/fps seconds, with t=0 at preRoll before the trigger (virtual clock)" };+ writeJson(join(out, "frames.json"), frames);+ }}+// crop rect, measured after the motion (use --clip if the element moves a lot)+const clip = await clipOf();+const track = trackSelectors.length ? await page.evaluate(() => { const m = (window as any).__mc; m.running = false; return m.samples; }) : [];const inspect: any = await page.evaluate(`(${INSPECT})(${JSON.stringify(selector ?? null)})`);+const gl: any = wantGl ? await page.evaluate(() => (window as any).__mcgl ? (window as any).__mcgl.export() : null) : null;+if (gl && workerSessions.length) {+ // worker traces join the page's; their frame times move onto the page clock (through the virtual clock's history)+ const hist: [number, number][] = virtual ? await page.evaluate(() => (window as any).__mcClock.history()) : [];+ const toPage = (wt: number, wOrigin: number) => {+ const real = wt + wOrigin - gl.timeOrigin;+ if (!virtual) return real;+ let v = hist.length ? hist[0][1] : real;+ for (const [r, vv] of hist) { if (r > real) break; v = vv; }+ return v;+ };+ gl.workers = [];+ for (const w of workerSessions) {+ const json = await workerEval(w.sessionId, "self.__mcgl ? JSON.stringify(self.__mcgl.export()) : null");+ if (!json) { gl.workers.push({ url: w.url, traced: false }); continue; }+ const d = JSON.parse(json);+ gl.workers.push({ url: w.url, traced: true, contexts: d.contexts.length, programs: d.programs.length });+ for (const k of ["contexts", "programs", "textures", "buffers", "framebuffers"]) gl[k].push(...d[k]);+ for (const f of d.frameData) f.t = toPage(f.t, d.timeOrigin);+ gl.frameData = [...gl.frameData, ...d.frameData].sort((x: any, y: any) => x.t - y.t);+ Object.assign(gl.dumps, d.dumps);+ gl.gpu.modules.push(...d.gpu.modules); gl.gpu.pipelines.push(...d.gpu.pipelines);+ gl.errors.push(...d.errors.map((e: string) => `worker ${w.idx}: ${e}`));+ }+}+const renderer: string | null = await page.evaluate(() => {+ const c = document.createElement("canvas");+ const g = (c.getContext("webgl2") || c.getContext("webgl")) as WebGLRenderingContext | null;+ if (!g) return null;+ const e = g.getExtension("WEBGL_debug_renderer_info");+ const r = e ? g.getParameter(e.UNMASKED_RENDERER_WEBGL) : g.getParameter(g.RENDERER);+ g.getExtension("WEBGL_lose_context")?.loseContext();+ return r;+});await page.screenshot({ path: join(out, "final.png"), clip: clip && clip.width > 0 && clip.height > 0 ? clip : undefined });+if (wantAssets) {+ // textures the GPU actually sampled, by URL+ const texUrls = new Set<string>((gl?.textures ?? []).map((t: any) => t.src?.url).filter(Boolean));+ for (const [u, res] of imageResponses) if (!gl || texUrls.has(u)) assetJobs.push(saveAsset(res, gl ? "textures" : "images"));+ await Promise.all(assetJobs);+}await context.close();await browser.close();-// ---------- video → frames -----------let frames: any = null;-if (wantVideo) {+// ---------- video → frames (real clock) ----------+if (wantVideo && !virtual) {const vdir = join(out, ".video");const webm = readdirSync(vdir).filter((f) => f.endsWith(".webm")).map((f) => join(vdir, f)).sort((x, y) => statSync(y).mtimeMs - statSync(x).mtimeMs)[0];if (!webm) throw new Error("no video recorded");renameSync(webm, join(out, "video.webm"));- const framesDir = ensureDir(join(out, "frames"));- for (const f of readdirSync(framesDir)) if (f.endsWith(".png")) require("node:fs").unlinkSync(join(framesDir, f));+ ensureDir(framesDir);+ for (const f of readdirSync(framesDir)) if (f.endsWith(".png")) unlinkSync(join(framesDir, f));// the video clock starts at page creation; the trigger offset is wall-clock, refine with compare.ts --auto-alignconst triggerOffset = Math.max(0, (tTrigger - tPageCreated) / 1000 - preRoll / 1000);const videoFps = fps * rate; // frames per *video* second so that timestamps map to reference time@@ -294,7 +591,7 @@ if (wantVideo) {if (clip) vf.push(`crop=${Math.round(clip.width * scale)}:${Math.round(clip.height * scale)}:${Math.round(clip.x * scale)}:${Math.round(clip.y * scale)}`);ffmpeg(["-y", "-ss", triggerOffset.toFixed(3), "-i", join(out, "video.webm"), "-t", ((duration + preRoll) / rate / 1000).toFixed(3), "-vf", vf.join(","), join(framesDir, "%04d.png")], { quiet: true });const count = readdirSync(framesDir).filter((f) => f.endsWith(".png")).length;- frames = { fps, count, playbackRate: rate, preRollMs: preRoll, triggerFrame: Math.round((preRoll / 1000) * fps), clip, viewport, scale, note: "frame i is at t = i/fps seconds of reference time, with t=0 at preRoll before the trigger" };+ frames = { fps, count, playbackRate: rate, preRollMs: preRoll, triggerFrame: Math.round((preRoll / 1000) * fps), clip, viewport, scale, clock: "real", seed, note: "frame i is at t = i/fps seconds of reference time, with t=0 at preRoll before the trigger" };writeJson(join(out, "frames.json"), frames);}@@ -304,10 +601,14 @@ const trackOut = { selectors: trackSelectors, playbackRate: rate, note: "t in mssamples: track.map((s: any) => ({ ...s, t: +((s.t - t0) * rate).toFixed(1) })) };if (trackSelectors.length) writeJson(join(out, "track.json"), trackOut);writeJson(join(out, "inspect.json"), inspect);-writeJson(join(out, "capture.json"), { url, out, viewport, scale, fps, rate, trigger, target, selector, clip, duration, preRoll, waitBefore, scrollTo: a["scroll-to"], track: trackSelectors, capturedAt: new Date().toISOString() });+const glSummary = gl ? writeGlArtifacts(out, gl, t0, virtual ? 1 : rate) : null;+if (wantAssets) writeJson(join(out, "assets.json"), assetIndex.sort((x, y) => x.file.localeCompare(y.file)));+writeJson(join(out, "capture.json"), { url, out, viewport, scale, fps, rate, trigger, target, selector, clip, duration, preRoll, waitBefore, scrollTo: a["scroll-to"], track: trackSelectors,+ clock: virtual ? "virtual" : "real", seed, rafHz: virtual ? rafHz : undefined, gpu: gpuMode, renderer, gl: wantGl, capturedAt: new Date().toISOString() });console.log(JSON.stringify({- out, frames: frames && { count: frames.count, fps, triggerFrame: frames.triggerFrame, clip },+ out, frames: frames && { count: frames.count, fps, triggerFrame: frames.triggerFrame, clip, clock: frames.clock },libs: inspect.libs, fonts: inspect.fonts.slice(0, 8), animations: inspect.animations.length, keyframes: inspect.keyframes.length,- target: inspect.target, trackSamples: track.length, trackSelectors,+ target: inspect.target, trackSamples: track.length, trackSelectors, renderer,+ gl: glSummary ?? undefined, assets: wantAssets ? assetIndex.length : undefined,}, null, 2));diff --git a/skills/motion-clone/scripts/compare.ts b/skills/motion-clone/scripts/compare.tsindex af26a5c..1ef6d98 100644--- a/skills/motion-clone/scripts/compare.ts+++ b/skills/motion-clone/scripts/compare.ts@@ -21,6 +21,9 @@ compare.ts — frame-by-frame comparison of clone vs reference.--threshold T pass if mean mismatch ≤ T (fraction of pixels), default 0.05; use 0.01-0.02 for pixel fidelity--motion-threshold T pass if activity-curve timing error ≤ T seconds, default 0.08--fps N frames per second (default: frames.json beside --ref, else 25)+ --blur R box-blur both sets by R px before comparing: particles, noise and grain that are placed+ differently but have the same density, colour and motion stop counting as mismatch+ (try 4-8). Reports both the sharp and the blurred mismatch.--no-diffs skip writing diff PNGsOutput in <out>/: report.json, report.md, diff/NNNN.png (red = differing pixels)@@ -37,6 +40,19 @@ const motionThreshold = num(a["motion-threshold"], 0.08);const region = parseRect(a.region);const wantDiffs = !a["no-diffs"];+const blurR = num(a.blur, 0);++// Captures made with different settings measure the setup, not the clone. capture.json sits next to frames/.+const capOf = (dir: string) => { const p = join(dir, "..", "capture.json"); return existsSync(p) ? readJson(p) : null; };+const capRef = capOf(refDir), capClone = capOf(cloneDir);+const setupWarnings: string[] = [];+if (capRef && capClone) {+ const same = (k: string, f = (c: any) => JSON.stringify(c[k] ?? null)) => { if (f(capRef) !== f(capClone)) setupWarnings.push(`${k}: reference ${f(capRef)}, clone ${f(capClone)}`); };+ for (const k of ["viewport", "scale", "fps", "trigger", "duration", "preRoll", "clock", "seed", "gpu", "rafHz", "rate"]) same(k);+ if (capRef.renderer && capClone.renderer && capRef.renderer !== capClone.renderer) setupWarnings.push(`renderer: reference "${capRef.renderer}", clone "${capClone.renderer}"`);+ for (const w of setupWarnings) console.error(`warning: captures differ in ${w}`);+}+const refFiles = listFrames(refDir);let cloneFiles = listFrames(cloneDir);if (!refFiles.length || !cloneFiles.length) throw new Error("no frames found");@@ -60,14 +76,41 @@ function crop(img: PNG): PNG {PNG.bitblt(img, o, region.x, region.y, region.width, region.height, 0, 0);return o;}+// separable box blur, two passes ≈ gaussian; RGBA in place+function blur(img: PNG, r: number): PNG {+ if (r <= 0) return img;+ const { width: w, height: h } = img;+ const src = new Float32Array(img.data), tmp = new Float32Array(src.length);+ const pass = (from: Float32Array, to: Float32Array, horizontal: boolean) => {+ const n = horizontal ? w : h, m = horizontal ? h : w;+ for (let j = 0; j < m; j++) for (let c = 0; c < 4; c++) {+ let acc = 0, cnt = 0;+ const idx = (i: number) => ((horizontal ? j * w + i : i * w + j) << 2) + c;+ for (let i = 0; i <= Math.min(r, n - 1); i++) { acc += from[idx(i)]; cnt++; }+ for (let i = 0; i < n; i++) {+ to[idx(i)] = acc / cnt;+ const add = i + r + 1, rem = i - r;+ if (add < n) { acc += from[idx(add)]; cnt++; }+ if (rem >= 0) { acc -= from[idx(rem)]; cnt--; }+ }+ }+ };+ pass(src, tmp, true); pass(tmp, src, false);+ pass(src, tmp, true); pass(tmp, src, false);+ const o = new PNG({ width: w, height: h });+ for (let i = 0; i < src.length; i++) o.data[i] = Math.round(src[i]);+ return o;+}function mismatch(aP: PNG, bP: PNG, diff?: PNG): number {const n = pixelmatch(aP.data, bP.data, diff?.data, aP.width, aP.height, { threshold: pixelThreshold, includeAA: false });return n / (aP.width * aP.height);}// cache decoded + cropped frames (frames are small after clipping; fine for a few hundred)-const refImgs = refFiles.map((p) => crop(readPng(p)));-const cloneImgs = cloneFiles.map((p) => crop(readPng(p)));+const refSharp = refFiles.map((p) => crop(readPng(p)));+const cloneSharp = cloneFiles.map((p) => crop(readPng(p)));+const refImgs = blurR ? refSharp.map((p) => blur(p, blurR)) : refSharp;+const cloneImgs = blurR ? cloneSharp.map((p) => blur(p, blurR)) : cloneSharp;// ---- activity curve: change between consecutive frames, per set ----function activity(imgs: PNG[]): number[] {@@ -75,7 +118,7 @@ function activity(imgs: PNG[]): number[] {for (let i = 1; i < imgs.length; i++) out.push(mismatch(imgs[i - 1], imgs[i]));return out;}-const refAct = activity(refImgs), cloneAct = activity(cloneImgs);+const refAct = activity(refSharp), cloneAct = activity(cloneSharp); // timing reads sharp frames, even with --blurfunction motionWindow(act: number[], floor = 0.002) {// first and last frame where something visibly changeslet first = -1, last = -1;@@ -107,9 +150,10 @@ for (let i = 0; i < refImgs.length; i++) {const diff = diffDir ? new PNG({ width: refImgs[i].width, height: refImgs[i].height }) : undefined;const m = mismatch(refImgs[i], cloneImgs[j], diff);if (diff && diffDir) writeFileSync(join(diffDir, `${pad(i)}.png`), PNG.sync.write(diff));- frames.push({ i, t: +(i / fps).toFixed(3), cloneIndex: j, mismatch: +m.toFixed(4) });+ frames.push({ i, t: +(i / fps).toFixed(3), cloneIndex: j, mismatch: +m.toFixed(4), ...(blurR ? { sharpMismatch: +mismatch(refSharp[i], cloneSharp[j]).toFixed(4) } : {}) });}-const compared = frames.filter((f) => f.mismatch !== null) as { i: number; t: number; mismatch: number }[];+const compared = frames.filter((f) => f.mismatch !== null) as { i: number; t: number; mismatch: number; sharpMismatch?: number }[];+const sharpMean = blurR ? compared.reduce((s, f) => s + (f.sharpMismatch ?? 0), 0) / Math.max(1, compared.length) : null;const mean = compared.reduce((s, f) => s + f.mismatch, 0) / Math.max(1, compared.length);const worst = [...compared].sort((x, y) => y.mismatch - x.mismatch).slice(0, 5);const refWin = motionWindow(refAct), cloneWin = motionWindow(cloneAct.slice(Math.max(0, offset)));@@ -123,7 +167,7 @@ const maxTimingErr = Math.max(Math.abs(timingError.startS), Math.abs(timingErrorconst pass = { pixels: mean <= threshold, timing: maxTimingErr <= motionThreshold };const report = {- fps, size: [W, H], region, offset, threshold, motionThreshold, pixelThreshold,+ fps, size: [W, H], region, offset, threshold, motionThreshold, pixelThreshold, blur: blurR || undefined, sharpMeanMismatch: sharpMean === null ? undefined : +sharpMean.toFixed(4), setupWarnings,frames: frames.length, compared: compared.length,meanMismatch: +mean.toFixed(4), maxMismatch: worst[0]?.mismatch ?? 0, worstFrames: worst,motion: { reference: refWin, clone: cloneWin, timingError },@@ -138,7 +182,8 @@ const md = [`# compare: ${refDir} vs ${cloneDir}`,``,`- frames compared: ${compared.length}/${frames.length} at ${fps} fps, clone offset ${offset}`,- `- mean mismatch: **${(mean * 100).toFixed(2)}%** (threshold ${(threshold * 100).toFixed(1)}%) → ${pass.pixels ? "PASS" : "FAIL"}`,+ ...setupWarnings.map((w) => `- **warning, captures differ in ${w}**: re-capture with the same settings before reading the numbers`),+ `- mean mismatch${blurR ? ` (blurred ${blurR} px)` : ""}: **${(mean * 100).toFixed(2)}%** (threshold ${(threshold * 100).toFixed(1)}%) → ${pass.pixels ? "PASS" : "FAIL"}${sharpMean !== null ? `; sharp: ${(sharpMean * 100).toFixed(2)}%` : ""}`,`- motion window — reference: frames ${refWin.first}–${refWin.last} (${refWin.durationS.toFixed(2)}s, peak #${refWin.peak}); clone: ${cloneWin.first}–${cloneWin.last} (${cloneWin.durationS.toFixed(2)}s, peak #${cloneWin.peak})`,`- timing error (clone − ref): start ${timingError.startS}s, end ${timingError.endS}s, duration ${timingError.durationS}s, peak ${timingError.peakS}s → ${pass.timing ? "PASS" : "FAIL"} (limit ${motionThreshold}s)`,`- worst frames: ${worst.map((w) => `#${w.i} (${(w.mismatch * 100).toFixed(1)}% @ ${w.t}s)`).join(", ")}`,diff --git a/skills/motion-clone/scripts/easing.ts b/skills/motion-clone/scripts/easing.tsindex 63b4af0..31c8d6d 100644--- a/skills/motion-clone/scripts/easing.ts+++ b/skills/motion-clone/scripts/easing.ts@@ -10,6 +10,8 @@ easing.ts — which easing is this?bun easing.ts --track <track.json> --selector <css> --prop <x|y|w|h|opacity|scale|translateX|translateY|rotate> [--from-ms T --to-ms T]bun easing.ts --series '[[t_ms, value], ...]'bun easing.ts --track <track.json> --selector <css> --prop y --compare-track <other.json> # also diffs two tracks+ bun easing.ts --track <gl-track.json> --channel <key> [--compare-track <other gl-track.json> --compare-channel <key>]+ # a uniform, camera, object or material value from capture.ts --gl (key or its unique ending, e.g. uHover)Prints: start/end values, delay (first change), duration (first → last change), overshoot, and the best-fittingnamed easings with their RMSE. Use the top match as the CSS/Framer/GSAP easing in the clone, then re-run on the@@ -28,9 +30,23 @@ function matrixPart(transform: string): { tx: number; ty: number; sx: number; syreturn { tx: v[4], ty: v[5], sx: Math.hypot(v[0], v[1]), sy: Math.hypot(v[2], v[3]), rot: (Math.atan2(v[1], v[0]) * 180) / Math.PI };}-function seriesFromTrack(path: string, selector: string, prop: string): [number, number][] {+// gl-track.json channels: exact key, or a unique key ending in ".<name>" / "<name>"+function resolveChannel(t: any, name: string): string {+ if (t.channels[name]) return name;+ const keys = Object.keys(t.channels).filter((k) => k.endsWith("." + name) || k.endsWith(name));+ if (keys.length === 1) return keys[0];+ throw new Error(keys.length ? `channel "${name}" is ambiguous: ${keys.slice(0, 12).join(", ")}` : `no animated channel "${name}" (bun gl.ts channels <dir> lists them; constants are in gl/gl.json)`);+}++function seriesFromTrack(path: string, selector: string, prop: string, channel?: string): [number, number][] {const t = readJson(path);const outS: [number, number][] = [];+ if (t.kind === "gl-track") {+ if (!channel) throw new Error("this is a gl-track.json: pass --channel <key>");+ const k = resolveChannel(t, channel);+ for (const s of t.samples) if (s.v[k] !== undefined) outS.push([s.t, s.v[k]]);+ return outS;+ }for (const s of t.samples) {const e = s.els?.[selector];if (!e) continue;@@ -42,7 +58,7 @@ function seriesFromTrack(path: string, selector: string, prop: string): [number,return outS;}-let series: [number, number][] = a.series ? JSON.parse(String(a.series)) : seriesFromTrack(String(a.track), String(a.selector), String(a.prop || "y"));+let series: [number, number][] = a.series ? JSON.parse(String(a.series)) : seriesFromTrack(String(a.track), String(a.selector), String(a.prop || "y"), a.channel ? String(a.channel) : undefined);const fromMs = num(a["from-ms"], -Infinity), toMs = num(a["to-ms"], Infinity);series = series.filter(([t]) => t >= fromMs && t <= toMs);if (series.length < 4) { console.log("not enough samples (element missing from track, or window too narrow)"); process.exit(1); }@@ -120,7 +136,7 @@ const result = {};if (a["compare-track"]) {- const other = seriesFromTrack(String(a["compare-track"]), String(a.selector), String(a.prop || "y"));+ const other = seriesFromTrack(String(a["compare-track"]), String(a.selector), String(a.prop || "y"), a["compare-channel"] ? String(a["compare-channel"]) : a.channel ? String(a.channel) : undefined);// both tracks have t=0 at their trigger, so compare at the same t (not from each track's first sample)const at = (s: [number, number][], t: number) => { let best = s[0]; for (const p of s) if (Math.abs(p[0] - t) < Math.abs(best[0] - t)) best = p; return best[1]; };const diffs = series.map(([t, v]) => +(at(other, t) - v).toFixed(2));diff --git a/skills/motion-clone/scripts/frames.ts b/skills/motion-clone/scripts/frames.tsindex 79fa31e..1c74b90 100644--- a/skills/motion-clone/scripts/frames.ts+++ b/skills/motion-clone/scripts/frames.ts@@ -51,6 +51,6 @@ args.push("-vf", vf.join(","), "-vsync", "0", join(out, "%04d.png"));ffmpeg(args, { quiet: true });const count = readdirSync(out).filter((f) => f.endsWith(".png")).length;-const meta = { ...info, fps, count, start, end, crop, width: width || info.width, note: "frame i (1-based file name) is at t = start + (i-1)/fps seconds of the source" };+const meta = { ...info, fps, count, start, end, crop, outWidth: width || undefined, note: "frame i (1-based file name) is at t = start + (i-1)/fps seconds of the source" };writeJson(join(out, "frames.json"), meta);console.log(JSON.stringify(meta, null, 2));diff --git a/skills/motion-clone/scripts/gl.ts b/skills/motion-clone/scripts/gl.tsnew file mode 100644index 0000000..31a6df6--- /dev/null+++ b/skills/motion-clone/scripts/gl.ts@@ -0,0 +1,404 @@+// Read what capture.ts --gl recorded from a canvas: WebGL / WebGPU / canvas 2D calls and the three.js scene.+// capture.ts calls writeGlArtifacts() to turn the raw in-page trace into files; the CLI reads them back.+//+// Usage: bun gl.ts summary <capture dir>+// bun gl.ts channels <capture dir> [--grep RE] [--series KEY]+// bun gl.ts compare --ref <capture dir> --clone <capture dir> [--map "refName=cloneName,…"]+import { existsSync, readFileSync, writeFileSync, rmSync } from "node:fs";+import { join } from "node:path";+import { abs, ensureDir, num, parseArgs, readJson, usage, writeJson } from "./lib.ts";++const slug = (s: string) => s.replace(/\(([^)]*)\)/g, "$1").replace(/[^\w-]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 48);+const suffix = (n: number, k: number) => (n === 1 ? "" : n <= 4 ? "." + "xyzw"[k] : `[${k}]`);+const r4 = (v: number) => +v.toPrecision(5);++type Channel = { source: "uniform" | "scene" | "webgpu"; program?: string; uniform?: string; min: number; max: number; firstChangeMs: number | null; lastChangeMs: number | null; kind: string; perSecond?: number; periodMs?: number };++// What a channel does over the capture: constant, a clock (uniform time), a transition between two rests,+// an oscillation, or several steps. The kind decides how it is cloned (drive by time, ease, loop).+function classify(ts: number[], vs: number[]): Pick<Channel, "min" | "max" | "firstChangeMs" | "lastChangeMs" | "kind" | "perSecond" | "periodMs"> {+ const min = Math.min(...vs), max = Math.max(...vs), range = max - min;+ const base = { min: r4(min), max: r4(max) };+ if (!(range > 1e-7)) return { ...base, firstChangeMs: null, lastChangeMs: null, kind: "constant" };+ const eps = range * 0.002;+ let first = -1, last = -1, ups = 0, downs = 0, turns = 0, prevSign = 0;+ for (let i = 1; i < vs.length; i++) {+ const d = vs[i] - vs[i - 1];+ if (Math.abs(d) <= eps) continue;+ if (first < 0) first = i - 1;+ last = i;+ const s = Math.sign(d);+ if (s > 0) ups++; else downs++;+ if (prevSign && s !== prevSign) turns++;+ prevSign = s;+ }+ const firstChangeMs = Math.round(ts[first + 1]), lastChangeMs = Math.round(ts[last]); // first sample that moved, sample where it settled+ const moving = ups + downs;+ const span = ts[ts.length - 1] - ts[0];+ if (turns === 0) {+ // monotonic: a clock if it moves through the whole capture at a constant rate+ const n = vs.length, mt = ts.reduce((s, t) => s + t, 0) / n, mv = vs.reduce((s, v) => s + v, 0) / n;+ let sxy = 0, sxx = 0, syy = 0;+ for (let i = 0; i < n; i++) { sxy += (ts[i] - mt) * (vs[i] - mv); sxx += (ts[i] - mt) ** 2; syy += (vs[i] - mv) ** 2; }+ const r2 = sxx && syy ? (sxy * sxy) / (sxx * syy) : 0;+ if (r2 > 0.995 && lastChangeMs - firstChangeMs > span * 0.8) return { ...base, firstChangeMs, lastChangeMs, kind: "clock", perSecond: r4((sxy / sxx) * 1000) };+ return { ...base, firstChangeMs, lastChangeMs, kind: "transition" };+ }+ if (turns >= 3) {+ // period from the mean distance between same-direction turning points+ const peaks: number[] = [];+ for (let i = 1; i < vs.length - 1; i++) if (vs[i] > vs[i - 1] + eps / 2 && vs[i] >= vs[i + 1]) peaks.push(ts[i]);+ const periodMs = peaks.length >= 2 ? Math.round((peaks[peaks.length - 1] - peaks[0]) / (peaks.length - 1)) : undefined;+ return { ...base, firstChangeMs, lastChangeMs, kind: moving > vs.length * 0.6 ? "oscillation" : "steps", periodMs };+ }+ return { ...base, firstChangeMs, lastChangeMs, kind: "there-and-back" };+}++// ---------- capture.ts → files ----------+export function writeGlArtifacts(out: string, d: any, t0: number, rate: number) {+ const dir = join(out, "gl");+ rmSync(dir, { recursive: true, force: true });+ rmSync(join(out, "three"), { recursive: true, force: true });+ ensureDir(dir);+ const t = (pageMs: number) => +((pageMs - t0) * rate).toFixed(1);+ const progKey = new Map<string, string>();+ for (const p of d.programs) progKey.set(p.id, p.id + (p.label ? ":" + slug(p.label) : ""));++ // shaders+ const shaderDir = ensureDir(join(dir, "shaders"));+ for (const p of d.programs) {+ const base = progKey.get(p.id)!.replace(":", "-");+ p.files = {};+ if (p.vs) { writeFileSync(join(shaderDir, base + ".vert"), p.vs); p.files.vs = `gl/shaders/${base}.vert`; }+ if (p.fs) { writeFileSync(join(shaderDir, base + ".frag"), p.fs); p.files.fs = `gl/shaders/${base}.frag`; }+ delete p.vs; delete p.fs;+ }+ for (const m of d.gpu?.modules ?? []) {+ if (!m.code) continue;+ const f = `${m.id}${m.label ? "-" + slug(m.label) : ""}.wgsl`;+ writeFileSync(join(shaderDir, f), m.code);+ m.file = `gl/shaders/${f}`;+ delete m.code;+ }+ // buffer dumps and canvas textures+ for (const [id, dump] of Object.entries<any>(d.dumps ?? {})) {+ const f = `${id}.${dump.type.replace(/Array$/, "")}.bin`;+ writeFileSync(join(ensureDir(join(dir, "buffers")), f), Buffer.from(dump.base64, "base64"));+ const b = d.buffers.find((x: any) => x.id === id);+ if (b) b.file = `gl/buffers/${f}`;+ }+ delete d.dumps;+ for (const tx of d.textures) {+ const url: string | undefined = tx.src?.dataUrl;+ if (!url) continue;+ writeFileSync(join(ensureDir(join(dir, "textures")), `${tx.id}.png`), Buffer.from(url.split(",")[1], "base64"));+ tx.src.file = `gl/textures/${tx.id}.png`;+ delete tx.src.dataUrl;+ }+ // three.js scenes in three's own JSON format (ObjectLoader.parse() loads them back)+ if (d.three) for (const s of d.three.scenes) {+ if (s._json) { writeFileSync(join(ensureDir(join(out, "three")), `scene-${s.index}.json`), s._json); s.file = `three/scene-${s.index}.json`; delete s._json; }+ }++ // ---------- channels ----------+ const frames: any[] = d.frameData;+ type Raw = { ts: number[]; vs: number[] };+ const raw = new Map<string, Raw>();+ const put = (key: string, tm: number, v: number) => { let r = raw.get(key); if (!r) raw.set(key, (r = { ts: [], vs: [] })); r.ts.push(tm); r.vs.push(v); };+ const meta = new Map<string, Partial<Channel>>();+ // uniforms: deltas per (program, n-th draw of it in the frame), replayed into values per frame+ const state = new Map<string, Record<string, number[]>>();+ const perOrd = new Map<string, Map<number, Raw>>(); // "prog|uniform|k" → ord → series+ for (const f of frames) {+ const tm = t(f.t);+ for (const [key, delta] of Object.entries<any>(f.u ?? {})) state.set(key, { ...(state.get(key) ?? {}), ...delta });+ for (const [pid, count] of Object.entries<number>(f.pc ?? {})) {+ for (let ord = 0; ord < count; ord++) {+ const vals = state.get(`${pid}#${ord}`);+ if (!vals) continue;+ for (const [name, v] of Object.entries(vals)) {+ if (v.length > 16) continue;+ v.forEach((x, k) => {+ const id = `${pid}|${name}|${k}|${v.length}`;+ let m = perOrd.get(id);+ if (!m) perOrd.set(id, (m = new Map()));+ let r = m.get(ord);+ if (!r) m.set(ord, (r = { ts: [], vs: [] }));+ r.ts.push(tm); r.vs.push(x);+ });+ }+ }+ }+ }+ for (const [id, m] of perOrd) {+ const [pid, name, k, n] = id.split("|");+ const series = [...m.entries()].sort((x, y) => x[0] - y[0]);+ const same = series.every(([, r]) => r.vs.length === series[0][1].vs.length && r.vs.every((v, i) => v === series[0][1].vs[i]));+ for (const [ord, r] of same ? series.slice(0, 1) : series) {+ const key = `${progKey.get(pid) ?? pid}${same ? "" : "#" + ord}.${name}${suffix(+n, +k)}`;+ raw.set(key, r);+ meta.set(key, { source: "uniform", program: pid, uniform: name });+ }+ }+ // scene graphs (three.js, pixi, playcanvas, babylon, ogl): deltas of camera / object / material values per render+ const sg: Record<string, number> = {};+ for (const f of frames) {+ if (!f.sg || !f.tr) continue;+ Object.assign(sg, f.sg);+ const tm = t(f.t);+ for (const [key, v] of Object.entries(sg)) { put(key, tm, v); if (!meta.has(key)) meta.set(key, { source: "scene" }); }+ }+ // WebGPU uniform buffer writes+ const gw: Record<string, number[]> = {};+ for (const f of frames) {+ if (!f.gw || !Object.keys(f.gw).length) continue;+ Object.assign(gw, f.gw);+ const tm = t(f.t);+ for (const [key, v] of Object.entries(gw)) v.forEach((x, k) => { const ck = `gpu:${key}[${k}]`; put(ck, tm, x); if (!meta.has(ck)) meta.set(ck, { source: "webgpu" }); });+ }++ const channels: Record<string, Channel> = {};+ const constants: Record<string, number> = {};+ for (const [key, r] of raw) {+ const c = classify(r.ts, r.vs);+ if (c.kind === "constant") { if (meta.get(key)?.source !== "scene" || Object.keys(constants).length < 2000) constants[key] = r.vs[0]; continue; }+ channels[key] = { ...(meta.get(key) as any), ...c };+ }+ // samples: one per frame that drew something, values carried forward between draws+ const keys = Object.keys(channels);+ const idx = new Map(keys.map((k) => [k, 0]));+ const samples: any[] = [];+ const times = [...new Set(keys.flatMap((k) => raw.get(k)!.ts))].sort((x, y) => x - y);+ const cur: Record<string, number> = {};+ for (const tm of times) {+ for (const k of keys) {+ const r = raw.get(k)!;+ let i = idx.get(k)!;+ while (i < r.ts.length && r.ts[i] <= tm) { cur[k] = r.vs[i]; i++; }+ idx.set(k, i);+ }+ samples.push({ t: tm, v: { ...cur } });+ }+ writeJson(join(out, "gl-track.json"), {+ kind: "gl-track", note: "t in ms, 0 = trigger. One sample per rendered frame; v holds every channel that changes during the capture (constants are in gl/gl.json). Fit one with: easing.ts --track gl-track.json --channel <key>",+ channels, samples,+ });++ // ---------- passes: what one frame draws, in order, per canvas ----------+ const drawn = frames.filter((f) => f.d?.length);+ const passes: any[] = [];+ const canvasOf = new Map(d.contexts.map((c: any) => [c.id, c.canvas]));+ const ctxIds = [...new Set(drawn.flatMap((f) => f.d.map((x: any) => x.c ?? "webgpu")))];+ for (const cid of ctxIds) {+ const rep = [...drawn].reverse().find((f) => f.d.some((x: any) => (x.c ?? "webgpu") === cid));+ if (!rep) continue;+ for (const dr of rep.d.filter((x: any) => (x.c ?? "webgpu") === cid)) {+ const fb = dr.fb && d.framebuffers.find((x: any) => x.id === dr.fb);+ const target = `${cid} ${canvasOf.get(cid) ?? ""} → ` + (dr.gpu ? "webgpu" : dr.fb ? `framebuffer ${dr.fb}${fb?.color ? " → texture " + fb.color : ""}` : "screen");+ let p = passes[passes.length - 1];+ if (!p || p.target !== target) passes.push((p = { target, draws: [] }));+ const last = p.draws[p.draws.length - 1];+ const label = dr.gpu ? dr.gpu : `${progKey.get(dr.p) ?? dr.p} ${dr.m} ${dr.n}${dr.i ? " ×" + dr.i + " instances" : ""}${dr.tx ? " samples " + dr.tx.filter(Boolean).join(",") : ""} [${dr.st}]`;+ if (last && last.label === label) last.times++;+ else p.draws.push({ label, times: 1 });+ }+ }+ const drawCounts = drawn.map((f) => f.d.length + (f.more || 0));+ const avgDraws = drawCounts.length ? +(drawCounts.reduce((s, n) => s + n, 0) / drawCounts.length).toFixed(1) : 0;+ writeJson(join(dir, "draws.json"), { note: "per frame: every draw call (p program, m primitive, n vertices, i instances, fb target framebuffer, tx bound textures by unit, st state), clears, three.js render calls", frames: frames.map((f) => ({ t: t(f.t), draws: f.d, more: f.more || undefined, clears: f.cl?.length ? f.cl : undefined, three: f.tr, canvas2d: f.c2 ? Object.fromEntries(Object.entries<any>(f.c2).map(([k, v]) => [k, { n: v.n, calls: v.calls }])) : undefined })) });+ // canvas 2D call logs from sampled frames+ const logs: Record<string, string[]> = {};+ for (const f of frames) for (const [cid, v] of Object.entries<any>(f.c2 ?? {})) if (v.log) (logs[cid] = logs[cid] ?? []).push(`--- frame t=${t(f.t)}ms (${v.n} calls)`, ...v.log);+ for (const [cid, lines] of Object.entries(logs)) writeFileSync(join(dir, `canvas2d-${cid}.txt`), lines.join("\n") + "\n");++ // ---------- gl.json ----------+ const animatedBy = new Map<string, string[]>();+ for (const [k, c] of Object.entries(channels)) if (c.program) animatedBy.set(c.program + "|" + c.uniform, [...(animatedBy.get(c.program + "|" + c.uniform) ?? []), k]);+ for (const p of d.programs) {+ p.key = progKey.get(p.id);+ p.drawsPerFrame = drawn.length ? +(p.draws / drawn.length).toFixed(2) : 0;+ for (const u of p.uniforms) { const ch = animatedBy.get(p.id + "|" + u.name); if (ch) u.animated = ch; }+ }+ const glJson = {+ note: "static side of the GPU scene; animated values are channels in ../gl-track.json; shader sources in shaders/",+ renderer: d.contexts.find((c: any) => c.renderer)?.renderer ?? (d.gpu?.adapter ? `WebGPU ${[d.gpu.adapter.vendor, d.gpu.adapter.architecture, d.gpu.adapter.description].filter(Boolean).join(" ")}` : null),+ contexts: d.contexts, three: d.three, engines: d.engines && Object.keys(d.engines).length ? d.engines : undefined, workers: d.workers, frames: frames.length, drawCallsPerFrame: avgDraws, passes,+ programs: d.programs, textures: d.textures, buffers: d.buffers, framebuffers: d.framebuffers,+ webgpu: d.gpu && (d.gpu.modules.length || d.gpu.pipelines.length) ? d.gpu : undefined,+ canvas2d: Object.keys(logs).length ? Object.keys(logs).map((c) => `gl/canvas2d-${c}.txt`) : undefined,+ constants, errors: d.errors?.length ? d.errors : undefined,+ };+ writeJson(join(dir, "gl.json"), glJson);+ const sum = summarize(out);+ writeFileSync(join(dir, "summary.md"), sum + "\n");+ return { contexts: d.contexts.map((c: any) => `${c.id} ${c.type} ${c.canvas}`), programs: d.programs.length, drawCallsPerFrame: avgDraws, animatedChannels: keys.length, three: d.three?.revision ?? undefined, summary: join(dir, "summary.md") };+}++// ---------- summary ----------+export function summarize(dirIn: string): string {+ const dir = abs(dirIn);+ const g = readJson(join(dir, "gl", "gl.json"));+ const track = existsSync(join(dir, "gl-track.json")) ? readJson(join(dir, "gl-track.json")) : { channels: {} };+ const L: string[] = [];+ L.push(`# GPU trace: ${dir}`, "");+ L.push(`renderer: ${g.renderer ?? "?"} · ${g.frames} frames traced · ${g.drawCallsPerFrame} draw calls per frame`, "");+ L.push("## Canvases");+ for (const c of g.contexts) L.push(`- ${c.id} ${c.type} on ${c.canvas}: ${c.size ? c.size.join("×") : "?"} px${c.cssRect ? `, css ${c.cssRect[2]}×${c.cssRect[3]} at ${c.cssRect[0]},${c.cssRect[1]} (pixel ratio ${c.pixelRatio})` : ""}${c.attributes ? `, antialias ${c.attributes.antialias}, alpha ${c.attributes.alpha}, premultipliedAlpha ${c.attributes.premultipliedAlpha}, preserveDrawingBuffer ${c.attributes.preserveDrawingBuffer}` : ""}`);+ if (g.three) {+ L.push("", `## three.js r${g.three.revision ?? "?"}`);+ for (const r of g.three.renderers) L.push(`- ${r.kind} on ${r.canvas}: pixelRatio ${r.pixelRatio}, size ${r.size?.join("×")}, outputColorSpace ${r.outputColorSpace ?? r.outputEncoding}, toneMapping ${r.toneMapping} (exposure ${r.toneMappingExposure}), clear ${JSON.stringify(r.clearColor)} α${r.clearAlpha}, autoClear ${r.autoClear}`);+ for (const s of g.three.scenes) {+ L.push(`- scene ${s.index}${s.name ? ` "${s.name}"` : ""}: ${s.objects} objects${s.file ? `, full JSON in ${s.file} (THREE.ObjectLoader)` : ""}`);+ for (const o of s.tree.slice(0, 40)) {+ if (o.key === "scene") continue;+ const geo = o.geometry ? ` ${o.geometry.type}${o.geometry.parameters ? JSON.stringify(o.geometry.parameters) : ""} ${o.geometry.vertices ?? "?"} verts` : "";+ const mat = o.material ? " · " + o.material.map((m: any) => `${m.type}${m.name ? ` "${m.name}"` : ""}${m.transparent ? " transparent" : ""}${m.blending !== 1 && m.blending !== undefined ? ` blending=${m.blending}` : ""}${m.uniforms ? ` uniforms[${m.uniforms.join(",")}]` : ""}`).join(", ") : "";+ L.push(` ${" ".repeat(o.depth)}- ${o.key} ${o.type}${geo}${mat} pos ${JSON.stringify(o.position)} rot ${JSON.stringify(o.rotation)}${o.visible ? "" : " (hidden)"}`);+ }+ if (s.tree.length > 40) L.push(` … ${s.tree.length - 40} more in gl/gl.json`);+ }+ for (const m of g.three.mixers ?? []) for (const act of m.actions) L.push(`- AnimationMixer on ${m.root}: clip "${act.clip}" ${act.duration?.toFixed?.(3)} s, ${act.tracks?.length} tracks (${act.tracks?.slice(0, 6).map((x: any) => `${x.name} ${x.keys} keys ${x.interpolation === 2300 ? "discrete" : x.interpolation === 2301 ? "linear" : x.interpolation === 2302 ? "smooth" : ""}`).join(", ")}…), ${act.running ? "running" : "stopped"}, timeScale ${act.timeScale}, loop ${act.loop === 2201 ? "repeat" : act.loop === 2200 ? "once" : act.loop === 2202 ? "pingpong" : act.loop}; keyframes in gl/gl.json › three.mixers`);+ if (g.three.loads?.length) L.push(`- loaded through three.js loaders: ${g.three.loads.map((x: any) => `${x.loader} ${x.url}`).join(", ")}`);+ }+ if (g.engines && Object.keys(g.engines).length) L.push("", "## Other engines", ...Object.entries<any>(g.engines).map(([k, v]) => `- ${k}: ${v.map((e: any) => `${e.kind}${e.version ? " v" + e.version : ""}`).join(", ")}; scene values are \`${k}:…\` channels`));+ L.push("", "## Programs (shaders in gl/shaders/)");+ for (const p of g.programs) {+ if (!p.draws) continue;+ L.push(`- **${p.key}**: ${p.drawsPerFrame}/frame, ${p.modes.join("/")} up to ${p.maxCount} verts${p.maxInstances ? ` × ${p.maxInstances} instances` : ""}, ${p.state}${p.files?.fs ? ` (${p.files.vs}, ${p.files.fs})` : ""}`);+ if (p.three?.length) L.push(` - three.js: ${p.three.join("; ")}`);+ const anim = p.uniforms.filter((u: any) => u.animated).map((u: any) => u.name);+ const fixed = p.uniforms.filter((u: any) => !u.animated && u.value !== undefined && !/^(sampler|isampler|usampler)/.test(u.type ?? "") && (u.value?.length ?? 0) <= 4).map((u: any) => `${u.name}=${u.value.length === 1 ? u.value[0] : "[" + u.value.join(",") + "]"}`);+ if (anim.length) L.push(` - animated: ${anim.join(", ")}`);+ if (fixed.length) L.push(` - fixed: ${fixed.slice(0, 24).join(", ")}${fixed.length > 24 ? " …" : ""}`);+ if (p.layout?.length) L.push(` - attributes: ${p.layout.map((x: any) => x.constant ? `${x.name}(constant)` : `${x.name} ${x.size}×${x.type} buf ${x.buffer}${x.divisor ? " per-instance" : ""}`).join(", ")}`);+ }+ const unused = g.programs.filter((p: any) => !p.draws).length;+ if (unused) L.push(`- (${unused} programs compiled but not drawn during the capture)`);+ if (g.passes?.length) {+ L.push("", "## One frame per canvas, in draw order (render target: draws)");+ for (const p of g.passes) L.push(`- ${p.target}: ${p.draws.map((x: any) => x.label + (x.times > 1 ? ` ×${x.times}` : "")).join("; ")}`);+ }+ const tex = g.textures.filter((t: any) => t.src && t.src.kind !== "empty" && t.src.kind !== "storage" && !(t.w === 1 && t.h === 1));+ if (tex.length) {+ L.push("", "## Textures with content");+ for (const t of tex.slice(0, 30)) L.push(`- ${t.id} ${t.w}×${t.h} ${t.src.kind}${t.src.url ? " " + t.src.url : ""}${t.src.file ? " → " + t.src.file : ""}${t.uploads > 1 ? ` (${t.uploads} uploads: updated while running)` : ""}`);+ }+ if (g.webgpu) L.push("", `## WebGPU`, `- ${g.webgpu.modules.length} shader modules (WGSL in gl/shaders/), ${g.webgpu.pipelines.length} pipelines`);+ if (g.canvas2d) L.push("", "## Canvas 2D", ...g.canvas2d.map((f: string) => `- call log of sampled frames: ${f}`));+ const ch = Object.entries<any>(track.channels);+ if (ch.length) {+ L.push("", `## Animated channels (${ch.length}; fit any of them with easing.ts --track gl-track.json --channel KEY)`);+ const order = ["transition", "there-and-back", "oscillation", "steps", "clock"];+ const shown = ch.sort((x, y) => order.indexOf(x[1].kind) - order.indexOf(y[1].kind) || (x[1].firstChangeMs ?? 0) - (y[1].firstChangeMs ?? 0));+ for (const [k, c] of shown.slice(0, 60)) L.push(`- ${k}: ${c.kind}${c.kind === "clock" ? ` (+${c.perSecond}/s)` : ""}${c.periodMs ? ` period ~${c.periodMs} ms` : ""}, ${c.min} → ${c.max}, changes ${c.firstChangeMs}–${c.lastChangeMs} ms`);+ if (shown.length > 60) L.push(`- … ${shown.length - 60} more: bun gl.ts channels ${dirIn}`);+ }+ if (g.errors?.length) L.push("", "## Tracer notes", ...g.errors.map((e: string) => `- ${e}`));+ return L.join("\n");+}++// ---------- compare ----------+function compareCaptures(refDir: string, cloneDir: string, map: Record<string, string>, timingLimit: number, grep: RegExp | null) {+ const R = readJson(join(refDir, "gl", "gl.json")), C = readJson(join(cloneDir, "gl", "gl.json"));+ const rt = readJson(join(refDir, "gl-track.json")), ct = readJson(join(cloneDir, "gl-track.json"));+ const L: string[] = [`# GPU compare: ${refDir} vs ${cloneDir}`, ""];+ // canvases matched by element (tag, id, classes), the probe canvases libraries make (300×150, not in the page) left out+ const ctx = (g: any) => g.contexts.filter((c: any) => /webgl|webgpu/.test(c.type) && c.cssRect && c.cssRect[2] > 0);+ const fmt = (c: any) => c ? `${c.type} ${c.size?.join("×")} px (ratio ${c.pixelRatio}), antialias ${c.attributes?.antialias}, alpha ${c.attributes?.alpha}, premultipliedAlpha ${c.attributes?.premultipliedAlpha}` : "—";+ L.push("## Canvases", "| canvas | reference | clone |", "|---|---|---|");+ const cc = ctx(C);+ for (const r of ctx(R)) {+ const c = cc.find((x: any) => x.canvas === r.canvas);+ L.push(`| ${r.canvas} | ${fmt(r)} | ${fmt(c)}${c && fmt(c) !== fmt(r) ? " **differs**" : ""} |`);+ }+ for (const c of cc) if (!ctx(R).some((r: any) => r.canvas === c.canvas)) L.push(`| ${c.canvas} | — | ${fmt(c)} |`);+ if (R.three || C.three) {+ const f = (g: any) => g.three ? g.three.renderers.map((r: any) => `${r.canvas}: r${g.three.revision} ${r.outputColorSpace ?? r.outputEncoding}, toneMapping ${r.toneMapping}, pixelRatio ${r.pixelRatio}, clear ${JSON.stringify(r.clearColor)} α${r.clearAlpha}`).join("<br>") : "—";+ L.push(`| three.js renderers | ${f(R)} | ${f(C)} |`);+ }+ // structure: drawn programs grouped by what they draw (primitive, vertex count, instances, blend/depth state)+ const sig = (g: any) => {+ const m = new Map<string, number>();+ for (const p of g.programs.filter((p: any) => p.draws)) {+ const k = `${p.modes.join("/")} ${p.maxCount}${p.maxInstances ? " ×" + p.maxInstances : ""} [${p.state}]`;+ m.set(k, +((m.get(k) ?? 0) + p.drawsPerFrame).toFixed(2));+ }+ return m;+ };+ const rs = sig(R), cs = sig(C);+ L.push("", "## Draw structure (draw calls per traced frame, by primitive · vertices · state)", "", "| draws | reference | clone |", "|---|---|---|");+ for (const k of [...new Set([...rs.keys(), ...cs.keys()])].sort()) L.push(`| ${k} | ${rs.get(k) ?? "—"} | ${cs.get(k) ?? "—"}${!rs.has(k) || !cs.has(k) ? " **only in one**" : ""} |`);+ L.push("", `draw calls per frame: ${R.drawCallsPerFrame} vs ${C.drawCallsPerFrame}. A different rate for the same draw usually means a different render cadence (every frame vs every other frame).`);++ // channels matched by uniform / property name (prefixes differ between builds), or by --map+ const tail = (k: string) => k.replace(/^(w\d+\.)?p\d+(:[\w-]+)?(#\d+)?\./, "").replace(/^(\w+):s\d+\//, "$1:").replace(/#\d+/g, "");+ const cIndex = new Map<string, string[]>();+ for (const k of Object.keys(ct.channels)) cIndex.set(tail(k), [...(cIndex.get(tail(k)) ?? []), k]);+ const series = (tr: any, k: string) => tr.samples.filter((s: any) => s.v[k] !== undefined).map((s: any) => [s.t, s.v[k]] as [number, number]);+ const at = (s: [number, number][], tm: number) => { let best = s[0]; for (const p of s) if (Math.abs(p[0] - tm) < Math.abs(best[0] - tm)) best = p; return best[1]; };+ const rows: string[] = [];+ let fails = 0;+ // several clone channels can share a name (every Group has a rotation.x): take the one that moves most alike+ const likeness = (r: any, c: any) => (c.kind === r.kind ? 0 : 1000) + Math.abs((c.firstChangeMs ?? 0) - (r.firstChangeMs ?? 0)) + Math.abs((c.lastChangeMs ?? 0) - (r.lastChangeMs ?? 0))+ + 1000 * (Math.abs(c.min - r.min) + Math.abs(c.max - r.max)) / Math.max(1e-9, Math.abs(r.max - r.min));+ const taken = new Set<string>();+ for (const [rk, r] of Object.entries<any>(rt.channels)) {+ if (r.kind === "clock" || (grep && !grep.test(rk))) continue;+ const wanted = map[tail(rk)] ?? tail(rk);+ const ck = (cIndex.get(wanted) ?? []).filter((k) => !taken.has(k)).sort((x, y) => likeness(r, ct.channels[x]) - likeness(r, ct.channels[y]))[0];+ if (ck) taken.add(ck);+ if (!ck) { rows.push(`| ${rk} | ${r.kind} ${r.min}→${r.max} ${r.firstChangeMs}–${r.lastChangeMs} ms | (no channel named ${wanted}) | | missing |`); fails++; continue; }+ const c = ct.channels[ck];+ const ds = r.firstChangeMs !== null && c.firstChangeMs !== null ? c.firstChangeMs - r.firstChangeMs : NaN;+ const de = r.lastChangeMs !== null && c.lastChangeMs !== null ? c.lastChangeMs - r.lastChangeMs : NaN;+ const span = Math.max(1e-9, r.max - r.min);+ const rsr = series(rt, rk), csr = series(ct, ck);+ const diffs = rsr.map(([tm, v]) => Math.abs(at(csr, tm) - v) / span);+ const mean = diffs.reduce((s, x) => s + x, 0) / Math.max(1, diffs.length);+ const ok = Math.abs(ds) <= timingLimit && Math.abs(de) <= timingLimit && mean <= 0.05 && c.kind === r.kind;+ if (!ok) fails++;+ rows.push(`| ${rk} | ${r.kind} ${r.min}→${r.max} ${r.firstChangeMs}–${r.lastChangeMs} ms | ${ck}: ${c.kind} ${c.min}→${c.max} ${c.firstChangeMs}–${c.lastChangeMs} ms | start ${ds >= 0 ? "+" : ""}${ds} ms, end ${de >= 0 ? "+" : ""}${de} ms, mean |Δ| ${(mean * 100).toFixed(1)} % of range | ${ok ? "pass" : "FAIL"} |`);+ }+ L.push("", `## Animated channels (${rows.length} in the reference; uniform time "clock" channels are skipped)`, "", "| reference | | clone | timing and value error | result |", "|---|---|---|---|---|", ...rows);+ L.push("", `pass: start/end within ${timingLimit} ms, same kind, mean value error ≤ 5 % of the reference range. ${fails} of ${rows.length} failing.`);+ return { md: L.join("\n"), fails };+}++if (import.meta.main) {+ const HELP = `+gl.ts — read a GPU trace written by capture.ts --gl.++ bun gl.ts summary <capture dir> canvases, three.js scene, programs, passes, textures, animated channels+ bun gl.ts channels <capture dir> [--grep RE] [--series KEY] list channels (kind, range, change window) or print one as [[t, v], …]+ bun gl.ts compare --ref <dir> --clone <dir> [--grep RE] [--map "uHover=u_hover,…"] [--timing 80] [--out report.md]+ canvas settings, draw structure and every animated channel, ref vs clone+`;+ const a = parseArgs(process.argv.slice(2));+ const cmd = a._[0];+ if (a.help || !cmd) usage(HELP);+ if (cmd === "summary") {+ const dir = String(a._[1] ?? a.in ?? "");+ if (!existsSync(join(dir, "gl", "gl.json"))) throw new Error(`no gl/gl.json in ${dir}: capture with --gl first`);+ console.log(summarize(dir));+ } else if (cmd === "channels") {+ const dir = String(a._[1] ?? a.in ?? "");+ const tr = readJson(join(dir, "gl-track.json"));+ if (a.series) {+ const k = String(a.series);+ const keys = Object.keys(tr.channels).filter((x) => x === k || x.endsWith("." + k) || x.endsWith(k));+ if (keys.length !== 1) throw new Error(keys.length ? `ambiguous: ${keys.join(", ")}` : `no channel ${k}`);+ console.log(JSON.stringify(tr.samples.filter((s: any) => s.v[keys[0]] !== undefined).map((s: any) => [s.t, s.v[keys[0]]])));+ } else {+ const re = a.grep ? new RegExp(String(a.grep), "i") : null;+ for (const [k, c] of Object.entries<any>(tr.channels)) if (!re || re.test(k)) console.log(`${k}\t${c.kind}\t${c.min} → ${c.max}\t${c.firstChangeMs}–${c.lastChangeMs} ms${c.perSecond ? `\t+${c.perSecond}/s` : ""}${c.periodMs ? `\tperiod ${c.periodMs} ms` : ""}`);+ }+ } else if (cmd === "compare") {+ if (!a.ref || !a.clone) usage(HELP);+ const map: Record<string, string> = {};+ for (const pair of String(a.map ?? "").split(",").filter(Boolean)) { const [x, y] = pair.split("="); map[x.trim()] = y.trim(); }+ const { md, fails } = compareCaptures(abs(String(a.ref)), abs(String(a.clone)), map, num(a.timing, 80), a.grep ? new RegExp(String(a.grep)) : null);+ if (a.out) writeFileSync(abs(String(a.out)), md + "\n");+ console.log(md);+ process.exitCode = fails ? 1 : 0;+ } else usage(HELP);+}diff --git a/skills/motion-clone/scripts/inpage/clock.js b/skills/motion-clone/scripts/inpage/clock.jsnew file mode 100644index 0000000..fd12f10--- /dev/null+++ b/skills/motion-clone/scripts/inpage/clock.js@@ -0,0 +1,258 @@+// Virtual clock, injected before any page script (capture.ts --clock virtual, --seed).+//+// Seeded Math.random: the same seed gives the same particles, arcs and noise on every capture.+// Virtual time: performance.now, Date, timers, requestAnimationFrame, requestIdleCallback,+// document.timeline.currentTime, Event.timeStamp and every CSS / Web Animations API animation follow+// one clock that the capturer advances by hand. A frame then takes as long as it takes to render (software+// GL, a slow machine) and the page still sees a steady 60 Hz, so frame k is always the state at t = k / fps.+//+// Free mode (before freeze) passes timers and frames through to the browser, with bookkeeping, so the+// page loads normally. freeze() takes the pending timers and frames over; advance(ms) then runs them in+// time order, ticking rAF every 1000 / rafHz ms and yielding to the event loop between callbacks so+// promise chains and MessageChannel schedulers (React) keep up.+(function (CFG) {+ const w = self; // also runs in workers (seed only)+ if (w.__mcClock) return;++ if (CFG.seed !== null && CFG.seed !== undefined) {+ // mulberry32+ let s = CFG.seed >>> 0 || 1;+ Math.random = function random() {+ s = (s + 0x6d2b79f5) | 0;+ let t = Math.imul(s ^ (s >>> 15), 1 | s);+ t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;+ return ((t ^ (t >>> 14)) >>> 0) / 4294967296;+ };+ }+ if (!CFG.virtual) { w.__mcClock = { virtual: false, seed: CFG.seed }; return; }++ const N = {+ setTimeout: w.setTimeout.bind(w), clearTimeout: w.clearTimeout.bind(w),+ raf: w.requestAnimationFrame.bind(w), caf: w.cancelAnimationFrame.bind(w),+ perfNow: performance.now.bind(performance), dateNow: Date.now, Date: Date,+ };+ const tsDesc = Object.getOwnPropertyDescriptor(Event.prototype, "timeStamp");+ const tlDesc = w.AnimationTimeline && Object.getOwnPropertyDescriptor(AnimationTimeline.prototype, "currentTime");++ const st = {+ frozen: false, now: 0, dateOffset: N.dateNow() - N.perfNow(), nextId: 1, seq: 0, nesting: 0,+ timers: new Map(), rafs: new Map(), tick: 1000 / (CFG.rafHz || 60), nextTick: 0,+ anims: new Map(), frames: 0, startedAt: null, keeper: 0, hist: [],+ };+ const now = () => (st.frozen ? st.now : N.perfNow());++ function call(cb, args) {+ try {+ if (typeof cb === "string") (0, eval)(cb);+ else if (typeof cb === "function") cb.apply(w, args);+ } catch (e) {+ N.setTimeout(() => { throw e; });+ }+ }++ // ---------- timers ----------+ function arm(t) {+ t.native = N.setTimeout(() => { if (st.timers.get(t.id) === t && !st.frozen) fire(t); }, Math.max(0, t.due - N.perfNow()));+ }+ function addTimer(cb, delay, args, interval) {+ const id = st.nextId++;+ const nesting = st.nesting + 1;+ let d = Math.max(0, Number(delay) || 0);+ if (nesting > 5 || interval) d = Math.max(d, nesting > 5 ? 4 : 1); // browsers clamp nested timers to 4 ms+ const t = { id, cb, args, delay: d, interval, due: now() + d, seq: st.seq++, nesting, native: null };+ st.timers.set(id, t);+ if (!st.frozen) arm(t);+ return id;+ }+ function fire(t) {+ if (t.interval) { t.due = (st.frozen ? t.due : N.perfNow()) + t.delay; t.seq = st.seq++; if (!st.frozen) arm(t); }+ else st.timers.delete(t.id);+ const prev = st.nesting;+ st.nesting = t.nesting;+ call(t.cb, t.args);+ st.nesting = prev;+ }+ function clearTimer(id) {+ const t = st.timers.get(id);+ if (!t) return;+ if (t.native !== null) N.clearTimeout(t.native);+ st.timers.delete(id);+ }+ w.setTimeout = function setTimeout(cb, delay, ...args) { return addTimer(cb, delay, args, false); };+ w.setInterval = function setInterval(cb, delay, ...args) { return addTimer(cb, delay, args, true); };+ w.clearTimeout = function clearTimeout(id) { clearTimer(id); };+ w.clearInterval = function clearInterval(id) { clearTimer(id); };+ w.requestIdleCallback = function requestIdleCallback(cb, opts) {+ return addTimer(() => cb({ didTimeout: false, timeRemaining: () => 10 }), Math.min(50, (opts && opts.timeout) || 1), [], false);+ };+ w.cancelIdleCallback = function cancelIdleCallback(id) { clearTimer(id); };++ // ---------- animation frames ----------+ w.requestAnimationFrame = function requestAnimationFrame(cb) {+ const id = st.nextId++;+ const r = { cb, native: null };+ if (!st.frozen) r.native = N.raf((ts) => { if (st.rafs.get(id) === r) { st.rafs.delete(id); call(cb, [ts]); } });+ st.rafs.set(id, r);+ return id;+ };+ w.cancelAnimationFrame = function cancelAnimationFrame(id) {+ const r = st.rafs.get(id);+ if (!r) return;+ if (r.native !== null) N.caf(r.native);+ st.rafs.delete(id);+ };+ function runFrame(ts) {+ st.frames++;+ syncAnims();+ syncVideos();+ const due = [...st.rafs.entries()];+ st.rafs.clear(); // callbacks registered while these run belong to the next frame+ for (const [, r] of due) call(r.cb, [ts]);+ }++ // ---------- CSS animations, transitions and WAAPI ----------+ // Each running animation on the document timeline is paused when first seen and then seeked to+ // base + (virtual now − first seen) · playbackRate. Finite ones are finish()ed at their end so+ // `finished` promises and finish events still fire (motion / Framer Motion wait on them).+ function syncAnims() {+ let list;+ try { list = document.getAnimations(); } catch { return; }+ for (const a of list) {+ if (a.timeline && a.timeline !== document.timeline) continue; // scroll / view timelines follow scroll+ let rec = st.anims.get(a);+ if (!rec || a.playState === "running") {+ if (!rec && a.playState !== "running") continue; // paused or finished by the page+ rec = { base: a.currentTime || 0, v0: st.now };+ st.anims.set(a, rec);+ try { a.pause(); } catch { continue; }+ }+ if (!st.frozen) continue;+ const rate = a.playbackRate || 1;+ const t = rec.base + (st.now - rec.v0) * rate;+ let end = Infinity;+ try { end = a.effect ? a.effect.getComputedTiming().endTime : Infinity; } catch {}+ if ((rate > 0 && t >= end) || (rate < 0 && t <= 0)) { st.anims.delete(a); try { a.finish(); } catch {} continue; }+ try { a.currentTime = t; } catch {}+ }+ }+ // <video> plays on the decoder's real clock: pause each playing video when first seen and seek it with+ // the virtual clock; busy() holds the frame until the seek has landed.+ const videos = new Map();+ function syncVideos() {+ let list;+ try { list = document.querySelectorAll("video"); } catch { return; }+ for (const v of list) {+ let rec = videos.get(v);+ if (!rec) {+ if (v.paused) continue;+ rec = { base: v.currentTime, v0: st.now };+ videos.set(v, rec);+ try { v.pause(); } catch {}+ }+ if (!st.frozen) continue;+ let t = rec.base + ((st.now - rec.v0) / 1000) * (v.playbackRate || 1);+ if (v.loop && v.duration > 0) t %= v.duration;+ else if (v.duration > 0) t = Math.min(t, v.duration);+ if (Math.abs(v.currentTime - t) > 0.001) try { v.currentTime = t; } catch {}+ }+ }++ // While frozen but not stepping (page load for --trigger load), keep catching new animations so+ // they start from ~0 instead of running on the real clock.+ function keeper() { if (!st.frozen) return; syncAnims(); st.keeper = N.raf(keeper); }++ // ---------- time sources ----------+ performance.now = function now_() { return now(); };+ function VDate(...a) {+ if (!new.target) return new N.Date(st.dateOffset + now()).toString();+ return a.length ? new N.Date(...a) : new N.Date(st.frozen ? st.dateOffset + st.now : N.dateNow());+ }+ VDate.prototype = N.Date.prototype;+ VDate.now = () => (st.frozen ? Math.round(st.dateOffset + st.now) : N.dateNow());+ VDate.parse = N.Date.parse;+ VDate.UTC = N.Date.UTC;+ Object.defineProperty(VDate.prototype, "constructor", { value: VDate, writable: true, configurable: true });+ w.Date = VDate;+ if (tsDesc && tsDesc.get) {+ Object.defineProperty(Event.prototype, "timeStamp", { configurable: true, get() { return st.frozen ? st.now : tsDesc.get.call(this); } });+ }+ if (tlDesc && tlDesc.get) {+ Object.defineProperty(AnimationTimeline.prototype, "currentTime", { configurable: true, get() { return st.frozen && this === document.timeline ? st.now : tlDesc.get.call(this); } });+ }++ // ---------- workers ----------+ // A worker answers on its own (real) clock. The capturer waits for posted-but-unanswered messages+ // before each frame, the same way it waits for the network, so a worker reply always lands on the+ // same virtual frame. A worker that never answers stops counting after 2 s.+ const pending = new Map();+ if (w.Worker) {+ const W = w.Worker;+ const post = W.prototype.postMessage;+ W.prototype.postMessage = function () {+ if (!this.__mcSilent) pending.set(this, N.perfNow());+ if (!this.__mcListening) {+ this.__mcListening = true;+ this.addEventListener("message", () => pending.delete(this));+ this.addEventListener("error", () => pending.delete(this));+ }+ return post.apply(this, arguments);+ };+ }+ function busy() {+ let n = 0;+ for (const v of videos.keys()) if (v.seeking) n++;+ for (const [wk, t] of pending) {+ if (N.perfNow() - t > 2000) { wk.__mcSilent = true; pending.delete(wk); } else n++;+ }+ return n;+ }++ // ---------- control ----------+ const mc = new MessageChannel();+ const waiting = [];+ mc.port1.onmessage = () => { const r = waiting.shift(); if (r) r(); };+ const yieldTask = () => new Promise((r) => { waiting.push(r); mc.port2.postMessage(0); });++ function freeze() {+ if (st.frozen) return st.now;+ st.now = N.perfNow();+ st.frozen = true;+ st.nextTick = st.now + st.tick;+ for (const t of st.timers.values()) if (t.native !== null) { N.clearTimeout(t.native); t.native = null; }+ for (const r of st.rafs.values()) if (r.native !== null) { N.caf(r.native); r.native = null; }+ syncAnims();+ keeper();+ return st.now;+ }++ async function advance(ms) {+ if (!st.frozen) freeze();+ if (st.startedAt === null) st.startedAt = st.now;+ N.caf(st.keeper);+ const target = st.now + Math.max(0, ms);+ for (let guard = 0; guard < 200000; guard++) {+ let next = null;+ for (const t of st.timers.values()) if (!next || t.due < next.due || (t.due === next.due && t.seq < next.seq)) next = t;+ const nextAt = Math.min(next ? next.due : Infinity, st.nextTick);+ if (nextAt > target) break;+ if (next && next.due <= st.nextTick) { st.now = Math.max(st.now, next.due); fire(next); }+ else { st.now = st.nextTick; st.nextTick += st.tick; runFrame(st.now); }+ await yieldTask();+ }+ st.now = target;+ syncAnims();+ syncVideos();+ keeper();+ if (st.hist.length < 20000) st.hist.push([N.perfNow(), st.now]);+ return st.now;+ }++ w.__mcClock = {+ virtual: true, seed: CFG.seed,+ freeze, advance, busy,+ history: () => st.hist, // [real performance.now, virtual now] after each advance, to place worker events+ now: () => now(),+ state: () => ({ frozen: st.frozen, now: st.now, timers: st.timers.size, rafs: st.rafs.size, frames: st.frames, animations: st.anims.size }),+ };+ if (CFG.freezeAtStart) freeze();+})diff --git a/skills/motion-clone/scripts/inpage/gl-hooks.js b/skills/motion-clone/scripts/inpage/gl-hooks.jsnew file mode 100644index 0000000..16e2a76--- /dev/null+++ b/skills/motion-clone/scripts/inpage/gl-hooks.js@@ -0,0 +1,718 @@+// GPU tracer, injected before any page script (capture.ts --gl).+//+// Pixels are the only output of a canvas, but everything that produced them passes through a handful of+// API calls. This wraps those calls and records:+// - WebGL 1/2: shader sources, programs, attribute layouts, textures (with their source URL), buffers+// (optionally their data), framebuffers, and per frame every draw call with its program, primitive,+// vertex/instance count, target framebuffer, bound textures, blend/depth/cull state and the uniform+// values that changed since the previous draw of that program. Uniforms are the animation channels of+// a GPU scene: a hover that eases a uniform from 0 to 1 over 600 ms shows up here as a curve.+// - three.js: through the __THREE_DEVTOOLS__ hook three.js calls on every Scene and WebGLRenderer, the+// renderer settings, the scene graph (exportable with toJSON) and per render the camera, object+// transforms and material uniforms.+// - WebGPU: WGSL shader modules, pipelines, draw counts and small uniform-buffer writes.+// - Canvas 2D: call counts per frame and the full call list on sampled frames.+// window.__mcgl.export() returns all of it; capture.ts turns it into gl.json, shaders/ and gl-track.json.+(function (CFG) {+ const w = self;+ if (w.__mcgl) return;+ const now = () => performance.now();+ const G = (w.__mcgl = {+ ctxs: [], programs: [], shaders: [], textures: [], buffers: [], fbs: [], frames: [], errors: [],+ three: { revision: null, renderers: [], scenes: [], rts: [] },+ gpu: { modules: [], pipelines: [], buffers: [] },+ cur: null, inRaf: 0, frameNo: 0, dumpBytes: 0,+ });+ const MAX_FRAMES = CFG.maxFrames || 1500;+ const MAX_DRAWS = CFG.maxDrawsPerFrame || 300;+ const MAX_OBJECTS = CFG.maxObjects || 250;+ const note = (where, e) => { if (G.errors.length < 50) G.errors.push(where + ": " + String((e && e.message) || e)); };++ // ---------- frames ----------+ // A frame is one requestAnimationFrame timestamp; work outside rAF joins the frame it happens near.+ function frameStart(ts) {+ if (G.cur && G.cur.ts === ts) return G.cur;+ if (G.frameNo % 30 === 0) try { engineScan(); } catch (e) { note("engine scan", e); } // engines that only show up as globals or on the context+ return newFrame(ts);+ }+ function newFrame(ts) {+ if (G.frames.length >= MAX_FRAMES) { G.cur = { dropped: true, ts, t: now(), d: [], u: {}, sg: {}, gw: {}, pc: {}, c2: null }; return G.cur; }+ G.cur = { i: G.frameNo++, ts, t: now(), d: [], u: {}, sg: {}, gw: {}, pc: {}, c2: null, cl: [], more: 0 };+ G.frames.push(G.cur);+ return G.cur;+ }+ function frame() {+ if (G.inRaf && G.cur) return G.cur;+ if (G.cur && now() - G.cur.t < 8) return G.cur;+ return newFrame(null);+ }+ if (w.requestAnimationFrame) {+ const raf = w.requestAnimationFrame;+ w.requestAnimationFrame = function requestAnimationFrame(cb) {+ return raf.call(this, function (ts) {+ frameStart(ts);+ G.inRaf++;+ try { return cb.apply(this, arguments); } finally { G.inRaf--; }+ });+ };+ }++ // ---------- ids ----------+ const reg = new WeakMap();+ const counters = {};+ function info(obj, kind, init) {+ if (!obj) return null;+ let i = reg.get(obj);+ if (!i) {+ counters[kind] = (counters[kind] || 0) + 1;+ i = Object.assign({ id: (CFG.idPrefix || "") + kind + counters[kind] }, init || {});+ reg.set(obj, i);+ }+ return i;+ }+ const r5 = (v) => (typeof v === "number" ? (Number.isInteger(v) ? v : +v.toPrecision(6)) : typeof v === "boolean" ? +v : v);++ function describeEl(el) {+ if (!el) return null;+ if (typeof OffscreenCanvas !== "undefined" && el instanceof OffscreenCanvas) return "OffscreenCanvas";+ let s = (el.tagName || "?").toLowerCase();+ if (el.id) s += "#" + el.id;+ if (el.classList && el.classList.length) s += "." + [...el.classList].slice(0, 3).join(".");+ return s;+ }++ // ---------- contexts ----------+ function registerCtx(ctx, canvas, type, attrs) {+ if (reg.has(ctx)) return;+ const kind = /webgl2/.test(type) ? "webgl2" : /webgl/.test(type) ? "webgl" : type;+ const c = info(ctx, "c", { type: kind, canvas: describeEl(canvas), requested: attrs || null, created: now() });+ c._ctx = ctx; c._canvas = canvas;+ c.st = { prog: null, fb: 0, vao: 0, ab: null, unit: 0, units: {}, caps: {}, blend: "SRC_ALPHA,ONE_MINUS_SRC_ALPHA", eq: "ADD", vp: null, cc: [0, 0, 0, 0], attribs: { 0: {} } };+ G.ctxs.push(c);+ }+ for (const C of [w.HTMLCanvasElement, w.OffscreenCanvas]) {+ if (!C) continue;+ const orig = C.prototype.getContext;+ C.prototype.getContext = function getContext(type, attrs) {+ const ctx = orig.apply(this, arguments);+ if (ctx) try { registerCtx(ctx, this, String(type), attrs); } catch (e) { note("getContext", e); }+ return ctx;+ };+ }++ // ---------- WebGL ----------+ const BLEND = { 0: "ZERO", 1: "ONE", 0x300: "SRC_COLOR", 0x301: "ONE_MINUS_SRC_COLOR", 0x302: "SRC_ALPHA", 0x303: "ONE_MINUS_SRC_ALPHA", 0x304: "DST_ALPHA", 0x305: "ONE_MINUS_DST_ALPHA", 0x306: "DST_COLOR", 0x307: "ONE_MINUS_DST_COLOR", 0x308: "SRC_ALPHA_SATURATE", 0x8001: "CONSTANT_COLOR", 0x8002: "ONE_MINUS_CONSTANT_COLOR", 0x8003: "CONSTANT_ALPHA", 0x8004: "ONE_MINUS_CONSTANT_ALPHA" };+ const EQ = { 0x8006: "ADD", 0x800a: "SUBTRACT", 0x800b: "REVERSE_SUBTRACT", 0x8007: "MIN", 0x8008: "MAX" };+ const MODE = ["POINTS", "LINES", "LINE_LOOP", "LINE_STRIP", "TRIANGLES", "TRIANGLE_STRIP", "TRIANGLE_FAN"];+ const TYPE = { 0x1406: "float", 0x8b50: "vec2", 0x8b51: "vec3", 0x8b52: "vec4", 0x1404: "int", 0x8b53: "ivec2", 0x8b54: "ivec3", 0x8b55: "ivec4", 0x8b56: "bool", 0x8b57: "bvec2", 0x8b58: "bvec3", 0x8b59: "bvec4", 0x8b5a: "mat2", 0x8b5b: "mat3", 0x8b5c: "mat4", 0x8b5e: "sampler2D", 0x8b5f: "sampler3D", 0x8b60: "samplerCube", 0x8b62: "sampler2DShadow", 0x8dc1: "sampler2DArray", 0x1405: "uint", 0x8dc6: "uvec2", 0x8dc7: "uvec3", 0x8dc8: "uvec4", 0x8b65: "mat2x3", 0x8b66: "mat2x4", 0x8b67: "mat3x2", 0x8b68: "mat3x4", 0x8b69: "mat4x2", 0x8b6a: "mat4x3", 0x8dca: "isampler2D", 0x8dd2: "usampler2D" };+ const CAP = { 0x0be2: "BLEND", 0x0b71: "DEPTH_TEST", 0x0b44: "CULL_FACE", 0x0b90: "STENCIL_TEST", 0x0c11: "SCISSOR_TEST" };+ const DATA_TYPE = { 0x1400: "BYTE", 0x1401: "UNSIGNED_BYTE", 0x1402: "SHORT", 0x1403: "UNSIGNED_SHORT", 0x1404: "INT", 0x1405: "UNSIGNED_INT", 0x1406: "FLOAT", 0x140b: "HALF_FLOAT", 0x8d61: "HALF_FLOAT_OES" };+ const S = (gl) => { const c = reg.get(gl); return c && c.st; };++ function describeSource(src) {+ if (!src || typeof src !== "object") return null;+ try {+ if (w.HTMLImageElement && src instanceof HTMLImageElement) return { kind: "img", url: src.currentSrc || src.src, w: src.naturalWidth, h: src.naturalHeight };+ if (w.HTMLVideoElement && src instanceof HTMLVideoElement) return { kind: "video", url: src.currentSrc || src.src, w: src.videoWidth, h: src.videoHeight };+ if (w.HTMLCanvasElement && src instanceof HTMLCanvasElement) return { kind: "canvas", el: describeEl(src), w: src.width, h: src.height, _el: src };+ if (w.OffscreenCanvas && src instanceof OffscreenCanvas) return { kind: "offscreen-canvas", w: src.width, h: src.height, _el: src };+ if (w.ImageBitmap && src instanceof ImageBitmap) return { kind: "bitmap", w: src.width, h: src.height, url: src.__mcUrl };+ if (w.ImageData && src instanceof ImageData) return { kind: "imagedata", w: src.width, h: src.height };+ if (w.VideoFrame && src instanceof VideoFrame) return { kind: "videoframe", w: src.displayWidth, h: src.displayHeight };+ if (ArrayBuffer.isView(src)) return { kind: "data", type: src.constructor.name, bytes: src.byteLength };+ } catch (e) { note("describeSource", e); }+ return { kind: typeof src };+ }++ function wrap(proto, name, after) {+ const o = proto && proto[name];+ if (typeof o !== "function" || o.__mc) return;+ const f = function () {+ const r = o.apply(this, arguments);+ try { after.call(this, r, arguments); } catch (e) { note(name, e); }+ return r;+ };+ f.__mc = true;+ proto[name] = f;+ }++ function onDraw(gl, mode, count, inst) {+ const s = S(gl);+ if (!s || !s.prog) return;+ const p = s.prog;+ p.draws++;+ p.modes[MODE[mode] || mode] = 1;+ if (count > p.maxCount) p.maxCount = count;+ if (inst && inst > p.maxInst) p.maxInst = inst;+ if (!p.layout) p.layout = attribLayout(s, p);+ const f = frame();+ if (f.dropped) return;+ const ord = (f.pc[p.id] = (f.pc[p.id] || 0) + 1) - 1;+ if (f.d.length >= MAX_DRAWS) { f.more++; return; }+ const tx = [];+ for (let u = 0; u < 8; u++) if (s.units[u]) tx[u] = s.units[u];+ const state = (s.caps.BLEND ? "blend " + s.blend + (s.eq !== "ADD" ? " " + s.eq : "") : "no-blend") + (s.caps.DEPTH_TEST ? " depth" : "") + (s.caps.CULL_FACE ? " cull" : "") + (s.depthMask === false ? " no-depth-write" : "");+ if (!p.state) p.state = state;+ f.d.push({ c: reg.get(gl).id, p: p.id, m: MODE[mode] || mode, n: count, i: inst || undefined, fb: s.fb, tx: tx.length ? tx : undefined, st: state, vp: s.vp ? s.vp.join(",") : undefined });+ // uniform deltas for this (program, ordinal-in-frame)+ const key = p.id + "#" + ord;+ const last = (p.snaps[ord] = p.snaps[ord] || {});+ let delta = null;+ for (const name in p.vals) {+ const v = p.vals[name];+ const l = last[name];+ let same = !!l && l.length === v.length;+ if (same) for (let k = 0; k < v.length; k++) if (l[k] !== v[k]) { same = false; break; }+ if (!same) { (delta || (delta = {}))[name] = v; last[name] = v; }+ }+ if (delta) f.u[key] = delta;+ }++ function attribLayout(s, p) {+ const out = [];+ const table = s.attribs[s.vao] || {};+ for (const idx in p.attribs) {+ const a = table[idx];+ out.push(Object.assign({ name: p.attribs[idx], index: +idx }, a ? { buffer: a.buf, size: a.size, type: DATA_TYPE[a.type] || a.type, normalized: !!a.norm, stride: a.stride, offset: a.off, divisor: a.div || undefined } : { constant: true }));+ }+ return out;+ }++ const UNIFORMS = ["uniform1f", "uniform2f", "uniform3f", "uniform4f", "uniform1i", "uniform2i", "uniform3i", "uniform4i", "uniform1ui", "uniform2ui", "uniform3ui", "uniform4ui"];+ const UNIFORMS_V = ["uniform1fv", "uniform2fv", "uniform3fv", "uniform4fv", "uniform1iv", "uniform2iv", "uniform3iv", "uniform4iv", "uniform1uiv", "uniform2uiv", "uniform3uiv", "uniform4uiv"];+ const UNIFORMS_M = ["uniformMatrix2fv", "uniformMatrix3fv", "uniformMatrix4fv", "uniformMatrix2x3fv", "uniformMatrix3x2fv", "uniformMatrix2x4fv", "uniformMatrix4x2fv", "uniformMatrix3x4fv", "uniformMatrix4x3fv"];+ const locs = new WeakMap();+ const texById = new Map();+ const setUniform = (loc, v) => {+ const l = locs.get(loc);+ if (!l) return;+ l.p.vals[l.name] = v.length > 64 ? v.slice(0, 64).map(r5) : v.map(r5);+ if (v.length > 64) l.p.long[l.name] = v.length;+ };+ const slice = (data, off, len) => Array.prototype.slice.call(data, off || 0, len ? (off || 0) + len : undefined);++ function hookWebGL(proto) {+ if (!proto) return;+ wrap(proto, "createShader", function (sh, [type]) { const i = info(sh, "s", { type: type === 0x8b31 ? "vertex" : "fragment", src: null }); G.shaders.push(i); });+ wrap(proto, "shaderSource", function (_, [sh, src]) { const i = reg.get(sh); if (i) i.src = src; });+ wrap(proto, "createProgram", function (p) {+ const i = info(p, "p", { vs: null, fs: null, links: 0, draws: 0, modes: {}, maxCount: 0, maxInst: 0, attribs: {}, vals: {}, long: {}, snaps: [], label: null, ctx: reg.get(this) && reg.get(this).id });+ i._gl = this; i._p = p;+ G.programs.push(i);+ });+ wrap(proto, "attachShader", function (_, [p, sh]) { const i = reg.get(p), s = reg.get(sh); if (i && s) i[s.type === "vertex" ? "vs" : "fs"] = s; });+ wrap(proto, "linkProgram", function (_, [p]) {+ const i = reg.get(p);+ if (!i) return;+ i.links++;+ i.vsSrc = i.vs && i.vs.src; i.fsSrc = i.fs && i.fs.src;+ const m = /#define SHADER_NAME (.+)/.exec(i.vsSrc || "") || /#define SHADER_NAME (.+)/.exec(i.fsSrc || "");+ if (m && !i.label) i.label = m[1].trim();+ i.linkedAt = now();+ });+ wrap(proto, "deleteProgram", function (_, [p]) { const i = reg.get(p); if (i) i.deleted = true; });+ wrap(proto, "useProgram", function (_, [p]) { const s = S(this); if (s) s.prog = reg.get(p) || null; });+ wrap(proto, "getUniformLocation", function (loc, [p, name]) { const i = reg.get(p); if (loc && i) locs.set(loc, { p: i, name: String(name).replace(/\[0\]$/, "") }); });+ wrap(proto, "getAttribLocation", function (idx, [p, name]) { const i = reg.get(p); if (i && idx >= 0) i.attribs[idx] = name; });+ wrap(proto, "bindAttribLocation", function (_, [p, idx, name]) { const i = reg.get(p); if (i) i.attribs[idx] = name; });+ for (const n of UNIFORMS) wrap(proto, n, function (_, a) { setUniform(a[0], Array.prototype.slice.call(a, 1)); });+ for (const n of UNIFORMS_V) wrap(proto, n, function (_, a) { setUniform(a[0], slice(a[1], a[2], a[3])); });+ for (const n of UNIFORMS_M) wrap(proto, n, function (_, a) { setUniform(a[0], slice(a[2], a[3], a[4])); });++ wrap(proto, "drawArrays", function (_, a) { onDraw(this, a[0], a[2], 0); });+ wrap(proto, "drawElements", function (_, a) { onDraw(this, a[0], a[1], 0); });+ wrap(proto, "drawArraysInstanced", function (_, a) { onDraw(this, a[0], a[2], a[3]); });+ wrap(proto, "drawElementsInstanced", function (_, a) { onDraw(this, a[0], a[1], a[4]); });+ wrap(proto, "drawRangeElements", function (_, a) { onDraw(this, a[0], a[3], 0); });++ wrap(proto, "createFramebuffer", function (fb) { G.fbs.push(info(fb, "f", { color: null })); });+ wrap(proto, "bindFramebuffer", function (_, [target, fb]) { const s = S(this); if (s && target !== 0x8ca8) s.fb = fb ? info(fb, "f", { color: null }).id : 0; }); // skip READ_FRAMEBUFFER+ wrap(proto, "framebufferTexture2D", function (_, [, att, , tex]) { const s = S(this); const f = s && s.fb && G.fbs.find((x) => x.id === s.fb); if (f && att === 0x8ce0) f.color = tex ? info(tex, "t", {}).id : null; });+ wrap(proto, "activeTexture", function (_, [u]) { const s = S(this); if (s) s.unit = u - 0x84c0; });+ wrap(proto, "createTexture", function (t) { const i = info(t, "t", { uploads: 0 }); G.textures.push(i); texById.set(i.id, i); });+ wrap(proto, "bindTexture", function (_, [, t]) { const s = S(this); if (s) s.units[s.unit] = t ? info(t, "t", { uploads: 0 }).id : undefined; });+ const texUpload = function (a, storage) {+ const s = S(this);+ if (!s) return;+ const id = s.units[s.unit];+ const t = id && texById.get(id);+ if (!t) return;+ t.uploads = (t.uploads || 0) + 1;+ if (t.uploads > 1 && t.src && t.src.kind !== "storage" && t.src.kind !== "empty") return;+ if (storage) { t.w = a[3]; t.h = a[4]; t.src = t.src || { kind: "storage" }; return; }+ if (a[1] !== 0) return; // mip levels+ let src = null;+ for (let k = a.length - 1; k >= 5; k--) if (a[k] && typeof a[k] === "object") { src = a[k]; break; }+ if (a.length === 6 && typeof a[5] === "object") src = a[5];+ t.src = describeSource(src) || { kind: "empty" };+ if (a.length >= 8 && typeof a[3] === "number") { t.w = a[3]; t.h = a[4]; } else if (t.src) { t.w = t.src.w; t.h = t.src.h; }+ };+ wrap(proto, "texImage2D", function (_, a) { texUpload.call(this, a, false); });+ wrap(proto, "texStorage2D", function (_, a) { texUpload.call(this, a, true); });+ wrap(proto, "texStorage3D", function (_, a) { texUpload.call(this, a, true); });+ // WebGL2 three.js allocates with texStorage2D, then uploads the image with texSubImage2D+ const subUpload = function (a, depth) {+ const s = S(this);+ const id = s && s.units[s.unit];+ const t = id && texById.get(id);+ if (!t || a[1] !== 0) return;+ t.uploads = (t.uploads || 0) + 1;+ if (t.src && t.src.kind !== "storage" && t.src.kind !== "empty") return;+ let src = null;+ for (let k = a.length - 1; k >= 4; k--) if (a[k] && typeof a[k] === "object") { src = a[k]; break; }+ const d = describeSource(src);+ if (d) { t.src = d; if (!t.w) { t.w = d.w; t.h = d.h; } if (depth) t.depth = a[6]; }+ };+ wrap(proto, "texSubImage2D", function (_, a) { subUpload.call(this, a, false); });+ wrap(proto, "texImage3D", function (_, a) { const s = S(this); const id = s && s.units[s.unit]; const t = id && texById.get(id); if (t && a[1] === 0) { t.uploads = (t.uploads || 0) + 1; t.w = a[3]; t.h = a[4]; t.depth = a[5]; let src = null; for (let k = a.length - 1; k >= 8; k--) if (a[k] && typeof a[k] === "object") { src = a[k]; break; } t.src = describeSource(src) || { kind: "empty" }; } });+ wrap(proto, "texSubImage3D", function (_, a) { subUpload.call(this, a, true); });+ wrap(proto, "compressedTexImage2D", function (_, a) { const s = S(this); const id = s && s.units[s.unit]; const t = id && texById.get(id); if (t) { t.uploads = (t.uploads || 0) + 1; t.w = a[3]; t.h = a[4]; t.src = t.src || { kind: "compressed" }; } });++ wrap(proto, "createBuffer", function (b) { G.buffers.push(info(b, "b", { uploads: 0 })); });+ wrap(proto, "bindBuffer", function (_, [target, b]) { const s = S(this); if (!s) return; if (target === 0x8892) s.ab = b ? info(b, "b", { uploads: 0 }).id : null; else if (target === 0x8893) s.eb = b ? info(b, "b", { uploads: 0 }).id : null; });+ wrap(proto, "bufferData", function (_, [target, data, usage, srcOffset, length]) {+ const s = S(this);+ const id = s && (target === 0x8893 ? s.eb : s.ab);+ const b = id && G.buffers.find((x) => x.id === id);+ if (!b) return;+ b.uploads++;+ b.target = target === 0x8893 ? "ELEMENT_ARRAY_BUFFER" : target === 0x8892 ? "ARRAY_BUFFER" : target;+ b.usage = { 0x88e4: "STATIC_DRAW", 0x88e8: "DYNAMIC_DRAW", 0x88e0: "STREAM_DRAW" }[usage] || usage;+ if (typeof data === "number") { b.bytes = data; return; }+ if (!data) return;+ const view = ArrayBuffer.isView(data) ? data : new Uint8Array(data);+ b.type = view.constructor.name;+ b.bytes = view.byteLength;+ if (b.uploads === 1) {+ b.sample = Array.prototype.slice.call(view, 0, 24).map(r5);+ if (CFG.dumpBuffers && G.dumpBytes + view.byteLength <= CFG.dumpBuffers) {+ b._dump = view.slice(srcOffset || 0, length ? (srcOffset || 0) + length : undefined);+ G.dumpBytes += b._dump.byteLength;+ }+ }+ });+ wrap(proto, "bufferSubData", function (_, [target]) { const s = S(this); const id = s && (target === 0x8893 ? s.eb : s.ab); const b = id && G.buffers.find((x) => x.id === id); if (b) b.subUploads = (b.subUploads || 0) + 1; });+ wrap(proto, "vertexAttribPointer", function (_, [idx, size, type, norm, stride, off]) { const s = S(this); if (s) { const t = (s.attribs[s.vao] = s.attribs[s.vao] || {}); t[idx] = Object.assign(t[idx] || {}, { buf: s.ab, size, type, norm, stride, off }); } });+ wrap(proto, "vertexAttribIPointer", function (_, [idx, size, type, stride, off]) { const s = S(this); if (s) { const t = (s.attribs[s.vao] = s.attribs[s.vao] || {}); t[idx] = Object.assign(t[idx] || {}, { buf: s.ab, size, type, stride, off }); } });+ wrap(proto, "vertexAttribDivisor", function (_, [idx, d]) { const s = S(this); if (s) { const t = (s.attribs[s.vao] = s.attribs[s.vao] || {}); t[idx] = Object.assign(t[idx] || {}, { div: d }); } });+ wrap(proto, "bindVertexArray", function (_, [v]) { const s = S(this); if (s) s.vao = v ? info(v, "v", {}).id : 0; });++ wrap(proto, "enable", function (_, [cap]) { const s = S(this); if (s && CAP[cap]) s.caps[CAP[cap]] = true; });+ wrap(proto, "disable", function (_, [cap]) { const s = S(this); if (s && CAP[cap]) s.caps[CAP[cap]] = false; });+ wrap(proto, "blendFunc", function (_, [a, b]) { const s = S(this); if (s) s.blend = (BLEND[a] || a) + "," + (BLEND[b] || b); });+ wrap(proto, "blendFuncSeparate", function (_, [a, b, c, d]) { const s = S(this); if (s) s.blend = [a, b, c, d].map((x) => BLEND[x] || x).join(","); });+ wrap(proto, "blendEquation", function (_, [m]) { const s = S(this); if (s) s.eq = EQ[m] || m; });+ wrap(proto, "blendEquationSeparate", function (_, [m, n]) { const s = S(this); if (s) s.eq = m === n ? EQ[m] || m : (EQ[m] || m) + "," + (EQ[n] || n); });+ wrap(proto, "depthMask", function (_, [m]) { const s = S(this); if (s) s.depthMask = !!m; });+ wrap(proto, "viewport", function (_, a) { const s = S(this); if (s) s.vp = [a[0], a[1], a[2], a[3]]; });+ wrap(proto, "clearColor", function (_, a) { const s = S(this); if (s) s.cc = [a[0], a[1], a[2], a[3]].map(r5); });+ wrap(proto, "clear", function (_, [mask]) { const s = S(this); if (!s) return; const f = frame(); if (!f.dropped && f.cl.length < 32) f.cl.push({ fb: s.fb, color: mask & 0x4000 ? s.cc : undefined }); });++ wrap(proto, "getExtension", function (ext, [name]) {+ const c = reg.get(this);+ if (c) (c.ext = c.ext || {})[name] = !!ext;+ if (!ext || ext.__mcw) return;+ ext.__mcw = true;+ const gl = this;+ if (name === "ANGLE_instanced_arrays") {+ wrap(ext, "drawArraysInstancedANGLE", function (_, a) { onDraw(gl, a[0], a[2], a[3]); });+ wrap(ext, "drawElementsInstancedANGLE", function (_, a) { onDraw(gl, a[0], a[1], a[4]); });+ wrap(ext, "vertexAttribDivisorANGLE", function (_, [idx, d]) { const s = S(gl); if (s) { const t = (s.attribs[s.vao] = s.attribs[s.vao] || {}); t[idx] = Object.assign(t[idx] || {}, { div: d }); } });+ }+ if (name === "OES_vertex_array_object") wrap(ext, "bindVertexArrayOES", function (_, [v]) { const s = S(gl); if (s) s.vao = v ? info(v, "v", {}).id : 0; });+ });+ }+ hookWebGL(w.WebGLRenderingContext && WebGLRenderingContext.prototype);+ hookWebGL(w.WebGL2RenderingContext && WebGL2RenderingContext.prototype);++ // ImageBitmaps made from fetched blobs lose their URL; keep it when the blob came from a Response.+ if (w.Response && w.createImageBitmap) {+ const blob = Response.prototype.blob;+ Response.prototype.blob = function () { const url = this.url; return blob.apply(this, arguments).then((b) => { try { b.__mcUrl = url; } catch {} return b; }); };+ const cib = w.createImageBitmap;+ w.createImageBitmap = function (src) { return cib.apply(this, arguments).then((bm) => { try { if (src && src.__mcUrl) bm.__mcUrl = src.__mcUrl; else if (src && src.currentSrc) bm.__mcUrl = src.currentSrc; } catch {} return bm; }); };+ }++ // ---------- three.js ----------+ const T = G.three;+ const objIds = new WeakMap();+ let objN = 0;+ const oid = (o) => { let i = objIds.get(o); if (!i) { i = ++objN; objIds.set(o, i); } return i; };+ const label = (o) => (o.name ? o.name.replace(/[.\s#:]+/g, "_") : o.type || "Object3D") + "#" + oid(o);+ const lastVal = {};+ function pushVal(f, key, v) {+ if (typeof v === "boolean") v = +v;+ if (typeof v !== "number" || !isFinite(v)) return;+ v = r5(v);+ if (lastVal[key] !== v) { lastVal[key] = v; f.sg[key] = v; }+ }+ function pushUniform(f, key, v) {+ if (v === null || v === undefined) return;+ if (typeof v === "number" || typeof v === "boolean") return pushVal(f, key, v);+ if (v.isColor) { pushVal(f, key + ".r", v.r); pushVal(f, key + ".g", v.g); pushVal(f, key + ".b", v.b); return; }+ if (v.isVector2 || v.isVector3 || v.isVector4 || v.isQuaternion) { for (const c of ["x", "y", "z", "w"]) if (c in v) pushVal(f, key + "." + c, v[c]); return; }+ if (v.isMatrix3 || v.isMatrix4) { v.elements.forEach((e, k) => pushVal(f, key + "[" + k + "]", e)); return; }+ if (Array.isArray(v) && v.length <= 16 && typeof v[0] === "number") v.forEach((e, k) => pushVal(f, key + "[" + k + "]", e));+ }+ function pushTransform(f, key, o) {+ for (const c of ["x", "y", "z"]) pushVal(f, key + ".position." + c, o.position[c]);+ for (const c of ["x", "y", "z"]) pushVal(f, key + ".rotation." + c, o.rotation[c]);+ for (const c of ["x", "y", "z"]) pushVal(f, key + ".scale." + c, o.scale[c]);+ pushVal(f, key + ".visible", o.visible);+ }+ function recordRender(renderer, scene, camera) {+ const f = frame();+ if (f.dropped || !scene) return;+ let si = T.scenes.indexOf(scene);+ if (si < 0) { T.scenes.push(scene); si = T.scenes.length - 1; }+ const rt = renderer.getRenderTarget ? renderer.getRenderTarget() : null;+ let rti = 0;+ if (rt) { rti = T.rts.indexOf(rt) + 1; if (!rti) { T.rts.push(rt); rti = T.rts.length; } }+ (f.tr = f.tr || []).push({ engine: "three", s: si, cam: camera ? label(camera) : null, rt: rti });+ const pre = "three:s" + si + "/";+ if (camera) {+ const ck = pre + "cam:" + label(camera);+ pushTransform(f, ck, camera);+ for (const k of ["fov", "zoom", "near", "far", "left", "right", "top", "bottom"]) if (k in camera) pushVal(f, ck + "." + k, camera[k]);+ }+ let n = 0;+ const seen = new Set();+ scene.traverse((o) => {+ if (n >= MAX_OBJECTS || o === scene) return;+ n++;+ const k = pre + label(o);+ pushTransform(f, k, o);+ if (o.morphTargetInfluences) o.morphTargetInfluences.slice(0, 8).forEach((v, i) => pushVal(f, k + ".morph[" + i + "]", v));+ const mats = o.material ? (Array.isArray(o.material) ? o.material : [o.material]) : [];+ for (const m of mats) {+ if (seen.has(m)) continue;+ seen.add(m);+ const mk = pre + "mat:" + label(m);+ pushVal(f, mk + ".opacity", m.opacity);+ if (m.color) pushUniform(f, mk + ".color", m.color);+ if (m.emissive) pushUniform(f, mk + ".emissive", m.emissive);+ if (m.uniforms) for (const u in m.uniforms) pushUniform(f, mk + "." + u, m.uniforms[u] && m.uniforms[u].value);+ }+ });+ }+ function hookRenderer(r) {+ if (T.renderers.includes(r)) return;+ T.renderers.push(r);+ const orig = r.render;+ if (typeof orig !== "function" || orig.__mc) return;+ const f = function (scene, camera) { try { recordRender(this, scene, camera); } catch (e) { note("three.render", e); } return orig.apply(this, arguments); };+ f.__mc = true;+ r.render = f;+ }+ try {+ const dt = w.__THREE_DEVTOOLS__ || (w.__THREE_DEVTOOLS__ = new EventTarget());+ dt.addEventListener("register", (e) => { T.revision = e.detail && e.detail.revision; });+ dt.addEventListener("observe", (e) => {+ const o = e.detail;+ if (!o) return;+ if (o.isScene) { if (!T.scenes.includes(o)) T.scenes.push(o); }+ else if (o.isWebGLRenderer || o.isWebGPURenderer || o.isRenderer || (typeof o.render === "function" && o.domElement)) queueMicrotask(() => hookRenderer(o));+ else if (typeof o.clipAction === "function") T.mixers.push(o); // AnimationMixer (r183+): its clips are keyframe data+ else if (typeof o.load === "function" && "manager" in o) hookLoader(o); // Loader (r183+): which files became the scene+ });+ } catch (e) { note("three hook", e); }+ T.mixers = [];+ T.loads = [];+ function hookLoader(l) {+ const load = l.load;+ if (typeof load !== "function" || load.__mc) return;+ const f = function (url) { try { if (T.loads.length < 200) T.loads.push({ loader: l.constructor && l.constructor.name, url: String(url) }); } catch {} return load.apply(this, arguments); };+ f.__mc = true;+ l.load = f;+ }++ // ---------- other engines: scene graph values per render, same channel format as three.js ----------+ // Each hook is the engine's own devtools entry point, so it works on bundled builds without globals.+ G.engines = { pixi: [], playcanvas: [], babylon: [], ogl: [] };+ const named = (o, fallback) => String((o && (o.label || o.name)) || fallback).replace(/[.\s#:/]+/g, "_");+ function pixiSample(stage) {+ const f = frame();+ if (f.dropped || !stage) return;+ let n = 0;+ const walk = (o, path) => {+ if (n++ >= MAX_OBJECTS) return;+ const k = "pixi:" + path + named(o, o.constructor && o.constructor.name) + "#" + oid(o);+ for (const p of ["x", "y", "rotation", "alpha", "visible"]) pushVal(f, k + "." + p, o[p]);+ if (o.scale) { pushVal(f, k + ".scale.x", o.scale.x); pushVal(f, k + ".scale.y", o.scale.y); }+ if (o.children) for (const c of o.children) walk(c, "");+ };+ walk(stage, "");+ (f.tr = f.tr || []).push({ engine: "pixi" });+ }+ w.__PIXI_APP_INIT__ = function (app, version) { G.engines.pixi.push({ version, app }); };+ w.__PIXI_RENDERER_INIT__ = function (renderer, version) {+ G.engines.pixi.push({ version, renderer });+ const r = renderer.render;+ if (typeof r === "function" && !r.__mc) {+ const f = function (opts) { try { pixiSample(opts && opts.container ? opts.container : opts); } catch (e) { note("pixi", e); } return r.apply(this, arguments); };+ f.__mc = true;+ renderer.render = f;+ }+ };+ try {+ w[Symbol.for("playcanvas.inspector")] = {+ register(app, inf) {+ G.engines.playcanvas.push({ version: inf && inf.version, app });+ app.on && app.on("framerender", () => {+ const f = frame();+ if (f.dropped) return;+ let n = 0;+ const walk = (e) => {+ if (n++ >= MAX_OBJECTS) return;+ const k = "playcanvas:" + named(e, "Entity") + "#" + oid(e);+ const p = e.getLocalPosition && e.getLocalPosition(), r = e.getLocalEulerAngles && e.getLocalEulerAngles(), s = e.getLocalScale && e.getLocalScale();+ if (p) for (const c of ["x", "y", "z"]) pushVal(f, k + ".position." + c, p[c]);+ if (r) for (const c of ["x", "y", "z"]) pushVal(f, k + ".rotation." + c, r[c]);+ if (s) for (const c of ["x", "y", "z"]) pushVal(f, k + ".scale." + c, s[c]);+ pushVal(f, k + ".enabled", e.enabled);+ for (const c of e.children || []) walk(c);+ };+ try { walk(app.root); } catch (e) { note("playcanvas", e); }+ (f.tr = f.tr || []).push({ engine: "playcanvas" });+ });+ },+ unregister() {},+ };+ } catch (e) { note("playcanvas hook", e); }+ function babylonScenes() {+ const B = w.BABYLON;+ if (!B || !B.Engine || !B.Engine.Instances) return;+ for (const eng of B.Engine.Instances) for (const sc of eng.scenes || []) {+ if (sc.__mc) continue;+ sc.__mc = true;+ G.engines.babylon.push({ version: B.Engine.Version, scene: sc });+ sc.onBeforeRenderObservable.add(() => {+ const f = frame();+ if (f.dropped) return;+ let n = 0;+ const objs = [].concat(sc.activeCamera ? [sc.activeCamera] : [], sc.meshes || [], sc.transformNodes || []);+ for (const m of objs) {+ if (n++ >= MAX_OBJECTS) break;+ const k = "babylon:" + named(m, m.getClassName ? m.getClassName() : "Node") + "#" + oid(m);+ for (const prop of ["position", "rotation", "scaling"]) if (m[prop]) for (const c of ["x", "y", "z"]) pushVal(f, k + "." + prop + "." + c, m[prop][c]);+ if ("alpha" in m) pushVal(f, k + ".alpha", m.alpha);+ if ("beta" in m) pushVal(f, k + ".beta", m.beta);+ if ("radius" in m) pushVal(f, k + ".radius", m.radius);+ if ("visibility" in m) pushVal(f, k + ".visibility", m.visibility);+ }+ (f.tr = f.tr || []).push({ engine: "babylon" });+ });+ }+ }+ // OGL sets gl.renderer = this on the context it creates; wrap its render({ scene, camera })+ function oglCheck(gl) {+ const r = gl && gl.renderer;+ if (!r || r.__mc || typeof r.render !== "function") return;+ r.__mc = true;+ G.engines.ogl.push({ renderer: r });+ const render = r.render;+ r.render = function (opts) {+ try {+ const f = frame();+ const scene = opts && opts.scene;+ if (!f.dropped && scene && scene.traverse) {+ let n = 0;+ const objs = [];+ if (opts.camera) objs.push(opts.camera);+ scene.traverse((o) => { if (n++ < MAX_OBJECTS) objs.push(o); });+ for (const o of objs) {+ const k = "ogl:" + named(o, o.constructor && o.constructor.name) + "#" + oid(o);+ for (const prop of ["position", "rotation", "scale"]) if (o[prop]) for (const [i, c] of ["x", "y", "z"].entries()) pushVal(f, k + "." + prop + "." + c, o[prop][c] !== undefined ? o[prop][c] : o[prop][i]);+ if ("visible" in o) pushVal(f, k + ".visible", o.visible);+ const u = o.program && o.program.uniforms;+ if (u) for (const name in u) { const v = u[name] && u[name].value; if (typeof v === "number") pushVal(f, k + ".u." + name, v); else if (v && v.length <= 4 && typeof v[0] === "number") for (let i = 0; i < v.length; i++) pushVal(f, k + ".u." + name + "[" + i + "]", v[i]); }+ }+ (f.tr = f.tr || []).push({ engine: "ogl" });+ }+ } catch (e) { note("ogl", e); }+ return render.apply(this, arguments);+ };+ }+ const engineScan = () => { babylonScenes(); for (const c of G.ctxs) if (c._ctx) oglCheck(c._ctx); };++ // ---------- WebGPU ----------+ if (w.GPU && GPU.prototype.requestAdapter) wrap(GPU.prototype, "requestAdapter", function (pr) {+ if (pr && pr.then) pr.then((ad) => { try { if (ad && ad.info) G.gpu.adapter = { vendor: ad.info.vendor, architecture: ad.info.architecture, device: ad.info.device, description: ad.info.description }; } catch {} });+ });+ if (w.GPUDevice) {+ const gpuId = new WeakMap();+ let gn = 0;+ const gid = (o, k) => { let i = gpuId.get(o); if (!i) { i = (CFG.idPrefix || "") + k + ++gn; gpuId.set(o, i); } return i; };+ wrap(GPUDevice.prototype, "createShaderModule", function (m, [d]) { G.gpu.modules.push({ id: gid(m, "m"), label: d && d.label, code: d && d.code }); });+ const pipe = function (pl, [d], kind) {+ const blend = d && d.fragment && d.fragment.targets ? d.fragment.targets.map((t) => t && { format: t.format, blend: t.blend }) : undefined;+ G.gpu.pipelines.push({ id: gid(pl, "pl"), kind, label: d && d.label, vertex: d && d.vertex && { module: gid(d.vertex.module, "m"), entryPoint: d.vertex.entryPoint }, fragment: d && d.fragment && { module: gid(d.fragment.module, "m"), entryPoint: d.fragment.entryPoint, targets: blend }, compute: d && d.compute && { module: gid(d.compute.module, "m"), entryPoint: d.compute.entryPoint }, primitive: d && d.primitive });+ };+ wrap(GPUDevice.prototype, "createRenderPipeline", function (pl, a) { pipe(pl, a, "render"); });+ wrap(GPUDevice.prototype, "createComputePipeline", function (pl, a) { pipe(pl, a, "compute"); });+ wrap(GPUDevice.prototype, "createBuffer", function (b, [d]) { G.gpu.buffers.push({ id: gid(b, "gb"), label: d && d.label, size: d && d.size, usage: d && d.usage }); });+ if (w.GPUQueue) wrap(GPUQueue.prototype, "writeBuffer", function (_, [buf, off, data, dOff, size]) {+ const f = frame();+ if (f.dropped || !data) return;+ const bytes = ArrayBuffer.isView(data) ? data.byteLength : data.byteLength;+ if (bytes > 1024) return; // uniforms, not geometry+ const view = ArrayBuffer.isView(data) ? new Float32Array(data.buffer, data.byteOffset, Math.floor(data.byteLength / 4)) : new Float32Array(data, 0, Math.floor(data.byteLength / 4));+ const start = (dOff || 0) * (ArrayBuffer.isView(data) ? data.BYTES_PER_ELEMENT / 4 : 1 / 4);+ f.gw[gid(buf, "gb") + "@" + (off || 0)] = Array.prototype.slice.call(view, start, Math.min(view.length, start + (size ? size / 4 : 64), start + 64)).map(r5);+ });+ if (w.GPURenderPassEncoder) for (const n of ["draw", "drawIndexed", "drawIndirect", "drawIndexedIndirect"]) wrap(GPURenderPassEncoder.prototype, n, function (_, a) { const f = frame(); if (!f.dropped) { f.gd = (f.gd || 0) + 1; if (f.d.length < MAX_DRAWS) f.d.push({ gpu: n, n: a[0], i: a[1] }); } });+ }++ // ---------- Canvas 2D ----------+ if (CFG.canvas2d !== false && w.CanvasRenderingContext2D) {+ const P = CanvasRenderingContext2D.prototype;+ const every = CFG.sample2dEvery || 15;+ const fmt = (v) => typeof v === "number" ? r5(v) : typeof v === "string" ? v.slice(0, 60) : v && v.constructor ? "[" + v.constructor.name + (v.src ? " " + String(v.src).slice(-60) : "") + "]" : String(v);+ const log = (ctx, name, args) => {+ const c = reg.get(ctx);+ if (!c) return;+ const f = frame();+ if (f.dropped) return;+ const c2 = (f.c2 = f.c2 || {});+ const per = (c2[c.id] = c2[c.id] || { n: 0, calls: {} });+ per.n++;+ per.calls[name] = (per.calls[name] || 0) + 1;+ if (f.i % every === 0 && per.n <= 2000) (per.log = per.log || []).push(name + "(" + Array.prototype.map.call(args, fmt).join(", ") + ")");+ };+ for (const name of Object.getOwnPropertyNames(P)) {+ const d = Object.getOwnPropertyDescriptor(P, name);+ if (!d || name === "constructor") continue;+ if (typeof d.value === "function" && !/^(get|is|measureText)/.test(name)) wrap(P, name, function (_, a) { log(this, name, a); });+ else if (d.set && /Style|global|line|font|shadow|filter|text|imageSmoothing/.test(name)) {+ Object.defineProperty(P, name, { configurable: true, enumerable: d.enumerable, get: d.get, set(v) { d.set.call(this, v); try { log(this, name + "=", [v]); } catch {} } });+ }+ }+ }++ // ---------- export ----------+ G.export = function () {+ const out = { revision: T.revision, errors: G.errors, frames: G.frames.length, contexts: [], programs: [], textures: [], buffers: [], framebuffers: G.fbs, frameData: G.frames, three: null, gpu: G.gpu, dumps: {} };+ for (const c of G.ctxs) {+ const o = { id: c.id, type: c.type, canvas: c.canvas, requested: c.requested, created: c.created, extensions: c.ext ? Object.keys(c.ext) : undefined };+ try {+ const el = c._canvas;+ if (el) {+ o.size = [el.width, el.height];+ if (el.getBoundingClientRect) { const r = el.getBoundingClientRect(); o.cssRect = [r.x, r.y, r.width, r.height].map((v) => Math.round(v)); o.pixelRatio = r.width ? +(el.width / r.width).toFixed(3) : null; }+ }+ const gl = c._ctx;+ if (c.type === "webgl" || c.type === "webgl2") {+ o.attributes = gl.getContextAttributes();+ const dbg = gl.getExtension("WEBGL_debug_renderer_info");+ o.renderer = dbg ? gl.getParameter(dbg.UNMASKED_RENDERER_WEBGL) : gl.getParameter(gl.RENDERER);+ o.version = gl.getParameter(gl.VERSION);+ o.contextLost = gl.isContextLost();+ }+ } catch (e) { note("export ctx", e); }+ out.contexts.push(o);+ }+ // three.js renderers: settings, and their WebGLProgram names so GL programs get readable labels+ if (T.renderers.length || T.scenes.length) {+ out.three = { revision: T.revision || w.__THREE__ || null, renderers: [], scenes: [], loads: T.loads.length ? T.loads : undefined, mixers: undefined };+ if (T.mixers.length) out.three.mixers = T.mixers.map((m) => {+ const acts = (m._actions || []).map((act) => {+ const c = act.getClip ? act.getClip() : act._clip;+ return { clip: c && c.name, duration: c && c.duration, tracks: c && c.tracks.slice(0, 60).map((tr) => ({ name: tr.name, type: tr.ValueTypeName, keys: tr.times.length, times: Array.from(tr.times.slice(0, 64)).map(r5), values: Array.from(tr.values.slice(0, 256)).map(r5), interpolation: tr.getInterpolation && tr.getInterpolation() })), running: act.isRunning && act.isRunning(), time: r5(act.time), timeScale: act.timeScale, weight: act.weight, loop: act.loop, repetitions: act.repetitions, clampWhenFinished: act.clampWhenFinished };+ });+ return { root: m.getRoot && m.getRoot() && label(m.getRoot()), timeScale: m.timeScale, actions: acts };+ });+ for (const r of T.renderers) {+ const o = {};+ try {+ const cc = { r: 0, g: 0, b: 0, copy(c) { this.r = c.r; this.g = c.g; this.b = c.b; return this; } };+ if (r.getClearColor) r.getClearColor(cc);+ const size = r.getSize ? r.getSize({ set(x, y) { this.x = x; this.y = y; return this; } }) : null;+ Object.assign(o, {+ kind: r.isWebGPURenderer ? "WebGPURenderer" : r.isWebGLRenderer ? "WebGLRenderer" : "renderer",+ canvas: describeEl(r.domElement), pixelRatio: r.getPixelRatio && r.getPixelRatio(), size: size && [size.x, size.y],+ toneMapping: r.toneMapping, toneMappingExposure: r.toneMappingExposure, outputColorSpace: r.outputColorSpace, outputEncoding: r.outputEncoding,+ clearColor: [cc.r, cc.g, cc.b].map(r5), clearAlpha: r.getClearAlpha && r.getClearAlpha(), autoClear: r.autoClear, sortObjects: r.sortObjects,+ shadowMap: r.shadowMap && { enabled: r.shadowMap.enabled, type: r.shadowMap.type }, useLegacyLights: r.useLegacyLights,+ info: r.info && { render: Object.assign({}, r.info.render), memory: Object.assign({}, r.info.memory) },+ });+ const progs = (r.info && r.info.programs) || [];+ for (const wp of progs) {+ const gp = wp && wp.program && reg.get(wp.program);+ if (gp) gp.label = (wp.name ? wp.name + " " : "") + "(" + (wp.type || "material") + ")";+ }+ if (r.properties && r.properties.get) for (const sc of T.scenes) sc.traverse((o) => {+ for (const m of o.material ? (Array.isArray(o.material) ? o.material : [o.material]) : []) {+ const wp = r.properties.get(m).currentProgram;+ const gp = wp && wp.program && reg.get(wp.program);+ if (gp) { gp.three = gp.three || []; const tag = "three:s" + T.scenes.indexOf(sc) + "/mat:" + label(m) + " on " + label(o); if (!gp.three.includes(tag)) gp.three.push(tag); }+ }+ });+ } catch (e) { note("export three renderer", e); }+ out.three.renderers.push(o);+ }+ T.scenes.forEach((s, i) => {+ const o = { index: i, uuid: s.uuid, name: s.name, objects: 0, tree: [] };+ try {+ s.traverse((x) => {+ o.objects++;+ if (o.tree.length >= 400) return;+ let depth = 0; for (let p = x.parent; p && p !== s.parent; p = p.parent) depth++;+ const g = x.geometry, m = x.material;+ const mats = m ? (Array.isArray(m) ? m : [m]) : [];+ o.tree.push({+ depth, key: x === s ? "scene" : label(x), type: x.type, name: x.name || undefined, visible: x.visible, renderOrder: x.renderOrder || undefined,+ position: x.position && x.position.toArray().map(r5), rotation: x.rotation && [x.rotation.x, x.rotation.y, x.rotation.z].map(r5), scale: x.scale && x.scale.toArray().map(r5),+ geometry: g && { type: g.type, parameters: g.parameters, vertices: g.attributes && g.attributes.position ? g.attributes.position.count : undefined, attributes: g.attributes ? Object.keys(g.attributes) : undefined, instances: x.count },+ material: mats.length ? mats.map((mm) => ({ key: label(mm), type: mm.type, name: mm.name || undefined, transparent: mm.transparent, blending: mm.blending, depthTest: mm.depthTest, depthWrite: mm.depthWrite, side: mm.side, opacity: mm.opacity, color: mm.color && mm.color.getHexString && "#" + mm.color.getHexString(), map: mm.map ? (mm.map.image && (mm.map.image.currentSrc || mm.map.image.src)) || mm.map.name || "texture" : undefined, uniforms: mm.uniforms ? Object.keys(mm.uniforms) : undefined })) : undefined,+ animations: x.animations && x.animations.length ? x.animations.map((a) => ({ name: a.name, duration: a.duration, tracks: a.tracks.length })) : undefined,+ });+ });+ if (CFG.sceneJson !== false) {+ const json = JSON.stringify(s.toJSON());+ o.jsonBytes = json.length;+ if (json.length <= (CFG.maxSceneBytes || 40e6)) o._json = json;+ }+ } catch (e) { note("export three scene " + i, e); }+ out.three.scenes.push(o);+ });+ }+ out.engines = {};+ for (const [k, list] of Object.entries(G.engines)) if (list.length) out.engines[k] = list.map((e) => ({ version: e.version, kind: e.app ? "app" : e.renderer ? "renderer" : e.scene ? "scene" : "?" }));+ out.timeOrigin = performance.timeOrigin;+ for (const p of G.programs) {+ const o = { id: p.id, label: p.label, three: p.three, ctx: p.ctx, links: p.links, deleted: p.deleted || undefined, draws: p.draws, modes: Object.keys(p.modes), maxCount: p.maxCount, maxInstances: p.maxInst || undefined, state: p.state, layout: p.layout, vs: p.vsSrc, fs: p.fsSrc, uniforms: [], longUniforms: Object.keys(p.long).length ? p.long : undefined };+ try {+ const gl = p._gl;+ if (!p.deleted && gl && !gl.isContextLost()) {+ const n = gl.getProgramParameter(p._p, gl.ACTIVE_UNIFORMS) || 0;+ for (let k = 0; k < n; k++) {+ const u = gl.getActiveUniform(p._p, k);+ if (!u) continue;+ const name = u.name.replace(/\[0\]$/, "");+ o.uniforms.push({ name, type: TYPE[u.type] || u.type, size: u.size, value: p.vals[name] });+ }+ const na = gl.getProgramParameter(p._p, gl.ACTIVE_ATTRIBUTES) || 0;+ o.attributes = [];+ for (let k = 0; k < na; k++) { const a = gl.getActiveAttrib(p._p, k); if (a) o.attributes.push({ name: a.name, type: TYPE[a.type] || a.type, size: a.size }); }+ }+ } catch (e) { note("export program", e); }+ if (!o.uniforms.length) o.uniforms = Object.keys(p.vals).map((name) => ({ name, value: p.vals[name] }));+ out.programs.push(o);+ }+ for (const t of G.textures) {+ const o = { id: t.id, w: t.w, h: t.h, uploads: t.uploads };+ if (t.src) { o.src = Object.assign({}, t.src); delete o.src._el; if (t.src._el && CFG.snapshotCanvases !== false) { try { o.src.dataUrl = t.src._el.toDataURL ? t.src._el.toDataURL("image/png") : undefined; } catch {} } }+ out.textures.push(o);+ }+ for (const b of G.buffers) {+ out.buffers.push({ id: b.id, target: b.target, usage: b.usage, type: b.type, bytes: b.bytes, uploads: b.uploads, subUploads: b.subUploads, sample: b.sample });+ if (b._dump) {+ const u8 = new Uint8Array(b._dump.buffer, b._dump.byteOffset, b._dump.byteLength);+ let s = "";+ for (let k = 0; k < u8.length; k += 0x8000) s += String.fromCharCode.apply(null, u8.subarray(k, k + 0x8000));+ out.dumps[b.id] = { type: b.type, base64: btoa(s) };+ }+ }+ return out;+ };+})diff --git a/skills/motion-clone/scripts/sheet.ts b/skills/motion-clone/scripts/sheet.tsindex 0a9295e..c6b0eae 100644--- a/skills/motion-clone/scripts/sheet.ts+++ b/skills/motion-clone/scripts/sheet.ts@@ -6,7 +6,7 @@import { chromium } from "playwright";import { join, basename } from "node:path";import { existsSync, readFileSync } from "node:fs";-import { abs, ensureDir, listFrames, num, parseArgs, readJson, usage } from "./lib.ts";+import { abs, ensureDir, listFrames, num, pad, parseArgs, readJson, usage } from "./lib.ts";const HELP = `sheet.ts — labelled contact sheets.@@ -27,9 +27,11 @@ const mode = a._[0];if (a.help || !mode || !a.out) usage(HELP);const out = ensureDir(abs(String(a.out)));+// frames.ts writes frames.json beside the frames, capture.ts one level upfunction fpsOf(dir: string, fallback: number) {- const j = join(dir, "frames.json");- if (existsSync(j)) { const m = readJson(j); if (m.fps) return Number(m.fps); }+ for (const j of [join(dir, "frames.json"), join(dir, "..", "frames.json")]) {+ if (existsSync(j)) { const m = readJson(j); if (m.fps) return Number(m.fps); }+ }return fallback;}const label = (i: number, fps: number) => `#${i} ${(i / fps).toFixed(2)}s`;@@ -64,24 +66,25 @@ if (mode === "filmstrip") {const fps = num(a.fps, fpsOf(refDir, 25));const every = num(a.every, 1), per = num(a["per-sheet"], 8), width = num(a.width, 420), offset = num(a.offset, 0);const ref = listFrames(refDir), clone = listFrames(cloneDir);- const diffs = diffDir ? listFrames(diffDir) : [];+ const hasDiffs = !!diffDir && listFrames(diffDir).length > 0;let report: any = null;if (diffDir && existsSync(join(diffDir, "..", "report.json"))) report = readJson(join(diffDir, "..", "report.json"));const n = Math.min(ref.length, clone.length - Math.max(0, offset));const idx: number[] = [];- const from = num(a.from, 0), to = num(a.to, n - 1);+ const from = num(a.from, Math.max(0, -offset)), to = num(a.to, n - 1);for (let i = from; i <= to && i < n; i += every) idx.push(i);- const ncol = diffs.length ? 3 : 2;+ const ncol = hasDiffs ? 3 : 2;for (let s = 0; s * per < idx.length; s++) {const chunk = idx.slice(s * per, (s + 1) * per);const rows = chunk.map((i) => {const c = clone[i + offset];- const d = diffs[i];- const mm = report?.frames?.[i]?.mismatch;+ // compare.ts names each diff after its reference frame and skips frames without a clone frame+ const d = hasDiffs ? join(diffDir!, `${pad(i)}.png`) : undefined;+ const mm = report?.frameDetails?.[i]?.mismatch ?? undefined;const cap = `${label(i, fps)}${mm !== undefined ? ` · mismatch ${(mm * 100).toFixed(1)}%` : ""}`;- return `<div class="cap">${cap}</div><div class="row" style="grid-template-columns:repeat(${ncol},${width}px)"><img src="${fileUrl(ref[i])}" style="width:${width}px"><img src="${c ? fileUrl(c) : ""}" style="width:${width}px">${d ? `<img src="${fileUrl(d)}" style="width:${width}px">` : ""}</div>`;+ return `<div class="cap">${cap}</div><div class="row" style="grid-template-columns:repeat(${ncol},${width}px)"><img src="${fileUrl(ref[i])}" style="width:${width}px"><img src="${c ? fileUrl(c) : ""}" style="width:${width}px">${d && existsSync(d) ? `<img src="${fileUrl(d)}" style="width:${width}px">` : ""}</div>`;}).join("");- sheets.push({ name: `compare-${String(s + 1).padStart(2, "0")}.png`, html: `<style>${css}</style><p class="hdr">reference vs clone${diffs.length ? " vs diff" : ""} · ${fps} fps · clone offset ${offset}</p><div class="colhdr" style="grid-template-columns:repeat(${ncol},${width}px)"><div>reference</div><div>clone</div>${diffs.length ? "<div>diff (red = differs)</div>" : ""}</div>${rows}` });+ sheets.push({ name: `compare-${String(s + 1).padStart(2, "0")}.png`, html: `<style>${css}</style><p class="hdr">reference vs clone${hasDiffs ? " vs diff" : ""} · ${fps} fps · clone offset ${offset}</p><div class="colhdr" style="grid-template-columns:repeat(${ncol},${width}px)"><div>reference</div><div>clone</div>${hasDiffs ? "<div>diff (red = differs)</div>" : ""}</div>${rows}` });}} else usage(HELP);