1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2907],{6906:(e,t,r)=>{"use strict";r.d(t,{Ag:()=>s,aj:()=>a,fg:()=>i,oE:()=>n});let a=e=>{if(null==e)return;let t=new Date(e);if(Number.isNaN(t.getTime()))return;let r=String(t.getDate()).padStart(2,"0"),a=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getFullYear()).slice(-2);return"".concat(r,"/").concat(a,"/").concat(s)},s=e=>"yearly"===e?"annual":e,i=e=>{let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getDate()).padStart(2,"0"),s=String(e.getHours()).padStart(2,"0"),i=String(e.getMinutes()).padStart(2,"0"),n=String(e.getSeconds()).padStart(2,"0"),l=String(e.getMilliseconds()).padStart(3,"0"),o=-e.getTimezoneOffset(),c=Math.floor(Math.abs(o)/60),u=Math.abs(o)%60;return"".concat(t,"-").concat(r,"-").concat(a,"T").concat(s,":").concat(i,":").concat(n,".").concat(l).concat(o>=0?"+":"-").concat(String(c).padStart(2,"0"),":").concat(String(u).padStart(2,"0"))};function n(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"long";if(!e)return"";let[r,a,s]=e.split("-"),i=["Muharram","Safar","Rabi al-Awwal","Rabi al-Thani","Jumada al-Awwal","Jumada al-Thani","Rajab","Sha'ban","Ramadan","Shawwal","Dhul Qadah","Dhul Hijjah"];"short"===t&&(i=i.map(e=>e.slice(0,3)));let n=parseInt(a,10)-1;return n<0||n>11?e:"short"===t?"".concat(parseInt(s,10),", ").concat(i[n]):"".concat(parseInt(s,10)," ").concat(i[n]," ").concat(r)}},23742:(e,t,r)=>{"use strict";r.d(t,{A:()=>n});var a=r(65907),s=r(45791);class i extends s.A{async getUserPremiumData(){await this.setToken();let{data:e}=await this.http.get("/user");return e}async getStripeCustomerPortal(e){return await this.setToken(),(await this.http.post("/user/stripe-customer-portal",{...e})).data}async signInWithGoogle(){return await a.A.signInWithGoogle()}async signInWithApple(){return await a.A.signInWithApple()}async signout(){await a.A.signOut()}async loginSendEmailOtp(e){try{return(await this.http.post("/login/email",e)).data}catch(e){var t,r;throw null!=(r=null==e||null==(t=e.response)?void 0:t.data)?r:e}}async signupSendEmailOtp(e){try{return await this.http.post("/signup",e)}catch(e){var t,r;throw null!=(r=null==e||null==(t=e.response)?void 0:t.data)?r:e}}async verifyOtp(e){var t,r,s,i;try{let s=await this.http.post("/login/verifyOtp",e);if(!(null==s||null==(t=s.data)?void 0:t.custom_token))throw Error("Unexpected error. Please try again.");let i=await a.A.loginWithToken(null==s||null==(r=s.data)?void 0:r.custom_token);if(!i.user)throw Error("Unexpected error. Please try again.");return i}catch(e){return null!=(i=null==e||null==(s=e.response)?void 0:s.data)?i:{error:e}}}constructor(){super("/api"),this.init()}}let n=new i},26541:(e,t,r)=>{"use strict";r.d(t,{D:()=>n,X:()=>i});var a=r(84497),s=r(54602);let i="en",n=(0,a.A)({locales:s.dI,defaultLocale:i,localePrefix:"as-needed",localeDetection:!1})},34663:(e,t,r)=>{"use strict";r.d(t,{Hm:()=>c,N_:()=>i,a8:()=>l,rd:()=>o});var a=r(55251),s=r(26541);let{Link:i,redirect:n,usePathname:l,useRouter:o,getPathname:c}=(0,a.A)(s.D)},41502:(e,t,r)=>{"use strict";r.d(t,{default:()=>j});var a=r(95155),s=r(36346),i=r(72998),n=r(12115);let l=e=>{let{partner:t,children:r}=e;return(0,a.jsxs)(s.f,{className:"gap-8",children:[(0,a.jsxs)(s.f,{className:"w-full gap-4",children:[(0,a.jsx)("h5",{className:"",children:"Before we proceed..."}),(0,a.jsx)("p",{className:"body2 text-sm text-light-fill-sec",children:"It looks like you already have a Muslim Pro premium subscription. Here are the details."}),r]}),(0,a.jsxs)("p",{className:"body2 text-sm text-light-fill-sec",children:["If you redeem the",t&&"garuda"===t?" Garuda":""," ","promo code, your current subscription will be overridden and your new subscription will start from today."]})]})},o=()=>(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h5",{className:"",children:"Redeem your code"}),(0,a.jsx)("p",{className:"body2 text-sm text-light-fill-sec",children:"Enter the code below to redeem your premium subscription."})]});var c=r(82748);let u=e=>{let{premiumType:t,expiryDate:r,loading:i}=e;return(0,a.jsx)(a.Fragment,{children:(0,a.jsxs)(s.y,{className:"relative min-h-[102px] w-full items-center justify-between rounded-lg p-6 text-left text-light-brd-pri-100 dark:text-dark-brd-pri-100",children:[i?(0,a.jsx)(s.f,{className:"w-full items-center justify-center",children:(0,a.jsx)(c.LoaderSpinner,{})}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsxs)(s.f,{className:"",children:[(0,a.jsx)("p",{className:"caption font-normal uppercase opacity-100",children:"Subscription Type"}),(0,a.jsx)("h5",{className:"capitalize",children:t})]}),(0,a.jsxs)(s.f,{className:"text-light-brd-pri-100 dark:text-dark-brd-pri-100",children:[(0,a.jsx)("p",{className:"caption font-normal uppercase",children:"Renews on"}),(0,a.jsx)("h5",{children:r})]})]}),(0,a.jsx)("div",{className:"absolute left-0 top-0 h-full w-full rounded-lg bg-light-brd-pri-100 opacity-20 dark:bg-dark-brd-pri-100"})]})})},d=e=>{let{onClick:t}=e;
1return(0,a.jsxs)(s.f,{className:"items-center gap-4 rounded-lg bg-light-fill-white p-4",children:[(0,a.jsxs)(s.y,{className:"items-center gap-2",children:[(0,a.jsx)(c.CircleWarningIcon,{}),(0,a.jsx)("h5",{className:"",children:"One thing to note..."})]}),(0,a.jsx)("p",{className:"body2 text-light-fill-black",children:"Please go to your respective app store to cancel your current subscription so as to prevent any double charging on your payment method."}),(0,a.jsx)("button",{className:"btn-lg btn-fill-pri w-full",onClick:t,children:"I understand"})]})};var p=r(88781),m=r(15064),h=r(66546),g=r(85888),f=r(62805);let b=e=>{let{onSubmit:t,codeValue:r,onChange:i,onClick:n,success:l,error:o,isLoading:u,disabled:d,continueButtonStatus:p,onLogout:b,errorCode:E}=e;return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("form",{className:"w-full",onSubmit:t,children:(0,a.jsx)(h.x$,{value:r,onChange:i,className:"w-full",label:"Promo Code",loading:u,onClick:t,name:"promoCode",statusMessage:((e,t)=>{let r="";return"validation"===e.type&&(r=e.error),t&&(r="Alhamdulillah, this code is valid"),r})(o,l),buttonText:"Apply",variant:((e,t)=>{let r="default";return e.type&&(r="error"),((null==e?void 0:e.status)===409||(null==e?void 0:e.status)===429)&&(r="default"),t&&(r="success"),r})(o,l)})}),(0,a.jsx)(m.$n,{size:"large",className:(0,f.cn)("h-auto w-full",409===E&&"disabled:bg-[#fffbd1]",429===E&&"disabled:bg-light-btn-warning-outlinebg"),onClick:n,variant:"fillPrimary",disabled:d,children:((e,t,r,i,n,l,o)=>{let u="initial";switch((e||t)&&(u="loading"),r&&i?u="complete":l&&(u="error"),n&&(u="redeemed"),u){case"initial":default:return"Continue";case"loading":return(0,a.jsxs)(s.y,{className:"h-full w-full items-center justify-center gap-2",children:[(0,a.jsx)(c.LoaderSpinner,{className:"h-6 w-6 stroke-light-btntext-sec"}),(0,a.jsx)("p",{className:"subhead1 text-light-btntext-sec",children:"Redemption in progress"})]});case"complete":return(0,a.jsxs)(s.y,{className:"h-full w-full items-center justify-center gap-2",children:[(0,a.jsx)(g.A,{}),(0,a.jsx)("p",{className:"subhead1 text-light-btntext-sec",children:"Redemption Successful"})]});case"redeemed":return(0,a.jsxs)(s.y,{className:"h-full w-full items-center justify-center gap-2",children:[(0,a.jsx)(g.A,{}),(0,a.jsx)("p",{className:"subhead1 text-light-btntext-sec",children:"You have redeemed this code"})]});case"error":return(0,a.jsx)(s.y,{className:"h-full w-full items-center justify-center gap-2",children:(0,a.jsx)("p",{className:"subhead1 text-light-btntext-sec",children:o.error?o.error:"Redemption failed. Please try again"})})}})(p.submitLoading,p.pollingLoading,p.pollingComplete,p.pollingSuccess,p.codeRedeemedContinue,"redeem"===o.type,o)}),(0,a.jsx)("p",{className:"body2 text-light-text-sec",children:p.pollingComplete&&p.pollingSuccess||p.codeRedeemedContinue?"Please wait while we redirect you":""}),(0,a.jsx)(m.$n,{size:"large",className:"w-full",onClick:b,variant:"fillPrimary",children:"Logout"})]})},E={ALREADY_CLAIMED:"The promo code has already been redeemed by the user."};var w=r(89759),x=r(34663),S=r(45791);class _ extends S.A{async validatePromoCode(e){try{return await this.setToken(),await this.http.get("/promoCode/validate?promoCode=".concat(e))}catch(e){var t,r,a;throw null!=(a=null==e||null==(r=e.response)||null==(t=r.data)?void 0:t.error)?a:"Unexpected error. Please try again."}}async redeemPromoCode(e,t){try{return await this.setToken(),await this.http.post("/promoCode/redeem",{promoCode:e,source:t})}catch(e){throw null==e?void 0:e.response}}constructor(){super("/api"),this.init()}}let y=new _;var A=r(23742),N=r(88610),I=r(6906);let v={error:"",type:""},j=e=>{let{partner:t,onRedemptionSuccessRoute:r,promoCode:c}=e,m=(0,x.rd)(),[h,g]=(0,n.useState)(c||""),[f,S]=(0,n.useState)("redemption"),[_,j]=(0,n.useState)(!1),{isLoading:T,premiumInfo:C}=(0,N.A)(e=>({isLoading:e.isLoading,premiumInfo:e.premiumInfo})),[P,R]=(0,n.useState)(v),[L,k]=(0,n.useState)(null);(0,n.useEffect)(()=>{T&&((null==C?void 0:C.premium)!=="none"&&(null==C?void 0:C.expiry)?S("existingPremium"):S("redemption"))},[T,C]);
1let[U,D]=(0,n.useState)(!1),[B,O]=(0,n.useState)(!1),M=async e=>{e.preventDefault(),R(v),k(null),D(!0),O(!1);try{await y.validatePromoCode(h)&&O(!0)}catch(e){if("string"==typeof e&&e===E.ALREADY_CLAIMED){V(!0),setTimeout(()=>{m.push(r)},2e3);return}R({error:e,type:"validation"})}finally{D(!1)}},[F,G]=(0,n.useState)(!1),[X,Z]=(0,n.useState)(""),[H,W]=(0,n.useState)(!1),K=async e=>{e.preventDefault();try{W(!0);let e=await y.redeemPromoCode(h,t||"muslimpro");e&&e.data&&"access"===e.data.promo_type?m.push("".concat(r,"?promo_access=true")):e&&e.data&&e.data.token&&(Z(e.data.token),G(!0))}catch(e){var a,s,i;R({error:null!=(s=null==e||null==(a=e.data)?void 0:a.error)?s:null==e?void 0:e.data,type:"redeem",status:null==e?void 0:e.status}),k(null!=(i=null==e?void 0:e.status)?i:null),O(!1),W(!1)}},z=async()=>{var e;G(!1);let t=await A.A.getUserPremiumData();return null!=t&&!!t.premiumInfo&&X===(null==t||null==(e=t.premiumInfo)?void 0:e.token)&&(W(!1),setTimeout(()=>{m.push(r)},1500),!0)},{pollingSuccess:Y,isPolling:q}=(0,w.A)({beginPolling:F,callback:z}),[J,V]=(0,n.useState)(!1);return(0,n.useEffect)(()=>{B&&R(v)},[P,B]),(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(i.a,{show:_&&"redemption"===f,children:(0,a.jsx)(d,{onClick:e=>{e.preventDefault(),j(!1)}})}),(0,a.jsx)(n.Suspense,{children:(0,a.jsx)(p.A,{emailInputComponents:(0,a.jsxs)(a.Fragment,{children:["redemption"===f?(0,a.jsx)(b,{codeValue:h,onChange:e=>{let{value:t}=e.currentTarget;g(t)},onSubmit:M,onClick:K,onLogout:e=>{e.preventDefault(),m.push("/signout")},success:!P.error&&B,error:P,errorCode:L,isLoading:U,disabled:!B||P.error.length>0||H||!q&&Y||q,continueButtonStatus:{submitLoading:H,pollingLoading:H||q,pollingComplete:!q,pollingSuccess:Y,codeRedeemedContinue:J}}):null,"existingPremium"===f?(0,a.jsxs)(s.f,{className:"gap-2",children:[(0,a.jsx)("button",{className:"btn-lg btn-fill-pri",onClick:e=>{e.preventDefault(),S("redemption"),j(!0)},children:"Override my current subscription"}),(0,a.jsx)("button",{className:"btn-lg btn-ghost-pri",onClick:e=>{e.preventDefault(),m.push(t?"/garuda/onboarding":"/onboarding")},children:"Keep my current subscription"})]}):null]}),partner:t,customView:(0,a.jsxs)(a.Fragment,{children:["redemption"===f?(0,a.jsx)(o,{}):null,"existingPremium"===f?(0,a.jsx)(l,{partner:t,children:(0,a.jsx)(u,{premiumType:(null==C?void 0:C.premium)?(0,I.Ag)(C.premium):void 0,expiryDate:(null==C?void 0:C.expiry)?(0,I.aj)(null==C?void 0:C.expiry):void 0,loading:null===C})}):null]})})})]})}},45791:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var a=r(95125),s=r(65907),i=r(15376).Buffer;class n{async setToken(){var e;this.token=await s.A.getIdToken(),this.refreshToken=await s.A.getRefreshToken(),this.token&&this.refreshToken&&(this.http.defaults.headers.Authorization="Bearer ".concat(this.token),this.http.defaults.headers["x-user-refresh-token"]=i.from(null!=(e=this.refreshToken)?e:"").toString("base64"))}async setAppCheckToken(){this.appCheckToken=await s.A.getAppCheckToken(),this.appCheckToken&&(this.http.defaults.headers["X-Firebase-AppCheck"]=this.appCheckToken)}async setUserIp(e){this.http.defaults.headers["x-forwarded-for"]=e,this.http.defaults.headers["x-custom-ip"]=e}setXApiKey(e){this.http.defaults.headers["x-api-key"]=e}async init(){this.http.defaults.baseURL=this.baseUrl,this.http.defaults.headers["Content-Type"]="application/json",this.http.defaults.headers.platform="web"}setAbortController(){this.abortController=new AbortController}constructor(e){this.http=a.A.create(),this.abortController=null,this.baseUrl=e}}let l=n},53961:(e,t,r)=>{"use strict";r.d(t,{g:()=>i});var a=r(95704);let s={NEXT_PUBLIC_FIREBASE_API_KEY:"AIzaSyA5W0u0Pd7JBhVcjZCLN8_S9y4EZFG94E8",NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN:"auth.muslimpro.com",NEXT_PUBLIC_FIREBASE_DATABASE_URL:"https://muslim-pro-app.firebaseio.com",NEXT_PUBLIC_FIREBASE_PROJECT_ID:"muslim-pro-app",NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET:"muslim-pro-app.appspot.com",NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID:"26836749833",NEXT_PUBLIC_FIREBASE_APP_ID:"1:26836749833:web:169f5c53e1af3c545772d8",NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID:"G-HN3WE0XENS",NEXT_PUBLIC_MP_CF_BASE_URL:"https://us-central1-muslim-pro-app.cloudfunctions.net",NEXT_PUBLIC_CORE_BASE_URL:"https://api-mp.muslimpro.com/v1",NEXT_PUBLIC_PARTNERS_BASE_URL:"https://partners-api.muslimpro.com/v1",NEXT_PUBLIC_FIREBASE_RECAPTCHA_ENTERPRISE_SITE_KEY:"6LeKuXwpAAAAAP00kW3mar9dK9S6iWnZ6jDUAdKt",NEXT_PUBLIC_ENV:"production",NEXT_PUBLIC_APP_BASE_URL:"https://app.muslimpro.com",NEXT_PUBLIC_JS_BRIDGE_CLIENT_ID:"muslimpro-internal-f3a9c7d2e8b4",NEXT_PUBLIC_JS_BRIDGE_CLIENT_SECRET:"aPRS_7d4c2f9e8b6a5d4c3b2a1f0e9d8c7b6a5f4e3d2c1b0a9f8e7d6c5b4a3f2e1d0",NEXT_PUBLIC_BETTR_FINANCE_LOGIN_URL:"https://secure.bettr.my/web/m/login?partner=MUSLIM_PRO&recordId=",NEXT_PUBLIC_WORDPRESS_BASE_URL:"https://www.muslimpro.com"};a.env.X_API_KEY,a.env.WORDPRESS_API_KEY,a.env.GOOGLE_SHEET_SERVICE_ACCOUNT_KEY,a.env.GOOGLE_SHEETS_UMRAH_DISCOUNTS_SPREADSHEET_ID,a.env.GOOGLE_SHEETS_UMRAH_DISCOUNTS_SHEET_NAME,a.env.REVALIDATE_SECRET;let i=()=>(function(e){let t=[];for(let r in e)e[r]||t.push(r);if(t.length>0)throw Error("Missing environment variables: ".concat(t.join(", ")));return e})(s)},54602:(e,t,r)=>{"use strict";r.d(t,{DB:()=>n,UJ:()=>i,dI:()=>s});var a=r(60715);let s=Object.freeze(["en","id","fr","ar","ru","ms","bn","zh","de","es","fa","hi","tr","ur","sv","it","nl"]),i={ar:"Ø£ÙÙØ§Øª-Ø§ÙØµÙاة-",en:"prayer-times-",fr:"heures-de-pri\xe8re-",id:"waktu-sholat-",ms:"waktu-solat-",ru:"вÑемÑ-молиÑвÑ-",bn:"নামাà¦à§à¦°-সময়-",zh:"ç¥ç¥·æ¶é´-",de:"gebetszeiten-",es:"horarios-de-oraci\xf3n-",fa:"اÙÙØ§Øª-ÙÙ
از-",hi:"नमाà¤à¤¼-à¤à¤¾-समय-",tr:"namaz-vakitleri-",ur:"ÙÙ
از-Ú©Û-اÙÙØ§Øª-",sv:"b\xf6nestider-",
1it:"orari-preghiera-",nl:"gebedstijden-"},n=["ar","fa","ur"];a.SN["og-image"]},60715:(e,t,r)=>{"use strict";r.d(t,{SN:()=>s,f1:()=>a});let a={"pt-slider-1":"https://download.muslimpro.com/images/web/Ask%20AiDeen.webp","pt-slider-2":"https://download.muslimpro.com/images/qalbox/en/preview/large/pt-slider-2.png","pt-slider-3":"https://download.muslimpro.com/images/web/Prayer%20Times.webp","pt-slider-4":"https://download.muslimpro.com/images/web/Quest.webp","pt-slider-5":"https://download.muslimpro.com/images/web/Ummah%20Pro.webp","pt-slider-6":"https://download.muslimpro.com/images/web/Quran.webp","pt-slider-7":"https://download.muslimpro.com/images/qalbox/en/preview/large/pt-slider-7.png","pt-slider-8":"https://download.muslimpro.com/images/web/Qibla.webp","pt-slider-9":"https://download.muslimpro.com/images/web/Ramadan%20&%20Fasting%20Tracker.webp","quran-companion":"https://download.muslimpro.com/images/web/Download.webp","app-store":"https://download.muslimpro.com/images/qalbox/en/preview/large/app-store.png","banner-bg":"https://download.muslimpro.com/images/web/banner-bg.svg","banner-bg-mobile":"https://download.muslimpro.com/images/qalbox/en/preview/large/banner-bg-mobile.png",fajr:"https://download.muslimpro.com/images/web/fajr.svg",zuhr:"https://download.muslimpro.com/images/web/zuhr.svg",asr:"https://download.muslimpro.com/images/web/asr.svg",magrib:"https://download.muslimpro.com/images/web/magrib.svg",isha:"https://download.muslimpro.com/images/web/isha.svg"},s={favicon:"https://download.muslimpro.com/images/web/favicon.ico","logo-mp":"https://download.muslimpro.com/images/web/logo-mp.png","mp-logo":"https://download.muslimpro.com/images/qalbox/en/preview/large/mp-logo.png","og-image":"https://download.muslimpro.com/images/qalbox/en/preview/large/og-image.jpg","purchase-page-image":"https://download.muslimpro.com/images/qalbox/en/preview/large/purchase_page_image.png","premium-crown":"/images/premium/premium-crown.png","premium-phone-mockup":"/images/premium/premium-phone-mockup.png"}},62805:(e,t,r)=>{"use strict";r.d(t,{cn:()=>i});var a=r(2821),s=r(75889);function i(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,s.QP)((0,a.$)(t))}},65907:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var a=r(52078),s=r(20792),i=r(59253),n=r(53961);let l=(0,n.g)(),o={apiKey:l.NEXT_PUBLIC_FIREBASE_API_KEY,authDomain:l.NEXT_PUBLIC_FIREBASE_AUTH_DOMAIN,databaseURL:l.NEXT_PUBLIC_FIREBASE_DATABASE_URL,projectId:l.NEXT_PUBLIC_FIREBASE_PROJECT_ID,storageBucket:l.NEXT_PUBLIC_FIREBASE_STORAGE_BUCKET,messagingSenderId:l.NEXT_PUBLIC_FIREBASE_MESSAGING_SENDER_ID,appId:l.NEXT_PUBLIC_FIREBASE_APP_ID,measurementId:l.NEXT_PUBLIC_FIREBASE_MEASUREMENT_ID},c=0===(0,a.Dk)().length?(0,a.Wp)(o):(0,a.Dk)()[0],u=(0,n.g)();class d{getAuth(){return this.auth}async getAppCheckToken(){if(u.NEXT_PUBLIC_FIREBASE_RECAPTCHA_ENTERPRISE_SITE_KEY){this.appCheck||(this.appCheck=(0,s.Ay)(c,{provider:new s.yG(u.NEXT_PUBLIC_FIREBASE_RECAPTCHA_ENTERPRISE_SITE_KEY),isTokenAutoRefreshEnabled:!0}));try{return(await (0,s.gf)(this.appCheck)).token}catch(e){if(e instanceof a.g)return null}}}async signInWithGoogle(){try{let e=new i.HF;return(0,i.df)(this.auth,e).then(()=>!0)}catch(e){return e instanceof a.g,!1}}async signInWithApple(){try{let e=new i.LD("apple.com");return(0,i.df)(this.auth,e).then(()=>!0)}catch(e){return e instanceof a.g,!1}}async signOut(){try{await this.auth.signOut()}catch(e){console.error(e)}}async getIdToken(){try{let e=this.auth.currentUser;if(e)return await e.getIdToken()}catch(e){return null}}async getRefreshToken(){var e,t;return null!=(t=null==(e=this.auth.currentUser)?void 0:e.refreshToken)?t:null}async loginWithToken(e){return(0,i.p)(this.auth,e).then(e=>e).catch(e=>{var t;return null!=(t=e.code)?t:""})}async createUserWithEmailAndPassword(e,t){try{let r=await (0,i.Wm)(this.auth,e);if(r&&r.length>0)throw Error("Email already in use");let a=await (0,i.eJ)(this.auth,e,t);a&&await (0,i.gA)(a.user)}catch(e){var r;throw null!=(r=null==e?void 0:e.message)?r:e}}async loginWithPhone(e,t){return(0,i.ik)(this.auth,e,t).then(e=>e).catch(e=>{var t;if(null==e||null==(t=e.message)?void 0:t.includes("too-many-requests"))throw{message:"Too many requests. Please try again later."}})}constructor(){this.auth=(0,i.xI)(c),this.auth.useDeviceLanguage()}}let p=new d},72907:(e,t,r)=>{Promise.resolve().then(r.bind(r,41502))},78441:(e,t,r)=>{"use strict";r.d(t,{G6:()=>s,ak:()=>i,iZ:()=>a});let a={GARUDA:"garuda",GIFTPREMIUM:"gift-premium",MONDIA:"mondia",MO_MAGIC:"mo_magic",NUON:"nuon",SSO:"sso"};a.GARUDA,a.GIFTPREMIUM,a.MONDIA,a.NUON,a.MO_MAGIC,a.SSO;let s={GP:"gp",BKASH:"bkash"},i={MYGP:"mygp",BKASH:"bkash"}},85888:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(95155);r(12115);let s=e=>{let{className:t,height:r=24,width:s=24}=e;return(0,a.jsx)("svg",{width:s,height:r,viewBox:"0 0 25 24",fill:"#0F1613",xmlns:"http://www.w3.org/2000/svg",className:"".concat(t||""),children:(0,a.jsx)("path",{d:"M10.25 18L3.5 11.25L4.5605 10.1895L10.25 15.8782L20.4395 5.68945L21.5 6.74995L10.25 18Z"})})}},88610:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var a=r(95988),s=r(89863),i=r(23742);let n={currentUser:null,premiumInfo:null,isLoading:!0,error:null},l=async e=>{await i.A.signout(),e({...n,isLoading:!1})},o=async e=>{switch(e){case"google":return await i.A.signInWithGoogle();case"apple":return await i.A.signInWithApple();default:return!1}},c=(0,a.vt)()((0,s.lt)((0,s.Zr)((e,t)=>({...n,signout:()=>l(e),resetUser:()=>e({...n,isLoading:!1}),setAllUserData:t=>e(e=>({...e,...t})),setCurrentUser:t=>e({currentUser:t}),setPremiumInfo:t=>e({premiumInfo:t}),fetchPremiumInfo:async()=>{e({isLoading:!0});try{let r=await i.A.getUserPremiumData(),a=t().currentUser;e({premiumInfo:r.premiumInfo,currentUser:a,isLoading:!1})}catch(t){e({error:JSON.stringify(t),isLoading:!1})}},isPremiumActive:()=>{var e;let r=t().premiumInfo;if(!r)return!1;if(r.premium&&"none"!==r.premium||(null==(e=r.entitled_features)?void 0:e.muslimpro)||r.free_trial&&!r.free_trial_completed||r.active_sku&&"FREE"!==r.active_sku||r.tier&&"FREE"!==r.tier)return!0;
1if(r.expiry&&(void 0===r.premium||null===r.premium)){let e=r.expiry;if((e>1e12?e:1e3*e)>Date.now())return!0}return!1},setLoading:t=>e({isLoading:t}),setError:t=>e({error:t}),handleSocialLogin:e=>o(e)}),{name:"user-storage"})))},88781:(e,t,r)=>{"use strict";r.d(t,{A:()=>g});var a=r(95155),s=r(36346),i=r(82748),n=r(52619),l=r.n(n),o=r(20063),c=r(18955),u=r(12115),d=r(78441);let p=u.lazy(()=>Promise.resolve().then(r.bind(r,82748)).then(e=>({default:e.GarudaIcon}))),m=u.lazy(()=>Promise.resolve().then(r.bind(r,82748)).then(e=>({default:e.MuslimProIcon}))),h=u.lazy(()=>Promise.all([r.e(1356),r.e(284)]).then(r.bind(r,60284))),g=e=>{var t;let{emailInputComponents:r,socialLoginComponents:n,partner:g,locale:f,view:b,email:E,customView:w}=e,x=(0,o.useSearchParams)(),S=null!=(t=null==x?void 0:x.toString())?t:"",_=(0,c.c3)("sso.login"),y=(0,c.c3)("auth"),A=(0,c.c3)("sso.otp"),{Logos:N,title:I,subTitle:v}=((e,t,r)=>{switch(t){case"garuda":return{Logos:[(0,a.jsx)(p,{},"logo-garuda"),(0,a.jsx)(m,{},"logo-mp"),(0,a.jsx)(h,{},"logo-qb")],title:"Salaam, redeem your free premium subscription",subTitle:"Sign up or log in with your Muslim Pro account and enter your Garuda booking number to redeem your free premium subscription. "};case"gift-premium":return{Logos:[(0,a.jsx)(m,{},"logo-mp"),(0,a.jsx)(h,{},"logo-qb")],title:"Salaam, redeem your free premium subscription",subTitle:"Sign up or log in with your Muslim Pro account and enter your redemption code to redeem your free premium subscription. "};case"mondia":case"nuon":return(e=>{let t=(0,c.c3)("auth");return{Logos:[(0,a.jsx)(m,{},"logo-mp"),(0,a.jsx)(h,{},"logo-qb")],title:t("title"),subTitle:t("signup"===e?"subtitleSignup":"subtitleActivate")}})(null!=r?r:"");case d.iZ.SSO:return{Logos:[(0,a.jsx)(m,{},"logo-mp")],title:e("title"),subTitle:e("subtitle")};default:return{Logos:[(0,a.jsx)(m,{},"logo-mp"),(0,a.jsx)(h,{},"logo-qb")],title:"Salaam",subTitle:"Sign up or log in with your Muslim Pro account."}}})(_,g,b),j=g===d.iZ.GARUDA?"from-garuda-blue min-h-screen w-screen bg-opacity-50 bg-gradient-to-t to-transparent to-20%":"";return(0,a.jsx)(s.f,{className:j,children:(0,a.jsx)(s.f,{className:"w-full items-center px-4 py-16",children:(0,a.jsxs)(s.f,{className:"w-full max-w-[410px] items-center gap-4 text-center",children:[(0,a.jsx)(s.y,{className:"items-center gap-4 pb-4",children:(0,a.jsx)(u.Suspense,{fallback:(0,a.jsx)(i.LoaderSpinner,{}),children:N})}),"signup"===b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h5",{className:"text-light-fill-pri-100",children:I}),(0,a.jsx)("p",{className:"body2 text-light-fill-sec",children:v}),r,n&&g!==d.iZ.MONDIA&&g!==d.iZ.NUON?(0,a.jsxs)("p",{className:"body2 text-light-fill-sec",children:[" ",g===d.iZ.SSO?_("alternateOptionText"):"Or, you can"," "]}):null,n&&g!==d.iZ.MONDIA&&g!==d.iZ.NUON?n:null,g!==d.iZ.MONDIA&&g!==d.iZ.NUON?(0,a.jsxs)("p",{className:"body2 text-light-fill-pri-100",children:["".concat(g===d.iZ.SSO?"".concat(_("alreadyHaveAccount")," "):"Already have an account?"," "),(0,a.jsx)(l(),{href:"".concat(f?"/"+f:"","/login").concat(g?"/"+g:"").concat(S?"?".concat(S):""),children:g===d.iZ.SSO?_("loginCta"):"Log in"})]}):null,(0,a.jsxs)("p",{className:"body2 txt-light-fill-pri-100",children:["".concat(g===d.iZ.SSO?_("accidentText"):"Came here by accident?"," "),g!==d.iZ.MONDIA&&g!==d.iZ.NUON?(0,a.jsx)("br",{}):" ",(0,a.jsx)(l(),{href:"https://muslimpro.com/",children:g===d.iZ.SSO?_("gotoMuslimPro"):"Go to Muslim Pro website"})]})]}):null,"login"===b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h5",{className:"text-light-fill-pri-100",children:I}),(0,a.jsx)("p",{className:"body2 text-light-fill-sec",children:v}),r,n?(0,a.jsx)("p",{className:"body2 text-light-fill-sec",children:g===d.iZ.SSO?_("alternateOptionText"):y("orYouCan")}):null,n||null,g!==d.iZ.MONDIA&&g!==d.iZ.NUON?(0,a.jsxs)("p",{className:"body2 text-light-fill-pri-100",children:[g===d.iZ.SSO?"".concat(_("notHavingAccountText")," "):"Don't have an account yet?",(0,a.jsx)(l(),{href:"".concat(f?"/"+f:"","/signup").concat(g?"/"+g:"").concat(S?"?".concat(S):""),children:g===d.iZ.SSO?_("signupCta"):"Sign Up"})]}):null,(0,a.jsxs)("p",{className:"body2 txt-light-fill-pri-100",children:["".concat(g===d.iZ.SSO?_("accidentText"):y("byAccident")," "),g!==d.iZ.MONDIA&&g!==d.iZ.NUON?(0,a.jsx)("br",{}):" ",(0,a.jsx)(l(),{href:"https://muslimpro.com/",children:g===d.iZ.SSO?_("gotoMuslimPro"):y("website")})]})]}):null,"verify-otp"===b?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("h5",{className:"text-light-fill-pri-100",children:(d.iZ.SSO,A("title"))}),(0,a.jsxs)("p",{className:"body2 text-light-fill-sec",children:[(d.iZ.SSO,A("subtitle"))," ",(0,a.jsx)("span",{className:"body2 text-light-fill-pri-100",children:E})]}),r]}):null,w?(0,a.jsxs)(a.Fragment,{children:[w,r]}):null]})})})}},89759:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var a=r(12115);let s=e=>{let{pollingInterval:t=500,pollingLimit:r=6e5,callback:s,beginPolling:i}=e,[n,l]=(0,a.useState)(!1),[o,c]=(0,a.useState)(Date.now()),[u,d]=(0,a.useState)(!1);(0,a.useEffect)(()=>
1{i&&(l(!0),c(Date.now()))},[i]),(0,a.useEffect)(()=>{n&&p()},[n]);let p=async()=>{if(Date.now()-o>r)return void l(!1);await s()?(l(!1),d(!0)):setTimeout(()=>{p()},t)};return{pollingSuccess:u,isPolling:n}}}}]);
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.