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AO,EAAA,IASvFA,EAAE,OAAO,CAAA,aATtBd,EAAM,YAAAe,EAAA,4BAMLQ,EAAA,QAAArB,EAAA,YAAAa,EAAA,wCAVI","names":["featuredTokens","$.state","featureCustom","busy","phase","copied","showBuyTokens","selectTier","tokens","$.set","onCustomInput","value","n","DUEL_FEATURE_CUSTOM_MIN","minutesLabel","m","h","customInvalid","$.derived","$.get","duelUrl","$$props","confirm","res","copyLink","div","$.first_child","fragment","button","div_1","button_1","$.sibling","$.child","div_2","div_3","root_1","h3","p","a","text_2","$.reset","button_2","t","$$args","div_4","root_2","h3_1","p_1","button_3","text_6","button_4","$.delegated","div_5","fragment_1","h3_2","p_2","button_5","text_10","div_6","span","div_7","DUEL_FEATURE_TIERS","tier","$$anchor","button_6","root_4","span_1","TokenCoin","span_2","$.set_class","$.set_text","text_12","$.append","div_8","span_3","input","$.remove_input_defaults","p_3","root_5","p_4","root_6","$.template_effect","$0","text_15","$$render","consequent_2","consequent_3","button_7","node_3","node_4","text_16","text_18","consequent_4","consequent_5","alternate","$.set_attribute","$.set_value","$4","e","consequent","consequent_1","alternate_1","BuyTokensModal","consequent_6","$1"],"sources":["../../../../../../src/lib/components/duel/DuelFeatureNudge.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport TokenCoin from '$lib/components/TokenCoin.svelte';\n\timport BuyTokensModal from '$lib/components/BuyTokensModal.svelte';\n\timport {\n\t\tDUEL_FEATURE_TIERS,\n\t\tDUEL_FEATURE_CUSTOM_MIN\n\t} from '$lib/duel-feature';\n\n\tinterface Props {\n\t\t/** the duel code parsed out of the pasted chat link. */\n\t\tcode: string;\n\t\tonclose: () => void;\n\t}\n\tlet { code, onclose }: Props = $props();\n\n\t// Mounted only while open (parent gates with {#if}), so a fresh instance per\n\t// nudge — no reset effect needed, state starts clean every time.\n\tlet featuredTokens = $state(0);\n\tlet featureCustom = $state('');\n\tlet busy = $state(false);\n\t// idle | success | not_owner | error\n\tlet phase = $state<'idle' | 'success' | 'not_owner' | 'error'>('idle');\n\tlet copied = $state(false);\n\t// insufficient tokens → pop the buy-tokens modal over the nudge.\n\tlet showBuyTokens = $state(false);\n\n\tfunction selectTier(tokens: number) {\n\t\tfeatureCustom = '';\n\t\tfeaturedTokens = featuredTokens === tokens ? 0 : tokens;\n\t}\n\tfunction onCustomInput(value: string) {\n\t\tfeatureCustom = value;\n\t\tconst n = parseInt(value);\n\t\tfeaturedTokens = Number.isInteger(n) && n >= DUEL_FEATURE_CUSTOM_MIN ? n : 0;\n\t}\n\tfunction minutesLabel(m: number): string {\n\t\tif (m < 60) return `${m} min`;\n\t\tconst h = m / 60;\n\t\treturn Number.isInteger(h) ? `${h}h` : `${(m / 60).toFixed(1)}h`;\n\t}\n\n\tconst customInvalid = $derived(featureCustom.trim() !== '' && featuredTokens === 0);\n\tconst duelUrl = $derived(\n\t\ttypeof window !== 'undefined' ? `${window.location.origin}/d/${code}` : `/d/${code}`\n\t);\n\n\tasync function confirm() {\n\t\tif (busy || featuredTokens <= 0) return;\n\t\tbusy = true;\n\t\ttry {\n\t\t\tconst res = await fetch(`/api/duel/${code}/feature`, {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({ tokens: featuredTokens })\n\t\t\t});\n\t\t\tif (res.ok) {\n\t\t\t\tphase = 'success';\n\t\t\t} else if (res.status === 402) {\n\t\t\t\t// not enough tokens → pop the buy-tokens modal over the nudge.\n\t\t\t\tshowBuyTokens = true;\n\t\t\t} else if (res.status === 403) {\n\t\t\t\tphase = 'not_owner';\n\t\t\t} else {\n\t\t\t\tphase = 'error';\n\t\t\t}\n\t\t} catch {\n\t\t\tphase = 'error';\n\t\t} finally {\n\t\t\tbusy = false;\n\t\t}\n\t}\n\n\tasync function copyLink() {\n\t\ttry {\n\t\t\tawait navigator.clipboard.writeText(duelUrl);\n\t\t\tcopied = true;\n\t\t\tsetTimeout(() => (copied = false), 1600);\n\t\t} catch {\n\t\t\t/* clipboard blocked — no-op */\n\t\t}\n\t}\n</script>\n\n<!-- svelte-ignore a11y_no_static_element_interactions -->\n<div class=\"fixed inset-0 z-[100] flex items-end justify-center sm:items-center\" role=\"dialog\" aria-modal=\"true\">\n\t\t<button class=\"absolute inset-0 bg-black/70 backdrop-blur-sm\" onclick={onclose} aria-label={t('Close')}></button>\n\n\t\t<div class=\"relative flex max-h-[92dvh] w-full max-w-[440px] flex-col rounded-t-3xl border border-border bg-bg sm:mx-4 sm:rounded-3xl\">\n\t\t\t<div class=\"flex justify-center pt-3 sm:hidden\">\n\t\t\t\t<div class=\"h-1 w-10 rounded-full bg-muted/20\"></div>\n\t\t\t</div>\n\t\t\t<button\n\t\t\t\tclass=\"absolute top-4 right-4 z-10 flex h-8 w-8 items-center justify-center rounded-full bg-surface text-muted/40 transition-colors hover:text-muted\"\n\t\t\t\tonclick={onclose}\n\t\t\t\taria-label={t('Close')}\n\t\t\t>\n\t\t\t\t<svg class=\"h-4 w-4\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><line x1=\"18\" y1=\"6\" x2=\"6\" y2=\"18\" /><line x1=\"6\" y1=\"6\" x2=\"18\" y2=\"18\" /></svg>\n\t\t\t</button>\n\n\t\t\t<div class=\"px-5 pt-7 pb-7 sm:px-7 sm:pt-8\">\n\t\t\t\t{#if phase === 'success'}\n\t\t\t\t\t<!-- featured! -->\n\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t<div class=\"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-blue/[.14]\">\n\t\t\t\t\t\t\t<svg class=\"h-6 w-6 text-blue\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.4\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"M5 13l4 4L19 7\" /></svg>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h3 class=\"mt-4 font-display text-2xl font-bold tracking-tight\">{t(\"you're on the board.\")}</h3>\n\t\t\t\t\t\t<p class=\"mt-2 text-sm text-muted\">{t('strangers can find your duel on /d now — no more begging the chat.')}</p>\n\t\t\t\t\t\t<a\n\t\t\t\t\t\t\thref=\"/d\"\n\t\t\t\t\t\t\tclass=\"mt-6 inline-flex w-full items-center justify-center rounded-xl bg-blue py-3 font-display text-sm font-semibold text-white no-underline transition-opacity hover:opacity-90\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{t('see the board')}\n\t\t\t\t\t\t</a>\n\t\t\t\t\t\t<button class=\"mt-3 block w-full text-center text-xs font-medium text-muted/40 transition-colors hover:text-muted\" onclick={onclose}>{t('done')}</button>\n\t\t\t\t\t</div>\n\t\t\t\t{:else if phase === 'not_owner'}\n\t\t\t\t\t<!-- not their duel — just nudge them to share it where people are -->\n\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t<h3 class=\"mt-2 font-display text-2xl font-bold tracking-tight\">{t('not your duel to feature.')}</h3>\n\t\t\t\t\t\t<p class=\"mt-2 text-sm leading-relaxed text-muted\">{t('only the person who made it can put it on the board. but you can still send it somewhere with actual people in it.')}</p>\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\tonclick={copyLink}\n\t\t\t\t\t\t\tclass=\"mt-6 inline-flex w-full items-center justify-center gap-2 rounded-xl border border-border bg-surface py-3 font-display text-sm font-semibold text-text transition-colors hover:border-muted\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{copied ? t('copied ✓') : t('copy the link')}\n\t\t\t\t\t\t</button>\n\t\t\t\t\t\t<button class=\"mt-3 block w-full text-center text-xs font-medium text-muted/40 transition-colors hover:text-muted\" onclick={onclose}>{t('close')}</button>\n\t\t\t\t\t</div>\n\t\t\t\t{:else}\n\t\t\t\t\t<!-- the pitch -->\n\t\t\t\t\t<div class=\"text-center\">\n\t\t\t\t\t\t<div class=\"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl bg-blue/[.14]\">\n\t\t\t\t\t\t\t<svg class=\"h-6 w-6 text-blue\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"11\" cy=\"11\" r=\"7\" /><path d=\"m21 21-4.3-4.3\" /></svg>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<h3 class=\"mt-4 font-display text-2xl font-bold tracking-tight\">{t('looking for a fight?')}</h3>\n\t\t\t\t\t\t<p class=\"mt-2 text-sm leading-relaxed text-muted\">\n\t\t\t\t\t\t\t{t('dropping your link in chat barely works. post it where people actually are — reddit, discord, wherever you lurk — or buy a slot on the board so a stranger finds it. the board costs tokens because this place runs on you sharing.')}\n\t\t\t\t\t\t</p>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<!-- share-elsewhere -->\n\t\t\t\t\t<button\n\t\t\t\t\t\tonclick={copyLink}\n\t\t\t\t\t\tclass=\"mt-5 inline-flex w-full items-center justify-center gap-2 rounded-xl border border-border bg-surface py-3 font-display text-sm font-semibold text-text transition-colors hover:border-muted\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{copied ? t('copied ✓ — now go post it') : t('copy link to share elsewhere')}\n\t\t\t\t\t</button>\n\n\t\t\t\t\t<div class=\"my-5 flex items-center gap-3\">\n\t\t\t\t\t\t<span class=\"h-px flex-1 bg-border\"></span>\n\t\t\t\t\t\t<span class=\"font-display text-[10px] font-bold tracking-[0.2em] text-muted/40 uppercase\">{t('or feature it')}</span>\n\t\t\t\t\t\t<span class=\"h-px flex-1 bg-border\"></span>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"grid grid-cols-3 gap-2.5\">\n\t\t\t\t\t\t{#each DUEL_FEATURE_TIERS as tier (tier.tokens)}\n\t\t\t\t\t\t\t<button\n\t\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\t\tclass=\"flex cursor-pointer flex-col items-center gap-1 rounded-xl border px-3 py-3.5 transition-all\n\t\t\t\t\t\t\t\t\t{featuredTokens === tier.tokens && featureCustom === ''\n\t\t\t\t\t\t\t\t\t\t? 'border-blue bg-blue text-white shadow-[0_6px_18px_-8px_rgba(59,130,246,0.6)]'\n\t\t\t\t\t\t\t\t\t\t: 'border-border bg-surface text-muted hover:border-muted hover:text-text'}\"\n\t\t\t\t\t\t\t\tonclick={() => selectTier(tier.tokens)}\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class=\"flex items-center gap-1.5 font-display text-base font-bold\">\n\t\t\t\t\t\t\t\t\t<TokenCoin size={17} />\n\t\t\t\t\t\t\t\t\t{tier.tokens}\n\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t<span class=\"text-[10px] tracking-wide uppercase {featuredTokens === tier.tokens && featureCustom === '' ? 'text-white/70' : 'text-muted/60'}\">{t('{time} up top', { time: minutesLabel(tier.minutes) })}</span>\n\t\t\t\t\t\t\t</button>\n\t\t\t\t\t\t{/each}\n\t\t\t\t\t</div>\n\n\t\t\t\t\t<div class=\"relative mt-2.5\">\n\t\t\t\t\t\t<span class=\"pointer-events-none absolute top-1/2 left-3.5 -translate-y-1/2\"><TokenCoin size={16} /></span>\n\t\t\t\t\t\t<input\n\t\t\t\t\t\t\ttype=\"number\"\n\t\t\t\t\t\t\tinputmode=\"numeric\"\n\t\t\t\t\t\t\tmin={DUEL_FEATURE_CUSTOM_MIN}\n\t\t\t\t\t\t\tvalue={featureCustom}\n\t\t\t\t\t\t\toninput={(e) => onCustomInput((e.target as HTMLInputElement).value)}\n\t\t\t\t\t\t\tplaceholder={t('go higher — {n}+ to outrank everyone', { n: DUEL_FEATURE_CUSTOM_MIN })}\n\t\t\t\t\t\t\tclass=\"w-full rounded-xl border bg-surface py-3 pr-4 pl-10 text-sm text-text placeholder:text-muted/30 focus:outline-none\n\t\t\t\t\t\t\t\t{customInvalid ? 'border-coral focus:border-coral' : 'border-border focus:border-blue'}\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\n\t\t\t\t\t{#if customInvalid}\n\t\t\t\t\t\t<p class=\"mt-2 text-[11px] text-coral\">{t('minimum {n} tokens for a custom bid.', { n: DUEL_FEATURE_CUSTOM_MIN })}</p>\n\t\t\t\t\t{:else if phase === 'error'}\n\t\t\t\t\t\t<p class=\"mt-2 text-[11px] text-coral\">{t('something went wrong. try again.')}</p>\n\t\t\t\t\t{/if}\n\n\t\t\t\t\t<button\n\t\t\t\t\t\tonclick={confirm}\n\t\t\t\t\t\tdisabled={busy || featuredTokens <= 0}\n\t\t\t\t\t\tclass=\"mt-4 inline-flex w-full cursor-pointer items-center justify-center rounded-xl bg-blue py-3.5 font-display text-sm font-semibold text-white transition-opacity hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-40\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{#if busy}\n\t\t\t\t\t\t\t{t('featuring…')}\n\t\t\t\t\t\t{:else if featuredTokens > 0}\n\t\t\t\t\t\t\t{t('feature for {n} tokens', { n: featuredTokens })}\n\t\t\t\t\t\t{:else}\n\t\t\t\t\t\t\t{t('pick a slot')}\n\t\t\t\t\t\t{/if}\n\t\t\t\t\t</button>\n\t\t\t\t{/if}\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n{#if showBuyTokens}\n\t<BuyTokensModal\n\t\tonclose={() => (showBuyTokens = false)}\n\t\treason={t(\"featuring costs {n} tokens — you're short. even Pro pays for the board.\", { n: featuredTokens })}\n\t\tsuccessPath={`/d/${code}`}\n\t\tsource=\"duel_link_nudge\"\n\t\topen\n\t/>\n{/if}\n"],"version":3}