PageSourceSearch

https://myka.ng/assets/HelpSupportPage-BoIKBIzg.js

js myka.ng collected 2026-10-09 22:41:29 UTC 14,285 bytes, 3 lines download raw bytes

1import{j as e,r as S,p as U}from"./vendor-react-DfYGAhtm.js";import{u as V,m as r,t as P,F as N,M as O,b as F,a as D,c as q,d as B,o as G,A as W}from"./index-DsBgCU7r.js";import{r as Y,L as A,a as K,q as k,f as Q,v as X,w as J}from"./vendor-icons-1odZwi-b.js";import{a as c,o as v,F as p,v as m,V as _,T as d,I as z,i as L,w as Z,x as R,h as ee}from"./vendor-ui-DA_r9yXk.js";import{h as re,w as te,c as oe,r as se}from"./whatsApp_support-lj6uqflA.js";import{h as ie}from"./vendor-state-BsBVN-fX.js";import"./vendor-forms-BP-7CbAP.js";const ne=async o=>{try{const{data:t}=await V.post("/api/v1/reports/bug",o);return t.data}catch(t){const s=t;throw s.response?.data?.message??s.message}},ae=()=>{const{mutateAsync:o,isPending:t}=ie({mutationFn:ne});return{reportIssueAsync:o,isSubmitting:t}},M=["image/jpeg","image/png"],le=new Set(M),ce=M.join(","),$=o=>le.has(o.type),pe=({file:o,onRemove:t})=>{const s=URL.createObjectURL(o);return e.jsxs(c,{position:"relative",w:"72px",h:"72px",flexShrink:0,children:[e.jsx(v,{src:s,w:"72px",h:"72px",objectFit:"cover",borderRadius:"lg",border:`1px solid ${r.border.primary}`,alt:o.name}),e.jsx(p,{position:"absolute",top:"-6px",right:"-6px",w:5,h:5,borderRadius:"full",bg:r.orange[500],align:"center",justify:"center",cursor:"pointer",onClick:t,_hover:{bg:r.orange[600]},children:e.jsx(m,{as:Y,boxSize:3,color:"white"})})]})},de=({files:o,onAdd:t,onRemove:s})=>{const i=S.useRef(null),u=x=>{const l=Array.from(x.target.files??[]),h=l.filter(w=>$(w));l.length-h.length>0&&P.error("Only JPEG or PNG images can be attached."),h.length>0&&t(h),x.target.value=""};return e.jsxs(c,{children:[e.jsx("input",{ref:i,type:"file",accept:ce,multiple:!0,style:{display:"none"},onChange:u}),o.length>0?e.jsx(c,{border:`1px solid ${r.border.primary}`,borderRadius:"xl",bg:"white",p:3,children:e.jsxs(p,{gap:3,wrap:"wrap",align:"center",children:[o.map((x,l)=>e.jsx(pe,{file:x,onRemove:()=>s(l)},`${x.name}-${l}`)),e.jsx(p,{w:"72px",h:"72px",borderRadius:"lg",border:`1.5px dashed ${r.orange[300]}`,bg:r.orange[50],align:"center",justify:"center",cursor:"pointer",flexShrink:0,onClick:()=>i.current?.click(),_hover:{bg:r.orange[100]},children:e.jsx(m,{as:A,boxSize:5,color:r.orange[500]})})]})}):e.jsxs(p,{direction:"column",align:"center",justify:"center",gap:2,p:6,border:`1.5px dashed ${r.orange[200]}`,borderRadius:"xl",bg:r.orange[50],cursor:"pointer",_hover:{bg:r.orange[100]},onClick:()=>i.current?.click(),children:[e.jsx(p,{w:12,h:12,borderRadius:"full",bg:r.orange[100],align:"center",justify:"center",children:e.jsx(m,{as:A,boxSize:5,color:r.orange[500]})}),e.jsxs(_,{gap:.5,children:[e.jsx(d,{fontSize:"sm",fontWeight:"semibold",color:r.orange[600],children:"Photo Evidence of Issue"}),e.jsx(d,{fontSize:"xs",color:r.text.info,children:"JPEG or PNG screenshots only"})]})]})]})},ue=({question:o,answer:t,isOpen:s,onToggle:i})=>e.jsxs(c,{border:`1px solid ${r.border.primary}`,borderRadius:"xl",overflow:"hidden",transition:"all 0.15s",children:[e.jsxs(p,{align:"center",justify:"space-between",px:5,py:4,cursor:"pointer",onClick:i,bg:s?r.orange[50]:"white",_hover:{bg:s?r.orange[50]:r.gray[50]},transition:"background 0.15s",children:[e.jsx(d,{fontSize:"sm",fontWeight:s?"semibold":"medium",color:s?r.orange[600]:r.text.primary,children:o}),e.jsx(m,{as:K,boxSize:4,color:s?r.orange[500]:r.text.gray,transform:s?"rotate(180deg)":"rotate(0deg)",transition:"transform 0.2s",flexShrink:0,ml:3})]}),s&&e.jsx(c,{px:5,py:4,bg:"white",borderTop:`1px solid ${r.border.primary}`,children:e.jsx(d,{fontSize:"sm",color:r.text.gray,lineHeight:"1.7",children:t})})]}),he=({onBack:o})=>{const[t,s]=S.useState(null),[i,u]=S.useState(""),x=N.filter(h=>h.question.toLowerCase().includes(i.toLowerCase())),l=h=>s(g=>g===h?null:h);return e.jsxs(_,{align:"stretch",gap:4,children:[e.jsxs(p,{align:"center",gap:3,children:[e.jsx(p,{align:"center",justify:"center",w:8,h:8,borderRadius:"full",border:`1px solid ${r.border.primary}`,bg:"white",cursor:"pointer",onClick:o,flexShrink:0,_hover:{bg:r.gray[50]},children:e.jsx(m,{as:k,boxSize:4,color:r.text.primary})}),e.jsxs(c,{children:[e.jsx(d,{fontWeight:"semibold",fontSize:"md",color:r.text.primary,children:"FAQs and Guides"}),e.jsx(d,{fontSize:"xs",color:r.text.gray,children:"Get help, report issues, or contact our support team"})]})]}),e.jsxs(p,{align:"center",gap:2,border:`1px solid ${r.border.primary}`,borderRadius:"xl",px:4,py:3,bg:"white",children:[e.jsx(m,{as:Q,boxSize:4,color:r.text.gray,flexShrink:0}),e.jsx(z,{value:i,onChange:h=>u(h.target.value),placeholder:"Search FAQ",variant:"subtle",bg:"transparent",border:"none",outline:"none",boxShadow:"none",_focus:{border:"none",outline:"none",boxShadow:"none"},fontSize:"sm",color:r.text.primary,_placeholder:{color:r.text.gray}})]}),e.jsx(_,{gap:2,align:"stretch",children:x.length>0?x.map((h,g)=>e.jsx(ue,{question:h.question,answer:h.answer,isOpen:t===g,onToggle:()=>l(g)},h.question)):e.jsxs(d,{fontSize:"sm",color:r.text.gray,textAlign:"center",py:6,children:['No results found for "',i,'"']})})]})},j=({label:o,required:t})=>e.jsxs(p,{align:"center",gap:1,mb:2,children:[e.jsx(d,{fontSize:"sm",fontWeight:"medium",color:r.text.primary,children:o}),t&&e.jsx(d,{fontSize:"sm",color:r.orange[500],lineHeight:"1",children:"*"})]}),xe=({imgSrc:o,title:t,subtitle:s,onClick:i})=>e.jsxs(p,{direction:"column",align:"center",justify:"center",gap:2,p:{base:4,md:5},bg:r.white.DEFAULT,borderRadius:"xl",border:`1px solid ${r.border.primary}`,cursor:"pointer",transition:"all 0.15s",_hover:{bg:r.gray[50],borderColor:r.orange[200]},onClick:i,textAlign:"center",minH:"120px",children:[e.jsx(v,{src:o,w:12,h:12,objectFit:"contain",alt:t}),e.jsxs(_,{gap:1,py:2,children:[e.jsx(L,{fontSize:"md",fontWeight:"semibold",color:r.text.primary,children:t}),e.jsx(d,{fontSize:"sm",color:r.text.info,children:s})]})]}),ge=({onNavigate:o})=>{const t="0911 111 5000",s="[email protected]",i=`tel:${t.replace(/\s/g,"")}`,u=`mailto:${s}`,x=[{imgSrc:re,title:"Help Center",subtitle:"Browse FAQs and guides",onClick:()=>o("faqs")},{imgSrc:te,title:"WhatsApp Agent",subtitle:"Chat with Myka on WhatsApp",onClick:()=>{window.open(F(),"_blank","noopener,noreferrer")}},{imgSrc:oe,title:"Contact Support",subtitle:"Call or email our team",onClick:()=>{window.location.href=`tel:${t.replace(/\s/g,"")}`}}
1,{imgSrc:se,title:"Report a Problem",subtitle:"Let us know about an issue",onClick:()=>o("report")}];return e.jsxs(e.Fragment,{children:[e.jsx(Z,{columns:{base:1,sm:2},gap:4,mb:5,children:x.map(l=>e.jsx(xe,{imgSrc:l.imgSrc,title:l.title,subtitle:l.subtitle,onClick:l.onClick},l.title))}),e.jsxs(p,{align:"center",justify:"flex-start",gap:{base:3,md:6},pt:4,px:{base:3,md:6},borderTop:`1px solid ${r.border.primary}`,wrap:"wrap",children:[e.jsx("a",{href:i,style:{textDecoration:"none",color:"inherit"},children:e.jsxs(p,{align:"center",gap:1.5,color:r.text.info,cursor:"pointer",children:[e.jsx(m,{as:X,boxSize:3.5}),e.jsx(d,{fontSize:"xs",children:O})]})}),e.jsx("a",{href:u,style:{textDecoration:"none",color:"inherit"},children:e.jsxs(p,{align:"center",gap:1.5,color:r.text.info,cursor:"pointer",children:[e.jsx(m,{as:J,boxSize:3.5}),e.jsx(d,{fontSize:"xs",children:s})]})}),e.jsx(d,{fontSize:"xs",color:r.text.info,children:"Available 24/7"})]})]})},I=({options:o,value:t,onChange:s})=>e.jsx(p,{gap:2,wrap:"wrap",children:o.map(i=>{const u=t===i;return e.jsx(c,{as:"button",px:4,py:2,borderRadius:"full",border:`1.5px solid ${u?r.orange[500]:r.border.primary}`,bg:u?r.orange[50]:"white",color:u?r.orange[600]:r.text.primary,fontWeight:u?"semibold":"medium",fontSize:"sm",cursor:"pointer",transition:"all 0.15s",_hover:{borderColor:r.orange[300],bg:r.orange[25]},onClick:()=>s(i),children:i},i)})}),me=o=>/tablet|ipad/i.test(o)?"Tablet":/mobile|android|iphone/i.test(o)?"Mobile":"Desktop",be=o=>/windows nt ([\d.]+)/i.test(o)?`Windows ${o.match(/windows nt ([\d.]+)/i)?.[1]??""}`:/mac os x ([\d_]+)/i.test(o)?`macOS ${o.match(/mac os x ([\d_]+)/i)?.[1]?.replace(/_/g,".")??""}`:/android ([\d.]+)/i.test(o)?`Android ${o.match(/android ([\d.]+)/i)?.[1]??""}`:/iphone os ([\d_]+)/i.test(o)?`iOS ${o.match(/iphone os ([\d_]+)/i)?.[1]?.replace(/_/g,".")??""}`:/linux/i.test(o)?"Linux":"Unknown",C={BASE_URL:"/",DEV:!1,MODE:"production",PROD:!0,SSR:!1,VITE_API_BASE_URL:"https://be.myka.ng",VITE_API_PARTNER_BASE_URL:"https://partner-be.myka.ng/api/v1",VITE_CONTENTFUL_SPACE_ID:"93i83gjaq4k0",VITE_MIXPANEL_API_HOST:"https://api-eu.mixpanel.com",VITE_MIXPANEL_TOKEN:"2ab009777e0dad741eec9b0cbdd520dd",VITE_OCR_SPACE_API_KEY:"K86738237188957",VITE_PAYOUT_BASE_URL:"https://payout.myka.ng/api/v1",VITE_PAYOUT_X_CHANNEL:"consumer",VITE_SENTRY_DSN:"https://5f71ca2e9b78ba4d88086e833699c6f3@o4510975569494016.ingest.us.sentry.io/4511704407736320",VITE_SENTRY_ENVIRONMENT:"production",VITE_UTILS_API_KEY:"your-api-key-here",VITE_UTILS_API_URL:"https://utility.myka.ng"},ye=["Claims","Policy","Billing","Technical","General Enquiry","Corporate / SME"],fe=["Low","Medium","High","Urgent"],je={Claims:"claims",Policy:"policy",Billing:"billing",Technical:"technical","General Enquiry":"general enquiry","Corporate / SME":"corporate/SME"},Se={category:"",priority:"",subject:"",description:"",stepsToReproduce:"",attachments:[]},_e=({onBack:o})=>{const[t,s]=S.useState(Se),[i,u]=S.useState(null),{reportIssueAsync:x,isSubmitting:l}=ae(),h=D(),{isAuthenticated:g,isInitialized:w}=q(),E=B(n=>n.auth.user),T=()=>h(G({step:W.LOGIN}));S.useEffect(()=>{w&&!g&&T()},[w,g]);const b=(n,a)=>s(y=>({...y,[n]:a})),f=t.category!==""&&t.priority!==""&&t.subject.trim()!==""&&t.description.trim()!==""&&t.stepsToReproduce.trim()!=="",H=async()=>{if(f){if(!g){T();return}u(null);try{const n=navigator.userAgent,a=new FormData;a.append("userId",E?.id??""),a.append("userName",E?.username??""),a.append("userEmail",E?.email??""),a.append("platform","web"),a.append("device",me(n)),a.append("osVersion",be(n)),a.append("appVersion",C.VITE_APP_VERSION??"1.0.0"),a.append("buildNumber",C.VITE_BUILD_NUMBER??"1"),a.append("reportId",crypto.randomUUID()),a.append("category",t.category),a.append("area",je[t.category]),a.append("priority",t.priority),a.append("severity",t.priority.toLowerCase()),a.append("subject",t.subject.trim()),a.append("title",t.subject.trim()),a.append("description",t.description.trim()),a.append("stepsToReproduce",t.stepsToReproduce.trim()),t.attachments.filter(y=>$(y)).forEach(y=>a.append("attachments",y)),await x(a),P.success("Ticket submitted successfully!"),o()}catch(n){u(typeof n=="string"?n:"Failed to submit ticket. Please try again.")}}};return e.jsxs(_,{align:"stretch",gap:5,children:[e.jsxs(p,{align:"center",gap:3,children:[e.jsx(p,{align:"center",justify:"center",w:8,h:8,borderRadius:"full",border:`1px solid ${r.border.primary}`,bg:"white",cursor:"pointer",onClick:o,flexShrink:0,_hover:{bg:r.gray[50]},children:e.jsx(m,{as:k,boxSize:4,color:r.text.primary})}),e.jsxs(c,{children:[e.jsx(d,{fontWeight:"semibold",fontSize:"md",color:r.text.primary,children:"Report a Problem"}),e.jsx(d,{fontSize:"xs",color:r.text.gray,children:"Describe your issue and our team will respond within 5 minutes during business hours."})]})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Issue Category",required:!0}),e.jsx(I,{options:ye,value:t.category,onChange:n=>b("category",n)})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Priority",required:!0}),e.jsx(I,{options:fe,value:t.priority,onChange:n=>b("priority",n)})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Subject",required:!0}),e.jsx(z,{value:t.subject,onChange:n=>b("subject",n.target.value),placeholder:"Subject of your issue",bg:"white",border:`1px solid ${r.border.primary}`,borderRadius:"xl",px:4,py:3,fontSize:"sm",color:r.text.primary,_placeholder:{color:r.text.gray}
1,_focus:{borderColor:r.orange[400],boxShadow:`0 0 0 1px ${r.orange[200]}`},height:"auto"})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Description",required:!0}),e.jsx(R,{value:t.description,onChange:n=>b("description",n.target.value),placeholder:"Please describe your issue in detail.",bg:"white",border:`1px solid ${r.border.primary}`,borderRadius:"xl",px:4,py:3,fontSize:"sm",color:r.text.primary,_placeholder:{color:r.text.gray},_focus:{borderColor:r.orange[400],boxShadow:`0 0 0 1px ${r.orange[200]}`},minH:"100px",resize:"vertical"})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Steps to Reproduce",required:!0}),e.jsx(R,{value:t.stepsToReproduce,onChange:n=>b("stepsToReproduce",n.target.value),placeholder:`1. Open Motor policy.
22. Select Third Party policy.
33. The screen goes black immediately.`,bg:"white",border:`1px solid ${r.border.primary}`,borderRadius:"xl",px:4,py:3,fontSize:"sm",color:r.text.primary,_placeholder:{color:r.text.gray},_focus:{borderColor:r.orange[400],boxShadow:`0 0 0 1px ${r.orange[200]}`},minH:"100px",resize:"vertical"})]}),e.jsxs(c,{children:[e.jsx(j,{label:"Attachments (optional)"}),e.jsx(de,{files:t.attachments,onAdd:n=>b("attachments",[...t.attachments,...n]),onRemove:n=>b("attachments",t.attachments.filter((a,y)=>y!==n))})]}),i&&e.jsx(c,{bg:r.error[50],border:`1px solid ${r.error[200]}`,borderRadius:"xl",px:4,py:3,children:e.jsx(d,{fontSize:"sm",color:r.error[600],children:i})}),e.jsx(c,{as:"button",w:"full",py:4,borderRadius:"full",bg:f?r.orange[500]:r.gray[200],color:f?"white":r.text.gray,fontWeight:"semibold",fontSize:"md",cursor:f?"pointer":"not-allowed",transition:"all 0.15s",_hover:f?{bg:r.orange[600]}:{},onClick:H,opacity:l||!f?.7:1,children:l?"Submitting…":"Submit Ticket"})]})},we=o=>o==="home"||o==="faqs"||o==="report",Ee=o=>{const t=o.get("view");return we(t)?t:"home"},ve=()=>{const[o,t]=U(),s=Ee(o),i=x=>{const l=new URLSearchParams(o);x==="home"?l.delete("view"):l.set("view",x),t(l,{replace:!0})},u=()=>i("home");return e.jsxs(ee,{gap:6,w:"100%",maxW:"1100px",mx:"auto",children:[e.jsxs(c,{children:[e.jsx(L,{fontSize:{base:"2xl",md:"28px"},fontWeight:"bold",color:r.text.label,children:"Help & Support"}),e.jsx(d,{fontSize:"md",color:r.text.info,mt:1,children:"Get help, report issues, or contact our support team"})]}),e.jsxs(c,{border:`1px solid ${r.border.secondary}`,background:`linear-gradient(145deg, white 55%, ${r.orange[50]} 100%)`,borderRadius:"xl",p:{base:4,md:5},children:[s==="home"&&e.jsx(ge,{onNavigate:i}),s==="faqs"&&e.jsx(he,{onBack:u}),s==="report"&&e.jsx(_e,{onBack:u})]})]})};export{ve 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.