1import{l as $,bn as E,u as B,x as I,c as d,o as a,k as D,b as t,t as r,d as u,G as S,p as j,g as n,f as o,b1 as U,bJ as F,F as y,s as h,bE as L,w as f,_ as c,j as _,i as w,e as N,D as P,Y as M,aq as O}from"./inertia-BhHMjE5o.js";import{_ as T}from"./WizardLayout-F5mZUCuf.js";import{_ as Y}from"./Card.vue_vue_type_script_setup_true_lang-Dp3iGZ7t.js";import{M as G}from"./mail-BlF-kzFS.js";import{L as A}from"./link-CEIIHWU0.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */const H={key:0,class:"bg-warning-50 mb-6 flex items-start gap-3 rounded-xl p-4 text-sm text-neutral-800"},q={class:"grid items-start gap-10 md:grid-cols-[1fr_400px] md:gap-14"},z={class:"mt-7"},J={class:"relative mt-2"},K={class:"flex items-center justify-between rounded-xl bg-neutral-50 px-4 py-4 text-neutral-900","aria-hidden":"true"},Q={class:"flex items-center gap-2 text-neutral-600"},R=["value"],W={class:"mt-7"},X={class:"mt-2 inline-flex rounded-full bg-neutral-50 p-1"},Z=["onClick"],ee={key:0,class:"mt-2 text-sm text-neutral-500"},te={key:1,class:"mt-3"},se={class:"mt-7 grid gap-4 md:grid-cols-2"},oe={class:"mt-6"},le={class:"gift-tile flex h-52 flex-col items-center justify-center gap-2 rounded-xl text-white"},re={class:"text-3xl font-semibold tracking-tight"},ne={class:"mt-3 space-y-2 text-neutral-700"},ae={class:"flex justify-between"},ie={class:"flex justify-between font-semibold text-neutral-900"},me={class:"text-sm leading-relaxed text-neutral-600"},de={class:"hidden md:block"},ue={class:"sticky bottom-0 -mx-8 mt-8 flex items-center justify-between gap-4 border-t border-neutral-200 bg-white px-6 py-3 md:hidden"},pe={class:"text-sm text-neutral-500"},fe={class:"text-base font-semibold text-neutral-900"},xe=$({layout:(x,p)=>E(T,{hideGiftStrip:!0},()=>p),meta:{bodyClass:"bg-white"},__name:"new.page",props:{plans:{},purchaserName:{},purchaserEmail:{},message:{}},setup(x){const p=x,k=[{value:"email",label:"Email",icon:G},{value:"link",label:"Link",icon:A}],C=p.plans.find(m=>m.months===3)??p.plans[0],s=B({plan_id:C?.id??null,purchaser_name:p.purchaserName,purchaser_email:p.purchaserEmail,door:"link",recipient_email:"",message:""}),v=I(!!s.errors.message),i=j(()=>p.plans.find(m=>m.id===s.plan_id)),b=m=>`$${(m/100).toLocaleString("en-US",{maximumFractionDigits:0})}`,g=m=>`$${(m/100).toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`,V=()=>{s.post("/gift")};return(m,e)=>(a(),d("form",{class:"w-full max-w-5xl",onSubmit:N(V,["prevent"])},[x.message?(a(),d("div",H,[e[11]||(e[11]=t("span",{"aria-hidden":"true"},"!",-1)),t("p",null,r(x.message),1)])):D("",!0),t("div",q,[t("div",null,[e[19]||(e[19]=t("h1",{class:"text-3xl font-semibold tracking-tight text-neutral-900"}," Gift a membership ",-1)),t("div",z,[e[12]||(e[12]=t("label",{for:"gift-plan",class:"text-sm font-semibold text-neutral-900"}," How long? ",-1)),t("div",J,[t("div",K,[t("span",null,r(i.value?.months)+" months of Pro",1),t("span",Q,[n(r(b(i.value?.amountCents??0))+" ",1),u(o(U),{class:"h-4 w-4 text-neutral-400"})])]),S(t("select",{id:"gift-plan","onUpdate:modelValue":e[0]||(e[0]=l=>o(s).plan_id=l),class:"absolute inset-0 h-full w-full cursor-pointer opacity-0",onChange:e[1]||(e[1]=l=>o(s).clearErrors("plan_id"))},[(a(!0),d(y,null,h(x.plans,l=>(a(),d("option",{key:l.id,value:l.id},r(l.months)+" months of Pro, "+r(b(l.amountCents)),9,R))),128))],544),[[F,o(s).plan_id]])]),u(L,{errors:o(s).errors.plan_id},null,8,["errors"])]),t("fieldset",W,[e[15]||(e[15]=t("legend",{class:"text-sm font-semibold text-neutral-900"}," How do you want to send it? ",-1)),t("div",X,[(a(),d(y,null,h(k,l=>t("button",{key:l.value,type:"button",class:P(["flex items-center gap-2 rounded-full px-5 py-2 text-sm",o(s).door===l.value?"bg-white font-medium text-neutral-900 shadow-sm":"text-neutral-500"]),onClick:ce=>o(s).door=l.value},[(a(),_(M(l.icon),{class:"h-4 w-4"})),n(" "+r(l.label),1)],10,Z)),64))]),o(s).door==="link"?(a(),d("p",ee," Anyone with the link can claim the gift. ")):(a(),d("div",te,[u(c,{modelValue:o(s).recipient_email,"onUpdate:modelValue":e[2]||(e[2]=l=>o(s).recipient_email=l),type:"email","is-error":!!o(s).errors.recipient_email,errors:o(s).errors.recipient_email,onInput:e[3]||(e[3]=l=>o(s).clearErrors("recipient_email"))},{label:f(()=>[...e[13]||(e[13]=[n("Their email",-1)])]),_:1},8,["modelValue","is-error","errors"]),e[14]||(e[14]=t("p",{class:"mt-2 text-sm text-neutral-500"}," Only this address can claim the gift. ",-1))]))]),t("div",se,[u(c,{modelValue:o(s).purchaser_name,"onUpdate:modelValue":e[4]||(e[4]=l=>o(s).purchaser_name=l),type:"text","is-error":!!o(s).errors.purchaser_name,errors:o(s).errors.purchaser_name,onInput:e[5]||(e[5]=l=>o(s).clearErrors("purchaser_name"))},{label:f(()=>[...e[16]||(e[16]=[n("Your name",-1)])]),_:1},8,["modelValue","is-error","errors"]),u(c,{modelValue:o(s).purchaser_email,"onUpdate:modelValue":e[6]||(e[6]=l=>o(s).purchaser_email=l),type:"email",autocomplete:"email","is-error":!!o(s).errors.purchaser_email,errors:o(s).errors.purchaser_email,onInput:e[7]||
1(e[7]=l=>o(s).clearErrors("purchaser_email"))},{label:f(()=>[...e[17]||(e[17]=[n("Your email, for the receipt",-1)])]),_:1},8,["modelValue","is-error","errors"])]),t("div",oe,[v.value?(a(),_(c,{key:1,modelValue:o(s).message,"onUpdate:modelValue":e[9]||(e[9]=l=>o(s).message=l),as:"textarea",rows:"4",autofocus:"","is-error":!!o(s).errors.message,errors:o(s).errors.message,onInput:e[10]||(e[10]=l=>o(s).clearErrors("message"))},{label:f(()=>[...e[18]||(e[18]=[n("Your message (optional)",-1)])]),_:1},8,["modelValue","is-error","errors"])):(a(),d("button",{key:0,type:"button",class:"text-secondary-600 hover:text-secondary-700 text-sm font-medium",onClick:e[8]||(e[8]=l=>v.value=!0)}," + Add a message "))])]),u(Y,{class:"shadow-xxl p-6 md:sticky md:top-8"},{default:f(()=>[t("div",le,[e[20]||(e[20]=t("img",{src:"/gm-logomark-white.svg",alt:"",class:"h-7 w-7 opacity-95"},null,-1)),t("div",re,r(i.value?.months)+" months of Pro ",1),e[21]||(e[21]=t("div",{class:"text-sm opacity-85"},"1:1 calls with vetted mentors",-1))]),e[26]||(e[26]=t("div",{class:"mt-6 text-lg font-semibold text-neutral-900"}," Order summary ",-1)),t("div",ne,[t("div",ae,[t("span",null,r(i.value?.months)+" months of Pro",1),t("span",null,r(g(i.value?.amountCents??0)),1)]),e[23]||(e[23]=t("div",{class:"flex justify-between"},[t("span",null,"Estimated tax"),t("span",null,"$0.00")],-1)),t("div",ie,[e[22]||(e[22]=t("span",null,"Estimated total",-1)),t("span",null,r(g(i.value?.amountCents??0)),1)])]),e[27]||(e[27]=t("hr",{class:"my-4 border-neutral-200"},null,-1)),t("p",me," One payment, nothing renews. If nobody claims the gift within 30 days, you get an automatic refund. The membership runs "+r(i.value?.months)+" months from the day they claim it. ",1),t("div",de,[u(w,{color:"purple",type:"submit",class:"mt-5 w-full","is-disabled":o(s).processing},{default:f(()=>[...e[24]||(e[24]=[n(" Continue to checkout ",-1)])]),_:1},8,["is-disabled"]),e[25]||(e[25]=t("p",{class:"mt-3 text-center text-xs text-neutral-500"},[n(" By clicking continue, you agree to "),t("a",{href:"/terms-of-service",target:"_blank",class:"underline"},"these terms"),n(". ")],-1))])]),_:1})]),t("div",ue,[t("div",pe,[e[28]||(e[28]=n(" Total ",-1)),t("div",fe,r(g(i.value?.amountCents??0)),1)]),u(w,{color:"purple",type:"submit",class:"flex-1","is-disabled":o(s).processing},{default:f(()=>[...e[29]||(e[29]=[n(" Continue to checkout ",-1)])]),_:1},8,["is-disabled"])])],32))}}),$e=O(xe,[["__scopeId","data-v-793f942e"]]);export{$e as default}; 2//# sourceMappingURL=new.page-DOT0yRkL.js.map
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.