PageSourceSearch

https://hifimap.net/assets/pricing-GmfJQCmD.js

js hifimap.net collected 2026-10-09 22:02:28 UTC 7,203 bytes, 1 lines download raw bytes

1import{r as e,t}from"./jsx-runtime-BkSabwWG.js";import{t as n}from"./react-DHmoMYoq.js";import{t as r}from"./link-DyJT8-fX.js";import{I as i,f as a,p as o,u as s}from"./index-CZvRv669.js";import{n as c,r as l,t as u}from"./usePlan-C2CYdhCY.js";var d=a(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),f=a(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),p=e(n()),m=t(),h=[{label:`Published systems`,free:`1`,pro:`3`,premium:`100`},{label:`Components per system`,free:`15`,pro:`100`,premium:`250`},{label:`Connections per system`,free:`30`,pro:`200`,premium:`500`},{label:`Drag-and-drop editor`,free:!0,pro:!0,premium:!0},{label:`Automatic wiring`,free:!0,pro:!0,premium:!0},{label:`Share a public link`,free:!0,pro:!0,premium:!0},{label:`Explore & global search`,free:!1,pro:!0,premium:!0},{label:`Choose your own link`,free:!1,pro:!1,premium:!0}],g={free:`0 EUR / 0 USD / 0 SEK`,pro:l.pro,premium:l.premium};function _({value:e}){return e===!0?(0,m.jsx)(d,{className:`size-4 text-primary`}):e===!1?(0,m.jsx)(f,{className:`size-4 text-muted-foreground/40`}):(0,m.jsx)(`span`,{className:`text-sm text-foreground`,children:e})}function v({tierWanted:e}){let{user:t,loading:n}=i(),{paidTier:a,loading:c,refetch:d}=u(),[f,h]=(0,p.useState)(!1);if(n||c)return(0,m.jsx)(`div`,{className:`mt-8 h-12`});if(!t)return(0,m.jsxs)(r,{to:`/auth`,className:`mt-8 block rounded-full bg-primary py-3 text-center text-[10px] font-semibold uppercase tracking-[0.2em] text-primary-foreground transition-opacity hover:opacity-90`,children:[`Sign in to get `,e===`pro`?`Pro`:`Premium`]});if(a===e||e===`pro`&&a===`premium`)return(0,m.jsx)(`div`,{className:`mt-8 rounded-full border border-primary/60 py-3 text-center text-[10px] font-semibold uppercase tracking-[0.2em] text-primary`,children:a===`premium`&&e===`pro`?`Included in your Premium`:`You're all set — thank you!`});let g=e===`premium`&&a===`pro`,_=g?`premium_upgrade`:e===`pro`?`pro_lifetime`:`premium_lifetime`;return(0,m.jsxs)(`div`,{className:`mt-8`,children:[(0,m.jsx)(`button`,{disabled:f,onClick:async()=>{h(!0);try{await s(_,{id:t.id,email:t.email},{onCompleted:()=>{o.success(`Payment received — unlocking your plan…`),y(d,e)}})}catch(e){o.error(e instanceof Error?e.message:`Checkout failed to open.`)}finally{h(!1)}},className:`block w-full rounded-full bg-primary py-3 text-center text-[10px] font-semibold uppercase tracking-[0.2em] text-primary-foreground transition-opacity hover:opacity-90 disabled:opacity-50`,children:f?`Opening checkout…`:g?`Upgrade to Premium`:`Get ${e===`pro`?`Pro`:`Premium`} — one-time`}),g&&(0,m.jsxs)(`p`,{className:`mt-2 text-center text-[11px] text-muted-foreground`,children:[l.premiumUpgrade,` — your Pro payment is deducted.`]})]})}async function y(e,t){for(let n=0;n<12;n++){await new Promise(e=>setTimeout(e,2500));let{data:n}=await e();if(n&&n.paidTier===t){o.success(`${t===`pro`?`Pro`:`Premium`} is active. Thank you!`);return}}o.info(`Payment received. If your plan doesn't appear shortly, reload the page.`)}function b(){return(0,p.useEffect)(()=>{new URLSearchParams(window.location.search).get(`purchase`)===`success`&&(o.success(`Thank you! Your upgrade activates within a few seconds.`),window.history.replaceState(null,``,`/pricing`))},[]),(0,m.jsxs)(`main`,{className:`mx-auto max-w-6xl px-6 py-16`,children:[(0,m.jsxs)(`header`,{className:`text-center`,children:[(0,m.jsx)(`p`,{className:`text-[10px] uppercase tracking-[0.3em] text-muted-foreground`,children:`Pricing`}),(0,m.jsxs)(`h1`,{className:`mt-3 font-display text-5xl italic text-foreground`,children:[`Start `,(0,m.jsx)(`span`,{className:`text-primary`,children:`free`}),`, grow when you need to`]}),(0,m.jsx)(`p`,{className:`mx-auto mt-4 max-w-2xl text-sm leading-relaxed text-muted-foreground`,children:`We want HiFimap to stay free and ad-supported by nobody. The free tier gives you a full editor, automatic wiring and a public link for one system. Pro is the sweet spot: bigger maps, three published systems and Explore — our global directory of setups, which we think is a killer way to discover systems and share your own. Premium lifts almost every limit and lets you choose your own link name.`}),(0,m.jsx)(`p`,{className:`mx-auto mt-3 max-w-2xl text-xs leading-relaxed text-muted-foreground
1/70`,children:`Development and hosting still cost something, so a small one-time fee keeps the lights on without ever putting ads in your way. No recurring charges — pay once, keep it forever. Already on Pro? Upgrading to Premium only costs the difference.`})]}),(0,m.jsxs)(`div`,{className:`mt-8 rounded-xl border border-primary/30 bg-primary/5 p-4 text-center`,children:[(0,m.jsx)(`p`,{className:`text-xs font-medium text-primary`,children:`Early Adopter program — limited time`}),(0,m.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:`For a limited time, everyone who joins gets the full Pro plan for free — three published systems, 100 components each and Explore. Sign up and publish your systems now and you keep the Pro level even after the program ends. Custom links and the biggest maps stay part of Premium.`})]}),(0,m.jsx)(`div`,{className:`mt-10 grid gap-6 lg:grid-cols-3`,children:[`free`,`pro`,`premium`].map(e=>{let t=c[e],n=e===`pro`;return(0,m.jsxs)(`section`,{className:`relative flex flex-col rounded-2xl border p-8 ${n?`border-primary/60 bg-card`:`border-border bg-card/40`}`,children:[n&&(0,m.jsx)(`span`,{className:`absolute -top-3 left-1/2 -translate-x-1/2 rounded-full bg-primary px-3 py-1 text-[10px] font-semibold uppercase tracking-[0.2em] text-primary-foreground`,children:`Recommended`}),(0,m.jsxs)(`div`,{className:`flex items-baseline justify-between`,children:[(0,m.jsx)(`h2`,{className:`font-display text-3xl italic text-foreground`,children:t.label}),(0,m.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.25em] text-muted-foreground`,children:e===`free`?`Always free`:`Pay once`})]}),(0,m.jsxs)(`p`,{className:`mt-1 text-sm font-medium text-foreground`,children:[g[e],(0,m.jsx)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:e===`free`?`forever`:`one-time`})]}),(0,m.jsx)(`p`,{className:`mt-2 text-sm leading-relaxed text-muted-foreground`,children:t.blurb}),(0,m.jsx)(`ul`,{className:`mt-6 space-y-3 border-t border-border pt-6`,children:h.map(t=>(0,m.jsxs)(`li`,{className:`grid grid-cols-[1fr_auto] items-center gap-4`,children:[(0,m.jsx)(`span`,{className:`text-xs uppercase tracking-widest text-muted-foreground`,children:t.label}),(0,m.jsx)(_,{value:t[e]})]},t.label))}),(0,m.jsx)(`div`,{className:`mt-auto`,children:e===`free`?(0,m.jsx)(r,{to:`/`,search:{new:!0},className:`mt-8 block rounded-full border border-border py-3 text-center text-[10px] font-semibold uppercase tracking-[0.2em] text-foreground transition-colors hover:border-primary`,children:`Start building`}):(0,m.jsx)(v,{tierWanted:e})})]},e)})}),(0,m.jsxs)(`p`,{className:`mt-10 text-center text-xs text-muted-foreground`,children:[`Questions about plans or payments?`,` `,(0,m.jsx)(r,{to:`/faq`,className:`text-primary underline-offset-4 hover:underline`,children:`Send us feedback`}),`.`]})]})}export{b as component};

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.