PageSourceSearch

https://mtn-selfservice-apps-full-kiosk.vercel.app/_next/static/ch…?dpl=dpl_6rVqXFsGChe9gJBR5BckCV6Re3sC

js mtn-selfservice-apps-full-kiosk.vercel.app collected 2026-10-03 05:48:52 UTC 14,682 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[974],{1827:(e,t,n)=>{"use strict";n.d(t,{A:()=>l});var i=n(7392),a=n(9472),s=n(4037),r=n(7827);let o={opacity:.62,background:"linear-gradient(135deg, rgba(255,255,255,0.62) 0%, transparent 42%, rgba(255,204,0,0.16) 100%), url('/brands/mtn/pattern-1.svg') 72% 50% / 42rem 22rem no-repeat, radial-gradient(circle at 18% 28%, rgba(0,0,0,0.035) 0 0.075rem, transparent 0.08rem), radial-gradient(circle at 72% 78%, rgba(0,0,0,0.035) 0 0.06rem, transparent 0.07rem)",backgroundBlendMode:"normal, multiply, normal, normal"};function l(e){let{icon:t,title:n,description:l,onClick:c,disabled:d=!1,isLoading:u=!1,loadingText:h="Loading…",variant:f="light",className:p}=e;return(0,i.jsxs)("button",{type:"button",onClick:c,disabled:d||u,"aria-busy":u||void 0,className:(0,r.cn)("relative isolate flex min-h-68 items-end justify-center overflow-hidden","rounded-4xl border border-[rgba(28,28,30,0.12)] px-9 py-8 text-left","dark"===f?"bg-neutral-900 text-white":"bg-white text-neutral-900","transition-transform active:scale-[0.985]","disabled:cursor-not-allowed disabled:opacity-[0.38] disabled:grayscale-[0.6]",p),children:[(0,i.jsx)("span",{"aria-hidden":!0,className:"absolute inset-0 z-0",style:o}),t&&(0,i.jsx)("span",{className:"absolute left-9 top-8 z-2 grid h-18 w-18 place-items-center rounded-full bg-brand/20 text-neutral-900",children:t}),(0,i.jsxs)("span",{className:"relative z-2 mr-auto grid max-w-152 justify-items-start gap-3 text-left",children:[(0,i.jsx)("span",{className:"block font-title text-40 font-[450] leading-[1.05]",children:u?(0,i.jsxs)("span",{className:"inline-flex items-center gap-3","aria-live":"polite",children:[(0,i.jsx)(s.y$,{size:"md",label:null}),h]}):n}),l&&!u&&(0,i.jsx)("small",{className:(0,r.cn)("max-w-120 font-body text-[28px] font-normal leading-[1.35]","dark"===f?"text-white/80":"text-neutral-900"),children:l})]}),!u&&(0,i.jsx)("span",{"aria-hidden":!0,className:(0,r.cn)("absolute right-8 top-1/2 z-2 grid h-16 w-16 -translate-y-1/2 place-items-center rounded-full","dark"===f?"bg-white/15 text-white":"bg-brand/18 text-neutral-900"),children:(0,i.jsx)(a.K,{size:40,weight:"bold"})})]})}},6499:(e,t,n)=>{"use strict";n.d(t,{A:()=>c,s:()=>l});var i=n(7827),a=n(1612),s=n(8743),r=n(5048),o=n(5722);function l(e){return(0,i.CU)(async()=>{let t=await a.L.post("/v1/webview/integrations/mtn-kyc/fetch",{p
1honeNumber:(0,r.e)(e)});if("0000"!==t.statusCode)throw Object.assign(Error("Customer not found"),{status:404});return t.data},()=>(0,o.a1)(e))}function c(e){return(0,i.CU)(()=>s.P.get("/v1/webview/verification-status",{params:{reference_id:e.reference_id,type:e.type,...e.case_id?{case_id:e.case_id}:{}}}),()=>(0,o.Cn)(),{useMocks:!1})}},8266:(e,t,n)=>{Promise.resolve().then(n.bind(n,9236))},9236:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>N});var i=n(7392),a=n(4364),s=n(4037),r=n(4094),o=n(9322),l=n(7827),c=n(3087),d=n(6499),u=n(3544),h=n(633),f=n(406),p=n(8354);let m={"phone-consent":{title:"",subtitle:""},phone:{title:"Enter MTN number",subtitle:"By continuing, you consent to MTN using this number for kiosk verification and service notifications."},"sim-choice":{title:"Do you have this SIM with you?",subtitle:"We use this to decide whether to send an OTP before showing services."},otp:{title:"Verify your number",subtitle:""}};function g(e,t){return Math.max(0,Math.min(e,t.length))}var b=n(8967);function x(e){let{value:t,error:n,channelLabel:a,isLoading:s,onDigit:r,onBack:o,onSubmit:l,onResend:c}=e;return(0,i.jsx)("div",{className:"relative h-full w-full overflow-hidden",children:(0,i.jsx)(b.A,{value:t,onDigit:r,onBack:o,onSubmit:l,onResend:c,isLoading:s,error:n,channelLabel:a})})}var v=n(9635);function y(e){let{phone:t,checked:n,isLoading:a,onCheckedChange:r,onCancel:o,onContinue:l}=e,c=t.startsWith("0")?t.slice(1):t,d="+233 ".concat(c.slice(0,2)," ").concat(c.slice(2,5)," ").concat(c.slice(5));return(0,i.jsx)(v.A,{title:"Phone Number Consent",subtitle:(0,i.jsxs)(i.Fragment,{children:["Scancom PLC will use"," ",(0,i.jsx)("span",{className:"font-[750] tabular-nums text-neutral-900",children:d})," ","to verify your account, check available services, and support this kiosk transaction."]}),media:(0,i.jsxs)("div",{className:"grid w-[min(100%,54rem)] justify-items-center gap-5",children:[(0,i.jsx)(s.Sc,{variant:"card",label:"I consent to Scancom PLC using this phone number for this kiosk transaction.",checked:n,disabled:a,onChange:e=>r(e.target.checked)}),(0,i.jsx)("p",{className:"-mt-1.5 text-center font-body text-[1.15rem] font-[450] leading-[1.55rem] text-neutral-500",children:"This consent applies only to this session."})]}),action:(0,i.jsxs)("div",{className:"fixed inset-x-0 bottom-8 z-4 grid grid-cols-2 gap-4 border-t border-neutral-100 bg-neutral-50/90 px-9.75 pt-5 pb-8 backdrop-blur-md",children:[(0,i.jsx)(s.$n,{variant:"secondary",onClick:o,disabled:a,className:"min-h-24 rounded-full bg-neutral-200 px-8 font-title text-32 font-[450] text-neutral-900 transition active:scale-[0.97] disabled:opacity-60",children:"Cancel"}),(0,i.jsx)(s.$n,{onClick:l,disabled:a||!n,isLoading:a,loadingText:"Checking…",className:"min-h-24 rounded-full bg-brand px-8 font-title text-32 font-[450] text-black transition active:scale-[0.97] disabled:bg-neutral-200 disabled:text-neutral-500",children:"Continue"})]})})}var k=n(3598),w=n(4129);
1function S(e){let{phone:t,phoneCursor:n,fieldError:a,apiError:r,isLoading:o,submitLabel:l,onDigit:c,onBack:d,onDelete:u,onCursorMove:h,onSubmit:f,onDismissApiError:p}=e;return(0,i.jsx)(k.A,{onDigit:c,onBack:d,onDelete:u,onCursorMove:h,onSubmit:f,backIcon:"backspace",isSubmitActive:10===t.length&&!a,isLoading:o,submitLabel:l,loadingText:"Checking…",displayKey:"phone-entry",display:(0,i.jsxs)(i.Fragment,{children:[r&&(0,i.jsx)(s.cH,{tone:"error",message:r,onDismiss:p}),(0,i.jsx)(w.A,{digits:t,error:a,cursorIndex:n,onCursorChange:e=>h(String(e))})]})})}var j=n(1827);function C(e){let{error:t,isLoading:n,onChooseSimAvailable:r,onChooseSimUnavailable:o}=e,[l,c]=(0,a.useState)(null);return(0,a.useEffect)(()=>{n||c(null)},[n]),(0,i.jsxs)("div",{className:"flex h-full w-full flex-col justify-end pt-7 pb-6",children:[t&&(0,i.jsx)(s.cH,{tone:"error",message:t,className:"mb-6"}),(0,i.jsxs)("div",{className:"grid w-full gap-6",children:[(0,i.jsx)(j.A,{title:"Yes, send OTP",description:"I have this SIM with me",onClick:()=>{c("available"),r()},disabled:n,isLoading:n&&"available"===l,loadingText:"Sending OTP…"}),(0,i.jsx)(j.A,{title:"No SIM available",description:"Show services that do not need OTP",variant:"dark",onClick:()=>{c("unavailable"),o()},disabled:n,isLoading:n&&"unavailable"===l,loadingText:"Continuing…"})]})]})}function N(){let{form:e,status:t,actions:n}=function(){let[e,t]=(0,a.useState)(""),[n,i]=(0,a.useState)(0),[s,r]=(0,a.useState)("phone"),[o,b]=(0,a.useState)(""),[x,v]=(0,a.useState)(""),[y,k]=(0,a.useState)(""),[w,S]=(0,a.useState)(""),[j,C]=(0,a.useState)(!1),[N,P]=(0,a.useState)(!1),[L,E]=(0,a.useState)(!1),T=(0,f.Be)(e=>e.started),{setCustomer:_,setKyc:A,setCustomerToken:B,kyc:D}=(0,p.N)(),M=(0,c.useRouter)(),I=function(e){let t=10-e.length;return 10===e.length?"Submit":"".concat(t," more digit").concat(1===t?"":"s")}(e),O=(0,l.Pf)(e),K=j?"phone-consent":s,U=m[K],z="Enter the 6-digit code sent to ".concat(e.slice(0,4),"****").concat(e.slice(-3),".");function F(e){return f.Be.getState().sessionKey===e}async function R(){if(10!==e.length||O||L||!N)return;let t=f.Be.getState().sessionKey;E(!0),k("");try{let n=await (0,d.s)(e);if(!F(t))return;A(n),_(e.slice(1),"".concat(n.firstName," ").concat(n.lastName)),C(!1),r("sim-choice")}catch(e){if(!F(t))return;C(!1),k((0,l.SU)(e,(null==e?void 0:e.status)===502?"We could not verify this number right now. Please try again.":"This number was not found on the MTN network. Please check and try again."))}finally{F(t)&&E(!1)}}async function H(){if(L||!e)return;let t=f.Be.getState().sessionKey;E(!0),k(""),S("");try{if(await (0,u.Ix)(e),!F(t))return;(0,f.Kv)("sim-available",!0,null),r("otp")}catch(e){if(!F(t))return;k((0,l.SU)(e,"Failed to send OTP. Please try again."))}finally{F(t)&&E(!1)}}async function W(){if(6!==o.length||L||!D)return;let t=f.Be.getState().sessionKey;E(!0),S("");try{let n=await (0,u.Jb)(e,o,D);if(!F(t))return;B(n.token),M.push(h.f.services)}catch(e){if(!F(t))return;S((0,l.SU)(e,(null==e?void 0:e.status)===422?"Invalid or expired OTP. Please try again.":"Something went wrong. Please try again.")),b("")}finally{F(t)&&E(!1)}}async function $(){if(!e||L)return!1;let t=f.Be.getState().sessionKey;E(!0),S("");try{return await (0,u.Ix)(e),F(t)}catch(e){return F(t)&&S((0,l.SU)(e,"Failed to resend OTP. Please try again.")),!1}finally{F(t)&&E(!1)}}function J(){L||(C(!1),P(!1))}async function V(){if(!D||L)return;let e=f.Be.getState().sessionKey;E(!0),k("");try{let t=await (0,u.Dv)(D);if(!F(e))return;(0,f.Kv)("sim-unavailable",!1,null),B(t.token),M.push(h.f.services)}catch(t){if(!F(e))return;k((0,l.SU)(t,"Failed to start session. Please try again."))}finally{F(e)&&E(!1)}}return(0,a.useEffect)(()=>{T||(t(""),i(0),r("phone"),b(""),v(""),k(""),S(""),C(!1),P(!1),E(!1))},[T]),{form:{phone:e,phoneCursor:n,step:s,otp:o,showConsent:j,hasAcceptedPhoneConsent:N},status:{isLoading:L,fieldError:x||O,apiError:y,otpError:w,submitLabel:I,shellStep:K,shellMeta:U,otpSubtitle:z},actions:{addDigit:function(a){if("phone"===s){if(v(""),e.length>=10)return;let s=g(n,e);t(e=>"".concat(e.slice(0,s)).concat(a).concat(e.slice(s))),i(s+1);return}"otp"===s&&(S(""),b(e=>e.length<6?e+a:e))},backspace:function(){if("phone"===s){v("");let a=g(n,e);if(0===a)return;t(e=>"".concat(e.slice(0,a-1)).concat(e.slice(a))),i(a-1)}"otp"===s&&(S(""),b(e=>e.slice(0,-1)))},deleteDigit:function(){if("phone"!==s)return;v("");let i=g(n,e);i>=e.length||t(e=>"".concat(e.slice(0,i)).concat(e.slice(i+1)))},movePhoneCursor:function(t){"phone"===s&&(v(""),i(n=>
1"start"===t?0:"end"===t?e.length:"left"===t?Math.max(0,n-1):"right"===t?Math.min(e.length,n+1):g(n,e)))},submitPhone:function(){10!==e.length||O||L||(v(""),k(""),P(!1),C(!0))},setHasAcceptedPhoneConsent:P,confirmPhoneConsent:R,cancelPhoneConsent:J,chooseSimAvailable:H,chooseSimUnavailable:V,submitOtp:W,resendOtp:$,handleScreenBack:function(){return(v(""),k(""),S(""),"phone"===s)?j?void J():((0,f.wD)(),void M.replace(h.f.home)):"sim-choice"===s?void r("phone"):void(b(""),r("sim-choice"))},setApiError:k}}}();return(0,a.useEffect)(()=>"phone"===e.step&&e.showConsent?void o.j.speak("Before we continue, please confirm you agree to let MTN use this number to verify your account for this transaction. Tick the box, then press Continue."):"sim-choice"===e.step?void o.j.speak("Do you have this SIM card with you right now? If yes, we will send a one-time code to confirm it is you. Choose Yes to receive the code, or No if you do not have the SIM."):void("otp"===e.step&&o.j.speak("We have sent a six-digit code to your phone. Please enter the code here to verify your number.")),[e.step,e.showConsent]),(0,i.jsxs)(r.A,{title:"otp"===t.shellStep?"Verify your number":t.shellMeta.title,subtitle:"otp"===t.shellStep?t.otpSubtitle:t.shellMeta.subtitle,onBack:n.handleScreenBack,disableBack:t.isLoading,disableHome:t.isLoading,children:["phone"===e.step&&(e.showConsent?(0,i.jsx)("div",{className:"relative h-full w-full overflow-hidden",children:(0,i.jsx)(y,{phone:e.phone,checked:e.hasAcceptedPhoneConsent,isLoading:t.isLoading,onCheckedChange:n.setHasAcceptedPhoneConsent,onCancel:n.cancelPhoneConsent,onContinue:n.confirmPhoneConsent})}):(0,i.jsx)(S,{phone:e.phone,phoneCursor:e.phoneCursor,fieldError:t.fieldError,apiError:t.apiError,isLoading:t.isLoading,submitLabel:t.submitLabel,onDigit:n.addDigit,onBack:n.backspace,onDelete:n.deleteDigit,onCursorMove:n.movePhoneCursor,onSubmit:n.submitPhone,onDismissApiError:()=>n.setApiError("")})),"sim-choice"===e.step&&(0,i.jsxs)("div",{className:"relative h-full w-full overflow-hidden px-6",children:[t.apiError&&(0,i.jsx)(s.cH,{tone:"error",message:t.apiError,onDismiss:()=>n.setApiError("")}),(0,i.jsx)(C,{error:t.fieldError,isLoading:t.isLoading,onChooseSimAvailable:n.chooseSimAvailable,onChooseSimUnavailable:n.chooseSimUnavailable})]}),"otp"===e.step&&(0,i.jsx)(x,{value:e.otp,error:t.otpError,channelLabel:function(e){let t=e.startsWith("0")?e.slice(1):e;return"OTP sent to +233 ".concat(t.slice(0,3),"****").concat(t.slice(-3))}(e.phone),isLoading:t.isLoading,onDigit:n.addDigit,onBack:n.backspace,onSubmit:n.submitOtp,onResend:n.resendOtp})]})}},9322:(e,t,n)=>{"use strict";n.d(t,{j:()=>c});var i=n(8354),a=n(5580),s=n(8339);function r(e){if(s._.debugApi)try{fetch("/api/debug-log",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({phase:"deeplink",method:"DEEPLINK",url:e}),keepalive:!0}).catch(()=>{})}catch(e){}window.location.href=e}function o(e,t){a.R.getState().setPendingAction(t),r(e)}function l(){var e;return null!=(e=i.N.getState().customerToken)?e:""}let c={scanBarcode(){o("barcode://scan?token=".concat(l()),"scan_serial")},scanImei(){o("barcode://imei/","scan_imei")},getSimCode(){o("carddispenser://getsimcode","get_sim_code")},checkInventory(){o("carddispenser://checkinventory","check_inventory")},dispense(){o("carddispenser://dispense","dispense_sim")},retract(){o("carddispenser://retract","retract_sim")},printReceipt(e){o("printer://printreceipt?".concat(new URLSearchParams(e).toString()),"printreceipt")},initializeFingerprint(){o("metricfinger://initialize","init_fingerprint")},verifyFingerprint(e){let{finger:t="rt",fingerToken:n}=e;o("metricfinger://verify?token=".concat(n,"&finger=").concat(t.toLowerCase(),"&session_id=").concat(l()),"verify_fingerprint")},speak(e){r("audio://speak?text=".concat(encodeURIComponent(e)))}}},9635:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var i=n(7392),a=n(7827);function s(e){let{title:t,subtitle:n,copyExtra:s,mediaLabel:r,mediaClassName:o,media:l,feedback:c,action:d,children:u,className:h}=e,f=null!=l?l:u,p=!!(t||n||s);return(0,i.jsxs)("div",{className:(0,a.cn)("flex h-full w-full flex-col items-center justify-start gap-9 bg-neutral-50 px-9 pt-22 pb-44 text-center",h),children:[p&&(0,i.jsxs)("div",{className:"grid justify-items-center gap-[0.85rem]",children:[t&&(0,i.jsx)("h1",{className:"max-w-2xl font-title text-48 font-[450] leading-[3.65rem] text-neutral-900",children:t}),n&&(0,i.jsx)("p",{className:"max-w-216 font-body text-32 font-medium leading-[2.6rem] text-neutral-500",children:n}),s]}),null!=f&&!1!==f&&(0,i.jsx)("div",{className:(0,a.cn)("grid w-full place-items-center",o),"aria-label":r,children:f}),c,d]})}}},e=>
1{e.O(0,[832,756,406,924,831,655,392,358],()=>e(e.s=8266)),_N_E=e.O()}]);

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.