1import{r as e}from"./rolldown-runtime-S-ySWqyJ.js";import{i as t,r as n}from"./framework-CXnKph_e.js";import{t as r}from"./createLucideIcon-DDARWCLE.js";import{t as i}from"./check-BdiQYQ-M.js";import{n as a,t as o}from"./rocket-9SQhuXm4.js";import{t as s}from"./share-2-DedjJxbm.js";import{t as c}from"./image-BfglxqmI.js";import{t as l}from"./sparkles-CyUf2GKf.js";import{t as u}from"./video-JUI6Sx-j.js";import{n as d}from"./react-client-KK-_sIxR.js";import{t as f}from"./navigation-2R1Ua1HG.js";import{t as p}from"./creator-journey-C7KOqre2.js";var m=r(`user-plus`,[[`path`,{d:`M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2`,key:`1yyitq`}],[`circle`,{cx:`9`,cy:`7`,r:`4`,key:`nufk8`}],[`line`,{x1:`19`,x2:`19`,y1:`8`,y2:`14`,key:`1bvyxn`}],[`line`,{x1:`22`,x2:`16`,y1:`11`,y2:`11`,key:`1shjgl`}]]),h=e(t(),1),g=n(),_={image:c,video:u,download:o,share:s};function v(e){let[t,n]=(0,h.useState)(e??null),[r,i]=(0,h.useState)(e!==void 0),a=(0,h.useCallback)(async()=>{try{let e=await fetch(`/api/creator-journey`,{credentials:`same-origin`,cache:`no-store`});if(e.status===401){i(!1),n(null);return}if(!e.ok)return;let t=await e.json();window.localStorage.getItem(`bna:creator-journey:downloaded`)===`1`&&(t.tasks=t.tasks.map(e=>e.id===`download`?{...e,completed:!0}:e),t.completed=t.tasks.filter(e=>e.completed).length,t.nextTask=t.tasks.find(e=>!e.completed)??null),n(t),i(!0)}catch{}},[]);return(0,h.useEffect)(()=>{let e=window.setTimeout(()=>void a(),0),t=()=>void a();return window.addEventListener(p,t),window.addEventListener(`focus`,t),()=>{window.clearTimeout(e),window.removeEventListener(p,t),window.removeEventListener(`focus`,t)}},[a]),{snapshot:t,authenticated:r,refresh:a}}function y(){let e=d(`account.journey`),{snapshot:t,authenticated:n}=v();if(!n||!t)return null;let r=t.completed===t.total;if(r)return null;let i=t.nextTask?e(`tasks.${t.nextTask.id}.label`):``;return(0,g.jsxs)(f,{className:`v-creator-journey-pill grid h-9 grid-cols-[20px_minmax(0,auto)_auto] items-center gap-2 rounded-full border bg-[rgba(24,32,34,.86)] px-2.5 text-[#eaf9fb] no-underline shadow-[inset_0_1px_rgba(255,255,255,.035)] [transition:border-color_.16s_ease,background_.16s_ease,transform_.16s_ease] hover:[transform:translateY(-1px)] hover:border-[rgba(82,230,255,.3)] hover:bg-[rgba(82,230,255,.08)] max-[760px]:hidden [&>svg]:w-[17px] [&>svg]:text-[#59def3] [&>span]:grid [&>span]:leading-[1.12] [&_b]:text-[10px] [&_b]:font-[650] [&_b]:whitespace-nowrap [&_small]:max-w-[185px] [&_small]:overflow-hidden [&_small]:text-[8px] [&_small]:text-[#7f9092] [&_small]:text-ellipsis [&_small]:whitespace-nowrap max-[1180px]:[&_small]:hidden [&>strong]:grid [&>strong]:h-[22px] [&>strong]:min-w-[34px] [&>strong]:place-items-center [&>strong]:rounded-full [&>strong]:bg-[rgba(82,230,255,.09)] [&>strong]:text-[9px] ${r?`is-complete border-[rgba(99,226,177,.22)] [&>svg]:text-[#78e0b7] [&>strong]:text-[#78e0b7]`:`border-white/[.12] [&>strong]:text-[#75e5f6]`}`,href:`/rewards#creator-journey`,"aria-label":r?e(`completeAria`):e(`progressAria`,{completed:t.completed,total:t.total,next:i}),children:[(0,g.jsx)(l,{"aria-hidden":`true`}),(0,g.jsxs)(`span`,{children:[(0,g.jsx)(`b`,{children:e(r?`completePill`:`pill`)}),(0,g.jsx)(`small`,{children:r?e(`keepCreating`):e(`next`,{task:i})})]}),(0,g.jsxs)(`strong`,{children:[t.completed,`/`,t.total]})]})}function b({initial:e}){let t=d(`account.journey`),{snapshot:n,authenticated:r}=v(e);if(!r||!n)return null;let s=n.completed===n.total;return(0,g.jsxs)(`section`,{className:`rewards-creator-journey my-[18px] scroll-mt-[90px] rounded-[21px] border border-white/[.11] bg-[radial-gradient(circle_at_100%_0,rgba(82,230,255,.1),transparent_29%),linear-gradient(135deg,#182022,#13191a_68%)] p-7 shadow-[inset_0_1px_rgba(255,255,255,.035)] max-[620px]:px-4 max-[620px]:py-5${s?` is-complete`:``}`,id:`creator-journey`,"aria-labelledby":`creator-journey-title`,children:[(0,g.jsxs)(`header`,{className:`flex items-center justify-between gap-6 max-[620px]:items-start`,children:[(0,g.jsxs)(`div`,{className:`grid gap-[5px]`,children:[(0,g.jsxs)(`p`,{className:`m-0 flex items-center gap-[7px] text-[11px] font-[750] tracking-[.15em] text-[#59dff3] [&_svg]:w-3.5`,children:[(0,g.jsx)(l,{}),` `,t(`eyebrow`)]}),(0,g.jsx)(`h3`,{className:`m-0 text-2xl tracking-[-.035em] max-[620px]:text-xl`,id:`creator-journey-title`,children:t(s?`completeTitle`:`title`)}),(0,g.jsx)(`small`,{className:`text-[11px] text-[#829093] max-[620px]:text-[10px]`,children:t(s?`completeDescription`:`description`)})]}),(0,g.jsxs)(`span`,{className:`grid min-w-[76px] place-items-center rounded-[14px] border border-[rgba(82,230,255,.16)] bg-[rgba(82,230,255,.06)] px-[13px] py-[9px]`,children:[(0,g.jsxs)(`strong`,{className:`text-[22px] tracking-[-.04em] text-[#72e5f6]`,children:[n.completed,`/`,n.total]}),(0,g.jsx)(`small`,{className:`text-[8px] text-[#718083] uppercase`,children:t(`complete`)})]})]}),(0,g.jsx)(`div`,{className:`rewards-journey-progress my-5 h-1 overflow-hidden rounded-full bg-white/[.055]`,"aria-hidden":`true`,children:(0,g.jsx)(`i`,{className:`block h-full rounded-[inherit] bg-[linear-gradient(90deg,#7cf0c4,#59e3f8,#4da6ff)] shadow-[0_0_15px_rgba(82,230,255,.35)] transition-[width] duration-300`,style:{width:`${n.completed/n.total*100}%`}})}),(0,g.jsx)(`ol`,{className:`m-0 grid list-none grid-cols-4 gap-2.5 p-0 max-[620px]:grid-cols-1`,children:n.tasks.map((e,r)=>{let o=_[e.id];return(0,g.jsxs)(`li`,{className:`relative grid min-h-[154px] grid-cols-[38px_minmax(0,1fr)] content-start gap-2.5 rounded-[14px] border p-4 max-[620px]:min-h-[105px] ${e.completed?`is-complete border-[rgba(99,226,177,.14)] bg-[linear-gradient(145deg,rgba(99,226,177,.055),rgba(10,15,16,.58)_60%)]`:e.id===n.nextTask?.id?`is-next border-[rgba(82,230,255,.28)] bg-[linear-gradient(145deg,rgba(82,230,255,.09),rgba(10,15,16,.68)_60%)]`:`border-white/[.08] bg-[rgba(10,15,16,.58)]`}`,children:[(0,g.jsx)(`span`,{className:`rewards-journey-step absolute top-2.5 right-2.5 grid size-[23px] place-items-center rounded-full bg-white/[.055] text-[9px] text-[#778588] [&_svg]:w-3 [&_svg]:text-[#75dfb8]`,children:e.completed?(0,g.jsx)(i,{}):r+1}),(0,g.jsx)(`span`,{className:`rewards-journey-icon grid size-[38px] place-items-center rounded-[11px] bg-[rgba(82,230,255,.07)] text-[#60deef] [&_svg]:w-[17px]`,children:(0,g.jsx)(o,{})}),(0,g.jsxs)(`div`,{className:`grid content-start gap-1 pt-0.5`,children:[(0,g.jsx)(`strong`,{className:`pr-[15px] text-xs leading-[1.35]`,children:t(`tasks.${e.id}.label`)}),(0,g.jsx)(`small`,{className:`text-[9px] leading-normal text-[#778587]`,children:t(`tasks.${e.id}.description`)})]}),e.completed?(0,g.jsxs)(`em`,{className:`absolute right-3.5 bottom-[
113px] inline-flex h-7 items-center gap-[5px] rounded-[7px] bg-[rgba(99,226,177,.08)] px-[9px] text-[9px] font-[650] not-italic text-[#75dfb8] no-underline [&_svg]:w-[11px]`,children:[(0,g.jsx)(i,{}),` `,t(`done`)]}):e.id===n.nextTask?.id?(0,g.jsxs)(f,{className:`absolute right-3.5 bottom-[13px] inline-flex h-7 items-center gap-[5px] rounded-[7px] bg-[linear-gradient(100deg,#dfffee,#67e7fb)] px-[9px] text-[9px] font-[650] text-primary-foreground no-underline [&_svg]:w-2 [&_svg]:fill-current`,href:e.href,children:[t(`start`),` `,(0,g.jsx)(a,{})]}):(0,g.jsx)(`span`,{className:`rewards-journey-locked absolute right-3.5 bottom-[13px] inline-flex h-7 items-center gap-[5px] rounded-[7px] px-[9px] text-[9px] font-[650] text-[#617073]`,children:t(`upNext`)})]},e.id)})}),s&&(0,g.jsxs)(`footer`,{className:`mt-[18px] flex items-center justify-between border-t border-white/[.08] pt-[18px]`,children:[(0,g.jsxs)(`span`,{className:`flex items-center gap-2 text-[11px] text-[#9cafb1] [&_svg]:w-4 [&_svg]:text-[#76e0b8]`,children:[(0,g.jsx)(o,{}),` `,t(`another`)]}),(0,g.jsx)(f,{className:`rounded-[9px] bg-[image:var(--brand-gradient)] px-3.5 py-[9px] text-[10px] font-bold text-primary-foreground no-underline`,href:`/create`,children:t(`createAgain`)})]})]})}export{y as n,m as r,b as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.