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MASDI,EAAC,EAAA,IAADA,CAAC,EACD,IAAAC,EAAAlH,EADAiH,EAAC,CAAA,EACDhE,EAAAhD,EAAAiH,EAAA,EAAA,EAAAlD,EAAAkD,CAAA,IAXDlG,CAAG,4BAUqC,IAAA1B,EAAE,mCAAmC,EAK3E,IAAAA,EAAE,mBAAmB,QAfvB0B,CAAG,cAmBHmG,EAACnF,GAAA,MAADmF,CAAC,wBAEC3G,EAAAL,GAAA0B,EAAAwB,EAAAlD,CAAA,EAAA,CAAA,IAAAb,EAAE,iCAAiC,CAAA,CAAA,2BAEnCkB,EAAAL,GAAA0B,EAAA4B,EAAAtD,CAAA,EAAA,CAAA,IAAAb,EAAE,mCAAmC,CAAA,CAAA,kBAHlCG,EAAA4F,CAAS,IAAK,cAAaxE,EAAAuG,CAAA,EAAAvG,EAAAM,EAAA,EAAA,MADhCgG,CAAC,MAADA,CAAC,mBA/BO,QAAOtG,EAAAC,EAAA,EAAArB,EAWPyF,CAAQ,EAAArE,EAAAY,GAAA,CAAA,EAAAhC,EAmBR4F,CAAS,GAAAxE,EAAAsB,GAAA,CAAA,MAvDnBvC,CAAG,IALJiG,CAAO,EAaJrF,EAAAL,GAAA0B,EAAAsE,EAAA,IAAAhG,GAAA,EAAA,EAAA,EAAA,CAAA,IAAAb,EAAE,OAAO,CAAA,CAAA,OAbZuG,CAAO,MAPA","names":["animating","direction","showActions","gateSize","displayName","$.derived","$$props","t","totalVotes","approvalPct","$.get","reportOpen","$.state","div","$.first_child","fragment","div_1","$.sibling","$.child","div_2","$0","GatedMedia","$$anchor","video","root_3","$.template_effect","$.set_attribute","$.append","img","root_4","$$render","consequent_1","alternate","div_3","root_5","consequent_2","alternate_1","div_4","root_6","consequent_3","div_5","root_7","consequent_4","div_6","root_8","span","$.set_text","text_2","div_7","root_9","span_1","text_3","consequent_6","div_8","div_9","span_2","fragment_3","consequent_7","span_3","fragment_4","span_4","consequent_8","div_10","root_12","span_5","root_13","text_8","consequent_9","span_6","root_14","text_9","consequent_10","span_7","root_15","text_10","consequent_11","span_8","root_16","text_11","consequent_12","consequent_13","$.reset","div_11","root_17","button","button_1","$1","$.delegated","consequent_14","div_12","node_12","button_2","text_12","ReportContentModal","node_13","$.set","$$value","$.set_class","item","hasVoted","$.proxy","votedDirection","voteError","submitting","$.user_effect","handleVote","vote","goto","openAgeGate","r","section","root","$.head","meta","root_1","a","text","ArenaCard","node","$.key","node_2","ArenaModIdentity","consequent","p","p_1","a_1","p_2","text_4","text_5","text_6","p_3","a_2","p_4","consequent_5"],"sources":["../../../../../../src/lib/components/arena/ArenaCard.svelte","../../../../../../src/routes/a/s/[id]/+page.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport type { ArenaFeedItem } from '$lib/types/arena';\n\timport ReportContentModal from '$lib/components/ReportContentModal.svelte';\n\timport GatedMedia from '$lib/components/GatedMedia.svelte';\n\n\tinterface Props {\n\t\titem: ArenaFeedItem;\n\t\tonvote: (vote: 'up' | 'down') => void;\n\t\tanimating?: boolean;\n\t\tdirection?: 'left' | 'right' | null;\n\t\t/** Hide the up/down vote buttons for read-only states (owner / already voted). */\n\t\tshowActions?: boolean;\n\t\t/** RAT-641: 'hero' where this card is the page's one large view. */\n\t\tgateSize?: 'tile' | 'hero';\n\t}\n\n\tlet {\n\t\titem,\n\t\tonvote,\n\t\tanimating = false,\n\t\tdirection = null,\n\t\tshowActions = true,\n\t\tgateSize = 'tile'\n\t}: Props = $props();\n\n\tconst displayName = $derived(item.isAnonymous || !item.nickname ? t('anonymous') : item.nickname);\n\tconst totalVotes = $derived(item.totalUpvotes + item.totalDownvotes);\n\tconst approvalPct = $derived(totalVotes > 0 ? Math.round((item.totalUpvotes / totalVotes) * 100) : 0);\n\n\t// RAT-236: report trigger.\n\tlet reportOpen = $state(false);\n</script>\n\n<div class=\"relative\">\n\t<!-- Depth stack cards -->\n\t<div class=\"absolute top-2 right-[-6px] bottom-[-6px] left-2 rounded-2xl border border-border bg-surface opacity-40\"></div>\n\t<div class=\"absolute top-1 right-[-3px] bottom-[-3px] left-1 rounded-2xl border border-border bg-surface-2 opacity-60\"></div>\n\n\t<!-- Main card -->\n\t<div\n\t\tclass=\"relative z-[2] overflow-hidden rounded-2xl border border-border bg-surface transition-all duration-500 ease-out\n\t\t\t{animating && direction === 'left' ? '-translate-x-[120%] rotate-[-12deg] opacity-0' : ''}\n\t\t\t{animating && direction === 'right' ? 'translate-x-[120%] rotate-[12deg] opacity-0' : ''}\n\t\t\t{!animating ? 'translate-x-0 rotate-0 opacity-100' : ''}\"\n\t>\n\t\t<!-- Photo / video -->\n\t\t<div class=\"relative aspect-[3/4] w-full overflow-hidden bg-bg\">\n\t\t\t{#if item.gate}\n\t\t\t\t<!-- RAT-641: the viewer hasn't passed the age check — the stand-in, and a\n\t\t\t\t     tap opens the check -->\n\t\t\t\t<GatedMedia src={item.imageUrl || null} gate={item.gate} surface=\"arena\" size={gateSize} />\n\t\t\t{:else if item.imageUrl}\n\t\t\t\t{#if item.mediaType === 'video'}\n\t\t\t\t\t<video\n\t\t\t\t\t\tsrc={item.imageUrl}\n\t\t\t\t\t\tautoplay\n\t\t\t\t\t\tmuted\n\t\t\t\t\t\tloop\n\t\t\t\t\t\tplaysinline\n\t\t\t\t\t\tpreload=\"metadata\"\n\t\t\t\t\t\tclass=\"h-full w-full object-cover\"\n\t\t\t\t\t></video>\n\t\t\t\t{:else}\n\t\t\t\t\t<img src={item.imageUrl} alt={t('Arena submission')} class=\"h-full w-full object-cover\" loading=\"lazy\" />\n\t\t\t\t{/if}\n\t\t\t{:else}\n\t\t\t\t<div class=\"flex h-full w-full items-center justify-center\">\n\t\t\t\t\t<svg class=\"h-16 w-16 text-white/[.04]\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1\">\n\t\t\t\t\t\t<rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" />\n\t\t\t\t\t\t<circle cx=\"9\" cy=\"9\" r=\"2\" />\n\t\t\t\t\t\t<path d=\"m21 15-3.086-3.086a2 2 0 00-2.828 0L6 21\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t\t<div class=\"pointer-events-none absolute inset-0 bg-gradient-to-t from-black/70 via-transparent to-transparent\"></div>\n\n\t\t\t<!-- Badges on photo -->\n\t\t\t{#if item.aiScore}\n\t\t\t\t<div class=\"absolute top-3 left-3 rounded border border-orange/20 bg-bg/80 px-2.5 py-1 text-[11px] font-medium text-orange backdrop-blur-sm\">\n\t\t\t\t\t{item.aiScore} / 10\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t\t{#if totalVotes > 0}\n\t\t\t\t<div class=\"absolute top-3 right-3 rounded border border-green/20 bg-bg/80 px-2.5 py-1 text-[11px] font-medium text-green backdrop-blur-sm\">\n\t\t\t\t\t{approvalPct}%\n\t\t\t\t</div>\n\t\t\t{/if}\n\n\t\t\t{#if item.contestEntryId}\n\t\t\t\t<!-- cross-posted contest entry: upvoting here also votes in the weekly\n\t\t\t\t     contest (deduped). Contest entries are always boosted, so this\n\t\t\t\t     badge stands in for the plain \"boosted\" one. -->\n\t\t\t\t<div class=\"absolute bottom-14 left-3 flex items-center gap-1 rounded border border-yellow/30 bg-bg/85 px-2 py-0.5 backdrop-blur-sm\">\n\t\t\t\t\t<span class=\"text-[10px] leading-none\">🏆</span>\n\t\t\t\t\t<span class=\"text-[9px] font-bold uppercase tracking-wider text-yellow\">{t('contest entry')}</span>\n\t\t\t\t</div>\n\t\t\t{:else if item.isBoosted}\n\t\t\t\t<div class=\"absolute bottom-14 left-3 flex items-center gap-1 rounded border border-orange/20 bg-bg/80 px-2 py-0.5 backdrop-blur-sm\">\n\t\t\t\t\t<svg class=\"h-3 w-3 text-orange\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path d=\"M13 10V3L4 14h7v7l9-11h-7z\"/></svg>\n\t\t\t\t\t<span class=\"text-[9px] font-bold uppercase tracking-wider text-orange\">{t('boosted')}</span>\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</div>\n\n\t\t<!-- Card info -->\n\t\t<div class=\"p-4\">\n\t\t\t<p class=\"font-display text-lg font-bold tracking-tight\">{displayName}</p>\n\t\t\t<div class=\"mt-1 flex items-center gap-2 text-[11px]\">\n\t\t\t\t{#if item.aiScore}\n\t\t\t\t\t<span class=\"text-orange\">{item.aiScore} / 10</span>\n\t\t\t\t\t<span class=\"h-0.5 w-0.5 rounded-full bg-muted/20\"></span>\n\t\t\t\t{/if}\n\t\t\t\t{#if totalVotes > 0}\n\t\t\t\t\t<span class=\"text-green\">{t('{pct}% approval', { pct: approvalPct })}</span>\n\t\t\t\t\t<span class=\"h-0.5 w-0.5 rounded-full bg-muted/20\"></span>\n\t\t\t\t\t<span class=\"text-muted/40\">{t('{n} votes', { n: totalVotes })}</span>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t\t{#if item.emotes.fire + item.emotes.water + item.emotes.crown + item.emotes.skull > 0}\n\t\t\t\t<div class=\"mt-2 flex gap-2 text-[11px] text-muted/40\">\n\t\t\t\t\t{#if item.emotes.fire > 0}\n\t\t\t\t\t\t<span class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<svg class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1.5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15.362 5.214A8.252 8.252 0 0112 21 8.25 8.25 0 016.038 7.047 8.287 8.287 0 009 9.601a8.983 8.983 0 013.361-6.867 8.21 8.21 0 003 2.48z\" /></svg>\n\t\t\t\t\t\t\t{item.emotes.fire}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t{/if}\n\t\t\t\t\t{#if item.emotes.water > 0}\n\t\t\t\t\t\t<span class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<svg class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1.5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 21a8.25 8.25 0 006.222-13.618A8.303 8.303 0 0012 3.25a8.303 8.303 0 00-6.222 4.132A8.25 8.25 0 0012 21z\" /></svg>\n\t\t\t\t\t\t\t{item.emotes.water}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t{/if}\n\t\t\t\t\t{#if item.emotes.crown > 0}\n\t\t\t\t\t\t<span class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<svg class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1.5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M2.25 18.75a60.07 60.07 0 0115.797 2.101c.727.198 1.453-.342 1.453-1.096V18.75M3.75 4.5v.75A.75.75 0 013 6h-.75m0 0v-.375c0-.621.504-1.125 1.125-1.125H20.25M2.25 6v9m18-10.5v.75c0 .414.336.75.75.75h.75m-1.5-1.5h.375c.621 0 1.125.504 1.125 1.125v9.75c0 .621-.504 1.125-1.125 1.125h-.375m1.5-1.5H21a.75.75 0 00-.75.75v.75m0 0H3.75m0 0h-.375a1.125 1.125 0 01-1.125-1.125V15m1.5 1.5v-.75A.75.75 0 003 15h-.75M15 10.5a3 3 0 11-6 0 3 3 0 016 0zm3 0h.008v.008H18V10.5zm-12 0h.008v.008H6V10.5z\" /></svg>\n\t\t\t\t\t\t\t{item.emotes.crown}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t{/if}\n\t\t\t\t\t{#if item.emotes.skull > 0}\n\t\t\t\t\t\t<span class=\"flex items-center gap-1\">\n\t\t\t\t\t\t\t<svg class=\"h-3 w-3\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"1.5\"><path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M12 6v6h4.5m4.5 0a9 9 0 11-18 0 9 9 0 0118 0z\" /></svg>\n\t\t\t\t\t\t\t{item.emotes.skull}\n\t\t\t\t\t\t</span>\n\t\t\t\t\t{/if}\n\t\t\t\t</div>\n\t\t\t{/if}\n\t\t</div>\n\t</div>\n</div>\n\n<!-- Swipe buttons -->\n{#if showActions}\n\t<div class=\"mt-5 flex items-center justify-center gap-4\">\n\t\t<button\n\t\t\tclass=\"flex h-14 w-14 cursor-pointer items-center justify-center rounded-full border border-coral/20 bg-coral/[.08] text-coral transition-all hover:scale-105 hover:bg-coral/15 active:scale-95\"\n\t\t\tonclick={() => onvote('down')}\n\t\t\taria-label={t('Nope')}\n\t\t>\n\t\t\t<svg class=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2.5\">\n\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M6 18L18 6M6 6l12 12\" />\n\t\t\t</svg>\n\t\t</button>\n\n\t\t<button\n\t\t\tclass=\"flex h-[72px] w-[72px] cursor-pointer items-center justify-center rounded-full border border-green/20 bg-green/[.08] text-green transition-all hover:scale-105 hover:bg-green/15 active:scale-95\"\n\t\t\tonclick={() => onvote('up')}\n\t\t\taria-label={t('Approve')}\n\t\t>\n\t\t\t<svg class=\"h-7 w-7\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2.5\">\n\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M4.5 12.75l6 6 9-13.5\" />\n\t\t\t</svg>\n\t\t</button>\n\t</div>\n{/if}\n\n<!-- RAT-236: faint report link under the swipe buttons -->\n<div class=\"mt-4 text-center\">\n\t<button\n\t\ttype=\"button\"\n\t\tonclick={() => (reportOpen = true)}\n\t\tclass=\"text-[11px] text-muted/40 underline-offset-2 transition-colors hover:text-muted hover:underline\"\n\t>\n\t\t{t('report this submission')}\n\t</button>\n</div>\n\n<ReportContentModal\n\tbind:open={reportOpen}\n\tentityType=\"arena_submission\"\n\tentityId={item.id}\n\tonclose={() => (reportOpen = false)}\n/>\n","<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport { goto } from '$app/navigation';\n\timport ArenaCard from '$lib/components/arena/ArenaCard.svelte';\n\timport ArenaModIdentity from '$lib/components/arena/ArenaModIdentity.svelte';\n\timport { openAgeGate } from '$lib/stores/ageGate';\n\timport type { ArenaFeedItem } from '$lib/types/arena';\n\n\tlet { data } = $props();\n\n\tconst item = $derived(data.item as ArenaFeedItem);\n\n\tlet hasVoted = $state(data.alreadyVoted);\n\tlet votedDirection = $state<'up' | 'down' | null>(null);\n\tlet voteError = $state<'daily_limit' | 'generic' | null>(null);\n\tlet submitting = $state(false);\n\n\t// RAT-117 pattern: re-seed local state when `data` reloads (e.g. navigating\n\t// from one submission deeplink straight to another reuses this component).\n\t$effect(() => {\n\t\thasVoted = data.alreadyVoted;\n\t\tvotedDirection = null;\n\t\tvoteError = null;\n\t});\n\n\tasync function handleVote(vote: 'up' | 'down') {\n\t\t// Logged-out: the card is public but voting isn't — send them to\n\t\t// register, returning here afterwards so they can swipe. Must run\n\t\t// synchronously (no await before goto) to keep the click activation.\n\t\tif (!data.isLoggedIn) {\n\t\t\tgoto(`/auth/sign-in?next=${encodeURIComponent(`/a/s/${item.id}`)}`);\n\t\t\treturn;\n\t\t}\n\t\tif (submitting || hasVoted || data.isOwner) return;\n\t\t// RAT-641: not a blind vote on a shot they can't see yet.\n\t\tif (item.gate) {\n\t\t\topenAgeGate({ surface: 'arena' });\n\t\t\treturn;\n\t\t}\n\t\tsubmitting = true;\n\t\tvoteError = null;\n\t\ttry {\n\t\t\tconst res = await fetch('/api/arena/vote', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'Content-Type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({ submissionId: item.id, vote })\n\t\t\t});\n\t\t\tconst r = await res.json();\n\t\t\tif (r.ok) {\n\t\t\t\tvotedDirection = vote;\n\t\t\t\thasVoted = true;\n\t\t\t} else if (r.error === 'already_voted' || r.error === 'own_submission') {\n\t\t\t\thasVoted = true;\n\t\t\t} else if (r.error === 'daily_limit') {\n\t\t\t\tvoteError = 'daily_limit';\n\t\t\t} else {\n\t\t\t\tvoteError = 'generic';\n\t\t\t}\n\t\t} catch {\n\t\t\tvoteError = 'generic';\n\t\t} finally {\n\t\t\tsubmitting = false;\n\t\t}\n\t}\n</script>\n\n<svelte:head>\n\t<title>{t('arena submission — ratemyd.')}</title>\n\t<meta name=\"robots\" content=\"noindex\" />\n</svelte:head>\n\n<section class=\"relative min-h-[calc(100dvh-64px)] px-4 pt-20 pb-16 md:pt-24\">\n\t<div\n\t\tclass=\"pointer-events-none absolute inset-0 bg-[linear-gradient(rgba(255,255,255,.006)_1px,transparent_1px),linear-gradient(90deg,rgba(255,255,255,.006)_1px,transparent_1px)] bg-[size:60px_60px]\"\n\t></div>\n\n\t<div class=\"relative z-10 mx-auto w-full max-w-[360px]\">\n\t\t<a\n\t\t\thref=\"/a\"\n\t\t\tclass=\"inline-flex items-center gap-1 text-sm text-muted no-underline transition-colors hover:text-accent\"\n\t\t>\n\t\t\t<svg class=\"h-4 w-4\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\">\n\t\t\t\t<path stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M15 19l-7-7 7-7\" />\n\t\t\t</svg>\n\t\t\t{t('arena')}\n\t\t</a>\n\n\t\t<div class=\"mt-6\">\n\t\t\t<ArenaCard\n\t\t\t\t{item}\n\t\t\t\tonvote={handleVote}\n\t\t\t\tshowActions={!hasVoted && !data.isOwner}\n\t\t\t\tgateSize=\"hero\"\n\t\t\t/>\n\t\t</div>\n\n\t\t<!-- Staff only: staffRole is null for everyone who isn't a mod/admin. -->\n\t\t{#if data.staffRole && item.isAnonymous}\n\t\t\t{#key item.id}<ArenaModIdentity submissionId={item.id} role={data.staffRole} />{/key}\n\t\t{/if}\n\n\t\t{#if data.isOwner}\n\t\t\t<div class=\"mt-6 rounded-2xl border border-border bg-surface p-5 text-center\">\n\t\t\t\t<p class=\"font-display text-sm font-bold text-text\">{t('this is your submission')}</p>\n\t\t\t\t<p class=\"mt-1 text-[13px] text-muted\">{t(\"you can't vote on your own shot.\")}</p>\n\t\t\t\t<a\n\t\t\t\t\thref=\"/a/dashboard/{item.id}\"\n\t\t\t\t\tclass=\"mt-4 inline-flex items-center justify-center rounded-lg bg-accent px-5 py-3 font-display text-sm font-bold text-white no-underline transition-colors hover:bg-accent-dark\"\n\t\t\t\t>\n\t\t\t\t\t{t('view your stats →')}\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t{:else if hasVoted}\n\t\t\t<div class=\"mt-6 rounded-2xl border border-border bg-surface p-5 text-center\">\n\t\t\t\t<p class=\"font-display text-sm font-bold text-text\">\n\t\t\t\t\t{#if votedDirection === 'up'}\n\t\t\t\t\t\t{t('approved')} <span class=\"text-green\">✓</span>\n\t\t\t\t\t{:else if votedDirection === 'down'}\n\t\t\t\t\t\t{t('noped')}\n\t\t\t\t\t{:else}\n\t\t\t\t\t\t{t('you already voted on this')}\n\t\t\t\t\t{/if}\n\t\t\t\t</p>\n\t\t\t\t<p class=\"mt-1 text-[13px] text-muted\">{t(\"keep going — the crowd's waiting.\")}</p>\n\t\t\t\t<a\n\t\t\t\t\thref=\"/a\"\n\t\t\t\t\tclass=\"mt-4 inline-flex items-center justify-center rounded-lg bg-accent px-5 py-3 font-display text-sm font-bold text-white no-underline transition-colors hover:bg-accent-dark\"\n\t\t\t\t>\n\t\t\t\t\t{t('enter the arena →')}\n\t\t\t\t</a>\n\t\t\t</div>\n\t\t{:else if voteError}\n\t\t\t<p class=\"mt-5 text-center text-[13px] text-coral\">\n\t\t\t\t{#if voteError === 'daily_limit'}\n\t\t\t\t\t{t(\"you're out of swipes for today.\")}\n\t\t\t\t{:else}\n\t\t\t\t\t{t('something went wrong — try again.')}\n\t\t\t\t{/if}\n\t\t\t</p>\n\t\t{/if}\n\t</div>\n</section>\n"],"version":3}