PageSourceSearch

https://myka.ng/assets/PlanPage-BaDq486b.js

js myka.ng collected 2026-10-09 22:42:23 UTC 17,145 bytes, 1 lines download raw bytes

1import{j as e,r as A,d as te,u as oe,N as ie}from"./vendor-react-DfYGAhtm.js";import{m as g,g as X,t as q,D as ne}from"./index-DsBgCU7r.js";import{D as re}from"./DatePickerField-CClDGS0S.js";import{a_ as ae,aM as se,a$ as le,b0 as ce,b1 as pe,P as de,b2 as xe,aF as ue}from"./vendor-icons-1odZwi-b.js";import{M as me}from"./Modal-DS-VW05m.js";import{E as i,a as l,b as C,c as Y,d as ge,e as be,f as he,g as fe,h as ye}from"./EducationCardShell-CWM2CwNG.js";import{a as x,T as a,H as _,F as h,v as M,o as je,t as Se,G as ve}from"./vendor-ui-DA_r9yXk.js";import{m as Ce,r as U,g as P,a as we,b as Ee,c as Fe,d as He,e as Ae,f as I,h as De,i as Be,j as We,k as Oe,l as $,n as ke,o as ze,p as Te}from"./educationFlow-DDSnkTTP.js";import"./vendor-forms-BP-7CbAP.js";import{g as Pe}from"./errors-BYKXB8DF.js";import{a as Ne}from"./educationPolicyApi-BFZ7uOa_.js";import{E as Ie}from"./routes-CkGlntR3.js";import"./LinkPaymentMethodOption-CuZHpNDU.js";import"./vendor-state-BsBVN-fX.js";import"./DropdownPopover-KjBTPKBF.js";import"./checkoutSessionStore-BRM5sYZN.js";const Ye="—",_e="₦500,000",Me=({underwriter:o})=>o.trim().toUpperCase().includes("LEADWAY")?_e:Ye,Re={icon:ae,bg:g.gray[100],fg:g.navy[500]},Le=[{match:/pay(ment)?s?\b|premium|cost/i,accent:{icon:se,bg:g.orange[50],fg:g.orange[500]}},{match:/earn|interest|growth|return/i,accent:{icon:le,bg:i.successBg,fg:i.successGreen}},{match:/family|payout|claim|benefit|cover/i,accent:{icon:ce,bg:i.riderPanelBg,fg:g.navy[400]}},{match:/commit|rule|term|policy/i,accent:{icon:pe,bg:g.slate[50],fg:g.navy[500]}}],qe=o=>Le.find(({match:r})=>r.test(o))?.accent??Re,N=({label:o,value:r})=>e.jsxs(x,{bg:"rgba(255, 255, 255, 0.12)",border:"1px solid",borderColor:"rgba(255, 255, 255, 0.16)",borderRadius:"12px",px:"12px",py:"8px",children:[e.jsx(a,{fontFamily:l,fontSize:"10px",fontWeight:"semibold",lineHeight:"15px",letterSpacing:"0.8px",textTransform:"uppercase",color:"rgba(255, 255, 255, 0.6)",whiteSpace:"nowrap",children:o}),e.jsx(a,{pt:"2px",fontFamily:l,fontSize:"13px",fontWeight:"bold",lineHeight:"19.5px",color:"white",whiteSpace:"nowrap",children:r})]}),Ue=({open:o,onClose:r,plan:t,fromPremium:s,onSelect:p})=>e.jsxs(me,{open:o,onClose:r,size:"md",maxW:"600px",mobileBottomSheet:!0,scrollBehavior:"inside",bodyPadded:!1,contentProps:{borderRadius:{base:"24px 24px 0 0",md:"28px"},overflow:"hidden"},children:[e.jsxs(x,{px:{base:"24px",md:"28px"},pt:{base:"24px",md:"28px"},pb:"22px",pr:"64px",background:i.summaryHeroGradient,children:[t?.underwriter?e.jsxs(a,{pb:"8px",fontFamily:l,fontSize:"11px",fontWeight:"semibold",lineHeight:"16.5px",letterSpacing:"0.9px",textTransform:"uppercase",color:"rgba(255, 255, 255, 0.6)",children:["Powered by ",t.underwriter]}):null,e.jsx(a,{as:"h2",fontFamily:C,fontWeight:"600",fontSize:{base:"22px",md:"26px"},lineHeight:"32px",letterSpacing:"-0.6px",color:"white",children:t?.name??"What is covered"}),t?.description?e.jsx(a,{pt:"6px",fontFamily:l,fontSize:"13px",lineHeight:"20px",color:"rgba(255, 255, 255, 0.75)",children:t.description}):null,t?e.jsxs(_,{gap:"8px",pt:"18px",wrap:"wrap",children:[t.estimatedReturn?e.jsx(N,{label:"Est. return",value:t.estimatedReturn}):null,e.jsx(N,{label:"Term",value:t.durationLabel}),s?e.jsx(N,{label:"From",value:s}):null]}):null]}),e.jsx(x,{bg:"#F8FAFD",maxH:{base:"44dvh",md:"48vh"},overflowY:"auto",px:{base:"16px",md:"20px"},py:"16px",children:e.jsxs(h,{direction:"column",gap:"12px",children:[t?.coverageGroups.map(d=>{const c=qe(d.title);return e.jsxs(x,{bg:"white",border:"1px solid",borderColor:i.tileBorder,borderRadius:"18px",px:{base:"16px",md:"18px"},py:"16px",children:[e.jsxs(h,{align:"center",gap:"10px",children:[e.jsx(h,{boxSize:"32px",flexShrink:0,align:"center",justify:"center",borderRadius:"10px",bg:c.bg,children:e.jsx(M,{as:c.icon,boxSize:"17px",color:c.fg})}),e.jsx(a,{fontFamily:l,fontSize:"11px",fontWeight:"bold",lineHeight:"16.5px",letterSpacing:"0.8px",textTransform:"uppercase",color:i.muted,children:d.title})]}),e.jsx(h,{direction:"column",pt:"12px",children:d.items.map((n,f)=>e.jsxs(x,{...f>0&&{mt:"12px",pt:"12px",borderTop:"1px solid",borderColor:i.tileBorder},children:[e.jsx(a,{fontFamily:l,fontSize:"14px",fontWeight:"semibold",lineHeight:"21px",color:g.navy[500],children:n.name}),n.description?e.jsx(a,{pt:"4px",fontFamily:l,fontSize:"13px",lineHeight:"20.5px",color:g.text.tertiary,children:n.description}):null]},n.name))})]},d.title)}),t&&t.coverageGroups.length===0?e.jsx(a,{py:"24px",textAlign:"center",fontFamily:l,fontSize:"14px",lineHeight:"21px",color:i.muted,children:"Coverage details for this plan are not available yet."}):null]})}),t&&p?e.jsx(x,{px:{base:"20px",md:"24px"},py:"16px",bg:"white",borderTop:"1px solid",borderColor:i.tileBorder,children:e.jsx(X,{buttonType:"primary",type:"button",text:"Select This Plan",size:"lg",h:"48px",fullWidth:!0,borderRadius:"full",fontFamily:l,fontSize:"14px",fontWeight:"medium",letterSpacing:"-0.9px",onClick:()=>p(t)})}):null]}),$e=({message:o})=>
1e.jsxs(h,{align:"flex-start",gap:"12px",bg:i.noticeBg,border:"1px solid",borderColor:i.noticeBorder,borderRadius:"16px",p:{base:"12px",md:"16px"},minW:0,w:"100%",children:[e.jsx(M,{as:de,boxSize:"18px",mt:"2px",flexShrink:0,color:i.orangeMain}),e.jsx(a,{fontFamily:C,fontSize:{base:"12px",md:"13px"},fontWeight:"500",lineHeight:"19.5px",color:i.orangeMain,minW:0,flex:"1",wordBreak:"break-word",children:o})]}),Ve="/assets/card-edu-BrQjTfKf.jpeg",V=({label:o,value:r,caption:t,align:s,valueSize:p={base:"22px",md:"28px"},valueLineHeight:d={base:"30px",md:"42px"}})=>e.jsxs(h,{direction:"column",align:s,minW:0,flex:"1",children:[e.jsx(a,{fontFamily:l,fontSize:{base:"10px",md:"11px"},fontWeight:"semibold",lineHeight:"16.5px",letterSpacing:{base:"0.6px",md:"1.1px"},textTransform:"uppercase",color:"white",children:o}),e.jsx(a,{pt:"4px",fontFamily:C,fontWeight:"600",fontSize:p,lineHeight:d,color:"white",wordBreak:"break-word",children:r}),t?e.jsx(a,{pt:"2px",fontFamily:l,fontSize:{base:"11px",md:"12px"},lineHeight:"16.5px",color:"white",children:t}):null]}),G=({label:o,value:r,align:t})=>e.jsxs(h,{direction:"column",align:t,minW:0,flex:"1",children:[e.jsx(a,{fontFamily:l,fontSize:{base:"10px",md:"11px"},lineHeight:"16.5px",color:"white",children:o}),e.jsx(a,{pt:"4px",fontFamily:l,fontSize:t==="flex-end"?{base:"13px",md:"14px"}:{base:"14px",md:"16px"},fontWeight:t==="flex-end"?"medium":"semibold",lineHeight:t==="flex-end"?"21px":"24px",color:"white",wordBreak:"break-word",children:r})]}),Ge=({maturityPayout:o,lifeCoverAmount:r,premiumLabel:t,premiumValue:s,underwriter:p})=>e.jsxs(x,{position:"relative",overflow:"hidden",w:"100%",maxW:"100%",minH:{base:"168px",md:"198px"},borderRadius:{base:"20px",md:"24px"},border:"1px solid",borderColor:"#F0F2F5",backgroundImage:`url(${Ve})`,backgroundSize:"cover",backgroundPosition:"center",children:[e.jsx(x,{position:"absolute",inset:0,bg:"rgba(31, 54, 95, 0.5)",pointerEvents:"none"}),e.jsxs(x,{position:"relative",p:{base:"16px",md:"24px"},minW:0,children:[e.jsxs(h,{align:"flex-start",justify:"space-between",gap:{base:"8px",md:"16px"},minW:0,w:"100%",children:[e.jsx(V,{label:"Est. maturity payout",value:o,caption:"Paid back to you",align:"flex-start"}),e.jsx(V,{label:"Life cover included",value:r,caption:"Paid to their family",align:"flex-end"})]}),e.jsxs(h,{align:"flex-end",justify:"space-between",gap:{base:"8px",md:"16px"},mt:{base:"16px",md:"24px"},pt:{base:"12px",md:"16px"},borderTop:"1px solid",borderColor:"#F0F2F5",minW:0,w:"100%",children:[e.jsx(G,{label:t,value:s,align:"flex-start"}),e.jsx(G,{label:"Powered by",value:p,align:"flex-end"})]})]})]}),Ke="data:image/svg+xml,%3csvg%20preserveAspectRatio='none'%20overflow='visible'%20style='display:%20block;'%20width='12'%20height='12'%20viewBox='0%200%2012%2012'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cg%20id='Icon'%20clip-path='url(%23clip0_0_12)'%3e%3cpath%20id='Vector'%20d='M6%2011C8.76142%2011%2011%208.76142%2011%206C11%203.23858%208.76142%201%206%201C3.23858%201%201%203.23858%201%206C1%208.76142%203.23858%2011%206%2011Z'%20stroke='%2304802E'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_2'%20d='M6%208V6'%20stroke='%2304802E'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3cpath%20id='Vector_3'%20d='M6%204H6.005'%20stroke='%2304802E'%20stroke-linecap='round'%20stroke-linejoin='round'/%3e%3c/g%3e%3cdefs%3e%3cclipPath%20id='clip0_0_12'%3e%3crect%20width='12'%20height='12'%20fill='white'/%3e%3c/clipPath%3e%3c/defs%3e%3c/svg%3e",Qe=({onClick:o,variant:r="outline",label:t="What is covered"})=>{const s=r==="soft";return e.jsx(Y,{type:"button",onClick:o,bg:s?i.coveredBadgeBg:"white",border:"1px solid",borderColor:i.coveredBadgeBorder,borderRadius:"full",px:s?"7px":"12px",py:s?"2px":"4px",cursor:o?"pointer":"default",_hover:{opacity:o?.85:1},children:e.jsxs(_,{gap:"6px",children:[e.jsx(je,{src:Ke,alt:"","aria-hidden":!0,boxSize:"12px"}),e.jsx(a,{fontFamily:C,fontSize:"11px",fontWeight:"600",lineHeight:"16.5px",color:i.coveredBadgeText,whiteSpace:"nowrap",children:t})]})})},Xe=({options:o,value:r,onChange:t,variant:s="outline"})=>e.jsx(_,{gap:"8px",align:"stretch",w:"100%",maxW:"100%",flexWrap:"wrap",children:o.map(p=>{const d=p.value===r,c=p.isDisabled??!1,n=s==="solid"?{bg:i.riderActiveBg,borderColor:i.riderActiveBg,color:"white",boxShadow:"inset 0px 4px 4px 0px rgba(255, 255, 255, 0.25)"}:{bg:"white",borderColor:i.orangeMain,color:i.orangeMain,boxShadow:"0px 1px 1.5px rgba(0, 0, 0, 0.1), 0px 1px 1px rgba(0, 0, 0, 0.1)"},f={bg:"white",borderColor:i.tileBorder,color:g.text.tertiary,boxShadow:void 0},b=d?n:f;return e.jsx(Y,{type:"button",disabled:c,"aria-pressed":d,onClick:()=>{c||t(p.value)},flex:{base:"1 1 calc(50% - 8px)",sm:"1 1 auto"},minW:{base:"calc(50% - 8px)",sm:"0"}
1,maxW:{base:"calc(50% - 4px)",sm:"none"},px:{base:"10px",md:"16px"},py:s==="solid"?"11px":"13px",border:"1px solid",borderRadius:"full",opacity:c?.45:1,cursor:c?"not-allowed":"pointer",transition:"border-color 0.15s ease, background-color 0.15s ease",...b,children:e.jsx(a,{fontFamily:l,fontSize:{base:"12px",md:"14px"},fontWeight:"medium",lineHeight:"21px",textAlign:"center",whiteSpace:"nowrap",color:"inherit",children:p.label})},p.value)})}),K=({icon:o,label:r,isDisabled:t,onClick:s})=>e.jsx(Y,{type:"button","aria-label":r,disabled:t,onClick:s,display:"flex",alignItems:"center",justifyContent:"center",boxSize:"44px",flexShrink:0,borderRadius:"12px",bg:i.stepperButtonBg,opacity:t?.4:1,cursor:t?"not-allowed":"pointer",transition:"background-color 0.15s ease",_hover:{bg:t?i.stepperButtonBg:i.toggleBorder},children:e.jsx(M,{as:o,boxSize:"16px",color:g.text.tertiary})}),Q=({value:o,onChange:r,min:t,max:s,step:p=1,unit:d,formatValue:c,label:n,isEditable:f=!1})=>{const[b,w]=A.useState(null),j=u=>{const m=Math.max(t,u);return s!=null?Math.min(s,m):m},S=c?c(o):`${o} ${o===1?d:`${d}s`}`,W=b===""?"":c?c(Number(b)):b??"",E=u=>{const m=u.replace(/\D/g,"");w(m),m!==""&&r(Number(m))},O=()=>{const u=Number(b),m=b===""||!Number.isFinite(u)?o:u;w(null),r(j(m))};return e.jsxs(h,{align:"center",justify:"space-between",gap:"12px",p:"8px",bg:"white",border:"1px solid",borderColor:i.tileBorder,borderRadius:"16px",role:"group","aria-label":n,children:[e.jsx(K,{icon:xe,label:`Decrease ${n}`,isDisabled:o<=t,onClick:()=>r(j(o-p))}),f?e.jsx(Se.input,{"aria-label":n,inputMode:"numeric",value:b===null?S:W,onFocus:()=>w(String(o)),onChange:u=>E(u.target.value),onBlur:O,onKeyDown:u=>{u.key==="Enter"&&u.currentTarget.blur()},flex:"1",minW:0,bg:"transparent",border:"none",outline:"none",fontFamily:C,fontWeight:"600",fontSize:"20px",lineHeight:"30px",textAlign:"center",color:g.text.tertiary,_focusVisible:{outline:"none"}}):e.jsx(a,{"aria-live":"polite",fontFamily:C,fontWeight:"600",fontSize:"20px",lineHeight:"30px",textAlign:"center",color:g.text.tertiary,children:S}),e.jsx(K,{icon:ue,label:`Increase ${n}`,isDisabled:s!=null&&o>=s,onClick:()=>r(j(o+p))})]})},Ze=()=>{const o=te(),{state:r}
1=oe(),{createEducationPolicy:t,isLoading:s}=Ne(),p=r,d=p?.goal,c=p?.providerPlan,n=A.useMemo(()=>c?Ce(c):null,[c]),[f,b]=A.useState(()=>n?U(n,d?.frequency):"MONTHLY"),[w,j]=A.useState(()=>n?we({minContribution:Ee(n,U(n,d?.frequency)),goalAmount:d?.contributionAmount}):P(null,"MONTHLY").minContribution),[S,W]=A.useState(()=>Fe({minDurationYears:n?.termYears??P(n,f).minDurationYears,goalDuration:d?.durationYears})),[E,O]=A.useState(d?.dateOfBirth??""),[u,m]=A.useState(!1);if(!n||!c)return{status:"redirect"};const F=He(n,f),v=P(n,F),H=v.minContribution,D=Math.max(w,H),{maturityValue:z}=Ae(n,{amount:D,frequency:F,durationYears:S}),k=ge[F],T=()=>{if(!E.trim()){q.error("Please enter your date of birth to continue.");return}const B={contributionAmount:D,frequency:F,durationYears:S,dateOfBirth:E};t(Te({plan:n,goal:B}),{onSuccess:y=>{o(`/${Ie.Details}`,{state:{goal:B,providerPlan:c,policy:y.data}})},onError:y=>{q.error(Pe(y)??"We could not start your education application. Please try again.")}})};return{status:"ready",plan:n,dateOfBirth:E,setDateOfBirth:O,isCoverageOpen:u,openCoverage:()=>m(!0),closeCoverage:()=>m(!1),activeFrequency:F,setFrequency:B=>{const y=B;n.supportedFrequencies.includes(y)&&(b(y),j(ze(n,y)))},frequencyOptions:ke(n),activeContribution:D,setContributionAmount:j,durationYears:S,setDurationYears:W,minContribution:H,minDurationYears:v.minDurationYears,minAgeYears:v.minAgeYears,maxAgeYears:v.maxAgeYears,dobMinDate:$(v.maxAgeYears),dobMaxDate:$(v.minAgeYears),frequencyLabel:k,contributionHint:Oe({minContribution:H,frequencyLabel:k}),durationHint:We(n),interestNotice:Be(n),maturityPayout:De(z),lifeCoverAmount:Me({underwriter:n.underwriter}),premiumValue:I(D),coverageFromLabel:H>0?`${I(H)} / ${k}`:void 0,isSubmitting:s,continueToDetails:T,goBack:()=>o(-1)}},gt=()=>{const o=Ze();if(o.status==="redirect")return e.jsx(ie,{to:`/${ne.Overview}`,replace:!0});const{plan:r,dateOfBirth:t,setDateOfBirth:s,isCoverageOpen:p,openCoverage:d,closeCoverage:c,activeFrequency:n,setFrequency:f,frequencyOptions:b,activeContribution:w,setContributionAmount:j,durationYears:S,setDurationYears:W,minContribution:E,minDurationYears:O,minAgeYears:u,maxAgeYears:m,dobMinDate:F,dobMaxDate:v,frequencyLabel:H,contributionHint:D,durationHint:z,interestNotice:k,maturityPayout:T,lifeCoverAmount:B,premiumValue:y,coverageFromLabel:R,isSubmitting:L,continueToDetails:Z,goBack:J}=o;return e.jsxs(be,{variant:"surface",onBack:J,children:[e.jsxs(h,{align:"flex-start",justify:"space-between",gap:"12px",pb:"8px",minW:0,w:"100%",flexWrap:"wrap",children:[e.jsx(a,{as:"h1",fontFamily:C,fontWeight:"600",fontSize:{base:"22px",md:"28px"},lineHeight:{base:"30px",md:"35px"},color:i.titleNavy,flex:"1",minW:0,children:r.name}),e.jsx(Qe,{onClick:d})]}),e.jsx(a,{pb:"24px",fontFamily:l,fontSize:"15px",lineHeight:"24.375px",color:i.steelSlate,children:r.description}),e.jsx(x,{pb:"16px",children:e.jsx(Ge,{maturityPayout:T,lifeCoverAmount:B,premiumLabel:`${H} Premium`,premiumValue:y,underwriter:r.underwriter})}),e.jsx(x,{pb:"24px",children:e.jsx($e,{message:k})}),e.jsxs(x,{children:[e.jsx(a,{fontFamily:l,fontSize:"14px",fontWeight:"medium",lineHeight:"21px",color:i.steelSlate,children:"How often do you want to save?"}),e.jsx(x,{pt:"12px",children:e.jsx(Xe,{variant:"solid",options:b,value:n,onChange:f})})]}),e.jsxs(x,{pt:"24px",children:[e.jsx(a,{as:"h2",fontFamily:C,fontWeight:"600",fontSize:"18px",lineHeight:"27px",color:i.steelSlate,children:"Eligibility check"}),e.jsxs(x,{pt:"12px",children:[e.jsx(a,{pb:"6px",fontFamily:l,fontSize:"13px",fontWeight:"medium",lineHeight:"19.5px",letterSpacing:"-0.13px",color:i.steelSlate,children:"Select customer's date of birth"}),e.jsx(re,{value:t,onChange:s,placeholder:"DD-MM-YYYY",iconPosition:"right",borderRadius:"48px",borderColor:i.inputBorder,minDate:F,maxDate:v}),e.jsxs(a,{pt:"8px",fontFamily:l,fontStyle:"italic",fontSize:"12px",lineHeight:"18px",color:i.muted,children:["* You should be between ",u," to ",m," years of age."]})]})]}),e.jsxs(ve,{templateColumns:{base:"1fr",sm:"1fr 1fr"},gap:"16px",pt:"24px",children:[e.jsxs(x,{children:[e.jsx(a,{fontFamily:l,fontSize:"14px",fontWeight:"semibold",lineHeight:"21px",color:i.steelSlate,children:"How much to save?"}),e.jsx(x,{pt:"12px",children:e.jsx(Q,{value:w,onChange:j,min:E,max:fe,step:he,formatValue:I,isEditable:!0,label:"contribution amount"})}),e.jsx(a,{pt:"8px",fontFamily:l,fontSize:"11px",lineHeight:"16.5px",color:i.muted,children:D})]}),e.jsxs(x,{children:[e.jsx(a,{fontFamily:l,fontSize:"14px",fontWeight:"semibold",lineHeight:"21px",color:i.steelSlate,children:"Plan Duration"}),e.jsx(x,{pt:"12px",children:e.jsx(Q,{value:S,onChange:W,min:O,max:ye,formatValue:ee=>`${ee} yrs`,label:"plan duration"})}),z?e.jsx(a,{pt:"8px",fontFamily:l,fontSize:"11px",lineHeight:"16.5px",color:i.muted,children:z}):null]})]}),e.jsx(x,{pt:"32px",children:e.jsx(X,{buttonType:"primary",type:"button",text:"Continue",size:"lg",h:"48px",fullWidth:!0,borderRadius:"full",fontFamily:l,fontSize:"14px",fontWeight:"medium",letterSpacing:"-0.9px",disabled:!t.trim()||L,loading:L,onClick:Z})}),e.jsx(Ue,{open:p,onClose:c,plan:r,...R?{fromPremium:R}:{}})]})};export{gt 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.