PageSourceSearch

https://sendunlimitedemail.com/sue/mod-DJkIkd3o.js

js sendunlimitedemail.com collected 2026-10-05 06:24:04 UTC 11,591 bytes, 1 lines download raw bytes

1import{r as a,e as W,j as e,L as v,t as P}from"./edge-BOITG1XR.js";import{S as R}from"./mod-BsS8Yh4X.js";import"./mod-BMqEiUX-.js";const k=["standard","professional","advanced"],B={standard:"Standard",professional:"Professional",advanced:"Advanced"},A={standard:"#0284C7",professional:"#059669",advanced:"#7C3AED"},L={ips:"🌐 IP Addresses",os:"🖥 Operating System",software:"💿 Software Licenses",hosting:"🏠 Hosting & Control Panel",general:"📦 General"};function z(){return localStorage.getItem("token")||sessionStorage.getItem("sue_impersonate_token")||""}function w({info:t}){return t?t.setup===0&&t.monthly===0?e.jsxs("td",{style:x,children:[e.jsx("span",{style:{fontWeight:700,color:"#16A34A",fontSize:12},children:"FREE"}),e.jsx("div",{style:{fontSize:10.5,color:"#64748B"},children:"included"})]}):e.jsxs("td",{style:x,children:[t.setup>0&&e.jsxs("div",{style:{fontWeight:700,fontSize:13,color:"#0F1729"},children:["$",t.setup.toFixed(2)]}),t.monthly>0&&e.jsxs("div",{style:{fontSize:11.5,color:"#64748B"},children:["+$",t.monthly,"/mo"]}),t.label&&e.jsx("div",{style:{fontSize:10.5,color:"#94A3B8",lineHeight:1.3,marginTop:2},children:t.label})]}):e.jsx("td",{style:x,children:e.jsx("span",{style:{color:"#94A3B8",fontSize:12},children:"—"})})}const C={padding:"10px 14px",textAlign:"center",fontWeight:700,fontSize:11.5,letterSpacing:"0.04em",textTransform:"uppercase",borderBottom:"2px solid #E2E8F0"},x={padding:"12px 14px",textAlign:"center",borderBottom:"1px solid #F1F5F9",verticalAlign:"top"};function E({addon:t,optionValue:p,myService:s,owned:y,onBuy:g,small:d}){return s?y?e.jsx("span",{style:{fontSize:d?11:11.5,color:"#16A34A",fontWeight:700},children:"✓ Owned"}):e.jsx("button",{onClick:()=>g(t,p),style:{display:"inline-block",padding:d?"5px 11px":"7px 14px",borderRadius:d?6:7,background:A[s.plan]||"#0066CC",color:"#fff",fontWeight:700,fontSize:d?11.5:12,border:"none",cursor:"pointer"},children:"Buy now →"}):e.jsx(v,{to:"/pricing",style:{fontSize:d?11.5:12,color:"#0066CC",fontWeight:600},children:"Get a plan first →"})}function O({addon:t,userPlan:p,myService:s,ownedSlugs:y,onBuy:g}){const[d,b]=a.useState(!1),c=Array.isArray(t.options)?t.options:[],r=t.plan_prices||t.plan_price||{},f=y.has(t.slug),u=!r||Object.keys(r).length===0?!0:p?r[p]!==null&&r[p]!==void 0:!0;return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{style:{background:d?"#F8FAFC":"#fff"},children:[e.jsxs("td",{style:{...x,textAlign:"left",maxWidth:280},children:[e.jsx("div",{style:{fontWeight:700,fontSize:14,color:"#0F1729",marginBottom:3},children:t.name}),e.jsx("div",{style:{fontSize:12,color:"#64748B",lineHeight:1.5},children:t.description}),c.length>1&&e.jsx("button",{onClick:()=>b(i=>!i),style:{marginTop:6,fontSize:11.5,color:"#0066CC",background:"none",border:"none",cursor:"pointer",padding:0,fontWeight:600},children:d?"▲ Hide tiers":`▼ ${c.length} tiers available`})]}),k.map(i=>{const l=r[i];if(!r||Object.keys(r).length===0){const h=c[0],j=h?{setup:h.setup||0,monthly:h.monthly||0,label:h.label}:null;return e.jsx(w,{info:j},i)}return e.jsx(w,{info:l},i)}),e.jsx("td",{style:x,children:u?e.jsx(E,{addon:t,optionValue:c[0]?.value,myService:s,owned:f,onBuy:g}):p?e.jsx("span",{style:{fontSize:11.5,color:"#94A3B8"},children:"Not for your plan"}):e.jsx(v,{to:"/pricing",style:{fontSize:12,color:"#0066CC",fontWeight:600},children:"Get a plan first →"})})]}),d&&c.map((i,l)=>{const h=r[p],j=!r||Object.keys(r).length===0?!0:h!=null;return e.jsxs("tr",{style:{background:"#F8FAFC"},children:[e.jsx("td",{style:{...x,textAlign:"left",paddingLeft:32},children:e.jsx("span",{style:{fontSize:12.5,color:"#374151",fontWeight:600},children:i.label})}),k.map(S=>{const F=r[S];return r&&Object.keys(r).length>0&&F==null?e.jsx("td",{style:x,children:e.jsx("span",{style:{color:"#94A3B8",fontSize:12},children:"—"})},S):e.jsxs("td",{style:x,children:[i.setup>0&&e.jsxs("div",{style:{fontWeight:700,fontSize:13},children:["$",i.setup.toFixed(2)]}),i.monthly>0&&e.jsxs("div",{style:{fontSize:11.5,color:"#64748B"},children:["+$",i.monthly,"/mo"]})]},S)}),e.jsx("td",{style:x,children:j&&e.jsx(E,{addon:t,optionValue:i.value,myService:s,owned:f,onBuy:g,small:!0})})]},l)})]})}function I({addon:t,optionValue:p,myService:s,onClose:y,onPaid:g}){const[d,b]=a.useState(!0),[c,r]=a.useState(null),[f,u]=a.useState("");return a.useEffect(()=>{let i=!1;return b(!0),u(""),W.post(`/my/services/${s.service_id}/addons/purchase`,{addon_slug:t.slug,option_value:p??void 0,payment_method:"stripe",currency:"usd"}).then(({data:l})=>{i||(l?.next?.type==="error"||l?.next?.type==="unavailable"?u(l.next.reason||l.next.message||"Payment c
1ould not be started."):r({order_id:l.order_id,total:l.total}))}).catch(l=>!i&&u(l.response?.data?.error||"Could not start purchase. Please try again.")).finally(()=>!i&&b(!1)),()=>{i=!0}},[t.slug,s.service_id]),e.jsx("div",{style:{position:"fixed",inset:0,background:"rgba(15,23,41,0.55)",zIndex:1e3,display:"flex",alignItems:"center",justifyContent:"center",padding:16},children:e.jsxs("div",{style:{background:"#fff",borderRadius:16,maxWidth:440,width:"100%",padding:24,maxHeight:"90vh",overflowY:"auto"},children:[e.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[e.jsx("h3",{style:{fontSize:17,fontWeight:800,color:"#0F1729",margin:0},children:t.name}),e.jsx("button",{onClick:y,style:{background:"none",border:"none",fontSize:20,cursor:"pointer",color:"#94A3B8",lineHeight:1},children:"×"})]}),e.jsxs("p",{style:{fontSize:13,color:"#64748B",marginTop:6,marginBottom:18},children:["Applies to ",e.jsx("strong",{children:s.domain})," (",B[s.plan]," plan)"]}),d&&e.jsx("div",{style:{textAlign:"center",color:"#64748B",padding:20,fontSize:13.5},children:"Preparing payment…"}),f&&e.jsx("div",{style:{background:"#FEF2F2",border:"1px solid #FECACA",color:"#B91C1C",borderRadius:10,padding:"12px 14px",fontSize:13},children:f}),!d&&!f&&c&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{style:{background:"#F8FAFC",border:"1px solid #E2E8F0",borderRadius:10,padding:"12px 14px",marginBottom:16,display:"flex",justifyContent:"space-between",fontSize:14},children:[e.jsx("span",{style:{color:"#64748B",fontWeight:600},children:"Total due today"}),e.jsxs("span",{style:{fontWeight:800,color:"#0F1729"},children:["$",Number(c.total).toFixed(2)]})]}),e.jsx(R,{orderId:c.order_id,amount:c.total,onSuccess:()=>g(t.slug),onError:()=>P.error("Payment failed. Please try again.")})]})]})})}function N(){const[t,p]=a.useState(null),[s,y]=a.useState(null),[g,d]=a.useState(null),[b,c]=a.useState(new Set),[r,f]=a.useState(!0),[u,i]=a.useState(""),[l,h]=a.useState(null),j=a.useCallback(()=>{z()&&W.get("/my/addons").then(({data:n})=>{const o=(n?.data||[])[0];o&&(d({service_id:o.service_id,domain:o.domain,plan:o.plan}),y(o.plan),c(new Set(o.addons.filter(m=>m.owned).map(m=>m.slug))))}).catch(()=>{})},[]);a.useEffect(()=>{fetch("/api/checkout/addons",{headers:{Accept:"application/json"}}).then(n=>n.json()).then(n=>p(Array.isArray(n)?n:n.data||n.addons||[])).catch(()=>i("Could not load addons. Please refresh.")).finally(()=>f(!1)),j()},[j]);const S=(t||[]).reduce((n,o)=>{const m=o.category||"general";return n[m]||(n[m]=[]),n[m].push(o),n},{}),F=(n,o)=>h({addon:n,optionValue:o}),_=n=>{c(o=>new Set(o).add(n)),h(null),P.success("Purchase complete! Your license/software will be issued automatically within a minute."),setTimeout(j,3e3)};return e.jsxs("div",{style:{minHeight:"100vh",background:"#F8FAFC"},children:[e.jsxs("div",{style:{background:"linear-gradient(135deg, #0F1729 0%, #1E293B 100%)",padding:"52px 20px 44px",textAlign:"center"},children:[e.jsx("div",{style:{display:"inline-block",fontSize:11,fontWeight:700,letterSpacing:"0.08em",textTransform:"uppercase",color:"#94A3B8",background:"rgba(255,255,255,0.07)",padding:"4px 14px",borderRadius:999,marginBottom:14},children:"Optional Add-ons"}),e.jsx("h1",{style:{color:"#fff",fontSize:36,fontWeight:800,margin:"0 0 12px",letterSpacing:"-0.02em"},children:"Supercharge Your SMTP Plan"}),e.jsxs("p",{style:{color:"#94A3B8",fontSize:15,maxWidth:560,margin:"0 auto 24px",lineHeight:1.65},children:["Buy add-ons separately at any time. Prices vary by plan — the more you're on, the less you pay.",s&&e.jsxs(e.Fragment,{children:[e.jsx("br",{}),e.jsxs("span",{style:{color:A[s],fontWeight:700},children:["Your plan: ",B[s]]})," — prices shown below."]})]}),!z()&&e.jsxs("div",{style:{display:"flex",gap:12,justifyContent:"center",flexWrap:"wrap"},children:[e.jsx(v,{to:"/pricing",style:{padding:"11px 24px",borderRadius:8,background:"#0EA5E9",color:"#fff",fontWeight:700,fontSize:14,textDecoration:"none"},children:"View Plans →"}),e.jsx(v,{to:"/auth/login",style:{padding:"11px 24px",borderRadius:8,background:"rgba(255,255,255,0.1)",color:"#fff",fontWeight:700,fontSize:14,textDecoration:"none"},children:"Log in"})]})]}),e.jsxs("div",{style:{background:"#fff",borderBottom:"1px solid #E2E8F0",padding:"14px 24px",display:"flex",gap:18,flexWrap:"wrap",justifyContent:"center",alignItems:"center"},children:[k.map(n=>e.jsxs("span",{style:{display:"flex",alignItems:"center",gap:6,fontSize:13,fontWeight:600},children:[e.jsx("span",{style:{width:10,height:10,borderRadius:"50%",background:A[n],display:"inline-block"}}),B[n]," ",n===s?"← your plan":""]},n)),e.jsx("span",{style:{fontSize:12,color:"#94A3B8"},children:"— = not available for that plan"})]}),e.jsxs("div",{style:{maxWidth:1e3,margin:"0 auto",padding:"32px 16px 60px"},children:[r&&e.jsx("div",{style:{textAlign:"center",color:"#64748B",padding:60},children:"Loading add-ons…"}),u&&e.jsx("div",{style:{textAlign:"center",color:"#B91C1C",padding:40},children:u}),!r&&!u&&Object.keys(S).map(n=>e.jsxs("div",{style:{marginBottom:36},children:[e.jsx("h2",{style:{fontSize:15,fontWeight:800,color:"#0F1729",marginBottom:14,paddingBottom:8,borderBottom:"2px s
1olid #E2E8F0"},children:L[n]||n}),e.jsx("div",{style:{background:"#fff",borderRadius:12,overflow:"hidden",border:"1px solid #E2E8F0",boxShadow:"0 1px 4px rgba(0,0,0,0.04)"},children:e.jsxs("table",{style:{width:"100%",borderCollapse:"collapse"},children:[e.jsx("thead",{style:{background:"#F8FAFC"},children:e.jsxs("tr",{children:[e.jsx("th",{style:{...C,textAlign:"left",width:"36%"},children:"Add-on"}),k.map(o=>e.jsxs("th",{style:{...C,color:s===o?A[o]:"#64748B",background:s===o?`${A[o]}10`:"transparent"},children:[B[o],s===o&&e.jsx("div",{style:{fontSize:9,fontWeight:600,color:A[o],marginTop:2},children:"YOUR PLAN"})]},o)),e.jsx("th",{style:{...C,width:130},children:"Action"})]})}),e.jsx("tbody",{children:S[n].map(o=>e.jsx(O,{addon:o,userPlan:s,myService:g,ownedSlugs:b,onBuy:F},o.id))})]})})]},n)),!r&&!u&&t?.length===0&&e.jsx("div",{style:{textAlign:"center",color:"#64748B",padding:60},children:"No add-ons available right now."}),e.jsxs("div",{style:{marginTop:20,padding:"14px 20px",background:"#EFF6FF",border:"1px solid #BFDBFE",borderRadius:10,fontSize:13,color:"#1E40AF",lineHeight:1.6},children:[e.jsx("strong",{children:"Note:"})," Add-ons are billed once (setup fee) or added to your monthly total, charged immediately by card. Software licenses are issued automatically the moment payment is confirmed. If you don't have a plan yet,"," ",e.jsx(v,{to:"/pricing",style:{color:"#1D4ED8",fontWeight:700},children:"choose a plan first"}),". Questions? ",e.jsx(v,{to:"/tickets/new",style:{color:"#1D4ED8",fontWeight:700},children:"Open a support ticket"}),"."]})]}),l&&e.jsx(I,{addon:l.addon,optionValue:l.optionValue,myService:g,onClose:()=>h(null),onPaid:_})]})}export{N as default};

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.