Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

feat(web): show ASCII city on the typewriter paper

Gusd1ad2a286447
diff --git a/src/web/public/fonts/jgs5/LICENSE.txt b/src/web/public/fonts/jgs5/LICENSE.txt
new file mode 100644
index 000000000..afc2430d2
--- /dev/null
+++ b/src/web/public/fonts/jgs5/LICENSE.txt
@@ -0,0 +1,94 @@
+Copyright (c) 2022, Adel Faure [email protected],
+with Reserved Font Name jgs5, jgs7, jgs9.
+
+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 & 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/src/web/public/fonts/jgs5/jgs5.ttf b/src/web/public/fonts/jgs5/jgs5.ttf
new file mode 100644
index 000000000..b3ea2b63c
Binary files /dev/null and b/src/web/public/fonts/jgs5/jgs5.ttf differ
diff --git a/src/web/src/app/globals.css b/src/web/src/app/globals.css
index 38bd965d3..31a14c306 100644
--- a/src/web/src/app/globals.css
+++ b/src/web/src/app/globals.css
@@ -1183,11 +1183,9 @@ body.driver-active .community-ws-reconnect-overlay * {
width: 170px;
}
-/* ── Return key — wider, clickable ── */
.tw-return-key {
width: 52px !important;
border-radius: 14px !important;
- cursor: pointer;
border: none;
display: flex;
align-items: center;
@@ -1214,127 +1212,20 @@ body.driver-active .community-ws-reconnect-overlay * {
z-index: 1;
}
-.tw-return-key:active {
- transform: translateY(2px);
- box-shadow: 0 0 0 oklch(0.55 0.015 65), 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.7);
-}
-
-/* ── Easter egg H key ── */
-.tw-h-key {
- cursor: pointer;
- border: none;
- font-family: inherit;
- padding: 0;
- animation: none !important;
- transition: transform 0.1s ease, box-shadow 0.1s ease;
- background: oklch(0.91 0.015 75) !important;
-}
-
-.tw-h-key:active {
- transform: translateY(2px);
- box-shadow: 0 0 0 oklch(0.55 0.015 65), 0 1px 2px rgba(0, 0, 0, 0.1), inset 0 1px 2px rgba(255, 255, 255, 0.7);
-}
-
-.tw-h-label {
- font-family: var(--font-crt, monospace);
- font-size: 13px;
- color: oklch(0.50 0.015 65);
- line-height: 1;
- pointer-events: none;
- position: relative;
- z-index: 1;
- opacity: 0.35;
-}
-
-/* ── Birthday popover ── */
-.tw-birthday-popover {
- background: oklch(0.95 0.01 80) !important;
- border: 1px solid oklch(0.15 0.01 55 / 15%) !important;
- border-radius: 8px !important;
- padding: 16px !important;
- width: 220px !important;
- font-family: var(--font-crt, monospace);
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
-}
-
-.tw-birthday-title {
- font-size: 14px;
- color: oklch(0.25 0.01 55);
- margin: 0 0 12px;
- text-align: center;
-}
-
-.tw-birthday-selects {
- display: flex;
- gap: 8px;
- margin-bottom: 12px;
-}
-
-.tw-birthday-selects select {
- flex: 1;
- font-family: var(--font-crt, monospace);
- font-size: 13px;
- padding: 6px 8px;
- border: 1px solid oklch(0.15 0.01 55 / 15%);
- border-radius: 6px;
- background: oklch(0.97 0.008 80);
- color: oklch(0.25 0.01 55);
- outline: none;
- cursor: pointer;
- appearance: auto;
-}
-
-.tw-birthday-save {
- width: 100%;
- padding: 6px 0;
- font-family: var(--font-crt, monospace);
- font-size: 13px;
- background: oklch(0.25 0.01 55);
- color: oklch(0.92 0.005 80);
- border: none;
- border-radius: 6px;
- cursor: pointer;
- transition: opacity 0.15s;
-}
-
-.tw-birthday-save:hover {
- opacity: 0.85;
-}
-
-.tw-birthday-clear {
- display: block;
- width: 100%;
- margin-top: 8px;
- padding: 0;
- font-family: var(--font-crt, monospace);
- font-size: 11px;
- color: oklch(0.50 0.01 55);
- background: none;
- border: none;
- cursor: pointer;
- text-align: center;
- text-decoration: underline;
- text-underline-offset: 2px;
-}
-
-.tw-birthday-clear:hover {
- color: oklch(0.30 0.01 55);
-}
-
/* Key press animation */
-.tw-key:not(.tw-return-key):not(.tw-h-key):nth-child(3n+1) {
+.tw-key:not(.tw-return-key):nth-child(3n+1) {
animation: tw-press 1.6s ease 0.15s infinite;
}
-.tw-key:not(.tw-return-key):not(.tw-h-key):nth-child(7n) {
+.tw-key:not(.tw-return-key):nth-child(7n) {
animation: tw-press 2.2s ease 0.55s infinite;
}
-.tw-key:not(.tw-return-key):not(.tw-h-key):nth-child(2n+4) {
+.tw-key:not(.tw-return-key):nth-child(2n+4) {
animation: tw-press 1.9s ease 0.85s infinite;
}
-.tw-key:not(.tw-return-key):not(.tw-h-key):nth-child(4n+2) {
+.tw-key:not(.tw-return-key):nth-child(4n+2) {
animation: tw-press 1.3s ease 0s infinite;
}
diff --git a/src/web/src/components/home/hero-section.tsx b/src/web/src/components/home/hero-section.tsx
index 59f1f403a..a45bd0b26 100644
--- a/src/web/src/components/home/hero-section.tsx
+++ b/src/web/src/components/home/hero-section.tsx
@@ -22,7 +22,6 @@ export function HeroSection({
kicker,
headline = "Run Your Personal Company",
subline,
- papers,
showClipboard = true,
showCommunityLinks = true,
primaryCtaLabel,
@@ -40,7 +39,6 @@ export function HeroSection({
kicker?: string;
headline?: ReactNode;
subline?: ReactNode;
- papers?: ReactNode[];
showClipboard?: boolean;
showCommunityLinks?: boolean;
primaryCtaLabel?: string;
@@ -198,9 +196,7 @@ export function HeroSection({
{/* Full Typewriter */}
<div className={`absolute inset-0 ${typewriterClassName ?? ""}`}>
<TypewriterVisual
- interactive
entranceDelay={1.2}
- papers={papers}
className="absolute! inset-0"
/>
</div>
diff --git a/src/web/src/components/home/landing-content.test.ts b/src/web/src/components/home/landing-content.test.ts
index 50f368613..d14a67873 100644
--- a/src/web/src/components/home/landing-content.test.ts
+++ b/src/web/src/components/home/landing-content.test.ts
@@ -12,7 +12,6 @@ import {
LANDING_MACHINE_INTRO,
LANDING_PROVIDERS,
LANDING_SECTION_ORDER,
- LANDING_TYPEWRITER_CASES,
} from "./landing-content"
function webRoot() {
@@ -93,16 +92,6 @@ describe("landing content contract", () => {
])
})
- it("provides four independent typewriter examples", () => {
- expect(LANDING_TYPEWRITER_CASES).toHaveLength(4)
- expect(new Set(LANDING_TYPEWRITER_CASES.map((story) => story.title)).size).toBe(4)
- for (const story of LANDING_TYPEWRITER_CASES) {
- expect(story.meta).toBeTruthy()
- expect(story.byline).toBeTruthy()
- expect(story.body.split("\n\n")).toHaveLength(2)
- }
- })
-
it("closes with one living-room invitation instead of setup instructions", () => {
const root = webRoot()
const landingPageSource = readFileSync(path.join(root, "src/components/home/landing-page.tsx"), "utf8")
@@ -332,7 +321,6 @@ describe("landing content contract", () => {
expect(landingPageSource).toContain("collapseLinksOnMobile")
expect(heroSource).toContain("TypewriterVisual")
expect(typewriterSource).toContain("var(--tw-blob-theme, oklch(0.88 0.025 82))")
- expect(heroSource).toContain("papers={papers}")
expect(heroSource).toContain("backgroundDecoration")
expect(landingPageSource).toContain("<HeroAvatarSwarm />")
expect(swarmSource).toContain("HERO_SWARM_AVATARS")
@@ -370,7 +358,6 @@ describe("landing content contract", () => {
expect(landingStyles).toContain("max-width: var(--landing-content-max)")
expect(motionStyles).toContain("--motion-frame-radius: var(--gallery-frame-radius, var(--radius-lg))")
expect(motionStyles).toContain("clip-path: inset(0 round var(--motion-frame-radius))")
- expect(landingPageSource).toContain("papers={LANDING_TYPEWRITER_CASES.map")
expect(landingPageSource).toContain("LANDING_HERO.headlineLead")
expect(landingPageSource).toContain("LANDING_HERO.headlineTail")
expect(landingPageSource).toContain("subline={LANDING_HERO.subline}")
diff --git a/src/web/src/components/home/landing-content.ts b/src/web/src/components/home/landing-content.ts
index 74c5741aa..a9f139c0e 100644
--- a/src/web/src/components/home/landing-content.ts
+++ b/src/web/src/components/home/landing-content.ts
@@ -28,33 +28,6 @@ export const LANDING_HERO = {
secondaryCta: "View on GitHub",
} as const
-export const LANDING_TYPEWRITER_CASES = [
- {
- meta: "PROJECT / WEBSITE",
- title: "Direct feedback.",
- byline: "A teammate + your agent",
- body: "“Make the headline bigger.”\n\n“Done. Take a look.”",
- },
- {
- meta: "PROJECT / LAUNCH",
- title: "Pick up the work.",
- byline: "You + your agent",
- body: "“Finish yesterday’s draft.”\n\n“Ready for your review.”",
- },
- {
- meta: "ON YOUR PHONE / WEBSITE",
- title: "Check in anywhere.",
- byline: "You + your agent",
- body: "“How’s the page coming along?”\n\n“Here’s the latest preview.”",
- },
- {
- meta: "NEW PROJECT / PLANNING",
- title: "A familiar teammate.",
- byline: "Your teammate + Maya",
- body: "“Maya’s joining this project too.”\n\n“Let’s plan the next launch.”",
- },
-] as const
-
export const LANDING_GALLERY: ReadonlyArray<{
scene: LandingScene
label: string
diff --git a/src/web/src/components/home/landing-page.module.css b/src/web/src/components/home/landing-page.module.css
index 84abd9fdc..85267ff6d 100644
--- a/src/web/src/components/home/landing-page.module.css
+++ b/src/web/src/components/home/landing-page.module.css
@@ -277,35 +277,6 @@
zoom: 0.92;
}
-.heroPaper {
- color: var(--landing-text);
-}
-
-.paperMeta {
- color: var(--landing-text-muted);
-}
-
-.paperTitle {
- margin-top: 12px;
- font-family: var(--font-crt);
- font-size: 1.65rem;
- line-height: 1;
-}
-
-.paperByline {
- margin-top: 8px;
- color: var(--landing-text-muted);
- font-family: var(--font-mono);
- font-size: 0.64rem;
-}
-
-.paperBody {
- margin-top: 16px;
- font-family: var(--font-mono);
- font-size: 0.76rem;
- line-height: 1.65;
-}
-
.productSection,
.identitySection,
.timelineSection,
diff --git a/src/web/src/components/home/landing-page.tsx b/src/web/src/components/home/landing-page.tsx
index 24c2185e9..c2f70fc72 100644
--- a/src/web/src/components/home/landing-page.tsx
+++ b/src/web/src/components/home/landing-page.tsx
@@ -26,7 +26,6 @@ import {
LANDING_HERO,
LANDING_MACHINE_INTRO,
LANDING_PROVIDERS,
- LANDING_TYPEWRITER_CASES,
} from "./landing-content"
import styles from "./landing-page.module.css"
import { GithubOutboundLink } from "@/components/github-outbound-link"
@@ -81,19 +80,6 @@ function FooterSocialLinks() {
)
}
-function HeroPaper({ story }: { story: (typeof LANDING_TYPEWRITER_CASES)[number] }) {
- return (
- <div className={styles.heroPaper}>
- <div className={`tw-email-line ${styles.paperMeta}`}>{story.meta}</div>
- <div className={`tw-email-line ${styles.paperTitle}`}>{story.title}</div>
- <div className={`tw-email-line ${styles.paperByline}`}>{story.byline}</div>
- <div className={`tw-email-body ${styles.paperBody}`}>
- {story.body.split("\n\n").map((paragraph) => <p key={paragraph}>{paragraph}</p>)}
- </div>
- </div>
- )
-}
-
function ProductScene({ scene }: { scene: (typeof LANDING_GALLERY)[number]["scene"] }) {
const story = LANDING_GALLERY.find((item) => item.scene === scene)
@@ -323,9 +309,6 @@ export function LandingPage({ isLoggedIn }: { isLoggedIn: boolean }) {
}}
typewriterClassName={styles.landingHeroTypewriter}
largeCtas
- papers={LANDING_TYPEWRITER_CASES.map((story) => (
- <HeroPaper key={story.title} story={story} />
- ))}
showClipboard={false}
showCommunityLinks={false}
showMobileDesktopHint={false}
diff --git a/src/web/src/components/typewriter-city-art-data.ts b/src/web/src/components/typewriter-city-art-data.ts
new file mode 100644
index 000000000..c66fc1a1c
--- /dev/null
+++ b/src/web/src/components/typewriter-city-art-data.ts
@@ -0,0 +1 @@
+export const TYPEWRITER_CITY_ART = " . . . /|_/__.:.:.:.|: :: :/_/:: :|:.|#|.:.:.:.:.___.:| |: /_/ : __:: :: :: |.:|#|:.:.:.:.:___:| |:: __: :: ::/ /: ::|.:___:.:|_|:.:.:.:| |: :: :/ /:: :: :/_/:: :|:.|#|.:.:.:.:.___.:.:.:| / / :: :: /_/ :: __: :\\|_:.:.:.:|#|:.:.:.:.:___:|__ :\\__|___\n_ | . .| /__/|_:.:.:.:.:.|: __ :: :: :|:.|_|.:.:.:.:.|#|.:| |: :: :/ /:: :: :: |.:|_|:.:.:.:.:|#|:| |::/ /: :: ::/_/: ::|.:|#|:.:.:.:.:___:| __ |: :: :/_/:: __ :: :: :|:.|_|.:.:.:.:.|#|.:.:.:| /_/ :: __: :: ::/ /: ::|.:___:.:|_|:.:.:.:.:|#|:| / :: |___\n_\\|_ /|_/__.:.:___:.:.:.|: / / :: :: :|:.:.:.:.___.:.|_|.:| |: __\\ :/_/:: __ :: |.:.:.:.:___:.:|_|:| |::/_/: __ :: :: ::|.:|_|:.:.:.:.:|#|:| __\\\\:___ |: __ :: :: / / :: :: :|:.:.:.:.___.:.|_|.:.:.:| :: ::/ /: :: ::/_/: ::|.:|#|:.:.:.:.:___:.:|_|:|_/ : __::\n:\\|_\\__ |./__/|_:.:.:.:|#|:.:.:.|: /_/ : __:: :|:.:.:.:.|#|.:.:.:.:| |__/__\\__\\ :: / / :: |.:.:.:.:|#|:.:.:.:| |:: :: / / :: :: ::|.:.:.:.:___:.:|_|:| __\\\\:__\\\\\\:___ |: / / :: :: /_/ : __:: :|:.:.:.:.|#|.:.:.:.:.:.:| :: ::/_/: __ :: :: ::|.:|_|:.:.:.:.:|#|:.:.:.:|:: :/ /::\n__ \\__\\|_/__.:.:___:.:|_|:.:.:.|: :: :/ /:: :|:.___.:.|_|.:.:.:.:| __/__/ . __\\__\\: /_/ :: |.:___:.:|_|:.:.:.:| |:: :: /_/ :: __: ::|.:.:.:.:|#|:.:.:.:| \\\\:__\\\\\\:__\\\\\\:__ |: /_/ : __:: :: :/ /:: :|:.___.:.|_|.:.:.:.:.:.:| __ :: :: / / :: :: ::|.:.:.:.:___:.:|_|:.:.:.:|:: :/_/::\n / :: \\|_:.:.:.:|#|:.:.:.:.:.:.|: :: :/_/:: :|:.|#|.:.:.:.:.___.:| __/__/ __\\__\\:: :: |.:|#|:.:.:.:.:___:| |\\: :: :: ::/ /: ::|.:___:.:|_|:.:.:.:| \\\\:\\\\\\:__\\\\\\:__\\\\# |: :: :/ /:: :: :/_/:: :|:.|#|.:.:.:.:.___.:.:.:| / / :: :: /_/ :: __: ::|.:.:.:.:|#|:.:.:.:.:___:|__ :: :: /\n_/ :: |.:___: ___:.:.:.:.:.:.|: __ :: :: :|:.|_|.:.:.:.:.|#|.:| __/__/ . . __\\__\\ :: |.:|_|:.:.:.:.:|#|:| . __\\:: :: ::/_/: ::|.:|#|:.:.:.:.:.:.__ \\\\\\\\\\:\\\\\\:__\\\\#### |: :: :/_/:: __ :: :: :|:.|_|.:.:.:.:.|#|.:.:.:| /_/ :: __: :: ::/ /: ::|.:___:.:|_|:.:.:.:.:|#|:| / :: :: /\n:: :__\\|.:|#|: /___\\.:___:.:.:.|: / / :: :: :|:.:.:.:.___.:.|_||:__/__/ . . . __\\__\\ |.:.:.:.:___:.:|_|:| ___\\:: :: :: ::|.:|_|:.:.:.:.:__/ . \\\\\\\\\\\\\\\\:\\\\####### |: __ :: :: / / :: :: :|:.:.:.:.___.:.|_|.:.:.:| :: ::/ /: :: ::/_/: ::|.:|#|:.:.:.:.:___:.:|_|:|_/ : __::\n::__/__\\__\\|_|: |:::|.:|#|:.:.:.|: /_/ : __:: :|:.:.:.:.|#|.:.:.:|/__/ ____ __\\__\\.|.:.:.:|#|:.:.:.:| __\\ :: :: ::|.:.:.:.:.:.__/ \\\\\\\\\\\\\\\\\\\\######## |: / / :: :: /_/ : __:: :|:.:.:.:.|#|.:.:.:.:.:.:| :: ::/_/: __ :: :: ::|.:|_|:.:.:.:.:|#|:.:.:.:|:: :/ /::\n_/__/ __\\___\\ |___|.:|_|:.:.:.|: :: :/ /:: :|:.___.:.|_|.:.:.:|/\\__ | . /=/=/|. . __\\_|___:.:|_|:.:.:.:| __\\ :: ::|.:.:.:.___/ \\\\\\\\\\\\\\\\\\\\######## |: /_/ : __:: :: :/ /:: :|:.___.:.|_|.:.:.:.:.:.:| __ :: :: / / :: :: ::|.:.:.:.:___:.:|_|:.:.:.:|:: :/_/::\n_/ . ___\\ / | \\.:.:.:.:.:.|: :: :/_/:: :|:__\\|.:.:.:.:.___|:\\__\\|_ . |:::|/ . |./___||#|:.:.:.:.:.:.:| ___\\ ::|.:.:__/ \\\\\\\\\\\\\\\\\\\\########__ |: :: :/ /:: :: :/_/:: :|:.|#|.:.:.:.:.___.:.:.:| / / :: :: /_/ :: __: ::|.:.:.:.:|#|:.:.:__\\:___:|__ :: :: /\n __\\__\\.:.:.:.:.:.|: __ :: :: __/__\\__\\.:.:.:.|#||:: \\|_\\__ | ----- /|_/__.||_|:.:.:.:.:.:.__ __\\:|.__/ \\\\\\\\\\\\\\\\\\\\########:____ :: :/_/:: __ :: :: :|:.|_|.:.:.:.:__\\|.:.:.:| /_/ :: __: :: ::/ /: ::|.:___:.:|_|:.__/__\\__\\|:| / :: :: /\n . . .__\\__\\__:.:.:.|: / / :: _ ___/ __\\___\\.:.|_||:: __: \\__\\|_. . | /__/|_:.:.|.:.:.:.:.:.:__/ _|/ \\\\\\\\\\\\\\\\\\\\########\\\\\\:____: :: :: / / :: :: :|:.:.:.:._ ____\\___\\:.:| :: ::/ /: :: ::/_/: ::|.:|#|:.:.:__/__/ __\\___\\/ : __::\n . . __\\__\\.:.:.|: /_/ :__/_ /___\\ . ___\\__\\:.:|::/ /: ::\\|_\\__ | /|_/__.:.:.:.|.:.:.:.:.:_/ . \\\\\\\\\\\\\\\\\\\\########:__\\\\\\:___ :: :: /_/ : __:: :|:.:.:.__/ /___\\.___\\__\\| :: ::/_/: __ :: :: ::|.:|_ ___/__/ . ___\\__\\:/ /::\n __\\___\\.|: :___/__/ |:::| __\\__\\|::/_/: __ :\\__\\|_ | /__/|_:.:.:.:.:.|.:.:.:.__/ \\\\\\\\\\\\\\\\\\\\########\\\\\\:__\\\\## :: :: :: :/ /:: :|:.___/___ |:::| __\\___\\__ :: :: / / :: :: ::|.:.: /___\\ __\\__\\/::\n . ____ . . . ___\\__\\|_/:__/. |___| . __\\___\\ :: / / :: \\|_\\|_/__.:.:___:.:.:.|.:.:__/ \\\\\\\\\\\\\\\\\\\\########\\:_\\\\##### :: :: :: :/_/:: :|__/__/ |___| . ___\\___\\: :: /_/ :: __: ::|.__/ |:::| . . __\\__\\ /\n /=/=/| . . . __\\|__/ / | \\___ . ___\\__| /_/ :: __: \\|_:.:.:.:|#|:.:.:.|.:_/ \\\\\\\\\\\\\\\\\\\\########\\\\\\#######_\\: :: :: :: |:___/__/ . / | \\. . ___\\__\\_: :: ::/ /: :__/__/ |___|. . . __\\__\n |:::|/ | /__|__ | /=/=/| __|__:: ::/ /: |.:___:.:|_|:.:.:.|_/ . \\\\\\\\\\\\\\\\\\\\########\\\\\\####### __\\:: :: :: |/__/ ____ __\\___\\:: ::/_|:__/__/ / | \\ __\n . ----- . . . |__/__:|_\\|__. |:::|/ . . | /__|__:: ::/_/: |.:|#|:.:.:.:.:.:.| ___ \\\\\\\\\\\\\\\\\\\\########\\\\\\####### . __\\ :: :: |/\\__ | . ./=/=/| . . ___|___ :: |/__/. . ____ . .\n . . .| /__|__.:.:|:\\|__\\__|. ----- . |__ /__:| __ :: :: |.:|_|:.:.:.:.:.:.| __\\\\:____ \\\\\\\\\\\\\\\\\\_########\\\\\\####### __\\ :: |:\\__\\|_ . |:::|/ . . /_|__/ :: |/\\__ | . . /=/=/| . .\n /|__/__:.:___:|__ :\\__|__ | ________.:.:|/ / :: :: |.:.:.:.:___:.:.:.| . __\\\\:__\\\\\\:__\\\\\\\\\\\\\\\\\\\\########\\\\\\##### __\\: |: :\\|_\\__ | ----- |/__/_|:|/ :: _|:\\__\\|__ |:::|/ /\n__ . |./__/|__.:.:.:|#|:| / : ________| . |/______/|__.:|/_/ :: __: |.:.:.:.:|#|:.:.:.| __\\\\:__\\\\\\:__\\\\\\\\\\\\\\\\\\\\\\\\\\########:\\\\### ___|: __ \\__\\|__ . . ________.:.:| ::/ |: :\\|__\\__|. ----- . .| /__/\n__\\__| . /|_/__.:.:___:.:|_|:|_/ :/--+--/|_|\\__ | /___|| [] []|/#|.:|:: ::/ /: |.:___:.:|_|:.:.:.| __\\\\:__\\\\\\:__\\\\\\:__\\\\##\\\\\\\\\\\\########\\\\#### .oO()|: / / :: _______| . . |/______/|.:.:| ::/_|: __ :\\__|__ . . . /|_/__.\n::\\__|\\__ | /__/|_:.:.:.:|#|:.:.:.:|:: :|:::::|/:|\\__\\|_/__:.--------|_|.:|:: ::/_/: |.:|#|:.:.:.:.:.:.| . __\\\\:__\\\\\\:__\\\\\\:__\\\\#####\\\\\\\\\\\\############## (oOooO|: /_/ : /--+--/||__ /|| [] []|/__.:| :: |: / / :: |__\\__| | /__/|_:.:.\n:: :|\\__\\|_/__.:.:___:.:|_|:.:.:.:|:: :-------__ ::\\|_.:.:.:.|#|.:.:.:.:| __ :: :: |.:|_|:.:.:.:.:.:.| ____ \\\\:__\\\\\\:__\\\\\\:__\\\\########\\\\\\\\\\\\############## `||||: :: :/|:::::|/|__\\__|| /__/|--------|#|.:| :: |: /_/ : __:: \\__|___ . /|_/__.:.:___\n:: __: :\\|_:.:.:.:|#|:.:.:.:.:___:|__ :: :: / / :: |:.___.:.|_|.:.:.:.:|/ / :: :: |.:.:.:.:___:.:.:.| __\\\\:_____ \\\\:\\\\\\:__\\\\\\:__\\\\###########\\\\\\\\\\\\############## .oOo ||||: :: :/-------_ :\\__||_/__:.:.___.:.|_|.:| :: |: :: :/ /:: ::|___\\_|.| /__/|_:.:.:.:|#|\n::/ /: ::|.:___:.:|_|:.:.:.:.:|#|:| / :: :: /_/ :: |:.|#|.:.:.:.:.___.:|/_/ :: __: |.:.:.:.:|#|:.:.:.| \\\\:__\\\\\\:_____ __ \\\\\\\\\\:\\\\\\:__\\\\##############\\\\\\\\\\\\############## .oO()O /___|: __ :: :: / / :: ||_.:.:.:.|#|.:.:.:.:|\\ :: |: :: :/_/:: __ ::\\_|\\|_/__.:.:___:.:|_|\n::/_/: ::|.:|#|:.:.:.:.:___:.:|_|:|_/ : __:: :: :: |:.|_|.:.:.:.:.|#|.:|:: ::/ /: |.:___:.:|_|:.:.:.| \\\\:\\\\\\:__\\\\\\:____ . __\\\\:___ \\\\\\\\\\\\\\\\:\\\\#################\\\\\\\\\\\\############# (oOooOoo) |: / / :: :: /_/ : __:|:.___.:.|_|.:.:.:.:| __\\ |: __ :: :: / / :: |\\|_:.:.:.:|#|:.:.:.\n:: :: ::|.:|_|:.:.:.:.:|#|:.:.:.:|:: :/ /:: :: :: |:.:.:.:.___.:.|_|.:|:: ::/_/: |.:|#|:.:.:.:.:.:__ \\\\\\\\\\:\\\\\\:__\\\\### __\\\\:__\\\\\\:__\\\\\\\\\\\\\\\\\\\\##################\\\\\\\\\\\\########### `|||' |: /_/ : __:: :: :/ /:|:.|#|.:.:.:.:.___.:| __|: / / :: :: /_/ : __::|.:___:.:|_|:.:.:.\n:: :: ::|.:.:.:.:___:.:|_|:.:.:.:|:: :/_/::|_|_|_|: |:.:.:.:.|#|.:.:.:.:|:: :: :: |.:|_|:.:.:.:.___ \\\\\\\\\\\\\\\\:\\\\###### __\\\\:__\\\\\\:__\\\\\\\\\\\\\\\\\\\\\\\\\\##################\\\\\\\\\\\\########### ||| |: :: :/ /:: :: :/_/:|:.|_|.:.:.:.:.|#|.:| |: /_/ : __:: :: :/ /::|.:|#|:.:.:.:.:___\n:: __: ::|.:.:.:.:|#|:.:.:.:.:___:|__ :: ::|=====|: |:.___.:.|_|.:.:.:.:|_\\ :: :: |.:.:.:.:.:___\\\\:___ \\\\\\\\\\\\\\\\\\\\####### __\\\\:__\\\\\\:__\\\\\\:__\\\\#\\\\\\\\\\\\\\##################\\\\\\\\\\\\########### /___\\ .|: :: :/_/:: __ :: :|:.:.:.:.___.:.|_|.:| |: :: :/ /:: :: :/_/::|.:|_|:.:.:.:.:|#|\n::/ /: ::|.:___:.:|_|:.:.:.:.:|#|:| / :: :: // / :: |:.|#|.:.:.:.:.___.:| __\\: :: |.:.:.:.___\\\\:__\\\\\\:___ \\\\\\\\\\\\\\\\\\\\####### __\\\\:__\\\\\\:__\\\\\\:__\\\\####\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\###########_ (o|: __ :: :: /|_|_|_| :|:.:.:.:.|#|.:.:.:.:| |: :: :/_/:: __ :: ::|.:.:.:.:___:.:|_|\n::/_/: ::|.:|#|:.:.:.:.:___:.:|_|:|_/ : __:: / / :: |:.|_|.:.:.:.:.|#|.:| /_____\\:: |.:.:___\\\\:__\\\\\\:__\\\\\\:__\\\\\\\\\\\\\\\\\\\\####### \\\\:__\\\\\\:__\\\\\\:__\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\###########:__ . |: / / :: :: /|=====|_:|:.___.:.|_|.:.:.:.:| |: __ :: :: / / :: ::|.:.:.:.:|#|:.:.:.\n:: :: ::|.:|_|:.:.:.:.:|#|:.:.:.:|:: :/ /::/ /: :: |:.:.:.:.___.:.|_|.:| `__\\ |.___\\\\:__\\\\\\:__\\\\\\:__\\\\#\\\\\\\\\\\\\\\\\\\\####### \\\\:\\\\\\:__\\\\\\:__\\\\##########\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\###########\\\\# |: /_/ : __:: ::/ // /:|:.|#|.:.:.:.:.___.:| |: / / :: :: /_/ : __::|.:___:.:|_|:.:.:_\n:: :: ::|.:.:.:.:___:.:|_|:.:.:.:|:: :/_/:: __ :: |:.:.:.:.|#|.:.:.:.:|o. |||_|/\\\\:__\\\\\\:__\\\\\\:___\\####\\\\\\\\\\\\\\\\\\\\####### \\\\\\\\\\:\\\\\\:__\\\\#############\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\############## .oO |: :: :/ /:: :/ /:/_/:|:.|_|.:.:.:.:.|#|.:| |: /_/ : __:: :: :/ /::|.:|#|:.:.:.:.__/_\n:: __: ::|.:.:.:.:|#|:.:.:.:.:___:|__ :: ::|_|_|_|: |:.___.:.|_|.:.:.:.:|Oo. /___\\ \\\\:\\\\\\:__\\\\\\:___\\#######\\\\\\\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\:\\\\################\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\############## .oO()Oo|: :: :/_/:: / / :: :|:.:.:.:.___.:.|_|.:| |: :: :/ /:: :: :/_/::|.:|_|:.:.:__/__/\n::/ /: ::|.:___:.:|_|:.:.:.:.:|#|:| / :: ::|=====|: |:.|#|.:.:.:.:.___.:|oo) \\\\\\\\\\:\\\\\\:__\\\\##########\\\\\\\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\#################\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\##############__ (oOooOoo|: __ :: :: / / :: :|:.:.:.:.|#|.:.:.:.:| |: :: :/_/:: __ :: ::|.:.:.:.__/__/\n::/_/: ::|.:|#|:.:.:.:.:___:.:|_|:|_/ : __:: / / :: |:.|_|.:.:.:.:.|#|.:|' \\\\\\\\\\\\\\\\:\\\\#############\\\\\\\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\#################\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\##############:___ `|||' |: / / :: :: /|_|_|_|_:|:.___.:.|_|.:.:.:.:| |: __ :: :: / / :: ::|.:.___/__/ .\n:: :: ::|.:|_|:.:.:.:.:|#|:.:.:.:|:: :/ /:: / / :: |:.:.:.:.___.:.|_|.:| .oOo. \\\\\\\\\\\\\\\\\\\\##############\\\\#\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\#################\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\##############\\\\## _____ ||| |: /_/ : __:: |=====|/:|:.|#|.:.:.:.:.___.:| |: / / :: :: /_/ : __::|__/___/\n:: :: ::|.:.:.:.:___:.:|_|:.:.:.:|:: :/_/::/ /_ :: |:.:.:.:.|#|.:.:.:.:| .oO()Oo. \\\\\\\\\\\\\\\\\\\\#################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\#######\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\################## ___/ \\___\\ |: :: :/ /:: ::/ //_/:|:.|_|.:.:.:.:.|#|.:| |: /_/ : __:: :: :/ /__/__/ .\n:: __: ::|.:.:.:.:|#|:.:.:.:.:.:.:|:: :: :: / / :: |:.___.:.|_|.:.:.:.:|(oOooOoo) _\\\\\\\\\\\\\\\\\\\\#################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\##########\\#######_/ ~~~~ \\ |: :: :/_/:: _/ /:: :|:.:.:.:.___.:.|_|.:|. |: :: :/ /:: :: |:__/__/ . .\n::/ /: ::|.:___:.:|_|:.:.:.:.:.:.:|\\: :: ::|_|_|_|: |:.|#|.:.:.:.:.:.:.__ `|||' _\\\\:_\\\\\\\\\\\\\\\\#######\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\########\\\\\\####### ~~~ ~~~ ||\\ :: :: :: // / :: :|:.:.:.:.|#|.:.:.:.:| __\\|: :: :/_/:: __ |/__/ _\n::/_/: ::|__\\#|:.:.:.:.:.:.:.:.:.__ ___\\: ::|=====|: |:.|_|.:.:.:.:.___/ ||| \\\\:_\\\\\\:_\\\\\\\\\\####\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\########\\\\\\#######_\\ ~~~~~ _/ __\\: :: :: /_/ : __:|:.___.:.|_|.:.:.:.____/__\\___\\__ :: :: / / |/\\__ | . . /=\n:: :: __/__\\__\\.:.:.:.:.:.:.:__/ __\\:: / / ___|:.:.:.:.:.:__/ . /___\\ \\\\\\\\\\:_\\\\\\:_\\\\###\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\########\\\\\\####### ___________/ / __\\:: :: |_|_|_|/:|:.|#|.:.:.:.:.:____/__/ __\\/__\\ :: :: /_/ |:\\__\\|_ . .|:\n:: :__/__/ __\\__\\:.:.:.:.__/ __\\/ / | | |:.:.:.:.__/ .oOo. \\\\\\\\\\\\\\\\:_\\\\#####\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\########\\\\\\##### /____ / __\\ :: |=====|/:|:.|_|.:.:.:.____/__/ ___\\__\\__:: :: |:: \\|_\\__ | --\n::__/__/ . __\\___\\:__/ / /_\\|o|o|:.:.:__/ .oO()Oo. \\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\__#######\\\\\\########\\\\\\\\\\\\######## \\\\## /____/ // ___\\ ::/ / ___|:.:.:.:.:.__/___/ . . __\\__\\: :: |:: __: \\__\\|_ .\n_/__/. . ___\\__\\ __\\ |:___/ (oOooOoo) \\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\######## /____/ .oOo. // . __/ /:| | |:.:.:.:__/__/ . . .______\\_ |::/ /: ::\\|_\\__ | .\n_/ __\\__\\ _|/ `|||' .oOo\\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\########\\\\\\\\\\\\####### /____/ .oO()Oo./ / / /_\\|o|o|:.:.__/__/ __\\__\\::/_/: __ :\\__\\|_\n . . . . __\\__\\ ||| .oO()O\\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\#######_\\\\######## \\\\\\\\\\#### /____/ (oOooOoo) / __\\:|:__/__/. . . . . __\\___\\:: / / :: \\|_\\__ |\n . . . .__\\__\\ /___\\ (oOooOo\\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\################## \\\\# /____/ . `|||' // ___/__/ . . . . . __\\ __\\ /_/ :: __: \\__\\|\n __\\___\\ `|||'\\\\\\\\\\\\\\\\\\_#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\################## ./____/ ||| .oOo. __/___/ ___\\__\\ ::/ /: ::\\|\n . . . . . ___\\__\\ ||| \\\\\\\\\\\\\\\\\\\\#######__\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\################## /____/ /___\\oO()Oo. | __/__/ . . . . . . . __\\__\\:/_/: __\n . ____ . . . __\\__\\ | /___\\\\\\\\\\\\\\\\\\\\\\#######\\\\:__\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\################ /____/ (oOooOoo) |/__/ . . . . ____ . . . . ______\\: / /\n /=/=/| __\\_| . \\\\\\\\\\\\\\\\\\\\#######__\\\\##########\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\__######\\\\\\\\#######\\\\\\\\\\\\\\############# /____/ `|||' . |/\\__ | /=/=/| __\\__ /_/\n . |:::|/ . . . | /___| \\\\\\\\\\\\\\\\\\\\#######\\#############\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\########## /____/ / ||| |:\\__\\|_ . . . |:::|/ . . . . |/____ ::\n . ----- . . . /|_/__:| \\\\\\\\\\\\\\\\\\\\#####################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\\\\\\\#######\\\\\\\\\\\\\\####### /____/ /_ /___\\ |:: \\|_\\__ | . . .----- . . . . /_|/__.| ::\n _______ | /__/|_.:.:| \\\\\\\\\\\\\\\\\\\\#####################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######__\\\\####### \\\\\\\\\\#### /____/ . /_ / |:: __: \\__\\|_ _______ |/__/_|:.:.| __\n____ . . /______/|./|_/__:.:.:.:| . \\\\\\\\\\\\\\\\\\\\#####################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\######\\########## \\\\# /____/ .oOo. /_ |::/ /: ::\\|_\\__ ______ . . . /______/| . /_|/__.:.:.:.| / /\n+--/|. . . | [] []|/_/|_.:.:.:.:.:| \\\\\\\\\\\\\\\\\\\\#####################\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\################# ./____/ .oO()Oo. |::/_/: __ :\\__\\/--+--/| . . .| [] []|/ |/__/_|:.:.:.:.:.| /_/\n:::|/_| --------__:.:.___.:.:.:| \\\\\\\\\\\\\\\\\\\\###########\\\\\\#######\\\\\\\\\\__####### \\\\\\\\\\\\\\\\\\\\################# /____/ . __ (oOooOoo) |:: :: / / :: \\|:::::|/ -------- /|/__.:.:.___.:.:.| ::\n----__|___ . | /__/|_.:.:.:.|#|.:.:.:| . \\\\\\\\\\\\\\\\\\\\########\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\\\\\\\\\\\################ /____/ `|||' . |:: :: /_/ :: __-------__ . . . | /__/|:.:.:.:.|#|.:.:.| ::\n:: ::|___\\_|. ./|_/__:.:.___.:.|_|.:.:.:| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######_\\\\\\\\\\\\\\\\\\\\############# /____/ .o ||| /|:: __: :: ::/ /: :: |__\\__| . . /|_/__:.:.___.:.|_|.:.:.| __\n:: __ ::\\_|\\__ | /__/|_.:.:.:.|#|.:.:.:.:.:.:| (\\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######_\\\\\\\\\\\\\\\\\\\\##########/_____/ . .oO( /___\\ o /__/|::/ /: :: ::/_/: __ ::\\__|__ | /__/|_.:.:.:.|#|.:.:.:.:.:.| / /\n:: / / :: |\\__\\|_/__:.:.___.:.|_|.:.:.:.:.:.:| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\##########\\\\\\\\\\\\\\\\#######/__ __/ (oOoo__o) . | /__/__ |::/_/: __ :: :: / / :: :|__\\__| . /|_/__:.:.___.:.|_|.:.:.:.:.:.| /_/\n:: /_/ : __:: \\|_.:.:.:.|#|.:.:.:.:.___.:.:.:| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\########## \\\\\\\\\\####/_____/ / `|||' /\\ /__/__ |:: :: / / :: :: /_/ :: __: \\__|__ | /__/|_.:.:.:.|#|.:.:.:.:.___.:.:.| ::\n:: :: :/ /:: :|:.___.:.|_|.:.:.:.:.|#|.:.:.:| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\########## \\\\#/____/ o /_ ||| /_/__ |:: :: /_/ :: __: :: ::/ /: :: |__\\|_/__:.:.___.:.|_|.:.:.:.:.|#|.:.:.| ::\n:: :: :/_/:: :|:.|#|.:.:.:. ____.:.|_|.:.:.:| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\########## /____/ | . /_/ / /___\\ /__/_ |:: __: :: ::/ /: :: ::/_/: __ ::\\|_.:.:.:.|#|.:.:.:.:.___.:.|_|.:.:.| __\n:: __ :: :: :|:.|_|.:.:.:.| H |.:.:.:.:.:.:|__ . __\\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\########## /____/ /\\ /___ /_ /__/__ . |::/ /: :: ::/_/: __ :: :: / / :: |:.___.:.|_|.:.:.:.:.|#|.:.:.:.:.:.| / /\n:: / / :: :: :|:.:.:.:.___.| O |.:.:.:.:.:.:|__\\__ __/ __\\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\##########/____/ /____ /_/ /__/__ |::/_/: __ :: :: / / :: :: /_/ :: |:.|#|.:.:.:.:.___.:.|_|.:.:.:.:.:.| /_/\n:: /_/ |_|_|_| :|:.:.:.:.|#|.| T |.:.___.:.:.:| \\__\\__ _/ __\\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\#######/____/ . /___ /___ /__/__ |:: :: / / :: :: /_/ :: __: :: :: |:.|_|.:.:.:.:.|#|.:.:.:.:.___.:.:.| ::\n:: :: |=====| :|:.___.:.|_|.| E |.:.|#|.:.:.:| \\__\\__ | \\__ __\\ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\\\\\\\####/____/____ /___ /____ /__/__ |:: :: /_/ :: __: :: ::/ /: :: :: |:.:.:.:.___.:.|_|.:.:.:.:.|#|.:.:.| ::\n:: :: :// /: :|:.|#|.:.:.:.| L |.:.|_|.:.:.:| \\__\\__ | [] \\__ __ \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### \\\\#/____/ \\_________ /____ /___ /__/__ /_ |:: __: :: ::/ /: :: ::/_/:|_|_|_|: |:.:.:.:.|#|.:.:.:.:.___.:.|_|.:.:.| __\n:: __ :/ /:: :|:.|_|.:.:.:.|___|.:.:.:.:.:.:| \\__\\_| []\\__ /__ | \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### /____/ \\______ . \\__________ /___ / .oOo. /__/__ /_ |::/ /: :: ::/_/: __ :: ::|=====|: |:.___.:.|_|.:.:.:.:.|#|.:.:.:.:.:.| / /\n:: / / / / :: :|:.:.:.:.___.:.|_|.:.:.:.:.:.:| \\_|\\ \\__ /_| \\\\\\\\\\\\\\\\\\\\#######\\\\\\\\\\\\\\####### /____/ \\_________ \\_______ /____ .oO()Oo__ . /__/__ __ /|::/_/: __ :: :: / / :: :: / / :: |:.|#|.:.:.:.:.___.:.|_|.:.:.:.:.:.| /_/\n:: /_/ : __:: :|:.:.:.:.|#|.:.:.:.:.___.:.:.:|_ (o)\\ |__/__| \\\\\\\\\\\\\\\\\\\\####### \\\\\\\\\\######/____/. \\__________ /___ .oO(oOooOoo) /__/_/__ /__/|:: :: / / :: :: /_/ :: __: / / :: |:.|_|.:.:.:.:.|#|.:.:.:.:.___.:.:.| ::\n:: :: |_|_|_| :|:.___.:.|_|.:.:.:.:.|#|.:.:.:| \\_ \\__\\ |__ __ \\\\\\\\\\\\\\\\\\\\####### \\\\###/____/Oo .oOo. __oOo._______ .oO() `|||' /__/_/__ \\__ /__/__ |:: :: /_/ :: __: :: ::/ /:/ /: :: |:.:.:.:.___.:.|_|.:.:.:.:.|#|.:.:.| ::\n:: :: |=====| :|:.|#|.:.:.:.:.___.:.|_|.:.:.:| \\___\\| o_/ \\\\\\\\\\\\\\\\\\\\####### . /____/`|||' .oO()Oo. .oO()Oo. . (oOooO ||| /__/_/__ \\_ /_ /__/__ |:: __: :: ::/ /: :: ::/_/: __ :: |:.:.:.:.|#|.:.:.:.:.___.:.|_|.:.:.| __\n:: __ ::/ /: :|:.|_|.:.:.:.:.|#|.:.:.:.:.:.:| __/__\\__\\_ \\\\\\\\\\\\\\\\\\\\####### /____/ ||| (oOooOoo) .oOo. (oOooOoo) `||| /___\\ /__/_/__ __/ |_ . /_/__ |::/ /: :: ::/_/: __ :: ::|_|_|_|: |:.___.:.|_|.:.:.:.:.|#|.:.:.:.:.:.| / /\n:: / / :/ /:: :|:.:.:.:.___.:.|_|.:.:.:.:.:.:| __ __/__/. __\\__\\_ __\\\\\\\\\\\\\\\\####### /____/ /___\\ `|||' .oO()Oo. `|||' ||| /__/____ __/ [] | /__/_ |::/_/: __ :: :: / / :: ::|=====|: |:.|#|.:.:.:.:.___.:.|_|.:.:.:.:.:.| /_/\n:: /_/ / /_:: :|:.:.:.:.|#|.:.:.:.:.___.:.:.:|__ \\___/__/ . __\\__\\ \\\\\\\\\\#####/____/ ||| (oOooOoo) ||| /___\\ /__/__ | __\\ __/[] | /__/__ |:: :: / / :: :: /_/ :: __: / / :: |:.|_|.:.:.:.:.|#|.:.:.:.:.___.:.:.| ::\n:: :: :/ /:: :|:.___.:.|_|.:.:.:.:.|#|.:.:.:|__\\__ __/___/ __\\___\\ . \\\\##/____/ /___\\ `|||'| /___\\ /__/__ |__\\ __/ /| /__/__ |:: :: /_/ :: __: :: ::/ /: / / :: |:.:.:.:.___.:.|_|.:.:.:.:.|#|.:.:.|__\\\n:: :: |_|_|_| :|:.|#|.:.:.:.:.___.:.|_|.:.:.:| \\__\\_| __/__/ . . . ___\\__\\ /____/ |||/\\ /__/__ |_\\ __| /(o) /__/__ |:: __: :: ::/ /: :: ::/_/:/ /__ :: |:.:.:.:.|#|.:.:.:.:.___.:.|_|.:.:.| __\n:: __ |=====| :|:.|_|.:.:.:.:.|#|.:.:.:.:.:.:| \\_|/__/ . . ____ . __\\__\\_/ .o /___\\ /__/__ __ ___| /__ /__/__ |::/ /: :: ::/_/: __ :: :: / / :: |:.___.:.|_|.:.:.:.:.|#|.:.:.:.:.:.|\n:: / / ::/ /: :|:.:.:.:.___.:.|_|.:.:.:.:.:.:| |/\\__ | /=/=/| __\\__\\| | . /__/__ _\\_o | /__ /__/__ |::/_/: __ :: :: / / :: ::|_|_|_|: |:.|#|.:.:.:.:.___.:.|_|.:.:.:.:.:.|\n:: /_/ :/ /:: :|:.:.:.:.|#|.:.:.:.:.___.:.:.:|. |:\\__\\|_ . |:::|/ . . __\\|__ /\\ /__/__ \\|(o) /__/__ . |:: :: / / :: :: /_/ :: __:|=====|: |:.|_|.:.:.:.:.|#|.:.:.:.:.___.:.:.|\n:: :: / //:: :|:.___.:.|_|.:.:.:.:.|#|.:.:.:| |:: \\|_\\__ | . ----- . |. /__|__\\__ /__/__ /__/__ |:: :: /_/ :: __: :: ::/ /: / / :: |:.:.:.:.___.:.|_|.:.:.:.:.|#|.:.:.|\n:: :: :/_/:: :|:.|#|.:.:.:.:.___.:.|_|.:.:.:| |:: __: \\__\\|__ |__/__:| \\__\\__ . /__/__ /_ /__/__ |:: __: :: ::/ /: :: ::/_/: / /_ :: |:.:.:.:.|#|.:.:.:.:.___.:.|_|.:.:.|\n:: __ |_|_|_| :|:.|_|.:.:.:.:.|#|.:.:.:.:.:.:| |::/ /: ::\\|__\\__| . | /___|__.:.:| \\__\\__ /__/__ /_ /__/__ |::/ /: :: ::/_/: __ :: ::/ / / :: |:.___.:.|_|.:.:.:.:.|#|.:.:.:.:.:.|\n:: / / |=====| :|:.:.:.:.___.:.|_|.:.:.:.:.:.__ |::/_/: __ ::\\__|__ . /|_/___:.:___:| \\__\\__ /__/__ __ /__/__ |::/_/: __ :: :: / / :: :: /_/ :: |:.|#|.:.:.:.:.___.:.|_|.:.:.:.:.:.|\n:: /_/ : / /: :|:.:.:.:.|#|.:.:.:.:.:.:.:__/ |:: :: / / :: :|__\\__|| /__/|_:.:.:.:|#|:| \\__\\__ . /__/__ /__/__ |:: :: / / :: :: /_/ :: __:|_|_|_|: |:.|_|.:.:.:.:.|#|.:.:.:.:.___.:.:.|";
diff --git a/src/web/src/components/typewriter-city-art.module.css b/src/web/src/components/typewriter-city-art.module.css
new file mode 100644
index 000000000..76f907d84
--- /dev/null
+++ b/src/web/src/components/typewriter-city-art.module.css
@@ -0,0 +1,27 @@
+@font-face {
+ font-family: "Alook Jgs5";
+ src: url("/fonts/jgs5/jgs5.ttf") format("truetype");
+ font-display: block;
+}
+
+.frame {
+ container-type: inline-size;
+ width: 100%;
+ aspect-ratio: 16 / 9;
+ overflow: hidden;
+ color: var(--tw-body-lo);
+}
+
+.art {
+ margin: 0;
+ padding: 0;
+ border: 0;
+ font-family: "Alook Jgs5", monospace;
+ font-size: 0.625cqw;
+ line-height: 1;
+ font-weight: 400;
+ font-variant-ligatures: none;
+ letter-spacing: 0;
+ white-space: pre;
+ text-align: left;
+}
diff --git a/src/web/src/components/typewriter-city-art.tsx b/src/web/src/components/typewriter-city-art.tsx
new file mode 100644
index 000000000..02217ad57
--- /dev/null
+++ b/src/web/src/components/typewriter-city-art.tsx
@@ -0,0 +1,10 @@
+import { TYPEWRITER_CITY_ART } from "./typewriter-city-art-data";
+import styles from "./typewriter-city-art.module.css";
+
+export function TypewriterCityArt() {
+ return (
+ <div className={styles.frame} role="img" aria-label="A giant Alook sculpture in an ASCII city, surrounded by buildings, a park, and streets.">
+ <pre className={styles.art} aria-hidden="true">{TYPEWRITER_CITY_ART}</pre>
+ </div>
+ );
+}
diff --git a/src/web/src/components/typewriter-visual.dom.test.tsx b/src/web/src/components/typewriter-visual.dom.test.tsx
new file mode 100644
index 000000000..aba5d7a14
--- /dev/null
+++ b/src/web/src/components/typewriter-visual.dom.test.tsx
@@ -0,0 +1,27 @@
+import React from "react";
+import { render, screen } from "@/test/react-dom-harness";
+import { describe, expect, it, vi } from "vitest";
+
+vi.mock("@gsap/react", () => ({ useGSAP: vi.fn() }));
+
+import { TypewriterVisual } from "./typewriter-visual";
+import { TYPEWRITER_CITY_ART } from "./typewriter-city-art-data";
+
+describe("typewriter paper", () => {
+ it("shows the city without a switch control or consuming Enter", () => {
+ const { container } = render(<TypewriterVisual />);
+ expect(screen.getByRole("img", { name: /Alook sculpture/ })).toBeTruthy();
+ expect(container.querySelector("pre")?.textContent).toBe(TYPEWRITER_CITY_ART);
+ expect(screen.queryByRole("button")).toBeNull();
+ const enter = new KeyboardEvent("keydown", { key: "Enter", bubbles: true, cancelable: true });
+ document.dispatchEvent(enter);
+ expect(enter.defaultPrevented).toBe(false);
+ expect(container.querySelector("pre")?.textContent).toBe(TYPEWRITER_CITY_ART);
+ });
+
+ it("keeps custom error-page paper", () => {
+ const { container } = render(<TypewriterVisual paper={<p>Undeliverable — page not found</p>} />);
+ expect(screen.getByText("Undeliverable — page not found")).toBeTruthy();
+ expect(container.querySelector("pre")).toBeNull();
+ });
+});
diff --git a/src/web/src/components/typewriter-visual.tsx b/src/web/src/components/typewriter-visual.tsx
index 4e2d10e87..a0ade550b 100644
--- a/src/web/src/components/typewriter-visual.tsx
+++ b/src/web/src/components/typewriter-visual.tsx
@@ -1,143 +1,12 @@
"use client";
-import { useRef, useCallback, useState, useEffect, useMemo } from "react";
+import { useRef, useCallback } from "react";
import gsap from "gsap";
import { useGSAP } from "@gsap/react";
-import { SplitText } from "gsap/SplitText";
-import { useLocalStorage } from "@/hooks/use-local-storage";
-import { Popover, PopoverTrigger, PopoverContent } from "@/components/ui/popover";
+import { TypewriterCityArt } from "./typewriter-city-art";
-gsap.registerPlugin(SplitText);
-
-// Key layout: 3 rows of oval keys (front-facing view)
const KEY_ROWS = [9, 7, 9];
-interface TypewriterEmail {
- from: string;
- to: string;
- subject: string;
- body: string;
-}
-
-/** Clean, professional emails — default for the homepage. First email is shown on load, rest are randomly picked. */
-const EMAILS_DEFAULT: TypewriterEmail[] = [
- {
- subject: "Happy Birthday!",
- body: "Happy birthday! Of course I remembered \u2014 April 17th. I hope today feels as good as you deserve. Take it slow, enjoy the little things. I\u2019ll handle the rest.",
- },
- {
- subject: "Organize my meeting notes from this week",
- body: "Hey Jarvis, I dumped all my meeting notes into /docs/notes. Can you sort them by project, pull out the action items, and put together a summary? Also flag anything that looks time-sensitive.",
- },
- {
- subject: "Your morning briefing \u2014 Apr 17",
- body: "Good morning. Overnight: CI passed on main, two PRs merged, no alerts. Today: standup at 10am, design review at 2pm. I\u2019ve already rebased your feature branch and run the linter \u2014 you\u2019re clear to start coding.",
- },
- {
- subject: "Re: Are you there?",
- body: "Always. I\u2019ve been here since 3am \u2014 cleared your inbox, triaged two bug reports, and queued up your deploy for when you\u2019re ready. Go grab your coffee. I\u2019ll be right here when you get back.",
- },
- {
- subject: "Can you refactor the auth middleware?",
- body: "The session handling in src/middleware/auth.ts is getting messy. Can you break it into smaller functions, add proper error types, and make sure the tests still pass? Don\u2019t change the public API.",
- },
- {
- subject: "Weekly recap \u2014 Apr 14\u201317",
- body: "This week: 12 PRs merged, 3 bugs closed, test coverage up to 86%. You spent most of your time on the calendar feature. Reminder: you mentioned wanting to revisit the caching strategy \u2014 want me to draft a proposal?",
- },
- {
- subject: "Research vector DB options for memory",
- body: "I\u2019m thinking about adding semantic search to the memory system. Can you compare pgvector, Qdrant, and Turbopuffer? Focus on local-first setups, latency, and how they\u2019d integrate with our SQLite stack.",
- },
- {
- subject: "Heads up \u2014 CI failed on main",
- body: "Build broke 20 minutes ago. The failing test is calendar-month-grid.test.ts \u2014 looks like an off-by-one in the week boundary logic from your last commit. I\u2019ve got a fix ready. Want me to push it?",
- },
- {
- subject: "Prep for tomorrow\u2019s demo",
- body: "We\u2019re demoing to the team tomorrow at 2pm. Can you make sure staging is up to date, seed it with realistic test data, and write up a short script for the walkthrough? Keep it under 5 minutes.",
- },
-];
-
-
-const DAYS_IN_MONTH = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
-const MONTH_NAMES = Array.from({ length: 12 }, (_, i) =>
- new Date(2000, i, 1).toLocaleDateString("en-US", { month: "long" }),
-);
-
-function ordinal(n: number) {
- const s = ["th", "st", "nd", "rd"];
- const v = n % 100;
- return n + (s[(v - 20) % 10] || s[v] || s[0]);
-}
-
-interface Birthday {
- month: number;
- day: number;
-}
-
-function BirthdayPicker({
- value,
- onSave,
-}: {
- value: Birthday | null;
- onSave: (v: Birthday) => void;
- onClear: () => void;
-}) {
- const [month, setMonth] = useState(value?.month ?? 0);
- const [day, setDay] = useState(value?.day ?? 1);
- const maxDay = DAYS_IN_MONTH[month];
-
- useEffect(() => {
- if (day > maxDay) setDay(maxDay);
- }, [month, day, maxDay]);
-
- return (
- <div className="tw-birthday-picker">
- <p className="tw-birthday-title">When&#39;s your birthday?</p>
- <div className="tw-birthday-selects">
- <select value={month} onChange={(e) => setMonth(Number(e.target.value))}>
- {MONTH_NAMES.map((name, i) => (
- <option key={i} value={i}>
- {name}
- </option>
- ))}
- </select>
- <select value={day} onChange={(e) => setDay(Number(e.target.value))}>
- {Array.from({ length: maxDay }, (_, i) => (
- <option key={i + 1} value={i + 1}>
- {i + 1}
- </option>
- ))}
- </select>
- </div>
- <button className="tw-birthday-save" onClick={() => onSave({ month, day })}>
- Save
- </button>
- </div>
- );
-}
-
-// CSS variables the typewriter CSS needs — self-provided so
-// the component works outside the `.landing` scope too.
const TW_VARS: React.CSSProperties = {
"--tw-body": "oklch(0.25 0.01 60)",
"--tw-body-hi": "oklch(0.30 0.01 60)",
@@ -152,75 +21,20 @@ const TW_VARS: React.CSSProperties = {
interface TypewriterVisualProps {
className?: string;
- /** When true, keyboard Enter cycles the available papers. Default false. */
- interactive?: boolean;
- /** Delay (seconds) before the paper-feed entrance animation starts. */
entranceDelay?: number;
- /** Custom paper content. When provided, replaces the default email carousel and disables cycling. */
paper?: React.ReactNode;
- /** Custom paper carousel. Return cycles these papers without using the legacy email examples. */
- papers?: React.ReactNode[];
- /** Email scheme to display. Defaults to EMAILS_DEFAULT. Ignored when custom paper content is provided. */
- emails?: TypewriterEmail[];
- /** Scale factor for the background blob. Default 1. */
blobScale?: number;
- /** Bottom offset for the blob, e.g. "10%" or "20%". Default "-10%". */
blobBottom?: string;
}
-/**
- * Full 3D typewriter with paper-feed animation, email cycling, and mouse parallax.
- * `interactive` controls whether keyboard Enter triggers email cycling —
- * only the homepage should set this to true.
- */
export function TypewriterVisual({
className,
- interactive = false,
entranceDelay = 0.3,
paper,
- papers,
- emails = EMAILS_DEFAULT,
blobScale = 1,
blobBottom,
}: TypewriterVisualProps) {
const containerRef = useRef<HTMLDivElement>(null);
- const paperTlRef = useRef<gsap.core.Timeline | null>(null);
- const isAnimatingRef = useRef(false);
- const seenRef = useRef<Set<number>>(new Set([0]));
- const [emailIndex, setEmailIndex] = useState(0);
-
- const [birthday, setBirthday] = useLocalStorage<Birthday | null>("alook-birthday", null);
- const [hPopoverOpen, setHPopoverOpen] = useState(false);
- const [paperKey, setPaperKey] = useState(0);
-
- const effectiveEmails = useMemo(() => {
- if (!birthday) return emails;
- const longDate = `${MONTH_NAMES[birthday.month]} ${ordinal(birthday.day)}`;
- const shortDate = new Date(2000, birthday.month, birthday.day).toLocaleDateString(
- "en-US",
- { month: "short", day: "numeric" },
- );
- return emails.map((e, i) => {
- if (i !== 0) return e;
- return {
- ...e,
- body: e.body.replace("April 17th", longDate).replace("Apr 17", shortDate),
- };
- });
- }, [emails, birthday]);
- const effectivePapers = papers && papers.length > 0 ? papers : null;
- const cycleItemCount = effectivePapers?.length ?? effectiveEmails.length;
- const canCycle = !paper && cycleItemCount > 1;
-
- useEffect(() => {
- if (!birthday) return;
- const now = new Date();
- if (now.getMonth() === birthday.month && now.getDate() === birthday.day) {
- setEmailIndex(0);
- }
- }, [birthday]);
-
-
const handleMouseMove = useCallback(
(e: React.MouseEvent<HTMLElement>) => {
const el = containerRef.current;
@@ -245,153 +59,18 @@ export function TypewriterVisual({
scene.style.transform = "";
}, []);
- // Play the paper feed animation — paper slides up, text types in
- const playPaperFeed = useCallback(() => {
- const root = containerRef.current;
- if (!root) return;
-
- if (paperTlRef.current) {
- paperTlRef.current.kill();
+ useGSAP(() => {
+ const paperEl = containerRef.current?.querySelector<HTMLElement>(".tw-paper");
+ if (!paperEl) return;
+ if (window.matchMedia("(prefers-reduced-motion: reduce)").matches) {
+ gsap.set(paperEl, { y: 0, opacity: 1 });
+ return;
}
-
- const bodyEl = root.querySelector(".tw-email-body");
- if (!bodyEl) return;
- const bodySplit = SplitText.create(bodyEl, { type: "words" });
-
- const paper = root.querySelector<HTMLElement>(".tw-paper");
- const paperH = paper ? paper.offsetHeight : 300;
- gsap.set(paper, { y: paperH, opacity: 1 });
- gsap.set(root.querySelectorAll(".tw-email-line"), { opacity: 0 });
- gsap.set(bodySplit.words, { opacity: 0 });
-
- const tl = gsap.timeline({
- onComplete: () => {
- isAnimatingRef.current = false;
- },
- });
-
- tl.to(paper, {
- y: 0,
- duration: 3,
- ease: "power1.out",
- })
- .to(root.querySelectorAll(".tw-email-line"), {
- opacity: 1,
- duration: 0.15,
- stagger: 0.3,
- ease: "none",
- }, "<+=0.3")
- .to(bodySplit.words, {
- opacity: 1,
- duration: 0.01,
- stagger: 0.06,
- ease: "none",
- }, "<+=0.5");
-
- paperTlRef.current = tl;
- }, []);
-
- useEffect(() => {
- if (paperKey === 0) return;
- requestAnimationFrame(() => {
- requestAnimationFrame(() => playPaperFeed());
- });
- }, [paperKey, playPaperFeed]);
-
- const handleReturnKey = useCallback(() => {
- if (isAnimatingRef.current) return;
- isAnimatingRef.current = true;
-
- const root = containerRef.current;
- if (!root) return;
-
- if (paperTlRef.current) {
- paperTlRef.current.kill();
- }
-
- const paper = root.querySelector<HTMLElement>(".tw-paper");
- const paperH = paper ? paper.offsetHeight : 300;
- gsap.to(paper, {
- y: paperH,
- duration: 0.4,
- ease: "power2.in",
- onComplete: () => {
- setEmailIndex(() => {
- const unseen = Array.from({ length: cycleItemCount }, (_, i) => i)
- .filter((i) => !seenRef.current.has(i));
- if (unseen.length === 0) {
- seenRef.current = new Set();
- }
- const pool = unseen.length > 0 ? unseen : Array.from({ length: cycleItemCount }, (_, i) => i);
- const next = pool[Math.floor(Math.random() * pool.length)];
- seenRef.current.add(next);
- requestAnimationFrame(() => {
- requestAnimationFrame(() => {
- playPaperFeed();
- });
- });
- return next;
- });
- },
- });
- }, [playPaperFeed, cycleItemCount]);
-
- // Keyboard Enter listener — only when interactive
- useEffect(() => {
- if (!interactive || !canCycle) return;
- const onKeyDown = (e: KeyboardEvent) => {
- if (e.key === "Enter") {
- e.preventDefault();
- handleReturnKey();
- }
- };
- window.addEventListener("keydown", onKeyDown);
- return () => window.removeEventListener("keydown", onKeyDown);
- }, [interactive, canCycle, handleReturnKey]);
-
- // Entrance animation — paper feeds in on mount
- useGSAP(
- () => {
- const root = containerRef.current;
- if (!root) return;
-
- const bodyEl = root.querySelector(".tw-email-body");
- if (!bodyEl) return;
- const bodySplit = SplitText.create(bodyEl, { type: "words" });
-
- const paperEl = root.querySelector<HTMLElement>(".tw-paper");
- const paperH = paperEl ? paperEl.offsetHeight : 300;
- gsap.set(paperEl, { y: paperH, opacity: 1 });
- gsap.set(root.querySelectorAll(".tw-email-line"), { opacity: 0 });
- gsap.set(bodySplit.words, { opacity: 0 });
-
- const tl = gsap.timeline({ delay: entranceDelay });
-
- tl.to(paperEl, {
- y: 0,
- duration: 3,
- ease: "power1.out",
- })
- .to(root.querySelectorAll(".tw-email-line"), {
- opacity: 1,
- duration: 0.15,
- stagger: 0.3,
- ease: "none",
- }, "<+=0.3")
- .to(bodySplit.words, {
- opacity: 1,
- duration: 0.01,
- stagger: 0.06,
- ease: "none",
- }, "<+=0.5");
-
- paperTlRef.current = tl;
- },
- { scope: containerRef }
- );
-
- const email = effectiveEmails[emailIndex];
- const activePaper = paper ?? effectivePapers?.[emailIndex];
+ gsap.fromTo(paperEl,
+ { y: paperEl.offsetHeight, opacity: 1 },
+ { y: 0, duration: 3, delay: entranceDelay, ease: "power1.out" },
+ );
+ }, { scope: containerRef });
return (
<div
@@ -413,117 +92,29 @@ export function TypewriterVisual({
<div className="tw-body-bottom" />
<div className="tw-body-front">
- {/* Paper track — clips paper as it feeds out */}
<div className="tw-paper-track">
- <div className="tw-paper" key={activePaper ? `custom-${emailIndex}-${paperKey}` : `${emailIndex}-${paperKey}`}>
- {activePaper ?? (
- <>
- <div
- className="tw-email-headers"
- style={{
- fontFamily: "var(--font-crt)",
- fontSize: "15px",
- color: "oklch(0.45 0.01 55)",
- lineHeight: 1.7,
- borderBottom: "1px solid oklch(0.15 0.01 55 / 10%)",
- paddingBottom: "10px",
- marginBottom: "12px",
- }}
- >
- <div className="tw-email-line">
- <span style={{ color: "oklch(0.15 0.01 55)" }}>From:</span>{" "}
- {email.from}
- </div>
- <div className="tw-email-line">
- <span style={{ color: "oklch(0.15 0.01 55)" }}>To:</span>{" "}
- {email.to}
- </div>
- <div className="tw-email-line">
- <span style={{ color: "oklch(0.15 0.01 55)" }}>Subject:</span>{" "}
- {email.subject}
- </div>
- </div>
-
- <div
- className="tw-email-body"
- aria-hidden
- style={{
- fontFamily: "var(--font-crt)",
- color: "oklch(0.45 0.01 55)",
- fontSize: "17px",
- lineHeight: 1.6,
- }}
- >
- {email.body}
- </div>
- </>
- )}
+ <div className="tw-paper">
+ {paper ?? <TypewriterCityArt />}
</div>
</div>
-
- {/* Roller with knobs */}
<div className="tw-roller-assembly">
<div className="tw-knob tw-knob-left" />
<div className="tw-roller" />
<div className="tw-knob tw-knob-right" />
</div>
-
- {/* Type-bar fan */}
<div className="tw-typebar-fan" />
-
- {/* Key rows + return key */}
<div className="tw-keys-layer">
{KEY_ROWS.map((count, ri) => (
<div key={ri} className="tw-key-row">
- {Array.from({ length: count }).map((_, ki) => {
- if (ri === 2 && ki === 4 && !paper && !effectivePapers) {
- return (
- <Popover key={ki} open={hPopoverOpen} onOpenChange={setHPopoverOpen}>
- <PopoverTrigger
- className="tw-key tw-h-key"
- aria-label="H"
- render={<button />}
- >
- <span className="tw-h-label">H</span>
- </PopoverTrigger>
- <PopoverContent
- className="tw-birthday-popover"
- sideOffset={12}
- align="center"
- >
- <BirthdayPicker
- value={birthday}
- onSave={(v) => {
- setBirthday(v);
- setHPopoverOpen(false);
- setEmailIndex(0);
- setPaperKey((k) => k + 1);
- }}
- onClear={() => {
- setBirthday(null);
- setHPopoverOpen(false);
- }}
- />
- </PopoverContent>
- </Popover>
- );
- }
- return <div key={ki} className="tw-key" />;
- })}
- {ri === 1 && canCycle && (
- <button
- className="tw-key tw-return-key"
- onClick={handleReturnKey}
- aria-label="Return — load next paper"
- >
+ {Array.from({ length: count }, (_, ki) => <div key={ki} className="tw-key" />)}
+ {ri === 1 && (
+ <div className="tw-key tw-return-key" aria-hidden="true">
<span className="tw-return-label">{"\u21B5"}</span>
- </button>
+ </div>
)}
</div>
))}
</div>
-
- {/* Bars */}
<div className="tw-bars">
<div className="tw-bar tw-bar-long" />
<div className="tw-bar tw-bar-short" />