PageSourceSearch

https://spilo.ai/assets/JoinPage-BF4K9TIj.js

js spilo.ai collected 2026-10-09 16:46:34 UTC 10,134 bytes, 1 lines download raw bytes

1import{a4 as _,b as z,f as H,r as a,Y as g,j as e,B as v}from"./index-DfyJ78f7.js";import{d as I,P as U,c as N}from"./detectDefaultCountry-TP9_h9uT.js";import{F as y}from"./Footer-MXy4jaOc.js";import{a as W}from"./whatsapp-CWLGCE-x.js";import{u as V}from"./useTranslation-DZUoPLtO.js";import"./SocialIcons-DPrjw7F-.js";const O=25,$=3;function Q(){var b,p;const{code:r}=_(),i=z(),{t}=V("join"),{addToast:o}=H(),[s,w]=a.useState(null),[k,h]=a.useState(!0),[L,x]=a.useState(!1),[C,A]=a.useState(!1),[u,m]=a.useState("info"),[l,f]=a.useState(""),[d,j]=a.useState(!1),[T,c]=a.useState(!1),M=a.useMemo(()=>I(),[]);a.useEffect(()=>{if(!r){x(!0),h(!1);return}g.getInfo(r).then(n=>{n.enabled===!1?A(!0):w(n)}).catch(()=>x(!0)).finally(()=>h(!1))},[r]);const S=(b=s==null?void 0:s.config)!=null&&b.bonus_bytes?Math.round(s.config.bonus_bytes/(1024*1024)):O,E=((p=s==null?void 0:s.config)==null?void 0:p.activation_items)??$,B=()=>{m("phone")},D=()=>{m("info"),c(!1)},F=async()=>{if(!(!r||N(l)<7)){j(!0),c(!1);try{(await g.claim(l,r)).claimed?(f(""),m("result"),o(t("claimSuccess"),"success")):(c(!0),o(t("claimError"),"error"))}catch{c(!0),o(t("claimError"),"error")}finally{j(!1)}}},P=()=>{window.open(`https://wa.me/${W}?text=${encodeURIComponent("Hi!")}`,"_blank")};return k?e.jsxs("div",{className:"min-h-screen bg-theme-body flex flex-col",children:[e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-6",children:e.jsxs("div",{className:"max-w-md w-full animate-pulse",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(v,{size:64,className:"mx-auto mb-4 opacity-30"}),e.jsx("div",{className:"h-7 w-48 bg-theme-muted rounded mx-auto"})]}),e.jsxs("div",{className:"bg-theme-card rounded-theme-card shadow-theme-card p-8",children:[e.jsx("div",{className:"h-6 w-56 bg-theme-muted rounded mx-auto mb-3"}),e.jsx("div",{className:"h-4 w-44 bg-theme-muted rounded mx-auto mb-6"}),e.jsx("div",{className:"space-y-3 mb-8",children:[1,2,3].map(n=>e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"w-7 h-7 bg-theme-muted rounded-theme-card shrink-0"}),e.jsxs("div",{className:"flex-1",children:[e.jsx("div",{className:"h-4 w-32 bg-theme-muted rounded mb-1"}),e.jsx("div",{className:"h-3 w-48 bg-theme-muted rounded"})]})]},n))}),e.jsx("div",{className:"h-12 w-full bg-theme-muted rounded-theme-button"})]})]})}),e.jsx(y,{})," "]}):e.jsxs("div",{className:"min-h-screen bg-theme-body flex flex-col",children:[e.jsx("div",{className:"flex-1 flex flex-col items-center justify-center px-6",children:e.jsxs("div",{className:"max-w-md w-full",children:[e.jsxs("div",{className:"text-center mb-8",children:[e.jsx(v,{size:64,className:"mx-auto mb-4"}),e.jsx("h1",{className:"text-2xl font-bold text-theme-heading ds-heading",children:t("title")})]}),e.jsx("div",{className:"bg-theme-card rounded-theme-card shadow-theme-card p-8",children:C?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-center text-theme-secondary mb-2",children:t("disabled")}),e.jsx("p",{className:"text-center text-sm text-theme-muted mb-6",children:t("disabledHint")}),e.jsx("button",{onClick:()=>i("/login"),className:"w-full py-3 rounded-theme-button bg-theme-inverse text-white font-medium hover:bg-theme-secondary transition-colors",children:t("signUp")})]}):L?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"text-center text-theme-secondary mb-6",children:t("invalidLink")}),e.jsx("button",{onClick:()=>i("/login"),className:"w-full py-3 rounded-theme-button bg-theme-inverse text-white font-medium hover:bg-theme-secondary transition-colors",children:t("signUpAnyway")})]}):u==="info"?e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl font-bold text-theme-heading text-center mb-2",children:s!=null&&s.referrer_name?t("invitedByName",{name:s.referrer_name}):t("invitedGeneric")}),e.jsx("p",{className:"text-sm text-theme-secondary text-center mb-6",children:t("bonusText",{count:E,bonusMB:S})}),e.jsxs("div",{className:"space-y-3 mb-8",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1.5 rounded-theme-card bg-theme-muted text-theme-secondary shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M7.5 8.25h9m-9 3H12m-9.75 1.51c0 1.6 1.123 2.994 2.707 3.227 1.129.166 2.27.293 3.423.379.35.
1026.67.21.865.501L12 21l2.755-4.133a1.14 1.14 0 01.865-.501 48.172 48.172 0 003.423-.379c1.584-.233 2.707-1.626 2.707-3.228V6.741c0-1.602-1.123-2.995-2.707-3.228A48.394 48.394 0 0012 3c-2.392 0-4.744.175-7.043.513C3.373 3.746 2.25 5.14 2.25 6.741v6.018z"})})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-theme-heading",children:t("feature1Title")}),e.jsx("p",{className:"text-xs text-theme-muted",children:t("feature1Desc")})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1.5 rounded-theme-card bg-theme-muted text-theme-secondary shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456z"})})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-theme-heading",children:t("feature2Title")}),e.jsx("p",{className:"text-xs text-theme-muted",children:t("feature2Desc")})]})]}),e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx("div",{className:"p-1.5 rounded-theme-card bg-theme-muted text-theme-secondary shrink-0 mt-0.5",children:e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M3.75 6A2.25 2.25 0 016 3.75h2.25A2.25 2.25 0 0110.5 6v2.25a2.25 2.25 0 01-2.25 2.25H6a2.25 2.25 0 01-2.25-2.25V6zM3.75 15.75A2.25 2.25 0 016 13.5h2.25a2.25 2.25 0 012.25 2.25V18a2.25 2.25 0 01-2.25 2.25H6A2.25 2.25 0 013.75 18v-2.25zM13.5 6a2.25 2.25 0 012.25-2.25H18A2.25 2.25 0 0120.25 6v2.25A2.25 2.25 0 0118 10.5h-2.25a2.25 2.25 0 01-2.25-2.25V6zM13.5 15.75a2.25 2.25 0 012.25-2.25H18a2.25 2.25 0 012.25 2.25V18A2.25 2.25 0 0118 20.25h-2.25A2.25 2.25 0 0113.5 18v-2.25z"})})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium text-theme-heading",children:t("feature3Title")}),e.jsx("p",{className:"text-xs text-theme-muted",children:t("feature3Desc")})]})]})]}),e.jsx("button",{onClick:B,className:"w-full py-3 rounded-theme-button bg-theme-inverse text-white font-medium hover:bg-theme-secondary transition-colors",children:t("continue")})]}):u==="phone"?e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:D,className:"mb-4 text-sm text-theme-secondary hover:text-theme-heading transition-colors flex items-center gap-1",type:"button",children:[e.jsx("svg",{className:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 19.5L8.25 12l7.5-7.5"})}),t("back")]}),e.jsx("h2",{className:"text-xl font-bold text-theme-heading text-center mb-2",children:t("enterPhone")}),e.jsx("p",{className:"text-sm text-theme-secondary text-center mb-6",children:t("enterPhoneDesc")}),e.jsxs("form",{onSubmit:n=>{n.preventDefault(),F()},children:[e.jsx("div",{className:"mb-6",children:e.jsx(U,{value:l,onChange:f,defaultCountry:M,autoFocus:!0,disabled:d})}),T&&e.jsx("p",{className:"text-sm text-red-500 text-center mb-4",role:"alert",children:t("claimError")}),e.jsx("button",{type:"submit",disabled:d||N(l)<7,className:"w-full py-3 rounded-theme-button bg-theme-inverse text-white font-medium hover:bg-theme-secondary transition-colors disabled:opacity-40",children:t(d?"claiming":"continue")})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl font-bold text-theme-heading text-center mb-2",children:t("newUserTitle")}),e.jsx("p",{className:"text-sm text-theme-secondary text-center mb-6",children:t("newUserDesc")}),e.jsxs("button",{onClick:P,className:"w-full py-3 rounded-theme-button bg-emerald-600 text-white font-medium hover:bg-emerald-700 transition-colors flex items-center justify-center gap-2",children:[e.jsx("svg",{className:"w-5 h-5",fill:"currentColor",viewBox:"0 0 24 24",children:e.jsx("path",{d:"M17.472 14.382c-.297-.149-1.758-.867-2.03-.967-.273-.099-.471-.148-.67.15-.197.297-.767.966-.94 1.164-.173.199-.347.223-.644.075-.297-.15-1.255-.463-2.39-1.475-.883-.788-1.48-1.761-1.653-2.059-.173-.297-.018-.458.13-.606.134-.133.298-.347.446-.52.149-.174.198-.298.298-.497.099-.198.05-.371-.025-.52-.075-.149-.669-1.612-.916-2.207-.242-.579-.487-.5-.669-.51-.173-.008-.371-.01-.57-.01-.
1198 0-.52.074-.792.372-.272.297-1.04 1.016-1.04 2.479 0 1.462 1.065 2.875 1.213 3.074.149.198 2.096 3.2 5.077 4.487.709.306 1.262.489 1.694.625.712.227 1.36.195 1.871.118.571-.085 1.758-.719 2.006-1.413.248-.694.248-1.289.173-1.413-.074-.124-.272-.198-.57-.347m-5.421 7.403h-.004a9.87 9.87 0 01-5.031-1.378l-.361-.214-3.741.982.998-3.648-.235-.374a9.86 9.86 0 01-1.51-5.26c.001-5.45 4.436-9.884 9.888-9.884 2.64 0 5.122 1.03 6.988 2.898a9.825 9.825 0 012.893 6.994c-.003 5.45-4.437 9.884-9.885 9.884m8.413-18.297A11.815 11.815 0 0012.05 0C5.495 0 .16 5.335.157 11.892c0 2.096.547 4.142 1.588 5.945L.057 24l6.305-1.654a11.882 11.882 0 005.683 1.448h.005c6.554 0 11.89-5.335 11.893-11.893a11.821 11.821 0 00-3.48-8.413z"})}),t("sendWhatsApp")]}),e.jsxs("p",{className:"text-xs text-theme-muted text-center mt-4",children:[t("alreadyHaveAccount")," ",e.jsx("button",{onClick:()=>i(`/login?ref=${r}`),className:"text-brand-600 hover:underline",children:t("loginToClaim")})]})]})})]})}),e.jsx(y,{})," "]})}export{Q as JoinPage};

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.