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OuE,KAAUvE,CAAQ,CAAA,CAAA,CAAA,cARhFyE,EAAA,IAEenE,KAAIN,CAAQ,CAAA,CAAA,mBAHxBP,EAAAC,CAAQ,KAAIM,CAAQ,GAAA8B,EAAAmD,EAAA,QAexBC,EAAGjE,EAAAkE,GAAA,CAAA,EACFC,IADDF,CAAG,OACFE,EAAI,EAAA,IAAJA,CAAI,EAEJ,IAAAC,IAFAD,EAAI,CAAA,OAEJC,EAAI,EAAA,IAAJA,CAAI,EAEJ,IAAAC,KAFAD,EAAI,CAAA,OAEJC,GAAI,EAAA,IAAJA,EAAI,IALLJ,CAAG,EAOH,IAAAK,IAPAL,EAAG,CAAA,OAOHK,EAAM,EAAA,IAANA,CAAM,IAvBPf,EAAG,IAhGJzD,EAAG,IAHJH,CAAG,wBACFE,EAAM,aAAAY,CAAA,EAML2C,EAAArD,EAAA,aAAAwE,CAAA,UA0BCnB,EAAAnC,EAAG,OAAAzC,EAAqCC,CAAQ,EAAG,aAAe,MAAS,oCAhCc,IAAAmC,EAAE,OAAO,EASvF,IAAAA,EAAE,OAAO,EAa4C,IAAAA,EAAE,aAAa,EA6FxE,IAAAA,EAAE,mBAAmB,EAErB,IAAAA,EAAE,gBAAgB,EAElB,IAAAA,EAAE,qBAAqB,EAG7B,IAAAA,EAAE,aAAa,cA1HlBf,EAAM,YAAA2E,EAAA,4BAMLC,EAAA,QAAA1E,EAAA,YAAAyE,EAAA,sCAmHCF,EAAM,YAAAE,EAAA,gCA1HT7E,CAAG,yCAJG","names":["reason","source","need","note","$.prop","$$props","isPlus","$.derived","devPreviewTier","page","shown","pkg","withPlusBonus","$.get","choosing","covering","n","TOKEN_PACKAGES","p","selectedId","selected","loadingId","$.state","wasOpen","$.user_effect","trackBuyTokensModalOpen","buy","trackPurchaseClick","packUsdPrice","res","j","$.set","div","root_1","button","div_1","button_1","$.sibling","$.child","div_2","h3","p_1","root_2","p_2","root_3","$.template_effect","$0","$.set_text","text_2","t","$$render","consequent","alternate","div_3","div_4","$$anchor","picked","button_2","root_4","node_2","span","root_5","text_3","span_1","root_6","text_4","consequent_1","consequent_2","div_5","div_6","div_7","div_8","root_7","consequent_3","div_9","node_3","div_10","div_11","div_12","div_13","span_2","root_8","node_5","svg","root_9","consequent_4","$.reset","$.append","consequent_5","$.set_attribute","text_7","packPrice","div_14","button_3","$.first_child","fragment_1","text_10","node_7","p_3","root_11","consequent_6","consequent_7","div_15","node_6","span_3","span_4","span_5","button_4","$1","$$args","$.delegated"],"sources":["../../../../../../src/lib/components/BuyTokensModal.svelte"],"sourcesContent":["<script lang=\"ts\">\n\timport { t } from '$lib/i18n';\n\timport { packPrice, packUsdPrice } from '$lib/pricing-display';\n\timport { TOKEN_PACKAGES, type TokenPackage } from '$lib/token-packages';\n\timport { withPlusBonus } from '$lib/pro-plan';\n\timport { page } from '$app/state';\n\timport { devPreviewTier } from '$lib/dev-preview';\n\timport { trackBuyTokensModalOpen, trackPurchaseClick } from '$lib/analytics';\n\n\tinterface Props {\n\t\topen: boolean;\n\t\tonclose: () => void;\n\t\t/** optional context line, e.g. \"you're 30 tokens short to tip\". */\n\t\treason?: string | null;\n\t\t/** where Stripe returns on success (defaults to the profile balance). */\n\t\tsuccessPath?: string;\n\t\tsource?: string;\n\t\t/** tokens still missing for what the buyer came to do: the sheet opens\n\t\t *  with the smallest pack that covers it picked, and one button buys it. */\n\t\tneed?: number | null;\n\t\t/** one line under that button, e.g. what happens once they're back. */\n\t\tnote?: string | null;\n\t}\n\n\tlet {\n\t\topen,\n\t\tonclose,\n\t\treason = null,\n\t\tsuccessPath,\n\t\tsource = 'buy_tokens_modal',\n\t\tneed = null,\n\t\tnote = null\n\t}: Props = $props();\n\n\t// Plus members are granted the bonus server-side, so the count shown here has\n\t// to match /pricing — this is the impulse surface, and a modal that promises\n\t// 400 while checkout hands over 500 reads as a bug either way round.\n\tconst isPlus = $derived(\n\t\t(devPreviewTier(page.url) ?? page.data.subscriptionTier) === 'plus'\n\t);\n\tconst shown = (pkg: TokenPackage) => withPlusBonus(pkg.tokens, isPlus);\n\n\t// With a need, the packs are a choice with the right one already picked; a\n\t// tap picks another (the pick starts over each time the sheet opens).\n\tconst choosing = $derived(!!need && need > 0);\n\tconst covering = (n: number) =>\n\t\tTOKEN_PACKAGES.find((p) => shown(p) >= n) ?? TOKEN_PACKAGES[TOKEN_PACKAGES.length - 1];\n\tlet selectedId = $derived(open && need && need > 0 ? covering(need).id : null);\n\tconst selected = $derived(TOKEN_PACKAGES.find((p) => p.id === selectedId) ?? null);\n\n\tlet loadingId = $state<string | null>(null);\n\n\t// Fire once on each closed → open transition (not on every reactive re-run),\n\t// so the buy-tokens funnel is measurable from wherever the modal is raised —\n\t// `source` carries the surface, the same value forwarded to checkout.\n\tlet wasOpen = false;\n\t$effect(() => {\n\t\tif (open && !wasOpen) trackBuyTokensModalOpen(source);\n\t\twasOpen = open;\n\t});\n\n\tasync function buy(pkg: TokenPackage) {\n\t\tif (loadingId) return;\n\t\tloadingId = pkg.id;\n\t\t// Closes the wall → modal-open → purchase funnel: without this the last\n\t\t// step was invisible and the redirect to Stripe left no client-side\n\t\t// trail. Same helper the subscription surfaces use (begin_checkout +\n\t\t// purchase_click) and the same `product_surface` pack convention as\n\t\t// PremiumPlans / UpgradeModal, so all 18 mount sites are covered by one\n\t\t// call and stay splittable by `source`.\n\t\t// Track the granted count, not the list count — otherwise plus purchases\n\t\t// look like they under-deliver in the funnel.\n\t\ttrackPurchaseClick(shown(pkg), packUsdPrice(pkg), `tokens_${pkg.id}_${source}`);\n\t\ttry {\n\t\t\tconst res = await fetch('/api/checkout/tokens', {\n\t\t\t\tmethod: 'POST',\n\t\t\t\theaders: { 'content-type': 'application/json' },\n\t\t\t\tbody: JSON.stringify({\n\t\t\t\t\tpackageId: pkg.id,\n\t\t\t\t\tsuccessPath,\n\t\t\t\t\t// Stripe's back button returns to the page the modal was opened\n\t\t\t\t\t// on — not the server's /p fallback.\n\t\t\t\t\tcancelPath: `${location.pathname}?canceled=true`,\n\t\t\t\t\tsource\n\t\t\t\t})\n\t\t\t});\n\t\t\tconst j = await res.json();\n\t\t\tif (res.ok && j.url) {\n\t\t\t\twindow.location.href = j.url;\n\t\t\t\treturn;\n\t\t\t}\n\t\t} catch {\n\t\t\t/* fall through */\n\t\t}\n\t\tloadingId = null;\n\t}\n</script>\n\n{#if open}\n\t<!-- svelte-ignore a11y_no_static_element_interactions -->\n\t<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<!-- header -->\n\t\t\t<div class=\"shrink-0 px-5 pt-7 text-center sm:px-7 sm:pt-8\">\n\t\t\t\t<div class=\"mx-auto flex h-12 w-12 items-center justify-center rounded-2xl\" style=\"background: rgba(245,181,10,.14);\">\n\t\t\t\t\t<svg class=\"h-7 w-7\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n\t\t\t\t\t\t<defs><radialGradient id=\"btCoin\" cx=\"38%\" cy=\"32%\" r=\"78%\"><stop offset=\"0%\" stop-color=\"#ffe9a8\" /><stop offset=\"48%\" stop-color=\"#f5b50a\" /><stop offset=\"100%\" stop-color=\"#b9800a\" /></radialGradient></defs>\n\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"url(#btCoin)\" stroke=\"#a06f06\" stroke-width=\"0.75\" /><circle cx=\"12\" cy=\"12\" r=\"7.6\" fill=\"none\" stroke=\"#fff3d0\" stroke-width=\"1\" opacity=\"0.5\" /><ellipse cx=\"9.2\" cy=\"8\" rx=\"3.1\" ry=\"1.9\" fill=\"#fff\" opacity=\"0.4\" />\n\t\t\t\t\t</svg>\n\t\t\t\t</div>\n\t\t\t\t<h3 class=\"mt-4 font-display text-3xl font-bold tracking-tight\">{t('get tokens.')}</h3>\n\t\t\t\t{#if reason}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-muted\">{reason}</p>\n\t\t\t\t{:else}\n\t\t\t\t\t<p class=\"mt-2 text-sm text-muted\">{t('spend them on live tips, ratings, boosts & more.')}</p>\n\t\t\t\t{/if}\n\t\t\t</div>\n\n\t\t\t<!-- packages -->\n\t\t\t<div class=\"min-h-0 flex-1 overflow-y-auto px-5 pt-5 pb-2 sm:px-7\">\n\t\t\t\t<div class=\"flex flex-col gap-2.5\" role={choosing ? 'radiogroup' : undefined}>\n\t\t\t\t\t{#each TOKEN_PACKAGES as pkg (pkg.id)}\n\t\t\t\t\t\t{@const picked = choosing && selectedId === pkg.id}\n\t\t\t\t\t\t<button\n\t\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\t\trole={choosing ? 'radio' : undefined}\n\t\t\t\t\t\t\taria-checked={choosing ? picked : undefined}\n\t\t\t\t\t\t\tonclick={() => (choosing ? (selectedId = pkg.id) : buy(pkg))}\n\t\t\t\t\t\t\tdisabled={loadingId !== null}\n\t\t\t\t\t\t\tclass=\"group relative flex items-center justify-between rounded-2xl border p-4 text-left transition-colors disabled:opacity-60 {choosing\n\t\t\t\t\t\t\t\t? picked\n\t\t\t\t\t\t\t\t\t? 'border-text bg-surface'\n\t\t\t\t\t\t\t\t\t: 'border-border bg-surface/40 hover:border-muted/40'\n\t\t\t\t\t\t\t\t: pkg.popular\n\t\t\t\t\t\t\t\t\t? 'border-[#f5b50a]/60 bg-[#f5b50a]/[.06]'\n\t\t\t\t\t\t\t\t\t: pkg.whale\n\t\t\t\t\t\t\t\t\t\t? 'border-purple/50 bg-purple/[.06]'\n\t\t\t\t\t\t\t\t\t\t: 'border-border bg-surface/40 hover:border-muted/40'}\"\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{#if pkg.popular}\n\t\t\t\t\t\t\t\t<span class=\"absolute -top-2 left-4 rounded-full bg-[#f5b50a] px-2 py-0.5 font-display text-[9px] font-bold tracking-wide text-[#241a04] uppercase\">{t('most popular')}</span>\n\t\t\t\t\t\t\t{:else if pkg.whale}\n\t\t\t\t\t\t\t\t<span class=\"absolute -top-2 left-4 rounded-full bg-purple px-2 py-0.5 font-display text-[9px] font-bold tracking-wide text-white uppercase\">{t('best value')}</span>\n\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t<svg class=\"h-8 w-8 shrink-0\" viewBox=\"0 0 24 24\" aria-hidden=\"true\">\n\t\t\t\t\t\t\t\t\t<circle cx=\"12\" cy=\"12\" r=\"11\" fill=\"url(#btCoin)\" stroke=\"#a06f06\" stroke-width=\"0.75\" /><circle cx=\"12\" cy=\"12\" r=\"7.6\" fill=\"none\" stroke=\"#fff3d0\" stroke-width=\"1\" opacity=\"0.5\" /><ellipse cx=\"9.2\" cy=\"8\" rx=\"3.1\" ry=\"1.9\" fill=\"#fff\" opacity=\"0.4\" />\n\t\t\t\t\t\t\t\t</svg>\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<div class=\"font-display text-lg font-bold tracking-tight\">{shown(pkg)} tokens</div>\n\t\t\t\t\t\t\t\t\t{#if isPlus}\n\t\t\t\t\t\t\t\t\t\t<div class=\"text-[11px] font-semibold text-purple\">\n\t\t\t\t\t\t\t\t\t\t\t{pkg.tokens} + {shown(pkg) - pkg.tokens} plus bonus\n\t\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t<div class=\"text-[11px] text-muted\">“{pkg.label}” · {pkg.blurb}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class=\"flex items-center gap-3\">\n\t\t\t\t\t\t\t\t<div class=\"text-right\">\n\t\t\t\t\t\t\t\t\t<div class=\"font-display text-xl font-bold tracking-tight\">\n\t\t\t\t\t\t\t\t\t\t{loadingId === pkg.id && !choosing ? '…' : packPrice(pkg)}\n\t\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t\t<div class=\"text-[10px] text-muted/70\">{t('one-time')}</div>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t{#if choosing}\n\t\t\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\t\t\tclass=\"grid h-6 w-6 shrink-0 place-items-center rounded-full border-2 transition-colors {picked\n\t\t\t\t\t\t\t\t\t\t\t? 'border-text bg-text text-bg'\n\t\t\t\t\t\t\t\t\t\t\t: 'border-muted/50'}\"\n\t\t\t\t\t\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{#if picked}\n\t\t\t\t\t\t\t\t\t\t\t<svg class=\"h-3.5 w-3.5\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"\n\t\t\t\t\t\t\t\t\t\t\t\t><path d=\"M20 6 9 17l-5-5\" /></svg\n\t\t\t\t\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t{/if}\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</button>\n\t\t\t\t\t{/each}\n\t\t\t\t</div>\n\t\t\t</div>\n\n\t\t\t<!-- footer -->\n\t\t\t<div class=\"shrink-0 border-t border-border px-5 pt-4 pb-7 sm:px-7 sm:pb-8\">\n\t\t\t\t{#if choosing && selected}\n\t\t\t\t\t<button\n\t\t\t\t\t\ttype=\"button\"\n\t\t\t\t\t\tonclick={() => buy(selected)}\n\t\t\t\t\t\tdisabled={loadingId !== null}\n\t\t\t\t\t\tclass=\"mb-2 flex min-h-13 w-full items-center justify-center rounded-2xl bg-yellow px-5 py-4 font-display text-[16px] font-bold tracking-tight text-black transition-colors hover:bg-yellow/85 disabled:opacity-60\"\n\t\t\t\t\t>\n\t\t\t\t\t\t{loadingId\n\t\t\t\t\t\t\t? '…'\n\t\t\t\t\t\t\t: t('buy {n} tokens · {price}', { n: shown(selected), price: packPrice(selected) })}\n\t\t\t\t\t</button>\n\t\t\t\t\t{#if note}\n\t\t\t\t\t\t<p class=\"mb-3 text-center text-[12px] text-muted\">{note}</p>\n\t\t\t\t\t{/if}\n\t\t\t\t{/if}\n\t\t\t\t<div class=\"flex items-center justify-center gap-3 text-[10px] text-muted/30\">\n\t\t\t\t\t<span>{t('secure via stripe')}</span>\n\t\t\t\t\t<span class=\"h-2.5 w-px bg-border\"></span>\n\t\t\t\t\t<span>{t('instant top-up')}</span>\n\t\t\t\t\t<span class=\"h-2.5 w-px bg-border\"></span>\n\t\t\t\t\t<span>{t('tokens never expire')}</span>\n\t\t\t\t</div>\n\t\t\t\t<button class=\"mt-3 block w-full text-center text-xs font-medium text-muted/30 transition-colors hover:text-muted\" onclick={onclose}>\n\t\t\t\t\t{t('maybe later')}\n\t\t\t\t</button>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n{/if}\n"],"version":3}