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,EAAAW,GAAA,CAAS,UAAS,CAAAzM,EAAGmF,EAAO,GAAI,SAAS,yBAA5C2G,EAAG,MAJI","names":["importEnd","__vitePreload","pairProps","c","mine","theirs","toPublicParams","p","out","G9_PROBE","isProbe","input","u","withoutBodies","real","shim","init","built","$.derived","$$props","guestSculpt","round","s","$.get","snaps","isVulva","r","guest","gate","hudWords","duetWords","poseCast","scene","$.state","$.proxy","untrack","sceneOf","page","$.user_effect","q","$.set","fitScene","hudScene","placeChoiceFor","t","placeLabel","placeLoading","poseLabel","SceneSheet","sceneSheet","openScene","which","m","trackScene","applyScene","prev","engine","toast","saved","replaceState","resolve","withScene","pickScene","againElsewhere","next","start","root","canvas","hudRef","phase","hud","loadingHud","caption","captionN","settling","STEADY","STEADY_MS","SETTLE_MAX_MS","lastFrameAt","steadyRun","settleCap","settled","settle","now","capSettle","unsettle","syncCaption","h","n","end","screen","screenOf","back","duetQuery","withQuery","k","v","swapHref","topQuery","swapLabel","actHref","actLabel","SeduceLayer","seduceRef","sexing","hasPrelude","showHud","seduceSex","seduceEvents","fn","seduceSignIn","openAuthSheet","save","saveError","sheet","view","endView","elsewhere","DuetEndCard","DuetShareSheet","endLoad","endFailed","loadEnd","sh","PerfOverlay","sculptDebug","perfNow","d","offs","gen","playing","ticketAt","refreshing","freshTicket","teardown","off","safeRect","vw","vh","rects","sel","el","top","band","b","safeRectOf","boot","my","resetEnd","create","loadEngine","e","museAvatar","sculptDpr","sculptSkinLite","sculptCam","sculptPace","sculptUpscale","FINISH_SPOT","readScene","trackSculptDuet","roundKey","keepPlayed","g","takeGuestRound","vulva","samePair","res","saveDuet","goto","reloadSetup","invalidateAll","ticketAsk","refreshTicket","askTicket","duetTimeout","j","hasGuestRound","toastText","toastTimer","onDestroy","ownUrl","sq","sceneQuery","TICKET_REFRESH_MS","onSave","signUp","send","ticket","mismatched","log","keepGuestSculpt","keepGuestRound","challengeNick","challenge","shareDuetInvite","padDown","padUp","noTouchDefault","stop","onKey","fromEditor","afterNavigate","toEditor","query","handOff","leave","nick","dropGuestRound","changePartner","gear","retry","sound","div","root_1","canvas_1","$.first_child","fragment","$$value","div_1","root_3","$.attach","$.template_effect","$.set_class","$.clsx","$.delegated","$.event","$.append","$$anchor","$$render","consequent","DuetHud","node_2","$1","sceneLine","DuetEndCard_1","div_2","root_6","div_3","button","button_1","consequent_1","consequent_2","consequent_3","$0","SeduceLayer_1","consequent_4","div_4","root_8","a","root_9","$.set_attribute","consequent_5","a_1","root_10","consequent_6","consequent_7","DuetShareSheet_1","consequent_8","SceneSheet_1","consequent_9","div_5","root_13","consequent_10","PerfOverlay_1","consequent_11","div_6","root_15","div_7","$.sibling","fragment_7","a_2","button_2","div_8","fragment_8","a_3","div_9","fragment_9","a_4","h1","fragment_10","p_1","div_10","a_5","$.set_text","text_3","text_4","consequent_13","consequent_14","consequent_15","alternate","consequent_16"],"sources":["../../../../../../src/lib/components/sculpt/duet/end-chunk.ts","../../../../../../src/lib/sculpt/duet-pair-props.ts","../../../../../../src/lib/sculpt/public-params.ts","../../../../../../src/lib/components/sculpt/duet/quickie.ts","../../../../../../src/routes/sculpt/duet/+page.svelte"],"sourcesContent":["// The live duet page's end card and share sheet: their own chunk, asked for when a round starts\n// (perf audit). A leaf, so the page tests can make the chunk fail.\nexport function importEnd() {\n\treturn Promise.all([import('./DuetEndCard.svelte'), import('./DuetShareSheet.svelte')]);\n}\n","// RAT-712: the duet funnel split by scene and by the two identities. A round's cast (duet-cast.ts)\n// as analytics properties: which scene (`kind`: pv / pa / vv, `strap`), and who the player and the\n// partner are as characters (man / woman / trans). Never who as a person: no id, no nickname.\nimport type { Who } from './avatar/params';\n\ntype Side = 'player' | 'partner';\ninterface CastLike {\n\tkind: string;\n\tgiver: Side;\n\tstrap: boolean;\n\tchars: { giver: { who: Who }; receiver: { who: Who } };\n}\n\nexport interface PairProps {\n\tkind: string;\n\tstrap: boolean;\n\tplayer_who: Who;\n\tpartner_who: Who;\n}\n\n/** An old setup or replay without a cast (pv only then) has nothing to add: `{}`. */\nexport function pairProps(c: CastLike | null | undefined): PairProps | Record<string, never> {\n\tif (!c?.chars) return {};\n\tconst mine = c.giver === 'player' ? c.chars.giver : c.chars.receiver;\n\tconst theirs = c.giver === 'player' ? c.chars.receiver : c.chars.giver;\n\treturn { kind: c.kind, strap: c.strap, player_who: mine.who, partner_who: theirs.who };\n}\n","// A sculpt as other people get it (fleet tasks/2026-11-27-sculpt-vulva-duet, S1). Her duet settings\n// (VulvaParams.play) are hers: every server reader of someone else's sculpt strips them, so they reach\n// no page, share card, feed post or API answer. The only places they go: the owner's own editor\n// (getSculpt), the duet page of whoever plays with her, and a saved duet's playback payload.\n\nimport type { SculptParams } from './params';\nimport type { AnySculptParams, VulvaParams } from './vulva-params';\n\nexport type PublicVulvaParams = Omit<VulvaParams, 'play'>;\nexport type PublicSculptParams = SculptParams | PublicVulvaParams;\n\n/** A copy without `play` (whatever the body, so a stray key never rides along); a penis comes back\n *  as it was. */\nexport function toPublicParams(p: SculptParams): SculptParams;\nexport function toPublicParams(p: VulvaParams | PublicVulvaParams): PublicVulvaParams;\nexport function toPublicParams(p: AnySculptParams | PublicSculptParams): PublicSculptParams;\nexport function toPublicParams(p: AnySculptParams | PublicSculptParams): PublicSculptParams {\n\tconst out: PublicSculptParams & { play?: unknown } = { ...p };\n\tdelete out.play;\n\treturn out;\n}\n","// Quickie (the Play screen's third button): the duet as it plays on production before the full bodies,\n// the torsos only. The engine loads the Genesis 9 bodies when their probe answers (render/duet-engine\n// makeBodies); a Quickie page answers it \"no\" for itself while it is open, so the engine takes the\n// very path it takes for a viewer without the bodies. No change to the engine.\n\n/** avatar/g9.ts G9_PROBE (spelled here: that module would pull the bodies' math into this chunk) */\nexport const G9_PROBE = '/api/sculpt/g9/ok';\n\nconst isProbe = (input: RequestInfo | URL) => {\n\tconst u =\n\t\ttypeof input === 'string' ? input : input instanceof URL ? input.href : (input as Request).url;\n\ttry {\n\t\treturn new URL(u, location.href).pathname === G9_PROBE;\n\t} catch {\n\t\treturn false;\n\t}\n};\n\n/** Answers the bodies' probe 404 until the returned function is called (the page's teardown). */\nexport function withoutBodies(): () => void {\n\tconst real = window.fetch;\n\tconst shim: typeof fetch = (input, init) =>\n\t\tisProbe(input)\n\t\t\t? Promise.resolve(new Response(null, { status: 404 }))\n\t\t\t: real.call(window, input, init);\n\twindow.fetch = shim;\n\treturn () => {\n\t\tif (window.fetch === shim) window.fetch = real;\n\t};\n}\n","<script lang=\"ts\">\n\t// The live duet (fleet tasks/2026-11-27-sculpt-vulva-duet, PG2): the full-bleed stage, the HUD (HUD\n\t// B, DuetHud) and the pages mock's round start, failed stage and end. The engine (A's DuetEngine,\n\t// contract.ts) is a lazy chunk: three never reaches the server render or the first paint. The\n\t// page feeds it the pad, the keys and the HUD's buttons, and draws what it says.\n\t//\n\t// The pad is the harness's: a strip over the bottom of the stage (the right column on a landscape\n\t// phone), so the canvas above it keeps its own gestures (her clit, orbit, pinch). Before the first\n\t// tap it covers the whole stage: any tap starts.\n\timport {\n\t\tsculptCam,\n\t\tsculptDebug,\n\t\tsculptDpr,\n\t\tsculptPace,\n\t\tsculptSkinLite,\n\t\tsculptUpscale\n\t} from '$lib/sculpt/debug-flag';\n\timport '$lib/components/sculpt/duet/duet.css';\n\timport { museAvatar } from '$lib/sculpt/muse-look';\n\timport { onDestroy, untrack } from 'svelte';\n\timport { afterNavigate, goto, invalidateAll, replaceState } from '$app/navigation';\n\timport { resolve } from '$app/paths';\n\timport { page } from '$app/state';\n\timport DuetHud from '$lib/components/sculpt/duet/DuetHud.svelte';\n\timport type DuetEndCardT from '$lib/components/sculpt/duet/DuetEndCard.svelte';\n\timport type DuetShareSheetT from '$lib/components/sculpt/duet/DuetShareSheet.svelte';\n\timport type DuetPerfOverlayT from '$lib/components/sculpt/duet/DuetPerfOverlay.svelte';\n\timport type { DuetPerfRead } from '$lib/components/sculpt/duet/DuetPerfOverlay.svelte';\n\timport {\n\t\tloadEngine,\n\t\ttype DuetEndState,\n\t\ttype DuetEngine,\n\t\ttype DuetPhase,\n\t\ttype DuetRound,\n\t\ttype DuetSaved,\n\t\ttype FinishSpot\n\t} from '$lib/components/sculpt/duet/contract';\n\timport { duetQuery, topQuery } from '$lib/components/sculpt/duet/duet-url';\n\timport { duetTimeout } from '$lib/components/sculpt/duet/net';\n\timport { importEnd } from '$lib/components/sculpt/duet/end-chunk';\n\timport { handOff } from '$lib/sculpt/editor-handoff';\n\timport {\n\t\tendView,\n\t\tloadingHud,\n\t\tmismatched,\n\t\troundKey,\n\t\tsafeRectOf,\n\t\tsaveDuet,\n\t\tscreenOf,\n\t\tTICKET_REFRESH_MS\n\t} from '$lib/components/sculpt/duet/stage';\n\timport type { HudState } from '$lib/components/sculpt/duet/hud';\n\timport type { DuetMove } from '$lib/sculpt/duet-game';\n\timport type { DuetView } from '$lib/sculpt/render/duet-director';\n\timport { openAuthSheet } from '$lib/stores/authSheet';\n\timport { trackSculptDuet } from '$lib/analytics';\n\timport { pairProps } from '$lib/sculpt/duet-pair-props';\n\timport { browser } from '$app/environment';\n\timport { shareDuetInvite } from '$lib/sculpt/share';\n\timport { toPublicParams } from '$lib/sculpt/public-params';\n\timport { duetWords } from '$lib/sculpt/duet-words';\n\timport { isVulva } from '$lib/sculpt/vulva-params';\n\timport {\n\t\tdropGuestRound,\n\t\tguestSculpt,\n\t\thasGuestRound,\n\t\tkeepGuestRound,\n\t\tkeepGuestSculpt,\n\t\tsamePair,\n\t\ttakeGuestRound\n\t} from '$lib/sculpt/guest-duet';\n\timport { withoutBodies } from '$lib/components/sculpt/duet/quickie';\n\timport type SeduceLayerT from '$lib/components/sculpt/seduce/SeduceLayer.svelte';\n\timport type { DuetEvent } from '$lib/sculpt/duet-game';\n\timport type SceneSheetT from '$lib/components/sculpt/SceneSheet.svelte';\n\timport {\n\t\tFINISH_SPOT,\n\t\telsewhere,\n\t\tfitScene,\n\t\tplaceChoiceFor,\n\t\tplaceLabel,\n\t\tposeLabel,\n\t\treadScene,\n\t\tsceneLine,\n\t\tsceneOf,\n\t\tsceneQuery,\n\t\twithScene,\n\t\ttype PoseCast,\n\t\ttype Scene\n\t} from '$lib/sculpt/scene';\n\timport { trackScene } from '$lib/analytics';\n\timport { t } from '$lib/i18n';\n\timport type { PageData } from './$types';\n\n\tlet { data }: { data: PageData } = $props();\n\n\t/** RAT-685, signed out: what the visitor built in the editor, if it is the body this duet needs (the\n\t *  server's stand-in otherwise). Read once per setup, browser only. */\n\tconst built = $derived(\n\t\tbrowser && !('gate' in data.setup) && data.setup.guest\n\t\t\t? guestSculpt(data.setup.playerBody)\n\t\t\t: null\n\t);\n\t// S2's setup: a refused round is only { gate }; a ready one has no gate key\n\tconst round = $derived.by<DuetRound | null>(() => {\n\t\tif ('gate' in data.setup) return null;\n\t\tconst s = data.setup;\n\t\tif (!built) return s;\n\t\tconst snaps = { ...s.snaps, player: built };\n\t\treturn isVulva(built)\n\t\t\t? { ...s, vulva: toPublicParams(built), herPlay: built.play, snaps }\n\t\t\t: { ...s, penis: built, snaps };\n\t});\n\t/** the player's own side of the round, her settings included */\n\tconst mine = (r: DuetRound) =>\n\t\tr.playerBody === 'penis' ? r.penis : { ...r.vulva, play: r.herPlay };\n\tconst guest = $derived(!!round?.guest);\n\tconst gate = $derived('gate' in data.setup ? data.setup.gate : null);\n\t/** RAT-702: the HUD's labels in the words of who the two are */\n\tconst hudWords = $derived(duetWords(round?.cast ?? null));\n\n\t// ---------- RAT-773: the scene (where, and the starting position) ----------\n\t/** the pair, as far as the positions care (duet-poses poseAllowed) */\n\tconst poseCast = $derived<PoseCast | null>(\n\t\t// (round?.cast: the cards around a round that isn't, a failed load among them, must never throw)\n\t\tround?.cast ? { kind: round.cast.kind, strap: round.cast.strap } : null\n\t);\n\t/** what the link asked for (?place=&pose=), as this pair can play it; then what's picked here */\n\tlet scene = $state<Scene>(untrack(() => sceneOf(page.url.searchParams)));\n\t$effect(() => {\n\t\t// a new setup (a link, invalidateAll): the link's scene again, fitted to the pair\n\t\tconst q = page.url.searchParams;\n\t\tconst c = poseCast;\n\t\tuntrack(() => (scene = fitScene(sceneOf(q), c)));\n\t});\n\t/** the round's chips (Seduce's story picks its own; Quickie has no room) */\n\tconst hudScene = $derived(\n\t\tdata.seduce\n\t\t\t? null\n\t\t\t: {\n\t\t\t\t\tplace: data.quick || !placeChoiceFor(poseCast) ? null : t(placeLabel(scene.place)),\n\t\t\t\t\tloading: placeLoading,\n\t\t\t\t\tpose: t(poseLabel(scene.pose))\n\t\t\t\t}\n\t);\n\t/** the engine is bringing a new place in (hud.placeLoading): the Place chip spins */\n\tlet placeLoading = $state(false);\n\tlet SceneSheet = $state<typeof SceneSheetT | null>(null);\n\tlet sceneSheet = $state<'pose' | 'place' | null>(null);\n\tfunction openScene(which: 'pose' | 'place') {\n\t\tvoid import('$lib/components/sculpt/SceneSheet.svelte').then((m) => {\n\t\t\tSceneSheet = m.default;\n\t\t\tsceneSheet = which;\n\t\t});\n\t\ttrackScene('scene_open', { where: 'round', which });\n\t}\n\t/** The engine plays the scene (a position at once, mid-round too; a place fades, loads and goes on),\n\t *  and the URL carries it (a shared link lands here). A position the engine refuses stays as it was. */\n\tfunction applyScene(s: Scene, prev: Scene) {\n\t\tif (s.pose !== prev.pose && engine && !engine.setPose(s.pose)) {\n\t\t\ttoast('Not yet.');\n\t\t\ts = { ...s, pose: prev.pose };\n\t\t}\n\t\tif (!data.quick && s.place !== prev.place && engine)\n\t\t\tvoid engine.setPlace(s.place).catch(() => {\n\t\t\t\t// the place stays as it was, and so does the position (one it had: the shower's standing\n\t\t\t\t// isn't the bedroom's)\n\t\t\t\tif (s.pose !== prev.pose) engine?.setPose(prev.pose);\n\t\t\t\tscene = { ...scene, place: prev.place, pose: prev.pose };\n\t\t\t\ttoast(\"Couldn't load that place.\");\n\t\t\t});\n\t\tscene = s;\n\t\tif (saved) return; // the URL is the saved round's (a replay link); Again puts this page's back\n\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added\n\t\treplaceState(`${resolve('/sculpt/duet')}?${withScene(page.url.search, s)}`, {});\n\t}\n\tfunction pickScene(s: Scene) {\n\t\tconst prev = scene;\n\t\tsceneSheet = null;\n\t\tapplyScene(s, prev);\n\t\ttrackScene('scene_select', { place: s.place, pose: s.pose, where: 'round' });\n\t}\n\tfunction againElsewhere() {\n\t\tconst s = next;\n\t\tif (!s) return;\n\t\tconst prev = scene;\n\t\ttrackScene('again_elsewhere', { place: s.place, pose: s.pose });\n\t\tstart(); // in the tap (iOS: audio)\n\t\tapplyScene(s, prev);\n\t}\n\n\tlet root = $state<HTMLDivElement>();\n\tlet canvas = $state<HTMLCanvasElement>();\n\tlet hudRef = $state<DuetHud>();\n\tlet engine: DuetEngine | null = null;\n\t/** the engine's phase; null before it exists */\n\tlet phase = $state<DuetPhase | null>(null);\n\t/** the engine's HUD state (one object, changed in place); a stand-in while it loads */\n\tlet hud = $state.raw<HudState>(loadingHud());\n\tlet caption = $state<{ t: string; sub?: string } | null>(null);\n\t/** the engine's caption count last shown (hud.caption.n): a new n is a new caption */\n\tlet captionN = 0;\n\n\t// ---------- RAT-797: \"Tap to start\" only once the scene answers a tap ----------\n\t/** the engine is live, but its first frames are still slow (programs, textures going up): the cue\n\t *  says \"Setting the scene…\" until STEADY frames in a row each came within STEADY_MS, or at most\n\t *  SETTLE_MAX_MS after the round could start (a slow phone, or software GL, is never steady: it\n\t *  must not wait for ever). A tap still starts the round meanwhile: never lost, only not invited. */\n\tlet settling = $state(true);\n\tconst STEADY = 3,\n\t\tSTEADY_MS = 300,\n\t\tSETTLE_MAX_MS = 4000;\n\tlet lastFrameAt = 0,\n\t\tsteadyRun = 0;\n\tlet settleCap: ReturnType<typeof setTimeout> | undefined;\n\tfunction settled() {\n\t\tclearTimeout(settleCap);\n\t\tsettleCap = undefined;\n\t\tsettling = false;\n\t\thudRef?.frame();\n\t}\n\tfunction settle() {\n\t\tconst now = performance.now();\n\t\tsteadyRun = lastFrameAt && now - lastFrameAt < STEADY_MS ? steadyRun + 1 : 0;\n\t\tlastFrameAt = now;\n\t\tif (steadyRun >= STEADY) settled();\n\t}\n\t/** the round can start: the cap runs from here */\n\tfunction capSettle() {\n\t\tif (settling && !settleCap) settleCap = setTimeout(settled, SETTLE_MAX_MS);\n\t}\n\tfunction unsettle() {\n\t\tclearTimeout(settleCap);\n\t\tsettleCap = undefined;\n\t\tsettling = true;\n\t\tlastFrameAt = 0;\n\t\tsteadyRun = 0;\n\t}\n\n\t/** The engine says what just happened (hud.caption, with its own timing); the HUD plays it in. */\n\tfunction syncCaption(h: HudState) {\n\t\tconst c = h.caption ?? null;\n\t\tconst n = c?.n ?? 0;\n\t\tif (n === captionN && !!c === !!caption) return;\n\t\tcaptionN = n;\n\t\tcaption = c ? { t: c.t, sub: c.sub } : null;\n\t}\n\tlet end = $state.raw<DuetEndState | null>(null);\n\tconst screen = $derived(screenOf(phase));\n\n\t/** this duet's own query (?with= / ?bot=): Gear shop comes back to it, Again after a save goes\n\t *  back to it (the saved round's code took the URL) */\n\tconst back = $derived(duetQuery(data.target));\n\t/** RAT-696: who gives, when the pair lets the player choose (the same genitals, or her strap-on):\n\t *  the switch reloads the setup cast the other way */\n\t/** this page with one choice changed (the rest of the query kept) */\n\tconst withQuery = (k: string, v: string) => {\n\t\tconst q = new URLSearchParams(page.url.search);\n\t\tq.set(k, v);\n\t\treturn `${resolve('/sculpt/duet')}?${q}`;\n\t};\n\tconst swapHref = $derived.by(() => {\n\t\tconst c = round?.cast;\n\t\tif (!c?.choosable || round?.guest) return null;\n\t\tconst t = topQuery(c.giver === 'player' ? 'partner' : 'player').split('=')[1];\n\t\treturn withQuery('top', t);\n\t});\n\tconst swapLabel = $derived(\n\t\tround?.cast.kind === 'vv'\n\t\t\t? round.cast.giver === 'player'\n\t\t\t\t? 'You on top'\n\t\t\t\t: 'You below'\n\t\t\t: round?.cast.giver === 'player'\n\t\t\t\t? 'You give'\n\t\t\t\t: 'You take'\n\t);\n\t/** RAT-708: two vulvas: a strap-on or a scissor */\n\tconst actHref = $derived.by(() => {\n\t\tconst c = round?.cast;\n\t\tif (!c?.actable || round?.guest) return null;\n\t\treturn withQuery('act', c.kind === 'vv' ? 'strap' : 'scissor');\n\t});\n\tconst actLabel = $derived(round?.cast.kind === 'vv' ? 'Scissor' : 'Strap-on');\n\n\t// ---------- RAT-736 Seduce: talk first, then the round (no clock) ----------\n\t/** its layer: its own chunk, asked for only on a seduce page */\n\tlet SeduceLayer = $state<typeof SeduceLayerT | null>(null);\n\tlet seduceRef = $state<SeduceLayerT>();\n\t/** the round is on (Take her / Again): the HUD and the pad show */\n\tlet sexing = $state(false);\n\t/** the engine can show her talking pose (setPrelude, RAT-747); until then the talk veils the stage */\n\tlet hasPrelude = $state(false);\n\t$effect(() => {\n\t\tif (!data.seduce || SeduceLayer) return;\n\t\tvoid import('$lib/components/sculpt/seduce/SeduceLayer.svelte').then(\n\t\t\t(m) => (SeduceLayer = m.default)\n\t\t);\n\t});\n\t/** the HUD and the pad: always in a round, in Seduce only once the round is on */\n\tconst showHud = $derived(!data.seduce || sexing || phase === 'failed');\n\tfunction seduceSex() {\n\t\tsexing = true;\n\t\tstart();\n\t}\n\tfunction seduceEvents(fn: (e: DuetEvent) => void) {\n\t\treturn engine ? engine.on('event', fn) : () => {};\n\t}\n\tfunction seduceSignIn() {\n\t\topenAuthSheet(page.url.pathname + page.url.search, 'sculpt', {\n\t\t\ttitle: 'Sign in to talk to her',\n\t\t\tdetail: 'Free account. She remembers you next time.'\n\t\t});\n\t}\n\n\t// ---------- the end (PG3) ----------\n\tlet save = $state<'idle' | 'saving' | 'saved' | 'error' | 'expired'>('idle');\n\tlet saveError = $state('');\n\tlet saved = $state.raw<DuetSaved | null>(null);\n\tlet sheet = $state(false);\n\t/** the card shows the server's numbers once it has them */\n\tconst view = $derived(end ? endView(end, saved?.result, hudWords) : null);\n\t/** \"Again somewhere new\": a fresh suggestion for each end */\n\tconst next = $derived(end ? elsewhere(scene, poseCast) : null);\n\t// the place it suggests loads while the card shows (the engine does nothing mid-round, and a start\n\t// stops it), so Again somewhere new swaps it in from the cache\n\t$effect(() => {\n\t\tconst n = next;\n\t\tif (!n || data.quick || data.seduce || n.place === untrack(() => scene.place)) return;\n\t\tvoid engine?.preloadPlace(n.place).catch(() => {});\n\t});\n\n\t/** The end card and the share sheet: their own chunk, asked for when a round starts so they're\n\t *  there at its end (perf audit); the end asks again if that load failed. */\n\tlet DuetEndCard = $state<typeof DuetEndCardT | null>(null);\n\tlet DuetShareSheet = $state<typeof DuetShareSheetT | null>(null);\n\tlet endLoad: Promise<void> | null = null;\n\t/** the last ask failed: at the end a small card offers it again, and Leave */\n\tlet endFailed = $state(false);\n\tfunction loadEnd() {\n\t\tif (!endLoad) endFailed = false;\n\t\treturn (endLoad ??= importEnd()\n\t\t\t.then(([c, sh]) => {\n\t\t\t\tDuetEndCard = c.default;\n\t\t\t\tDuetShareSheet = sh.default;\n\t\t\t})\n\t\t\t.catch(() => {\n\t\t\t\tendLoad = null;\n\t\t\t\tendFailed = true;\n\t\t\t}));\n\t}\n\n\t/** Quickie (?quick=1): the torsos only, as on production before the full bodies (quickie.ts) */\n\t$effect(() => {\n\t\tif (data.quick) return withoutBodies();\n\t});\n\n\t/** ?debug (here or on any sculpt page this tab: debug-flag.ts): the engine's frame-time readout over the stage (its own chunk, only then) */\n\tlet PerfOverlay = $state<typeof DuetPerfOverlayT | null>(null);\n\t$effect(() => {\n\t\tif (!sculptDebug(page.url) || PerfOverlay) return;\n\t\tvoid import('$lib/components/sculpt/duet/DuetPerfOverlay.svelte').then(\n\t\t\t(m) => (PerfOverlay = m.default)\n\t\t);\n\t});\n\tfunction perfNow(): DuetPerfRead | null {\n\t\tconst d = (engine as { debug?: { perf(): DuetPerfRead } } | null)?.debug;\n\t\treturn d ? d.perf() : null;\n\t}\n\n\tlet offs: (() => void)[] = [];\n\t/** a newer boot (Change partner, Try again) makes an older one's late answer moot */\n\tlet gen = 0;\n\t/** what the engine plays (roundKey); null: nothing built */\n\tlet playing: string | null = null;\n\t/** when the current setup (and so its ticket) came in */\n\tlet ticketAt = 0;\n\tlet refreshing = false;\n\t/** a ticket from GET /api/sculpt/duet-ticket, newer than the setup's; null: the setup's is newest */\n\tlet freshTicket: string | null = null;\n\n\tfunction teardown() {\n\t\tclearTimeout(settleCap);\n\t\tfor (const off of offs) off();\n\t\toffs = [];\n\t\tengine?.dispose();\n\t\tengine = null;\n\t}\n\n\t/** The rect the scene may fill: under the top controls, clear of the play cluster or the card. */\n\tfunction safeRect() {\n\t\tconst vw = window.innerWidth,\n\t\t\tvh = window.innerHeight;\n\t\tif (!root) return { l: 0, t: 0, r: vw, b: vh };\n\t\tconst rects = (sel: string) =>\n\t\t\t[...root!.querySelectorAll(sel)].map((el) => el.getBoundingClientRect());\n\t\t// Seduce while talking: her framed in the free rectangle, from under the Desire meter to the top\n\t\t// of the chat's lines (the box and the fade below it are see-through over her); the keyboard\n\t\t// shrinks it, and opening or closing it relayouts\n\t\t// (exact, not safeRectOf's: no 40% floor, the scene frames her by how much room there really is)\n\t\tif (data.seduce && !sexing) {\n\t\t\tconst top = rects('.sd-top')[0];\n\t\t\tconst band = rects('.sd-lines, .sd-card').filter((r) => r.bottom > r.top)[0];\n\t\t\tconst t = top ? Math.max(0, top.bottom) : 0;\n\t\t\tconst b = band ? Math.min(vh, band.top) : vh;\n\t\t\treturn { l: 0, t, r: vw, b: Math.max(t + 1, b) };\n\t\t}\n\t\treturn safeRectOf(\n\t\t\tvw,\n\t\t\tvh,\n\t\t\trects('.dh-status, .dh-cam, .dh-sys'),\n\t\t\trects(screen === 'over' ? '.ec' : '.dh-play')\n\t\t);\n\t}\n\n\tasync function boot(r: DuetRound) {\n\t\tconst my = ++gen;\n\t\tteardown();\n\t\tphase = null;\n\t\thud = loadingHud();\n\t\tcaption = null;\n\t\tcaptionN = 0;\n\t\tunsettle();\n\t\tresetEnd();\n\t\tlet create;\n\t\ttry {\n\t\t\tcreate = await loadEngine();\n\t\t} catch {\n\t\t\tif (my === gen) phase = 'failed';\n\t\t\treturn;\n\t\t}\n\t\tif (my !== gen || !canvas) return;\n\t\tlet e: DuetEngine;\n\t\ttry {\n\t\t\te = create({\n\t\t\t\tcanvas,\n\t\t\t\tpenis: r.penis,\n\t\t\t\t// RAT-747: The Muse's own face and hair in Seduce (muse-look.ts), her finish on her figure\n\t\t\t\tvulva: {\n\t\t\t\t\t...r.vulva,\n\t\t\t\t\tplay: r.herPlay,\n\t\t\t\t\t...(data.seduce ? { avatar: museAvatar() } : {})\n\t\t\t\t},\n\t\t\t\tcast: r.cast,\n\t\t\t\tmode: 'live',\n\t\t\t\tsafeRect,\n\t\t\t\treducedMotion: matchMedia('(prefers-reduced-motion: reduce)').matches,\n\t\t\t\tdpr: sculptDpr(page.url),\n\t\t\t\tskinLite: sculptSkinLite(page.url),\n\t\t\t\tcam: sculptCam(page.url),\n\t\t\t\tpace: sculptPace(page.url),\n\t\t\t\tupscale: sculptUpscale(page.url),\n\t\t\t\tuntimed: data.seduce,\n\t\t\t\therFine: data.seduce,\n\t\t\t\t// RAT-773: the link's (or the pick's) scene; Seduce's story picks its own\n\t\t\t\t...(data.seduce\n\t\t\t\t\t? {}\n\t\t\t\t\t: { scene: { pose: scene.pose, ...(data.quick ? {} : { place: scene.place }) } }),\n\t\t\t\t// the finish preference picked in the Scene sheet (this device): the spot when none is picked\n\t\t\t\t...(data.seduce || !FINISH_SPOT[readScene().finish]\n\t\t\t\t\t? {}\n\t\t\t\t\t: { finish: FINISH_SPOT[readScene().finish]! })\n\t\t\t});\n\t\t} catch {\n\t\t\tphase = 'failed';\n\t\t\treturn;\n\t\t}\n\t\tengine = e;\n\t\thasPrelude = typeof (e as { setPrelude?: unknown }).setPrelude === 'function';\n\t\thud = e.hud;\n\t\tphase = e.phase;\n\t\tif (phase === 'ready') capSettle();\n\t\toffs.push(\n\t\t\te.on('frame', (h) => {\n\t\t\t\tsyncCaption(h);\n\t\t\t\tif (!!h.placeLoading !== placeLoading) placeLoading = !!h.placeLoading;\n\t\t\t\tif (settling) settle();\n\t\t\t\thudRef?.frame();\n\t\t\t}),\n\t\t\te.on('phase', (p) => {\n\t\t\t\tphase = p;\n\t\t\t\tif (p === 'ready') capSettle();\n\t\t\t\thudRef?.frame();\n\t\t\t\t// Seduce: the round ended from its pause card (End round): back to her, no end state\n\t\t\t\tif (p === 'ready' && data.seduce && sexing) {\n\t\t\t\t\tsexing = false;\n\t\t\t\t\tseduceRef?.roundOver('quit');\n\t\t\t\t}\n\t\t\t\tif (p === 'over' && e.end && data.seduce) {\n\t\t\t\t\tend = e.end;\n\t\t\t\t\tseduceRef?.roundOver(e.end.outcome);\n\t\t\t\t\ttrackSculptDuet('end', {\n\t\t\t\t\t\toutcome: e.end.outcome,\n\t\t\t\t\t\tscore: e.end.result.score,\n\t\t\t\t\t\tms: e.end.endMs,\n\t\t\t\t\t\tguest,\n\t\t\t\t\t\tseduce: true\n\t\t\t\t\t});\n\t\t\t\t} else if (p === 'over' && e.end) {\n\t\t\t\t\tvoid loadEnd();\n\t\t\t\t\tend = e.end;\n\t\t\t\t\ttrackSculptDuet('end', {\n\t\t\t\t\t\toutcome: e.end.outcome,\n\t\t\t\t\t\tscore: e.end.result.score,\n\t\t\t\t\t\tms: e.end.endMs,\n\t\t\t\t\t\tguest,\n\t\t\t\t\t\t...(round ? pairProps(round.cast) : {})\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t})\n\t\t);\n\t\te.ready.catch(() => {\n\t\t\tif (engine === e) phase = 'failed';\n\t\t});\n\t}\n\n\t// Each setup (first load, sign-in, invalidateAll) resyncs (repo rule): a new partner or a changed\n\t// sculpt builds a new engine and resets the cards; a setup that only brings a fresh ticket keeps\n\t// the round going (the save reads the newest ticket); a gate stops the engine behind it.\n\t$effect(() => {\n\t\tconst r = round;\n\t\tconst c = canvas;\n\t\tuntrack(() => {\n\t\t\tif (!r) {\n\t\t\t\tif (playing !== null || engine) {\n\t\t\t\t\tgen++;\n\t\t\t\t\tteardown();\n\t\t\t\t\tplaying = null;\n\t\t\t\t\tphase = null;\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tticketAt = Date.now();\n\t\t\tfreshTicket = null;\n\t\t\tif (!c) return;\n\t\t\tconst k = roundKey(r);\n\t\t\tif (k === playing) return;\n\t\t\tplaying = k;\n\t\t\ttrackSculptDuet('open', { partner: r.partner.kind, guest: r.guest, ...pairProps(r.cast) });\n\t\t\tvoid boot(r);\n\t\t\tif (!r.guest) void keepPlayed(r);\n\t\t});\n\t});\n\n\t/** Signed up for the round they just played as a guest, and the editor has saved their sculpt: that\n\t *  round is stored like any other, and its replay opens. Not if a sculpt changed meanwhile. */\n\tasync function keepPlayed(r: DuetRound) {\n\t\tconst g = takeGuestRound(back);\n\t\tif (!g || !r.ticket) return;\n\t\tconst vulva = { ...r.vulva, play: r.herPlay };\n\t\tif (!samePair(g, r.penis, vulva)) return;\n\t\tconst res = await saveDuet({\n\t\t\tticket: r.ticket,\n\t\t\tplayer: r.snaps.player,\n\t\t\tpartner: r.snaps.partner,\n\t\t\tlog: g.log\n\t\t});\n\t\tif (!res.ok) return toast(res.message);\n\t\ttrackSculptDuet('save', {\n\t\t\tpartner: r.partner.kind,\n\t\t\tscore: res.saved.result.score,\n\t\t\tguest: true,\n\t\t\t...pairProps(r.cast)\n\t\t});\n\t\tawait goto(resolve('/sculpt/duet/[code]', { code: res.saved.code }), { replaceState: true });\n\t}\n\n\t/** A fresh ticket in the background (the new setup only swaps it in). */\n\tfunction reloadSetup() {\n\t\tif (refreshing) return;\n\t\trefreshing = true;\n\t\tvoid invalidateAll().finally(() => (refreshing = false));\n\t}\n\n\t/** A fresh ticket only (perf audit: no whole-page reload), while the round plays. A refusal (401\n\t *  signed out, 404 the partner closed, 409 no sculpt) reloads the setup so the page shows its gate;\n\t *  a brake, a server error or no connection keeps the ticket it has (a refused save then reloads,\n\t *  as below). */\n\tlet ticketAsk: Promise<boolean> | null = null;\n\t/** true: a fresh ticket came (one ask at a time: the save's retry joins the round's) */\n\tfunction refreshTicket(): Promise<boolean> {\n\t\treturn (ticketAsk ??= askTicket().finally(() => (ticketAsk = null)));\n\t}\n\tasync function askTicket(): Promise<boolean> {\n\t\tconst q = back;\n\t\ttry {\n\t\t\tconst r = await fetch(`/api/sculpt/duet-ticket?${q}`, { signal: duetTimeout() });\n\t\t\tif (q !== back) return false;\n\t\t\tif (r.ok) {\n\t\t\t\tconst j = (await r.json()) as { ticket?: unknown };\n\t\t\t\tif (typeof j.ticket !== 'string') return false;\n\t\t\t\tfreshTicket = j.ticket;\n\t\t\t\tticketAt = Date.now();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tif (r.status !== 401 && r.status !== 404 && r.status !== 409) return false;\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t\treloadSetup();\n\t\treturn false;\n\t}\n\n\t$effect(() => {\n\t\tconst g = gate;\n\t\tif (!g) return;\n\t\tuntrack(() => {\n\t\t\ttrackSculptDuet('gate', { gate: g });\n\t\t\t// signed up from a guest's round, nothing saved yet: the editor saves what they built, then\n\t\t\t// comes back here with it\n\t\t\tif (g === 'no_sculpt' && hasGuestRound(back))\n\t\t\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added\n\t\t\t\tvoid goto(`${resolve('/sculpt')}?duet=${encodeURIComponent(back)}&go=1`, {\n\t\t\t\t\treplaceState: true\n\t\t\t\t});\n\t\t});\n\t});\n\n\tlet toastText = $state('');\n\tlet toastTimer: ReturnType<typeof setTimeout> | undefined;\n\tfunction toast(s: string) {\n\t\ttoastText = s;\n\t\tclearTimeout(toastTimer);\n\t\ttoastTimer = setTimeout(() => (toastText = ''), 1800);\n\t}\n\n\t// (onDestroy runs on the server too: nothing was made there)\n\tonDestroy(() => {\n\t\tgen++;\n\t\tif (typeof document !== 'undefined') teardown();\n\t});\n\n\t/** this page's own URL (the partner, Quickie, the scene): a saved round's replay URL goes back to it */\n\tconst ownUrl = () => {\n\t\tconst sq = sceneQuery(scene);\n\t\treturn `${resolve('/sculpt/duet')}?${back}${data.quick ? '&quick=1' : ''}${sq ? `&${sq}` : ''}`;\n\t};\n\tfunction resetEnd() {\n\t\tend = null;\n\t\tsave = 'idle';\n\t\tsaveError = '';\n\t\tsheet = false;\n\t\tif (saved) {\n\t\t\tsaved = null;\n\t\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added\n\t\t\treplaceState(ownUrl(), {});\n\t\t}\n\t}\n\n\t/** In the tap that starts it (Tap to start, Again): the engine unlocks audio and vibration there\n\t *  (iOS) and resets the round, same partner, same ticket. */\n\tfunction start() {\n\t\tif (!engine || (engine.phase !== 'ready' && engine.phase !== 'over')) return;\n\t\tcaption = null;\n\t\tcaptionN = 0;\n\t\tresetEnd();\n\t\tengine.start();\n\t\tif (!data.seduce) void loadEnd();\n\t\ttrackSculptDuet('start', { guest, ...(round ? pairProps(round.cast) : {}) });\n\t\tif (!data.seduce)\n\t\t\ttrackScene('round_start', {\n\t\t\t\tplace: data.quick ? 'none' : scene.place,\n\t\t\t\tpose: scene.pose,\n\t\t\t\tquick: !!data.quick\n\t\t\t});\n\t\t// the ticket would run out before this round's save: a new one while it plays\n\t\tif (!guest && Date.now() - ticketAt > TICKET_REFRESH_MS) void refreshTicket();\n\t}\n\n\t/** Save & share: the round as it was played goes to the server, which scores it itself. Then the\n\t *  share sheet; the URL becomes the saved duet's (shallow: the engine stays). Saved already: the\n\t *  sheet again. */\n\tasync function onSave() {\n\t\tif (saved) {\n\t\t\tsheet = true;\n\t\t\treturn;\n\t\t}\n\t\tconst e = engine?.end;\n\t\tconst r = round;\n\t\tif (!e || !r || save === 'saving') return;\n\t\tif (r.guest) return signUp(r, e.log);\n\t\tif (!r.ticket) return;\n\t\tsave = 'saving';\n\t\tconst send = (ticket: string) =>\n\t\t\tsaveDuet({ ticket, player: r.snaps.player, partner: r.snaps.partner, log: e.log });\n\t\tlet res = await send(freshTicket ?? r.ticket);\n\t\t// a new round or a new partner since: this answer is for a round that's gone\n\t\tif (engine?.end !== e) return;\n\t\t// the ticket ran out mid-round: a fresh one, and the same round once more\n\t\tif (!res.ok && res.error === 'bad_ticket' && (await refreshTicket()) && freshTicket) {\n\t\t\tif (engine?.end !== e) return;\n\t\t\tres = await send(freshTicket);\n\t\t\tif (engine?.end !== e) return;\n\t\t}\n\t\tif (!res.ok) {\n\t\t\tsaveError = res.message;\n\t\t\tif (res.error !== 'bad_ticket') {\n\t\t\t\tsave = 'error';\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t// the fresh ticket was refused too: this round can't be saved, the next one can (Play again)\n\t\t\tsave = 'expired';\n\t\t\treloadSetup();\n\t\t\treturn;\n\t\t}\n\t\tsaved = res.saved;\n\t\tsave = 'saved';\n\t\tsheet = true;\n\t\tif (mismatched(e, res.saved.result)) trackSculptDuet('mismatch');\n\t\ttrackSculptDuet('save', {\n\t\t\tpartner: r.partner.kind,\n\t\t\tscore: res.saved.result.score,\n\t\t\t...pairProps(r.cast)\n\t\t});\n\t\treplaceState(resolve('/sculpt/duet/[code]', { code: res.saved.code }), {});\n\t}\n\n\t/** A guest's Save it: the sign-up, with the sculpt and the round kept for after it. */\n\tfunction signUp(r: DuetRound, log: DuetEndState['log']) {\n\t\tkeepGuestSculpt(mine(r));\n\t\tkeepGuestRound(back, { penis: r.penis, vulva: { ...r.vulva, play: r.herPlay }, log });\n\t\ttrackSculptDuet('gate', { gate: 'guest_save' });\n\t\topenAuthSheet(page.url.pathname + page.url.search, 'sculpt', {\n\t\t\ttitle: 'Save your round',\n\t\t\tdetail: r.partner.nickname\n\t\t\t\t? `Free account. Your sculpt and this round are saved, and @${r.partner.nickname} gets told.`\n\t\t\t\t: 'Free account. Your sculpt and this round are saved.'\n\t\t});\n\t}\n\n\t/** RAT-685: a round against a built-in is a test of yours; its main button sends your own duet link,\n\t *  in the tap. Only while your sculpt takes duets (the link would open on a closed one). */\n\tconst challengeNick = $derived(\n\t\tround && !round.guest && round.partner.kind !== 'user' && round.youOpen\n\t\t\t? ((page.data.nickname as string | null | undefined) ?? null)\n\t\t\t: null\n\t);\n\tfunction challenge() {\n\t\tif (challengeNick) shareDuetInvite(challengeNick, toast, 'test_duet');\n\t}\n\n\t// ---------- the pad ----------\n\tfunction padDown(e: PointerEvent) {\n\t\tif (screen === 'pre') return; // the click starts (an activation iOS counts)\n\t\te.preventDefault();\n\t\tif (!engine || engine.phase !== 'play') return;\n\t\tengine.tap(e);\n\t\tengine.holdStart(e.pointerId, e);\n\t}\n\tfunction padUp(e: PointerEvent) {\n\t\tengine?.holdEnd(e.pointerId, e);\n\t}\n\t/** mid-round: no double-tap zoom, no scroll (touch-action does most of it; old iOS needs this) */\n\tfunction noTouchDefault(el: HTMLElement) {\n\t\tconst stop = (e: TouchEvent) => {\n\t\t\tif (e.cancelable) e.preventDefault();\n\t\t};\n\t\tel.addEventListener('touchstart', stop, { passive: false });\n\t\treturn () => el.removeEventListener('touchstart', stop);\n\t}\n\n\t// ---------- a desktop: Space taps (or starts); the HUD takes 1-7 ----------\n\tfunction onKey(e: KeyboardEvent) {\n\t\tif (e.key !== ' ' || e.repeat || e.metaKey || e.ctrlKey || e.altKey) return;\n\t\t// Seduce: Space is a word in the chat until the round is on\n\t\tif (!showHud) return;\n\t\t// Space on a focused control presses that control\n\t\tif ((e.target as HTMLElement | null)?.closest('button, a, input, textarea, select')) return;\n\t\tif (screen === 'pre') {\n\t\t\te.preventDefault();\n\t\t\tstart();\n\t\t} else if (engine?.phase === 'play') {\n\t\t\te.preventDefault();\n\t\t\tengine.tap(e);\n\t\t}\n\t}\n\n\t// ---------- the HUD's buttons ----------\n\t/** came here from the editor (its pick, Back to duet): the way back to it is Back, not a new\n\t *  entry. A push would leave editor, duet, editor, ... in the history, and Back (the iOS swipe\n\t *  too) would walk through every round again. */\n\tlet fromEditor: boolean | null = null;\n\tafterNavigate((n) => {\n\t\tfromEditor ??= n.from?.route.id === '/sculpt';\n\t});\n\t/** The editor, with what it should open (handed over when it is Back). A saved round's URL is\n\t *  the replay's (shallow): it goes back to this page's own first, so no entry in the history\n\t *  opens the replay page in place of the round (iPhone: X, then Back, landed on it). Not from the\n\t *  editor (a link, the profile): this entry becomes the editor's, so Back doesn't come here again. */\n\tfunction toEditor(query = '') {\n\t\t// a guest's side goes along, so the editor opens on it\n\t\tif (round?.guest) keepGuestSculpt(mine(round));\n\t\tif (saved) {\n\t\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added\n\t\t\treplaceState(ownUrl(), {});\n\t\t}\n\t\tif (fromEditor) {\n\t\t\tif (query) handOff(query);\n\t\t\thistory.back();\n\t\t\treturn;\n\t\t}\n\t\t// eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added\n\t\tvoid goto(query ? `${resolve('/sculpt')}?${query}` : resolve('/sculpt'), {\n\t\t\treplaceState: true\n\t\t});\n\t}\n\tfunction leave() {\n\t\t// a guest came from somebody's link: back to whose it was\n\t\tconst nick = round?.guest ? round.partner.nickname : null;\n\t\tif (nick && !fromEditor) {\n\t\t\tdropGuestRound();\n\t\t\tvoid goto(resolve('/sculpt/[nickname]', { nickname: nick }), { replaceState: true });\n\t\t\treturn;\n\t\t}\n\t\ttoEditor();\n\t}\n\t/** Change partner: the editor's duet picker (it saves the sculpt first, then comes back here). A\n\t *  guest's: Make it yours, the editor with the way back to this round. */\n\tfunction changePartner() {\n\t\ttoEditor(guest ? `duet=${encodeURIComponent(back)}` : 'duet-pick=1');\n\t}\n\tfunction gear() {\n\t\ttoEditor(`shop=gear&duet=${encodeURIComponent(back)}`);\n\t}\n\tfunction retry() {\n\t\tif (round) void boot(round);\n\t}\n\tfunction sound() {\n\t\tif (engine) engine.setSound(!!engine.hud.muted);\n\t\thudRef?.frame();\n\t}\n</script>\n\n<svelte:window onkeydown={onKey} />\n\n<div class={['duet dp', !showHud && 'talking']} bind:this={root}>\n\t{#if round}\n\t\t<canvas class=\"stage\" bind:this={canvas}></canvas>\n\t\t{#if showHud && (screen === 'pre' || screen === null)}\n\t\t\t<!-- the pad is the stage's touch surface, not a control: Space is its keyboard path (onKey) -->\n\t\t\t<div\n\t\t\t\tclass={['pad', screen === 'pre' && 'full']}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tonpointerdown={padDown}\n\t\t\t\tonpointerup={padUp}\n\t\t\t\tonpointercancel={padUp}\n\t\t\t\tonclick={() => screen === 'pre' && start()}\n\t\t\t\t{@attach screen === null && noTouchDefault}\n\t\t\t></div>\n\t\t{/if}\n\t\t<DuetHud\n\t\t\tbind:this={hudRef}\n\t\t\tuntimed={data.seduce}\n\t\t\t{settling}\n\t\t\t{hud}\n\t\t\twords={hudWords}\n\t\t\t{screen}\n\t\t\t{caption}\n\t\t\tpartner={round.partner.name}\n\t\t\tonmove={(k, e) => engine?.move(k as DuetMove, e)}\n\t\t\tonfinish={(s) => engine?.finishChoice(s as FinishSpot)}\n\t\t\tonview={(v: DuetView | 'auto') => engine?.setView(v)}\n\t\t\tonsound={sound}\n\t\t\tonpause={() => engine?.pause()}\n\t\t\tonresume={() => engine?.resume()}\n\t\t\tonquit={() => engine?.quit()}\n\t\t\tonleave={leave}\n\t\t\tongear={gear}\n\t\t\tonretry={retry}\n\t\t\tonstart={start}\n\t\t\tonshape={() => engine?.relayout()}\n\t\t\tscene={hudScene}\n\t\t\tonscene={openScene}\n\t\t>\n\t\t\t{#if data.seduce}\n\t\t\t\t<!-- Seduce: its own end (SeduceLayer) -->\n\t\t\t{:else if screen === 'over' && view && DuetEndCard}\n\t\t\t\t<DuetEndCard\n\t\t\t\t\t{view}\n\t\t\t\t\tpartner={round.partner.name}\n\t\t\t\t\tposters={round.posters}\n\t\t\t\t\tstate={save}\n\t\t\t\t\terror={saveError}\n\t\t\t\t\t{guest}\n\t\t\t\t\tonchallenge={challengeNick ? challenge : undefined}\n\t\t\t\t\tonagain={start}\n\t\t\t\t\telsewhere={next && sceneLine(next) !== sceneLine(scene) ? sceneLine(next, t) : null}\n\t\t\t\t\telsewhereNew={next && next.place !== scene.place ? 'place' : 'position'}\n\t\t\t\t\tonelsewhere={againElsewhere}\n\t\t\t\t\tonsave={onSave}\n\t\t\t\t\tonchange={changePartner}\n\t\t\t\t\tongear={gear}\n\t\t\t\t\tonleave={leave}\n\t\t\t\t/>\n\t\t\t{:else if screen === 'over' && endFailed}\n\t\t\t\t<!-- the end card's chunk didn't come (twice): still a way on, and a way out -->\n\t\t\t\t<div class=\"ec-miss on-light\" role=\"alert\">\n\t\t\t\t\t<p>Couldn't load.</p>\n\t\t\t\t\t<div class=\"row\">\n\t\t\t\t\t\t<button class=\"b b-lite\" type=\"button\" onclick={leave}>Leave</button>\n\t\t\t\t\t\t<button class=\"b b-ink\" type=\"button\" onclick={() => void loadEnd()}>Try again</button>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</DuetHud>\n\t\t{#if SeduceLayer && round}\n\t\t\t<SeduceLayer\n\t\t\t\tbind:this={seduceRef}\n\t\t\t\tname={round.partner.name}\n\t\t\t\tsignedIn={!round.guest}\n\t\t\t\tcanStart={phase === 'ready' || phase === 'over'}\n\t\t\t\tonsex={seduceSex}\n\t\t\t\tontalk={() => {\n\t\t\t\t\tsexing = false;\n\t\t\t\t}}\n\t\t\t\tonleave={leave}\n\t\t\t\tonsignin={seduceSignIn}\n\t\t\t\tsubscribe={seduceEvents}\n\t\t\t\treadHud={() => engine?.hud ?? null}\n\t\t\t\tonshape={() => engine?.relayout()}\n\t\t\t\tprelude={hasPrelude}\n\t\t\t\tonprelude={(p) => (engine as { setPrelude?: (p: unknown) => void } | null)?.setPrelude?.(p)}\n\t\t\t/>\n\t\t{/if}\n\t\t{#if !data.seduce && (swapHref || actHref) && (screen === 'pre' || screen === 'over')}\n\t\t\t<div class=\"swaps\">\n\t\t\t\t{#if swapHref}\n\t\t\t\t\t<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path + query -->\n\t\t\t\t\t<a class=\"swap\" href={swapHref} data-sveltekit-replacestate data-sveltekit-noscroll\n\t\t\t\t\t\t>{swapLabel}<span class=\"swap-x\">Switch</span></a\n\t\t\t\t\t>\n\t\t\t\t{/if}\n\t\t\t\t{#if actHref}\n\t\t\t\t\t<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path + query -->\n\t\t\t\t\t<a class=\"swap\" href={actHref} data-sveltekit-replacestate data-sveltekit-noscroll\n\t\t\t\t\t\t>{actLabel}<span class=\"swap-x\">Switch</span></a\n\t\t\t\t\t>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t{/if}\n\t\t{#if sheet && saved && DuetShareSheet}\n\t\t\t<DuetShareSheet\n\t\t\t\tkind=\"duet\"\n\t\t\t\tcode={saved.code}\n\t\t\t\torigin={page.url.origin}\n\t\t\t\tpartnerUser={round.partner.kind === 'user' ? round.partner.nickname : null}\n\t\t\t\ttrack={{ ...pairProps(round.cast) }}\n\t\t\t\tonclose={() => (sheet = false)}\n\t\t\t/>\n\t\t{/if}\n\t\t{#if SceneSheet && sceneSheet}\n\t\t\t<SceneSheet\n\t\t\t\t{scene}\n\t\t\t\tmode={sceneSheet}\n\t\t\t\tcast={poseCast}\n\t\t\t\tonpick={pickScene}\n\t\t\t\tonclose={() => (sceneSheet = null)}\n\t\t\t/>\n\t\t{/if}\n\t\t{#if toastText}<div class=\"toast on\" role=\"status\">{toastText}</div>{/if}\n\t\t{#if PerfOverlay}<PerfOverlay read={perfNow} />{/if}\n\t{:else if gate}\n\t\t<div class=\"dg on-light\">\n\t\t\t<p class=\"ec-eb\">Sex</p>\n\t\t\t{#if gate === 'limited'}\n\t\t\t\t<h1>Slow down a little.</h1>\n\t\t\t\t<p>Too many rounds started at once. Wait a few minutes, then try again.</p>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<a class=\"b b-lite\" href={resolve('/sculpt')}>Back</a>\n\t\t\t\t\t<button class=\"b b-pri\" type=\"button\" onclick={() => invalidateAll()}>Try again</button>\n\t\t\t\t</div>\n\t\t\t{:else if gate === 'no_sculpt'}\n\t\t\t\t<h1>Save your sculpt first.</h1>\n\t\t\t\t<p>A round plays your saved sculpt.</p>\n\t\t\t\t<!-- the editor's ?duet= keeps this partner: its Back to duet pill comes back here -->\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path, a query added -->\n\t\t\t\t\t<a class=\"b b-pri\" href=\"{resolve('/sculpt')}?duet={encodeURIComponent(back)}\"\n\t\t\t\t\t\t>Sculpt yours</a\n\t\t\t\t\t>\n\t\t\t\t</div>\n\t\t\t{:else if gate === 'needs_bodies'}\n\t\t\t\t<h1>This pair plays with full bodies.</h1>\n\t\t\t\t<p>Rounds between any two characters are in testing. Pick a partner with the other body.</p>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path + ?duet-pick -->\n\t\t\t\t\t<a class=\"b b-pri\" href=\"{resolve('/sculpt')}?duet-pick=1\">Pick a partner</a>\n\t\t\t\t</div>\n\t\t\t{:else}\n\t\t\t\t<h1>\n\t\t\t\t\t{gate === 'same_body'\n\t\t\t\t\t\t? 'This pair needs one of each.'\n\t\t\t\t\t\t: \"This sculpt isn't open to play.\"}\n\t\t\t\t</h1>\n\t\t\t\t<p>\n\t\t\t\t\t{gate === 'same_body'\n\t\t\t\t\t\t? 'Same-body rounds are coming. Pick a partner with the other body.'\n\t\t\t\t\t\t: 'It may have closed, or it is gone. Pick another partner.'}\n\t\t\t\t</p>\n\t\t\t\t<div class=\"row\">\n\t\t\t\t\t<!-- eslint-disable-next-line svelte/no-navigation-without-resolve -- resolved path + ?duet-pick -->\n\t\t\t\t\t<a class=\"b b-pri\" href=\"{resolve('/sculpt')}?duet-pick=1\">Pick a partner</a>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</div>\n\t{/if}\n</div>\n\n<style>\n\t/* RAT-696: who gives, for a pair that can go either way: a solid chip over the stage, pre-round */\n\t.swaps {\n\t\tposition: fixed;\n\t\tz-index: 60;\n\t\ttop: calc(env(safe-area-inset-top, 0px) + 64px);\n\t\tleft: 50%;\n\t\ttransform: translateX(-50%);\n\t\tdisplay: flex;\n\t\tgap: 8px;\n\t\tmax-width: calc(100vw - 32px);\n\t}\n\t.swap {\n\t\tdisplay: inline-flex;\n\t\twhite-space: nowrap;\n\t\talign-items: center;\n\t\tgap: 10px;\n\t\tpadding: 9px 14px;\n\t\tborder-radius: 999px;\n\t\tbackground: #18161a;\n\t\tcolor: #fff;\n\t\tfont: 600 14px/1.2 inherit;\n\t\ttext-decoration: none;\n\t\tbox-shadow: 0 4px 14px rgb(0 0 0 / 0.28);\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t.swap-x {\n\t\tpadding: 3px 9px;\n\t\tborder-radius: 999px;\n\t\tbackground: #fff;\n\t\tcolor: #18161a;\n\t\tfont-size: 12px;\n\t}\n\t/* RAT-736 Seduce while talking: no round HUD yet (kept mounted: the engine's frame callback) */\n\t.talking :global(.dh) {\n\t\tdisplay: none;\n\t}\n\t/* the game root: the whole viewport, the studio behind the scene (pages mock, round start) */\n\t.duet {\n\t\tposition: fixed;\n\t\tinset: 0;\n\t\tz-index: 50;\n\t\theight: 100dvh;\n\t\toverflow: hidden;\n\t\tbackground: #f4f3f1;\n\t\toverscroll-behavior: none;\n\t\t/* (no touch-action here: it would reach the end card's and the sheet's scroll; the stage and\n\t\t   the pad carry their own) */\n\t\t-webkit-user-select: none;\n\t\tuser-select: none;\n\t\t-webkit-touch-callout: none;\n\t}\n\t.stage {\n\t\tposition: absolute;\n\t\tinset: 0;\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\ttouch-action: none;\n\t}\n\t/* the harness's pad: the bottom of the stage takes the rhythm */\n\t.pad {\n\t\tposition: absolute;\n\t\tleft: 0;\n\t\tright: 0;\n\t\tbottom: 0;\n\t\theight: 38%;\n\t\ttouch-action: none;\n\t\t-webkit-tap-highlight-color: transparent;\n\t}\n\t.pad.full {\n\t\ttop: 0;\n\t\theight: auto;\n\t}\n\t@media (orientation: landscape) and (max-height: 500px) {\n\t\t.pad:not(.full) {\n\t\t\tleft: auto;\n\t\t\ttop: calc(env(safe-area-inset-top, 0px) + 60px);\n\t\t\twidth: calc(env(safe-area-inset-right, 0px) + 336px);\n\t\t\theight: auto;\n\t\t}\n\t}\n\t/* a refused round: the failed stage's card (.dh-err), on its own */\n\t.dg {\n\t\tposition: absolute;\n\t\tleft: calc(env(safe-area-inset-left, 0px) + 20px);\n\t\tright: calc(env(safe-area-inset-right, 0px) + 20px);\n\t\ttop: 50%;\n\t\ttranslate: 0 -50%;\n\t\tmax-width: 360px;\n\t\tmargin: 0 auto;\n\t\tdisplay: flex;\n\t\tflex-direction: column;\n\t\tgap: 8px;\n\t\tpadding: 20px;\n\t\tborder-radius: 20px;\n\t\tbackground: #fff;\n\t\tcolor: var(--ink);\n\t\tbox-shadow: 0 18px 40px rgba(0, 0, 0, 0.18);\n\t\ttouch-action: manipulation;\n\t}\n\t.dg h1 {\n\t\tmargin: 4px 0 0;\n\t\tfont: 700 24px/1.05 var(--f-d);\n\t\tletter-spacing: -0.03em;\n\t}\n\t.dg p:not(.ec-eb) {\n\t\tfont-size: 14.5px;\n\t\tline-height: 1.45;\n\t\tcolor: var(--ink-2);\n\t}\n\t.dg .row {\n\t\tdisplay: flex;\n\t\tgap: 8px;\n\t\tmargin-top: 10px;\n\t}\n\t.dg .row .b {\n\t\tflex: 1;\n\t}\n</style>\n"],"version":3}