!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="01d987c3-c0d5-494d-9900-8f9eda3a4547",e._sentryDebugIdIdentifier="sentry-dbid-01d987c3-c0d5-494d-9900-8f9eda3a4547")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[7351],{64471:function(e,t,r){r.d(t,{M:function(){return n}});class n extends Error{constructor(e,t,r){super(r),this.name="ApiError",this.url=t.url,this.status=t.status,this.statusText=t.statusText,this.body=t.body,this.request=e}}},6704:function(e,t,r){r.d(t,{O:function(){return g}});var n=r(95691),a=r(25134),i=r(11455);class o extends Error{get isCancelled(){return!0}constructor(e){super(e),this.name="CancelError"}}var s=new WeakMap,c=new WeakMap,u=new WeakMap,l=new WeakMap,d=new WeakMap,f=new WeakMap,p=new WeakMap;let h=Symbol.toStringTag;class g{get[h](){return"Cancellable Promise"}then(e,t){return(0,n._)(this,d).then(e,t)}catch(e){return(0,n._)(this,d).catch(e)}finally(e){return(0,n._)(this,d).finally(e)}cancel(){if(!((0,n._)(this,s)||(0,n._)(this,c)||(0,n._)(this,u))){if((0,i._)(this,u,!0),(0,n._)(this,l).length)try{for(let e of(0,n._)(this,l))e()}catch(e){console.warn("Cancellation threw an error",e);return}(0,n._)(this,l).length=0,(0,n._)(this,p)&&(0,n._)(this,p).call(this,new o("Request aborted"))}}get isCancelled(){return(0,n._)(this,u)}constructor(e){(0,a._)(this,s,{writable:!0,value:void 0}),(0,a._)(this,c,{writable:!0,value:void 0}),(0,a._)(this,u,{writable:!0,value:void 0}),(0,a._)(this,l,{writable:!0,value:void 0}),(0,a._)(this,d,{writable:!0,value:void 0}),(0,a._)(this,f,{writable:!0,value:void 0}),(0,a._)(this,p,{writable:!0,value:void 0}),(0,i._)(this,s,!1),(0,i._)(this,c,!1),(0,i._)(this,u,!1),(0,i._)(this,l,[]),(0,i._)(this,d,new Promise((t,r)=>{(0,i._)(this,f,t),(0,i._)(this,p,r);let a=e=>{(0,n._)(this,s)||(0,n._)(this,c)||(0,n._)(this,u)||(0,n._)(this,l).push(e)};return Object.defineProperty(a,"isResolved",{get:()=>(0,n._)(this,s)}),Object.defineProperty(a,"isRejected",{get:()=>(0,n._)(this,c)}),Object.defineProperty(a,"isCancelled",{get:()=>(0,n._)(this,u)}),e(e=>{!((0,n._)(this,s)||(0,n._)(this,c)||(0,n._)(this,u))&&((0,i._)(this,s,!0),(0,n._)(this,f)&&(0,n._)(this,f).call(this,e))},e=>{!((0,n._)(this,s)||(0,n._)(this,c)||(0,n._)(this,u))&&((0,i._)(this,c,!0),(0,n._)(this,p)&&(0,n._)(this,p).call(this,e))},a)}))}}},71650:function(e,t,r){r.d(t,{f:function(){return n}});let n={BASE:(0,r(8316).Z)().lg3OpenSearchUrl||"https://v3.launchgood.com/v3",VERSION:"2023-11-27T15:32:25Z",WITH_CREDENTIALS:!1,CREDENTIALS:"include",TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0,ENCODE_PATH:void 0}},56808:function(e,t,r){r.d(t,{c4:function(){return u},JH:function(){return g.J},_5:function(){return y._},Sr:function(){return p},Z:function(){return h}}),r(64471),r(6704),r(71650),(o=u||(u={})).NOT_SUBMITTED="not_submitted",o.PENDING_APPROVAL="pending_approval",o.SUSPENDED="suspended",o.ACTIVE="active",o.COMPLETED="completed",o.FAILED="failed",o.APPROVED="approved",o.IN_REVIEW="in_review",o.DIED="died",o.REJECTED="rejected",o.COMPLETE_UNPAID="complete_unpaid",(s=l||(l={})).FOOD_WATER="food-water",s.MOSQUE_COMMUNITY="mosque-community",s.EDUCATION="education",s.WOMEN="women",s.ORPHANS="orphans",s.REFUGEE="refugee",s.EMERGENCY_RELIEF="emergency-relief",s.HEALTH="health",s.CREATIVE="creative",s.OTHER="other",(c=d||(d={}))._501C3="501c3",c.GIFT_AID="gift_aid",c.REGISTERED_CHARITY="registered_charity";var n,a,i,o,s,c,u,l,d,f,p,h,g=r(52246);(n=f||(f={})).DEVELOPMENT="development",n.LOCAL="local",n.STAGING="staging",n.PRODUCTION="production",(a=p||(p={})).ASC="asc",a.DESC="desc",(i=h||(h={})).NAME="name",i.GOAL="goal",i.PLEDGED_AMOUNT="pledged_amount",i.END_DATE="end_date",i.START_DATE="start_date",i.STATUS="status",i.DONATION_COUNT="donation_count",i.LAUNCH_DATE="launch_date",i.CREATED_DATE="created_date",i.FUNDED_PERCENTAGE="funded_percentage";var y=r(49407)},52246:function(e,t,r){var n,a;r.d(t,{J:function(){return n}}),(a=n||(n={})).CAMPAIGN="campaign",a.ORGANIZATION="organization",a.COMMUNITY="community"},49407:function(e,t,r){r.d(t,{_:function(){return S}});var n=r(71650),a=r(64471),i=r(6704),o=r(82957).lW;let s=e=>null!=e,c=e=>"string"==typeof e,u=e=>c(e)&&""!==e,l=e=>"object"==typeof e&&"string"==typeof e.type&&"function"==typeof e.stream&&"function"==typeof e.arrayBuffer&&"function"==typeof e.constructor&&"string"==typeof e.constructor.name&&/^(Blob|File)$/.test(e.constructor.name)&&/^(Blob|File)$/.test(e[Symbol.toStringTag]),d=e=>e instanceof FormData,f=e=>{try{return btoa(e)}catch(t){return o.from(e).toString("base64")}},p=e=>{let t=[],r=(e,r)=>{t.push("".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(String(r))))},n=(e,t)=>{s(t)&&(Array.isArray(t)?t.forEach(t=>{n(e,t)}):"object"==typeof t?Object.entries(t).forEach(t=>{let[r,a]=t;n("".concat(e,"[").concat(r,"]"),a)}):r(e,t))};return(Object.entries(e).forEach(e=>{let[t,r]=e;n(t,r)}),t.length>0)?"?".concat(t.join("&")):""},h=(e,t)=>{let r=e.ENCODE_PATH||encodeURI,n=t.url.replace("{api-version}",e.VERSION).replace(/{(.*?)}/g,(e,n)=>{var a;return(null===(a=t.path)||void 0===a?void 0:a.hasOwnProperty(n))?r(String(t.path[n])):e}),a="".concat(e.BASE).concat(n);return t.query?"".concat(a).concat(p(t.query)):a},g=e=>{if(e.formData){let t=new FormData,r=(e,r)=>{c(r)||l(r)?t.append(e,r):t.append(e,JSON.stringify(r))};return Object.entries(e.formData).filter(e=>{let[t,r]=e;return s(r)}).forEach(e=>{let[t,n]=e;Array.isArray(n)?n.forEach(e=>r(t,e)):r(t,n)}),t}},y=async(e,t)=>"function"==typeof t?t(e):t,m=async(e,t)=>{let r=await y(t,e.TOKEN),n=await y(t,e.USERNAME),a=await y(t,e.PASSWORD),i=Object.entries({Accept:"application/json",...await y(t,e.HEADERS),...t.headers}).filter(e=>{let[t,r]=e;return s(r)}).reduce((e,t)=>{let[r,n]=t;return{...e,[r]:String(n)}},{});if(u(r)&&(i.Authorization="Bearer ".concat(r)),u(n)&&u(a)){let e=f("".concat(n,":").concat(a));i.Authorization="Basic ".concat(e)}return t.body&&(t.mediaType?i["Content-Type"]=t.mediaType:l(t.body)?i["Content-Type"]=t.body.type||"application/octet-stream":c(t.body)?i["Content-Type"]="text/plain":d(t.body)||(i["Content-Type"]="application/json")),new Headers(i)},b=e=>{if(void 0!==e.body){var t;return(null===(t=e.mediaType)||void 0===t?void 0:t.includes("/json"))?JSON.stringify(e.body):c(e.body)||l(e.body)||d(e.body)?e.body:JSON.stringify(e.body)}},_=async(e,t,r,n,a,i,o)=>{let s=new AbortController,c={headers:i,body:null!=n?n:a,method:t.method,signal:s.signal};return e.WITH_CREDENTIALS&&(c.credentials=e.CREDENTIALS),o(()=>s.abort()),await fetch(r,c)},E=(e,t)=>{if(t){let r=e.headers.get(t);if(c(r))return r}},T=async e=>{if(204!==e.status)try{let t=e.headers.get("Content-Type");if(t){if(["application/json","application/problem+json"].some(e=>t.toLowerCase().startsWith(e)))return await e.json();return await e.text()}}catch(e){console.error(e)}},w=(e,t)=>{let r={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable",...e.errors}[t.status];if(r)throw new a.M(e,t,r);if(!t.ok){var n,i;let r=null!==(n=t.status)&&void 0!==n?n:"unknown",o=null!==(i=t.statusText)&&void 0!==i?i:"unknown",s=(()=>{try{return JSON.stringify(t.body,null,2)}catch(e){return}})();throw new a.M(e,t,"Generic Error: status: ".concat(r,"; status text: ").concat(o,"; body: ").concat(s))}},U=(e,t)=>new i.O(async(r,n,a)=>{try{let n=h(e,t),i=g(t),o=b(t),s=await m(e,t);if(!a.isCancelled){let c=await _(e,t,n,o,i,s,a),u=await T(c),l=E(c,t.responseHeader),d={url:n,ok:c.ok,status:c.status,statusText:c.statusText,body:null!=l?l:u};w(t,d),r(d.body)}}catch(e){n(e)}});var v=r(8316),A=r(52246);class S{static getDiscover(e){let{entity:t,authorization:r,q:a,sort:i,zakatVerified:o,hideCommunityCampaigns:s,nearMe:c,countries:u,charityType:l,categories:d,limit:f,offset:p,aggregateCategories:h,canChooseInCampaignCreation:g}=e;return U(n.f,{method:"GET",url:"/discover/{entity}",path:{entity:t},headers:{Authorization:r},query:{q:a,sort:i,zakat_verified:o,hide_community_campaigns:s,near_me:c,countries:u,charity_type:l,categories:d,limit:f,offset:p,aggregate_categories:h,can_choose_in_campaign_creation:g}})}static optionsDiscover(){return U(n.f,{method:"OPTIONS",url:"/discover/{entity}"})}static getCardsFeatured(e,t,r,a){return U(n.f,{method:"GET",url:"/cards/{entity}/featured",path:{entity:e},headers:{Authorization:a},query:{limit:t,offset:r}})}static optionsCardsFeatured(e){return U(n.f,{method:"OPTIONS",url:"/cards/{entity}/featured",path:{entity:e}})}static getCardsByAccountId(e,t,r,a,i,o,s,c,u,l,d,f){return U(n.f,{method:"GET",url:"/cards/{entity}/by-account-id/{id}",path:{entity:e,id:t},headers:{Authorization:i},query:{limit:r,offset:a,...e===A.J.CAMPAIGN&&{campaign_status:o},...e===A.J.COMMUNITY&&{community_status:o},sort:s,sort_direction:c,q:u,aggregate_statuses:l,name:d,search_after:f}})}static optionsCardsByAccountId(e,t){return U(n.f,{method:"OPTIONS",url:"/cards/{entity}/by-account-id/{id}",path:{entity:e,id:t}})}static optionsSearchManage(e){return U(n.f,{method:"OPTIONS",url:"/search/manage/{proxy+}",path:{proxy:e}})}static options(){return U(n.f,{method:"OPTIONS",url:"/"})}static getCardsById(e,t,r){return U(n.f,{method:"GET",url:"/cards/{entity}/by-id/{id}",path:{entity:e,id:t},headers:{Authorization:r}})}static optionsCardsById(e,t){return U(n.f,{method:"OPTIONS",url:"/cards/{entity}/by-id/{id}",path:{entity:e,id:t}})}static getCardsByIdList(e,t,r){return U(n.f,{method:"GET",url:"/cards/{entity}/by-id-list",path:{entity:e},headers:{Authorization:t},query:{id_list:r}})}static optionsCardsByIdList(e){return U(n.f,{method:"OPTIONS",url:"/cards/{entity}/by-id-list",path:{entity:e}})}static getCardsByListId(e,t,r,a,i,o,s){return U(n.f,{method:"GET",url:"/cards/{entity}/by-list-id/{id}",path:{entity:e,id:t},headers:{Authorization:i},query:{limit:r,offset:a,randomize:o,seed:s}})}static optionsCardsByListId(){return U(n.f,{method:"OPTIONS",url:"/cards/{entity}/by-list-id/{id}"})}static getCharityLookup(e,t,r,a,i){return U(n.f,{method:"GET",url:"/charity/lookup",path:{entity:e},headers:{Authorization:a},query:{q:t,country:r},body:i})}static optionsCharityLookup(e){return U(n.f,{method:"OPTIONS",url:"/charity/lookup",path:{entity:e}})}static getSystemStatus(e){return U(n.f,{method:"GET",url:"/system/status",body:e})}}S.qurbaniRewards=async e=>{let{animalType:t,countryCode:r,minPrice:n,maxPrice:a,offset:i,limit:o,userIds:s}=e,c=(0,v.Z)().lg3OpenSearchUrl,u=new URLSearchParams;t&&u.append("animal",t),r&&u.append("country",r),n&&u.append("min",n.toString()),a&&u.append("max",a.toString()),i&&u.append("offset",i.toString()),o&&u.append("limit",o.toString()),s&&u.append("user_ids",s.join(","));let l=await fetch("".concat(c,"/rewards/search?type=qurbani&").concat(u.toString()),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await l.json()},S.getQurbaniOrganizers=async e=>{let{animalType:t,countryCode:r,minPrice:n,maxPrice:a,name:i}=e,o=(0,v.Z)().lg3OpenSearchUrl,s=new URLSearchParams;i&&s.append("q",i),t&&s.append("animal",t),r&&s.append("country",r),n&&s.append("min",n.toString()),a&&s.append("max",a.toString());let c=await fetch("".concat(o,"/rewards/users?type=qurbani&").concat(s.toString()),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await c.json()},S.getOrganizationsByIds=async e=>{let t=(0,v.Z)().lg3OpenSearchUrl,r="id_list=".concat(e.join(",")),n=await fetch("".concat(t,"/cards/organization/by-id-list?").concat(r),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await n.json()},S.getOrganizationById=async e=>{let t=(0,v.Z)().lg3OpenSearchUrl,r=await fetch("".concat(t,"/cards/organization/by-id/").concat(e),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await r.json()},S.getCampaignsByIds=async e=>{let t=(0,v.Z)().lg3OpenSearchUrl,r="id_list=".concat(e.join(",")),n=await fetch("".concat(t,"/cards/campaigns/by-id-list?").concat(r),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await n.json()},S.getCampaignById=async e=>{let t=(0,v.Z)().lg3OpenSearchUrl,r=await fetch("".concat(t,"/cards/campaign/by-id/").concat(e),{method:"GET",headers:{"content-type":"application/json",accept:"application/json"}});return await r.json()}},19974:function(e,t,r){function n(e){let{url:t,query:r,src:n}=e,{path:a,query:i}=function(e){let[t,r]=e.split("?");return{path:t,query:new URLSearchParams(r)}}(t),o=Object.fromEntries(i.entries()),s=r instanceof URLSearchParams?Object.fromEntries(r.entries()):r,c=new URLSearchParams({...o,...s});n&&c.set("src",n),c.sort();let u=c.toString();return u?"".concat(a,"?").concat(u):a}function a(e,t){let r=t||{},n=e;return Object.keys(r).forEach(e=>{let t=r[e];n=n.replace("%".concat(e,"%"),t)}),n}function i(e,t){let{url:r,label:i,query:o,src:s,replacements:c}=e,u=a(n({url:r,query:o,src:s}),c);return console.warn("ABTestLink: since ".concat(t,', using fallback href of "').concat(r,'" & sending URL as "').concat(u,'"')),{url:u,label:i}}r.r(t),r.d(t,{builderABTestLink:function(){return c},default:function(){return u}});var o=r(5693),s=r(22142);async function c(e){let{id:t,url:r,label:c,replacements:u,query:l,src:d}=e;console.debug("ABTestLink: building AB Test URL for ".concat(s.b.NAV_ITEMS," with ID ").concat(t,"..."),{replacements:u,url:r,query:l,src:d});try{let e={url:window.location.href,query:{data:{id:t}}};console.debug("ABTestLink: getting AB Test URL for ".concat(s.b.NAV_ITEMS," with ID ").concat(t," using builder params:"),e);let{data:{url:c,name:f,label:p}}=await o.f.get(s.b.NAV_ITEMS,e);if(!c)return i({url:r,label:p,query:l,src:d,replacements:u},"URL was empty in response from Builder.io");console.debug("ABTestLink: found ".concat(s.b.NAV_ITEMS," for ID ").concat(t," OK:"),{name:f,label:p,url:c});let h=n({url:c,query:l,src:d});return{url:a(h,u),label:p}}catch(e){return console.error("ABTestLink: Error building AB Test URL for ".concat(s.b.NAV_ITEMS," with ID ").concat(t,":"),e),i({url:r,label:c,query:l,src:d,replacements:u},"error building AB Test URL for ".concat(s.b.NAV_ITEMS," with ID ").concat(t))}}var u=c},22142:function(e,t,r){r.d(t,{b:function(){return n}});let n={NAV_ITEMS:"nav-items",FEATURE_VARIANT:"feature-variant"}},5693:function(e,t,r){r.d(t,{f:function(){return i}});var n=r(91315),a=r(8316);let i=n.fl.init((0,a.Z)().buiderIoApiKey)},17351:function(e,t,r){r.d(t,{cO:function(){return n.cO},mC:function(){return n.mC},cf:function(){return n.cf},lB:function(){return i.lB},F0:function(){return n.F0},u6:function(){return n.u6},Ug:function(){return o.Ug},Kv:function(){return o.Kv},U0:function(){return n.U0},Q2:function(){return n.Q2},h6:function(){return n.h6},D$:function(){return n.D$},KD:function(){return o.KD},rZ:function(){return i.rZ},T:function(){return i.T},DF:function(){return a.DF},y9:function(){return i.y9},ce:function(){return a.ce},kC:function(){return i.kC},MW:function(){return i.MW},uk:function(){return n.uk},$I:function(){return n.$I},ev:function(){return i.ev},OU:function(){return i.OU},o$:function(){return i.o$},wT:function(){return i.wT},ws:function(){return a.ws},BK:function(){return i.BK},hz:function(){return i.hz},lY:function(){return i.lY},A9:function(){return i.A9},EL:function(){return i.EL},mv:function(){return i.mv},E8:function(){return i.E8},Ox:function(){return i.Ox},Sq:function(){return i.Sq},Yc:function(){return i.Yc},CB:function(){return i.CB},rT:function(){return i.rT},dm:function(){return i.dm},d4:function(){return i.d4},CX:function(){return i.CX},w3:function(){return i.w3},Z0:function(){return i.Z0},il:function(){return i.il},$A:function(){return i.$A},kF:function(){return i.kF},VX:function(){return a.VX},O1:function(){return a.O1},Ho:function(){return i.Ho},p8:function(){return i.p8},A:function(){return i.A},PN:function(){return i.PN},ns:function(){return i.ns},fJ:function(){return i.fJ},iE:function(){return i.iE},$N:function(){return i.$N},fi:function(){return i.fi},Jc:function(){return i.Jc},Gr:function(){return i.Gr},s2:function(){return i.s2},sv:function(){return i.sv},_C:function(){return i._C},r4:function(){return i.r4},GG:function(){return i.GG},ze:function(){return i.ze},Nw:function(){return i.Nw},X0:function(){return i.X0},mu:function(){return n.mu},U_:function(){return n.U_},Tp:function(){return i.Tp},T1:function(){return a.T1},IG:function(){return i.IG},z8:function(){return i.z8},TB:function(){return n.TB},j3:function(){return i.j3},Ri:function(){return i.Ri},Cc:function(){return i.Cc},JJ:function(){return i.JJ},cr:function(){return i.cr},JV:function(){return i.JV},_t:function(){return n._t}}),r(19974),r(22142),r(5693);var n=r(78705),a=r(26689),i=r(93448),o=r(70103)},26689:function(e,t,r){r.d(t,{DF:function(){return o},O1:function(){return u},T1:function(){return l},VX:function(){return c},ce:function(){return s},ws:function(){return a}});var n=r(8316);let a=["fundraiserDashboard","fundraiserRecurring"],i={home:"%lg3BaseUrl%/",profile:"%lg3BaseUrl%/user/newprofile#!/user-profile/profile/%username%",startCampaign:"%lg3BaseUrl%/start",howItWorks:"%lg3BaseUrl%/v4/startfundraising",discover:"%lg3BaseUrl%/discover",legacy:"%lg3BaseUrl%/legacy",emergency:"%lg3BaseUrl%/emergency",emergencyRelief:"%lg3BaseUrl%/discover#!?f%5B%5D=category:emergency-relief&f%5B%5D=hide_community_campaigns:true",zakatLandingPage:"%lg3BaseUrl%/zakat",fridayGivers:"%lg3BaseUrl%/club#!/giving_club/friday-givers?src=footer",aboutUs:"%lg3BaseUrl%/about-us",careers:"%lg3BaseUrl%/careers",blog:"%lg3BaseUrl%/blog",safety:"%lg3BaseUrl%/safety",copyright:"%lg3BaseUrl%/copyright",termsOfUse:"%lg3BaseUrl%/terms-of-use",privacy:"%lg3BaseUrl%/privacy",createCampaign:"%lg3BaseUrl%/start",startCommunity:"%lg3BaseUrl%/communities/start",donations:"%lg3BaseUrl%/user/newprofile#!/user-profile/donations/%username%",scheduledGiving:"%lg3BaseUrl%/user/newprofile#!/user-profile/auto-giving-and-challenges/%username%",zakat:"%lg3BaseUrl%/user/newprofile#!/user-profile/zakat/%username%",givingList:"%lg3BaseUrl%/user/newprofile#!/user-profile/give-list/%username%",tax:"%baseUrl%/user/taxes",fridayGiversDonor:"%lg3BaseUrl%/user/newprofile#!/user-profile/auto-giving-and-challenges/%username%/club/friday-givers/join",ramadanReferrals:"%baseUrl%/ramadan?src=lg_sitewide_admin_panel_referrals",eid:"%baseUrl%/eid",dhcReferrals:"%baseUrl%/dhc?src=lg_sitewide_admin_panel_referrals",loginPage:"%lg3BaseUrl%/loginpage#!/?url=%username%",campaigns:"%lg3BaseUrl%/user/newprofile#!/user-profile/campaigns/%username%/active-campaigns",communities:"%lg3BaseUrl%/user/newprofile#!/user-profile/communities/%username%",reports:"%baseUrl%/fundraising/financial",editSettings:"%lg3BaseUrl%/user/newprofile#!/user-profile/edit-settings/%username%",editProfile:"%lg3BaseUrl%/user/newprofile#!/user-profile/edit-profile/%username%",paymentMethods:"%lg3BaseUrl%/user/newprofile#!/user-profile/cards-and-payment-methods/%username%",supportHome:"%supportUrl%/home",supportResources:"%supportUrl%/support/solutions/35000140783",supportContact:"%supportUrl%/support/tickets/new",supportPayoutLeanMore:"%supportUrl%/support/solutions/articles/35000013641-how-can-i-receive-a-payout-",supportRamadanChallenge:"%supportUrl%/support/solutions/folders/35000225679",supportDHC:"%supportUrl%/support/solutions/articles/35000220930-dhul-hijjah-challenge-terms-and-conditions",supportRamadanLeaderboardLearnMore:"%supportUrl%/support/solutions/articles/35000154464-all-about-the-ramadan-challenge-for-campaign-creators-#Daily-Leaderboard-Contest%C2%A0",blogHome:"%blogs%",blogDhulHijjah:"%blogs%/posts/fundraise-during-the-first-10-days-of-dhul-hijjah",blogDhulHijjahImpact:"%blogs%/posts/qurbani-fundraising-2-0---elevate-your-impact-this-dhul-hijjah",blogRamadan:"%blogs%/posts/unveiling-the-power-of-ramadan-fundraising",admin:"%lg3BaseUrl%/newadmin#!/admin/dashboard",fundraiserDashboard:"%baseUrl%/fundraising/dashboard",fundraiserRecurring:"%baseUrl%/fundraising/recurring",fundraiserDashboardLeaderboards:"%baseUrl%/fundraising/leaderboards",fundraiserDashboardDhulHijjah:"%baseUrl%/fundraising/dhul-hijjah",fundraiserDashboardDhulHijjahReferrals:"%baseUrl%/fundraising/dhul-hijjah/referrals",fundraiserDashboardDhulHijjahLeaderboards:"%baseUrl%/fundraising/dhul-hijjah/leaderboards",fundraiserDashboardRamadan:"%baseUrl%/fundraising/ramadan",fundraiserDashboardQurbani:"%baseUrl%/fundraising/qurbani",fundraiserDashboardReferrals:"%baseUrl%/fundraising/referrals",ramadanLeaderboardsGlobal:"%baseUrl%/leaderboards/global",fundraiserDashboardCampaigns:"%baseUrl%/fundraising/fundraisers",fundraiserDashboardCommunities:"%baseUrl%/fundraising/communities",fundraiserDashboardDonations:"%baseUrl%/fundraising/donations",fundraiserDashboardReports:"%baseUrl%/fundraising/reports",fundraiserDashboardPayouts:"%baseUrl%/fundraising/payouts",fundraiserReportDhulHijjah1445:"%baseUrl%/fundraising/reports/dhul-hijjah-1445/referrals",fundraiserReportRamadan1445:"%baseUrl%/fundraising/reports/ramadan-1445",fundraiserReportQurbani1445:"%baseUrl%/fundraising/reports/qurbani-1445",fundraiserDashboardFundraisersLive:"%baseUrl%/fundraising/fundraisers?tab=2"};function o(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return i[e].replace("%baseUrl%",(0,n.Z)().baseUrl).replace("%lg3BaseUrl%",(0,n.Z)().lg3BaseUrl).replace("%supportUrl%",(0,n.Z)().supportUrl).replace("%blogs%",(0,n.Z)().blogUrl).replace("%username%",t)}let s=e=>"".concat((0,n.Z)().lg3BaseUrl).concat(e,"/dhc/referrals"),c=e=>"".concat((0,n.Z)().baseUrl,"/scheduled-giving/charities/").concat(e,"/checkout"),u=e=>"".concat((0,n.Z)().lg3BaseUrl,"/").concat(e),l=e=>e.replace("".concat((0,n.Z)().baseUrl,"/"),"v4/")},70103:function(e,t,r){r.d(t,{AE:function(){return o},bG:function(){return g},Ug:function(){return u},Kv:function(){return _},KD:function(){return d}});class n{static generateSearchParams(e){let t=new URLSearchParams;if(t.append("docType",e.docType),t.append("index","launchgood_production_project"),t.append("f[]","hide_community_campaigns:true"),e.almost_funded&&t.append("f[]","almost_funded:true"),e.coordinates){let r="near_me:".concat(e.coordinates.latitude,"|").concat(e.coordinates.longitude);t.append("f[]",r)}return["limit","offset","randomize","src","type"].forEach(r=>{let n=e[r];n&&t.append(r,n.toString())}),t}}n.getCampaigns=async e=>{let{docType:t,coordinates:r,limit:a,offset:i=0,randomize:o=!0,src:s,type:c="discovery",almost_funded:u=!1}=e,l=n.generateSearchParams({docType:t,coordinates:r,limit:a,offset:i,randomize:o,src:s,type:c,almost_funded:u}),d=await fetch("".concat("https://search.launchgood.com","/v2/production?").concat(l.toString()));return await d.json()};var a,i=r(56808);(a||(a={})).ACTIVE="active";class o{static getToken(){let e=localStorage.getItem("token");if(!e)throw Error("Invalid authorization");return e}}o.getLiveCommunities=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:3,r=o.getToken();return(await i._5.getCardsByAccountId(i.JH.COMMUNITY,e,t,void 0,r,a.ACTIVE)).results},o.getCommunitiesByAccount=async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:300,r=o.getToken();return(await i._5.getCardsByAccountId(i.JH.COMMUNITY,e,t,void 0,r)).results},o.getCommunitiesAggregateByAccount=async e=>{let t=o.getToken();return await i._5.getCardsByAccountId(i.JH.COMMUNITY,e,0,void 0,t,void 0,void 0,void 0,void 0,!0)};var s=r(79889),c=r(43104);class u{}u.getPayoutsData=async e=>{let{accountId:t}=e;return await (0,c.WY)(s.f,{method:"POST",url:"/api/account/transfers",body:{account_id:t}})};var l=r(8316);class d{}d.createGuestUser=async e=>await (0,c.WY)(s.f,{method:"POST",url:"/api/user/guest",body:e}),d.toggleSubscribeToNewsletter=async e=>await (0,c.WY)(s.f,{method:"POST",url:"/api/user/toggleSubscribeToNewsletter/".concat(e)}),d.getGeoLocation=async()=>{let e=await fetch((0,l.Z)().geolocationApiUrl);return await e.json()};var f=r(56158),p=r(95106);let h={};class g{}g.getSupportedCurrencies=async()=>await (0,c.WY)(f.OpenAPI,{method:"POST",url:"/api/fulladmin/currencies"}),g.exchangeRate=async(e,t)=>{if(e===t)return Promise.resolve({from:e,to:t,rate:1,createdAt:p.ou.now()});let r="".concat(e,"-").concat(t);if(h[r]&&p.ou.now().diff(h[r].createdAt,"hours").hours<24)return Promise.resolve(h[r]);let{result:n}=await (0,c.WY)(f.OpenAPI,{method:"GET",url:"/project/data/exchange-rate/".concat(e,"/").concat(t)});return h[r]={...n,createdAt:p.ou.now()},h[r]};var y=r(8073),m=r(48398),b=r(60407);class _{}_.generateTotp=e=>{try{return new y.Authenticator({algorithm:y.HashAlgorithms.SHA1,digits:6,step:30,epoch:Date.now(),encoding:y.KeyEncodings.HEX,window:0,createRandomBytes:m.Mi,createDigest:m.k6,keyDecoder:b.Ei,keyEncoder:b._C}).generate(e)}catch(e){throw console.error("Could not generate Totp from given shared secret!"),e}},_.isUserWhitelisted=async()=>{let{result:e}=await f.UserService.currentUser();return!e["recaptcha-boolean"]},_.generateRecaptcha=async e=>{let t=await _.isUserWhitelisted();if(console.debug("Is the user whitelisted?",t),t)return" ";let r=localStorage.getItem("totpSharedSecret");if(r)return _.generateTotp(r);if(!e)throw console.warn("Recaptcha ref yet undefined; possibly recaptcha has not loaded yet"),Error("Cannot generate reCaptcha due to undefined current ref");return e.reset(),await e.executeAsync()||""}}}]);
//# sourceMappingURL=7351-179a011a2993f254.js.map