PageSourceSearch

https://myka.ng/assets/DashboardPage-Da2GsFPX.js

js myka.ng collected 2026-10-09 22:41:19 UTC 7,972 bytes, 1 lines download raw bytes

1import{d as R,r as d,j as e,u as k}from"./vendor-react-DfYGAhtm.js";import{F as v}from"./Footer-CtC7zzvZ.js";import{m as p,g as B,D as P,Y as T,aJ as M,B as W,aK as j}from"./index-DsBgCU7r.js";import{u as C,a as L,C as O}from"./blogApi-B-tmEZPp.js";import{w as I,i as H,f as N}from"./contentfulPreview-UQGJUROZ.js";import{B as F}from"./BlogPostSummaryCard-CAmiGhT5.js";import{a as i,F as f,i as $,B as z,w as E,s as S,T as b,m as V,G,h as w}from"./vendor-ui-DA_r9yXk.js";import"./healthCategoryUi-C2_keODf.js";import"./constants-UDB7jJ0h.js";import"./verifyStateConfig-DY_95LNG.js";import{o as A,A as U,b as Y,u as K,a as q,d as Q,f as J,P as X}from"./PromoCardSkeleton-Dncq1PuK.js";import{u as Z}from"./embla-carousel-react.esm-DyMEp6Qu.js";import{I as ee}from"./InsurersMarquee-BgbwSv7H.js";import{M as oe,a as se}from"./mykaPromises-CARilZxi.js";import{DashboardProductCategories as te}from"./DashboardProductCategories-CTUtx2mZ.js";import"./travel-D23Ir66-.js";import{u as re}from"./useAnalytics-HP01GbIH.js";import"./vendor-icons-1odZwi-b.js";import"./QRCODE-C9WIFLqn.js";import"./socialLinks-W7seOJ8a.js";import"./vendor-state-BsBVN-fX.js";import"./vendor-forms-BP-7CbAP.js";import"./Tag-CjDhIpKV.js";import"./other-icon-DC1bN4dP.js";import"./savings-BJUwUGln.js";import"./routes-BR5I3bEX.js";import"./annuity-retirement-C1dZ1QHM.js";import"./health-ped-DAki1cTK.js";import"./professional-indemnity-Cx_HID73.js";import"./property-building-content-BPs_xKUv.js";import"./property-business-assets-DHEXMjWx.js";import"./property-home-content-BS-RQEdB.js";import"./savings-specialized-hA4moY7S.js";import"./savings-targeted-goals-BG697KhM.js";import"./verification_mark-CJRfnqWz.js";import"./coverageModalQuery-rAl8RmMu.js";import"./Modal-DS-VW05m.js";import"./useBreakpoint-C_7Gw8n1.js";import"./useMotorVerifyFlow-DJY-GKHO.js";import"./errors-BYKXB8DF.js";import"./KycNinModal-HYhUNMVV.js";import"./NinVerificationPanel-Cl3L-HVS.js";import"./mascot-header-BIwJJ2kn.js";import"./underwriterLogoDisplay-B0FBG3Nn.js";import"./routes-Dr23NpA-.js";import"./routes-BuiSREd6.js";import"./routes-Bvg9FlGf.js";import"./api-BEJchXjA.js";import"./lifeHospitalPlanName-CE-8E2Cm.js";import"./currency-tq8RhIEU.js";import"./termLifePlanName-CE-8E2Cm.js";import"./greeting-COgqVEJw.js";import"./routes-BwXTp1y7.js";import"./routes-sl-sVJBZ.js";import"./routes-CkGlntR3.js";import"./routes-CNOe4p0Z.js";import"./routes-jB7S3MB-.js";import"./routes-UmHx9_5t.js";import"./routes-0SZn-6GV.js";import"./routes-TkfgV80o.js";import"./routes-DM9LZteW.js";import"./routes-D6u-5hjo.js";import"./routes-D-Rb-ubu.js";import"./routes-CkWG0BpN.js";import"./routes-SlierU_8.js";const y=3,ie=12,ae=()=>{const o=R(),s=C(),{data:r,isLoading:a,isError:n,refetch:m}=L({limit:ie,skip:0},s),x=c=>{o(I(`/${P.BlogList}/${c}`,s))},h=()=>{o(I(`/${P.BlogList}`,s))},l=r?.total??0,u=d.useMemo(()=>[...r?.posts??[]].sort((c,g)=>new Date(g.updatedAt).getTime()-new Date(c.updatedAt).getTime()).slice(0,y),[r?.posts]),t=!a&&!n&&l>y;return e.jsxs(i,{mt:{base:4,md:6},children:[e.jsxs(f,{align:{base:"flex-start",sm:"center"},justify:"space-between",gap:3,mb:4,flexDir:{base:"column",sm:"row"},children:[e.jsx($,{color:p.text.primary,fontFamily:"'Baloo 2', cursive",fontSize:{base:"xl",md:"24.58px"},fontWeight:"600",lineHeight:{base:"1.2",md:"28.67px"},letterSpacing:"-1.49px",children:"Recent blog posts"}),t?e.jsx(z,{type:"button",variant:"ghost",size:"sm",colorPalette:"gray",flexShrink:0,color:p.text.orange,fontWeight:"semibold",onClick:h,children:"View more"}):null]}),a?e.jsx(E,{columns:{base:1,md:2,lg:3},gap:{base:3,md:3},children:Array.from({length:y}).map((c,g)=>e.jsxs(i,{borderRadius:"16px",overflow:"hidden",children:[e.jsx(S,{h:{base:"136px",md:"180px"},w:"100%"}),e.jsxs(i,{p:3,children:[e.jsx(S,{h:"20px",w:"90%",mb:3}),e.jsx(S,{h:"16px",w:"40%"})]})]},g))}):n?e.jsxs(i,{borderRadius:"md",border:`1px solid ${p.border.primary}`,bg:p.gray[50],p:4,children:[e.jsx(b,{color:p.text.info,fontSize:"sm",mb:3,children:"We couldn't load blog posts. Please try again."}),e.jsx(B,{buttonType:"outline",size:"sm",text:"Retry",onClick:()=>{m()}})]}):u.length===0?e.jsx(b,{color:p.text.info,fontSize:"sm",children:"No articles yet. Check back soon."}):e.jsx(E,{columns:{base:1,md:2,lg:3},gap:{base:3,md:3},children:u.map(c=>e.jsx(F,{post:c,onOpenPost:x},c.id))})]})},ne=1200,me=480,D=o=>{if(!o)return;const s=new Image;s.decoding="async",s.src=o},le=o=>{d.useEffect(()=>{if(!(!o||o.length===0))for(const s of o){D(A(s.mainBannerUrl,{width:ne}));const r=s.stories?.[0];r&&D(A(r.imageUrl,{width:me}))}},[o])},_=4e3,ce=8e3,de=({slides:o,kycApproved:s,onSlideClick:r})=>
1{const[a,n]=d.useState(0),m=d.useMemo(()=>o.findIndex(t=>t.ctaType==="nin-form"),[o]),x=d.useMemo(()=>[U({delay:s||m<0?_:t=>t.map((c,g)=>g===m?ce:_),stopOnInteraction:!1,stopOnMouseEnter:!0})],[s,m]),[h,l]=Z({loop:!0},x);d.useEffect(()=>{if(!l)return;const t=()=>n(l.selectedScrollSnap());return l.on("select",t),()=>{l.off("select",t)}},[l]);const u=d.useCallback(t=>{l?.scrollTo(t)},[l]);return e.jsx(i,{minW:0,maxW:"100%",w:"100%",children:e.jsx(i,{ref:h,overflow:"hidden",borderRadius:"2xl",w:"100%",minW:0,children:e.jsx(f,{w:"100%",minW:0,align:"stretch",children:o.map(t=>e.jsx(i,{flex:"0 0 100%",minW:0,maxW:"100%",w:"100%",children:e.jsx(Y,{slide:t,onClick:()=>r(t),dotsTotal:o.length,dotsActive:a,onDotClick:u})},t.id))})})})},pe=()=>e.jsx(f,{direction:"column",align:"stretch",justify:"flex-start",gap:{base:2,sm:4,md:5},maxW:"100%",minW:0,pr:{base:0,md:4},borderRadius:"md",px:{base:2,md:4},py:{base:0,md:4},children:e.jsx(V.div,{initial:{opacity:0,y:16},animate:{opacity:1,y:0},transition:{duration:.4,ease:[.25,.46,.45,.94]},children:e.jsxs(f,{direction:"column",align:"stretch",gap:{base:2,md:4},children:[e.jsxs(b,{as:"h1",fontSize:{base:"2.25rem",sm:"2.875rem",md:"4.25rem"},fontWeight:"semibold",lineHeight:{base:1.12,sm:1.24,md:.9},letterSpacing:"-0.05em",color:p.text.label,mb:{base:0,md:4},children:["Tomorrow is"," ",e.jsx(i,{as:"span",color:p.orange[500],children:"safe"}),e.jsx("br",{}),"with us."]}),e.jsx(b,{fontFamily:"Inter, system-ui, sans-serif",fontSize:{base:"0.9375rem",sm:"1.01rem"},fontWeight:"normal",lineHeight:{base:1.4,md:1.4},color:p.text.primary,maxW:"95%",children:"Compare, buy, and manage real insurance in minutes. Real policies. Real claims. No stress."})]})})}),ue=()=>{const o=T(),s=C(),r=o!==null,a=o?.kycApproved??!1,n=H(s),{data:m,isLoading:x}=K(s);le(m);const{handleSlideClick:h,promoModals:l}=q(),u=d.useMemo(()=>{const t=Q(m??[]),c=N(t,s,{isolate:n});return n?c:J(c,{isLoggedIn:r,kycApproved:a})},[m,r,n,a,s]);return e.jsxs(e.Fragment,{children:[e.jsxs(G,{templateColumns:{base:"1fr",md:"repeat(2, minmax(0, 1fr))"},gap:{base:3,md:4},alignItems:{base:"stretch",md:"start"},w:"100%",maxW:"100%",minW:0,children:[e.jsx(pe,{}),x?e.jsx(X,{}):u.length>0?e.jsx(de,{slides:u,kycApproved:a,onSlideClick:h},`${r}-${a}-${u.length}`):null]}),l]})},xe="dashboard-myka-promise-heading",he=()=>{const o=R();return e.jsx(i,{mt:{base:4,md:6},children:e.jsx(oe,{promises:se,ctaLabel:"How to Claim on Myka",onCtaClick:()=>o(`/${M.claims}`),headingId:xe})})},Do=()=>{const o=k(),s=C(),{track:r}=re();return d.useEffect(()=>{r(W.HOME_SCREEN_VIEWED,{})},[r]),d.useEffect(()=>{const a=`#${j}`;if(o.hash!==a)return;const n=()=>{document.getElementById(j)?.scrollIntoView({behavior:"smooth",block:"start"})};queueMicrotask(n);const m=window.setTimeout(n,150);return()=>window.clearTimeout(m)},[o.pathname,o.hash]),e.jsxs(e.Fragment,{children:[s.isPreview?e.jsx(O,{}):null,e.jsxs(w,{gap:2,align:"stretch",py:{base:4,md:6},children:[e.jsx(i,{px:{base:4,md:6,lg:8},children:e.jsx(ue,{})}),e.jsx(i,{px:{base:4,md:6,lg:8},children:e.jsxs(w,{gap:2,align:"stretch",children:[e.jsx(ee,{}),e.jsx("div",{id:j,style:{scrollMarginTop:"5.5rem"},children:e.jsx(te,{})})]})}),e.jsx(i,{px:{base:4,md:6,lg:8},children:e.jsxs(w,{gap:2,align:"stretch",children:[e.jsx(he,{}),e.jsx(ae,{})]})})]}),e.jsx(v,{})]})};export{Do 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.