PageSourceSearch

https://static-prod.mightycause.com/mc-client/chunk-ZJVTDGYJ.js

js mightycause.com collected 2026-09-24 07:16:34 UTC 155,369 bytes, 7 lines download raw bytes

1
2!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="519b88b3-bd8f-5dff-85b4-ef9adb671123")}catch(e){}}();
3import{a as X,b as ee,c as Po}from"./chunk-I5XS5Q2K.js";import{a as To}from"./chunk-2KFFFEXL.js";import{a as Fo}from"./chunk-ZMC6OM4X.js";import{b as So}from"./chunk-5FXJFDVN.js";import{a as bo}from"./chunk-2KCKI4SH.js";import{a as xo}from"./chunk-Y54WF4EA.js";import"./chunk-KR6ZLUIO.js";import"./chunk-VG22JOIZ.js";import{a as Bt}from"./chunk-AOVG3ODU.js";import{a as zt}from"./chunk-YUNWLS6E.js";import"./chunk-UHZ4BJZN.js";import"./chunk-Z3EW3FH5.js";import"./chunk-Q5UIOSSP.js";import"./chunk-2GXNKGGH.js";import{a as ko}from"./chunk-63NVGYC5.js";import{a as oo}from"./chunk-YBSHWHWP.js";import{b as fo}from"./chunk-SF3LBQWY.js";import"./chunk-3EG53Q5T.js";import"./chunk-WDSEG2HL.js";import"./chunk-TFZ6BMYA.js";import"./chunk-KM7DT4K3.js";import"./chunk-XVD3ROXQ.js";import"./chunk-63ANJDYR.js";import"./chunk-YW2E6DSI.js";import{a as so}from"./chunk-KH5DZGNM.js";import{a as _e,b as yo}from"./chunk-5EINV65B.js";import{a as Co}from"./chunk-Z6USEE7H.js";import{d as uo,e as h,h as _o}from"./chunk-LHPVZF3V.js";import"./chunk-2M3QETKK.js";import"./chunk-INEWE6SG.js";import{c as T,d as mo,e as po}from"./chunk-IKEJPASG.js";import{b as ho}from"./chunk-HVR6QYVL.js";import"./chunk-2JF74RQL.js";import{a as lo}from"./chunk-I7BLO743.js";import"./chunk-DF7HIBO6.js";import{a as go}from"./chunk-O5N53BEO.js";import"./chunk-C57QP4TF.js";import"./chunk-6ESVMRDE.js";import"./chunk-W7NCBQUV.js";import"./chunk-77KO6I45.js";import"./chunk-R7MSJQOC.js";import{a as eo}from"./chunk-6HTRP6U7.js";import"./chunk-BSKHYKXK.js";import"./chunk-I5X7DE55.js";import"./chunk-ETZRMDHS.js";import"./chunk-NPR23P7I.js";import"./chunk-BVS47MGJ.js";import"./chunk-WDJPTZC5.js";import{a as Xt}from"./chunk-XZFXRJRY.js";import"./chunk-AAFBOZHS.js";import{b as io,e as no,h as ao,i as ro,j as co}from"./chunk-TA6QZW4D.js";import"./chunk-T5Q4IEHB.js";import"./chunk-KSQRQOTB.js";import{b as vo}from"./chunk-ICSKVG7Y.js";import{a as Zt}from"./chunk-A7W5NRHC.js";import"./chunk-NTJ4CINI.js";import"./chunk-6UNLROVI.js";import{a as Ht,b as Wt}from"./chunk-XBHOMARE.js";import"./chunk-C5T7GUT6.js";import"./chunk-DSHWJW7U.js";import{a as Jt}from"./chunk-FLZNG7WM.js";import{b as Kt}from"./chunk-Y53ZYOIU.js";import"./chunk-3YM57F2T.js";import{a as to}from"./chunk-4MMRLOE7.js";import"./chunk-MQQUES44.js";import{a as Lt}from"./chunk-4QRFWAA5.js";import{a as Gt,c as qt}from"./chunk-4OKMPB3H.js";import"./chunk-AGVOJNE2.js";import{a as Rt,b as Ut,c as Yt}from"./chunk-HJXQJEZE.js";import{b as he,c as $t}from"./chunk-I664YVIA.js";import{a as Qt,c as jt}from"./chunk-YSTTJCSR.js";import{c as Ot}from"./chunk-CN4EGA4I.js";import{f as Nt}from"./chunk-Z5M2FKAZ.js";import"./chunk-5NDSS4DO.js";import"./chunk-TTUVP5SZ.js";import{a as It}from"./chunk-5CMUHLSG.js";import{a as wt}from"./chunk-TNAGEFXD.js";import{a as $e}from"./chunk-YH4N3M4B.js";import"./chunk-BHOSW24E.js";import"./chunk-56LBQIQP.js";import"./chunk-IKWIL4NU.js";import{a as Dt}from"./chunk-5K5PYV5V.js";import"./chunk-TDGVUJZJ.js";import{d as ze}from"./chunk-MWF7JXGK.js";import{b as Mt}from"./chunk-UJXOZNZV.js";import{a as Et,b as At}from"./chunk-KS3Q7H57.js";import"./chunk-DAOAKQM2.js";import{a as k}from"./chunk-MGCQ5S6F.js";import"./chunk-MJXNRHWH.js";import{a as yt,b as kt,c as vt}from"./chunk-BUOPWRDV.js";import{d as Ft,e as St}from"./chunk-UQU3EU23.js";import"./chunk-346ISJSG.js";import{b as Pt,c as Tt,d as Vt}from"./chunk-CNRKNNWP.js";import{d as mt}from"./chunk-L6Z7ZO7O.js";import"./chunk-TLCCWCNW.js";import{a as gt}from"./chunk-5SJALNJN.js";import{a as ut,b as pt,c as ht,d as _t,e as Ct,i as ft}from"./chunk-XEY266ER.js";import"./chunk-SEDEP525.js";import"./chunk-SECBI6OV.js";import"./chunk-LXBG4CPT.js";import"./chunk-56KVT3OQ.js";import{C as rt,D as ct,G as st,H as dt,I as lt,b as Je,d as C,g as Ze,h as Xe,o as et,r as tt,u as ot,v as it,w as nt,x as at}from"./chunk-MF7VZYLI.js";import{b as He,c as We,e as Ke}from"./chunk-NFMDOWTR.js";import"./chunk-QE6DXY66.js";import{a as xt,b as bt}from"./chunk-B5YZVWIB.js";import"./chunk-HCSN2NMS.js";import"./chunk-FDIRDMLL.js";import"./chunk-XQLUXGKM.js";import"./chunk-3JHJJCIF.js";import"./chunk-J4X36CU5.js";import"./chunk-X3ZU2Z3D.js";import"./chunk-QZXCI4ZV.js";
3import{c as Qe,d as je}from"./chunk-VO633UWN.js";import{b as Le,c as Ge,f as Ye}from"./chunk-XIKGSSI2.js";import"./chunk-MNZQGPDO.js";import{g as Oe,j as Be}from"./chunk-NK2KZLT6.js";import"./chunk-MU5APV2L.js";import{a as Z,b as Ue}from"./chunk-KRFZY2QT.js";import{a as qe,b as Re}from"./chunk-DFSGG2NH.js";import"./chunk-MREDPIUE.js";import"./chunk-BWICLBYB.js";import"./chunk-TYTNPDEC.js";import"./chunk-WAPZ5LEW.js";import{A as we,D as Ie,E as pe,F as Ne,L as $,w as Me}from"./chunk-746D4QTP.js";import{Ac as S,Dc as m,Fd as I,Hc as ge,Ib as ve,Ic as xe,Jc as be,Lc as M,M as G,Mc as Fe,Nc as B,Ob as K,Oc as Se,Pc as se,R as H,Rc as Pe,Sc as a,T as fe,Tc as L,Ua as ke,Uc as y,Vc as de,Wc as le,Xc as Te,a as Ce,ba as ye,cc as d,cd as Ve,dc as l,dd as Ee,ea as ie,ec as ne,fc as J,gc as E,hc as A,hd as Ae,ic as f,id as me,jc as i,kb as W,kc as o,lb as j,lc as u,nd as V,od as Q,pc as ae,pd as w,qa as g,qb as n,qc as re,qd as ue,rc as ce,sd as De,uc as P,va as b,w as z,wa as F,xa as q,ya as U}from"./chunk-BZJI6Z2X.js";import{g as oe}from"./chunk-CS7K6LXP.js";var Mo=["checkoutNgForm"],wo=["donationAmtInput"],Io=["groupAutoComplete"],No=["groupChipList"],Oo=["groupIdsInput"],Bo=["stripePayment"],Lo=["braintreePayment"],Go=["donationCustomQuestionsFormComponent"],qo=["brandCustomQuestionsFormComponent"],Ro=["socialLoginFormForRockfoc"],Uo=["paymentSectionAnchor"],Yo=()=>[60],Vo=t=>({paymentMethodText:t}),Eo=(t,c)=>c.value,Qo=(t,c)=>c.fund_id,Ao=(t,c)=>c.id,Do=(t,c)=>c.code,jo=(t,c)=>c.key;function $o(t,c){if(t&1&&(i(0,"span"),a(1," benefitting "),i(2,"strong"),a(3),o(),a(4,". "),o()),t&2){let e=m(2);n(3),L(e.checkout.story.org_name)}}function zo(t,c){if(t&1&&(i(0,"p",19),a(1," You're making a donation to "),i(2,"strong"),a(3),o(),d(4,$o,5,1,"span"),o()),t&2){let e=m();n(3),y("",e.checkout.story.title," "),n(),l(e.checkout.story.type==="Widget"&&e.checkout.story.org_name?4:-1)}}function Ho(t,c){if(t&1&&(i(0,"div",20),u(1,"app-horizontal-tile",30),o()),t&2){let e=m();n(),f("urn",e.checkout.story.urn)}}function Wo(t,c){if(t&1&&(i(0,"span"),a(1),o()),t&2){let e=m(3);n(),y(" sponsored by ",e.checkout.paymentParameters.matching_grant_details.name," ")}}function Ko(t,c){if(t&1&&(i(0,"div",32)(1,"div",51)(2,"span")(3,"span",44),u(4,"i",52),o(),a(5),d(6,Wo,2,1,"span"),o()()()),t&2){let e=m(2);n(5),y(" Making a donation toward ",e.checkout.paymentParameters.matching_grant_details.title," "),n(),l(e.checkout.paymentParameters.matching_grant_details.name?6:-1)}}function Jo(t,c){if(t&1){let e=P();i(0,"mat-radio-group",53),S("change",function(){b(e);let r=m(2);return F(r.handleDonationType())}),i(1,"div",46)(2,"div",54)(3,"mat-radio-button",55),a(4," One-time donation "),o()(),i(5,"div",56)(6,"mat-radio-button",57),a(7," Monthly donation "),o()()()()}}function Zo(t,c){t&1&&(i(0,"span"),a(1,"/month"),o())}function Xo(t,c){if(t&1&&(i(0,"span",61),a(1),V(2,"truncate"),o()),t&2){let e=m().$implicit;n(),y(" ",w(2,1,e.description,Ae(4,Yo))," ")}}function ei(t,c){if(t&1){let e=P();i(0,"div")(1,"button",59),S("click",function(){let r=b(e).$implicit,p=m(3);return F(p.updateAmount(r))}),i(2,"span",60),a(3),V(4,"centsToCurrency"),d(5,Zo,2,0,"span"),o(),d(6,Xo,3,5,"span",61),o()()}if(t&2){let e,s,r=c.$implicit,p=m(3);Pe(Ee("col-12 suggestion-levels text-center ",p.suggestionLevelsStyles)),n(),se("bg-brand-theme",(p.selectedAmount==null||(e=p.selectedAmount.toString())==null?null:e.replace(",",""))===(r.value_in_cents/100).toString())("selected",(p.selectedAmount==null||(s=p.selectedAmount.toString())==null?null:s.replace(",",""))===(r.value_in_cents/100).toString()),n(2),y(" ",w(4,10,r.value_in_cents,p.getNarrowCurrencySymbol(p.checkout.paymentParameters.default_currency))," "),n(2),l(p.checkoutForm.controls.donationType.value==="2"?5:-1),n(),l(r.description?6:-1)}}function ti(t,c){if(t&1&&(i(0,"div",35),E(1,ei,7,13,"div",58,ne),o()),t&2){let e=m(2);n(),A(e.checkout.donorExperience.donation_suggestions)}}function oi(t,c){if(t&1&&(i(0,"span",40),a(1),V(2,"uppercase"),o()),t&2){let e=m(2);n(),y(" ",Q(2,1,e.checkout.paymentParameters.default_currency),"\xA0 ")}}function ii(t,c){t&1&&(i(0,"span",40),a(1,"/month"),o())}function ni(t,c){t&1&&(i(0,"mat-error"),a(1," Amount is "),i(2,"strong"),a(3,"required"),o()())}function ai(t,c){if(t&1&&(i(0,"mat-error"),a(1),V(2,"number"),o()),t&2){let e=m(2);n(),de(" The donation amount must be at least ",e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency),"",w(2,2,e.checkout.paymentParameters.min_donation_amount,0)," ")}}function ri(t,c){t&1&&(i(0,"div",63)(1,"span",44),u(2,"i",64),o(),i(3,"span"),a(4," State tax credit documents cannot be provided to donors who choose to remain anonymous. "),o()())}function ci(t,c){if(t&1&&(u(0,"div",26),i(1,"mat-checkbox",62),a(2," Donate anonymously "),o(),u(3,"div",26),d(4,ri,5,0,"div",63)),t&2){let e=m(2);n(4),l(e.showTaxCreditWarning?4:-1)}}function si(t,c){if(t&1&&(i(0,"mat-option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e.value),n(),y(" ",e.viewValue," ")}}function di(t,c){t&1&&(i(0,"mat-error"),a(1," Dedication address is "),i(2,"strong"),a(3,"required"),o()())}function li(t,c){t&1&&(i(0,"mat-error"),a(1," Name is "),i(2,"strong"),a(3,"required"),o()())}function mi(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function ui(t,c){t&1&&(i(0,"mat-error"),a(1," Addressee email is "),i(2,"strong"),a(3,"required"),o()())}function pi(t,c){t&1&&(i(0,"mat-error"),a(1," Enter valid "),i(2,"strong"),a(3,"email"),o(),a(4," address "),o())}function hi(t,c){if(t&1&&(i(0,"div",67)(1,"mat-form-field")(2,"mat-label"),a(3,"Addressee email"),o(),u(4,"input",72),d(5,ui,4,0,"mat-error"),d(6,pi,5,0,"mat-error"),o(),i(7,"mat-form-field",73)(8,"mat-label"),a(9,"Custom message"),o(),u(10,"textarea",74),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.dedicationEmail.errors&&e.checkoutForm.controls.dedicationEmail.errors.required?5:-1),n(),l(e.checkoutForm.controls.dedicationEmail.errors&&e.checkoutForm.controls.dedicationEmail.errors.invalidEmail?6:-1)}}function _i(t,c){if(t&1&&(i(0,"div",67)(1,"mat-form-field")(2,"mat-label"),a(3,"Dedication address"),o(),i(4,"mat-select",68),E(5,si,2,2,"mat-option",69,Eo),o(),d(7,di,4,0,"mat-error"),o(),i(8,"mat-form-field")(9,"mat-label"),a(10,"Name of addressee"),o(),u(11,"input",70),d(12,li,4,0,"mat-error"),d(13,mi,5,0,"mat-error"),o(),i(14,"mat-checkbox",71),a(15," Send an email to the addressee "),o(),d(16,hi,11,2,"div",67),o()),t&2){let e=m(3);n(5),A(e.checkout.dedicationTypes),n(2),l(e.checkoutForm.controls.dedicationType.errors&&e.checkoutForm.controls.dedicationType.errors.required?7:-1),n(5),l(e.checkoutForm.controls.dedicationName.errors&&e.checkoutForm.controls.dedicationName.errors.required?12:-1),n(),l(e.checkoutForm.controls.dedicationName.errors&&e.checkoutForm.controls.dedicationName.errors.creditCardLike?13:-1),n(3),l(e.checkoutForm.controls.dedicationEmailNotification.value?16:-1)}}function Ci(t,c){if(t&1&&(i(0,"div",33)(1,"div",46)(2,"div",65)(3,"mat-checkbox",66),a(4," Add a dedication to your donation "),o(),d(5,_i,17,4,"div",67),o()()()),t&2){let e=m(2);n(5),l(e.checkoutForm.controls.dedication.value?5:-1)}}function fi(t,c){if(t&1&&(i(0,"mat-option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e),n(),y(" ",e," ")}}function yi(t,c){if(t&1&&(i(0,"div",33)(1,"div",46)(2,"div",65)(3,"mat-form-field")(4,"mat-label"),a(5,"Designation"),o(),i(6,"mat-select",75),E(7,fi,2,2,"mat-option",69,J),o()()()()()),t&2){let e=m(2);n(7),A(e.checkout.donorExperience.designation_options)}}function ki(t,c){if(t&1&&(i(0,"div"),u(1,"app-custom-questions-form",76,3),o()),t&2){m();let e=B(2),s=m();n(),f("questions",s.checkout.donorExperience.custom_questions_list)("parentForm",e)("donationAmount",s.unformattedAmount)("anonymousDonation",s.checkoutForm.value.anonymous)}}function vi(t,c){if(t&1){let e=P();i(0,"div")(1,"button",77),S("click",function(){b(e);let r=m(2);return F(r.addToCartAction())}
3),i(2,"span",78),u(3,"i",79),o(),a(4,"Add to cart and check out later "),o()()}}function gi(t,c){if(t&1){let e=P();i(0,"div")(1,"button",80),S("click",function(){b(e);let r=m(2);return F(r.addToCartAction())}),i(2,"span",78),u(3,"i",79),o(),a(4,"Add to cart "),o()()}if(t&2){let e=m(2);n(),Se("opacity",e.unformattedAmount<e.checkout.paymentParameters.min_donation_amount?"0.5":""),f("active",e.addToCart.processing)}}function xi(t,c){if(t&1){let e=P();i(0,"div",33)(1,"div",46)(2,"div",65)(3,"p",81),a(4," You're logged in as "),i(5,"strong"),a(6),o(),a(7),o(),i(8,"p",81),a(9),i(10,"button",82),S("click",function(){b(e);let r=m(2);return F(r.logout())}),a(11,"Log out."),o()()()()()}if(t&2){let e=m(2);n(6),L(e.user.full_name),n(),y(" (",e.user.email,"). "),n(2),y(" Not ",e.user.first_name,"? ")}}function bi(t,c){if(t&1){let e=P();i(0,"p",90),a(1," Sign in with "),i(2,"button",92),S("click",function(){b(e);let r=m(4);return F(r.socialLogin("mit_sso"))}),a(3," MIT Infinite Connection "),o(),a(4," to link your donation with your alumni account. "),o()}}function Fi(t,c){if(t&1&&(i(0,"form",94,4)(2,"button",95),a(3," Rock FOC "),o()()),t&2){let e=m(5);f("action",e.socialLoginUrl.rockfoc_sso,j)}}function Si(t,c){if(t&1){let e=P();i(0,"p",90),a(1," Sign in as a "),i(2,"button",93),S("click",function(){b(e);let r=m(4);return F(r.socialLogin("rockfoc_sso"))}),a(3," Rocket or Redfin Team Member "),o(),a(4," to link your donation with your account. "),o(),d(5,Fi,4,1,"form",94)}if(t&2){let e=m(4);n(5),l(e.socialLoginUrl.rockfoc_sso?5:-1)}}function Pi(t,c){if(t&1&&(i(0,"div",46)(1,"div",89),d(2,bi,5,0,"p",90),d(3,Si,6,1),i(4,"p",91),a(5,"OR"),o()()()),t&2){let e=m(3);n(2),l(e.brand.enable_mit_sso?2:-1),n(),l(e.brand.enable_rockfoc_sso?3:-1)}}function Ti(t,c){t&1&&(i(0,"mat-error"),a(1," First name is "),i(2,"strong"),a(3,"required"),o()())}function Vi(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function Ei(t,c){t&1&&(i(0,"mat-error"),a(1," Last name is "),i(2,"strong"),a(3,"required"),o()())}function Ai(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function Di(t,c){t&1&&(i(0,"mat-error"),a(1," Email is "),i(2,"strong"),a(3,"required"),o()())}function Mi(t,c){t&1&&(i(0,"mat-error"),a(1," Enter valid "),i(2,"strong"),a(3,"email"),o(),a(4," address "),o())}function wi(t,c){if(t&1){let e=P();i(0,"div")(1,"p",90),a(2," Looks like you already have an account. Sign in to use your saved information for a quicker donation. "),o(),i(3,"button",96),S("click",function(){b(e);let r=m(3);return F(r.signIn())}),a(4," Sign In (Optional) "),o()()}}function Ii(t,c){if(t&1&&(i(0,"div",33),d(1,Pi,6,2,"div",46),i(2,"div",46)(3,"div",83)(4,"div",84)(5,"div",85)(6,"mat-form-field")(7,"mat-label"),a(8,"First name"),o(),u(9,"input",86),d(10,Ti,4,0,"mat-error"),d(11,Vi,5,0,"mat-error"),o()(),i(12,"div",85)(13,"mat-form-field")(14,"mat-label"),a(15,"Last name"),o(),u(16,"input",87),d(17,Ei,4,0,"mat-error"),d(18,Ai,5,0,"mat-error"),o()()()(),i(19,"div",83)(20,"mat-form-field")(21,"mat-label"),a(22,"Email"),o(),u(23,"input",88),d(24,Di,4,0,"mat-error"),d(25,Mi,5,0,"mat-error"),o(),d(26,wi,5,0,"div"),o()()()),t&2){let e=m(2);n(),l(e.brand.enable_mit_sso||e.brand.enable_rockfoc_sso?1:-1),n(9),l(e.checkoutForm.controls.firstName.errors&&e.checkoutForm.controls.firstName.errors.required?10:-1),n(),l(e.checkoutForm.controls.firstName.errors&&e.checkoutForm.controls.firstName.errors.creditCardLike?11:-1),n(6),l(e.checkoutForm.controls.lastName.errors&&e.checkoutForm.controls.lastName.errors.required?17:-1),n(),l(e.checkoutForm.controls.lastName.errors&&e.checkoutForm.controls.lastName.errors.creditCardLike?18:-1),n(6),l(e.checkoutForm.controls.email.errors&&e.checkoutForm.controls.email.errors.required?24:-1),n(),l(e.checkoutForm.controls.email.errors&&e.checkoutForm.controls.email.errors.invalidEmail?25:-1),n(),l(e.checkoutForm.controls.email.valid&&e.knownEmail&&!e.emailLookupData.guest&&e.emailLookupData.sc&&!e.brand.enable_mit_sso&&!e.brand.enable_rockfoc_sso?26:-1)}}function Ni(t,c){t&1&&ce(0)}function Oi(t,c){t&1&&ce(0)}function Bi(t,c){if(t&1&&(i(0,"mat-option",69),a(1),K(2,Oi,1,0,"ng-container",99),o()),t&2){let e=c.$implicit;m(3);let s=B(32);f("value",e.value),n(),y(" ",e.viewValue," "),n(),f("ngTemplateOutlet",s)("ngTemplateOutletContext",me(4,Vo,e.viewValue))}}function Li(t,c){if(t&1&&(i(0,"span"),a(1),V(2,"centsToCurrency"),o()),t&2){let e=m(3);n(),y(" Balance: ",ue(2,1,e.selectedGivingFund.balance_in_cents,"$","1.2-2")," USD ")}}function Gi(t,c){t&1&&(i(0,"span"),a(1," Recommended for your donation size! "),o())}function qi(t,c){t&1&&(i(0,"mat-error"),a(1," Card number is "),i(2,"strong"),a(3,"required"),o()())}function Ri(t,c){t&1&&(i(0,"mat-error"),a(1," Card number is not val
3id "),o())}function Ui(t,c){t&1&&(i(0,"mat-error"),a(1," MM / YY is "),i(2,"strong"),a(3,"required"),o()())}function Yi(t,c){t&1&&(i(0,"mat-error"),a(1," Enter a valid expiration date "),o())}function Qi(t,c){t&1&&(i(0,"mat-error"),a(1," CVC is "),i(2,"strong"),a(3,"required"),o()())}function ji(t,c){t&1&&(i(0,"mat-error"),a(1," Enter "),i(2,"strong"),a(3,"valid"),o(),a(4," CVC "),o())}function $i(t,c){t&1&&(i(0,"mat-error"),a(1," Enter "),i(2,"strong"),a(3,"valid"),o(),a(4," CVC "),o())}function zi(t,c){if(t&1&&(i(0,"div",83)(1,"div",84)(2,"div",83)(3,"mat-form-field")(4,"mat-label",123)(5,"span",44),u(6,"i",124),o(),a(7,"Card number "),o(),u(8,"input",125),d(9,qi,4,0,"mat-error"),d(10,Ri,2,0,"mat-error"),o()(),i(11,"div",108)(12,"mat-form-field")(13,"mat-label",126),a(14,"MM / YY"),o(),u(15,"input",127),d(16,Ui,4,0,"mat-error"),d(17,Yi,2,0,"mat-error"),o()(),i(18,"div",108)(19,"mat-form-field")(20,"mat-label",128),a(21,"CVC"),o(),u(22,"input",129),d(23,Qi,4,0,"mat-error"),d(24,ji,5,0,"mat-error"),d(25,$i,5,0,"mat-error"),o()()()()),t&2){let e=m(3);n(8),f("appMask",e.maskCreditCardOptions),n(),l(e.checkoutForm.controls.cardNumber.errors&&e.checkoutForm.controls.cardNumber.errors.required?9:-1),n(),l(e.checkoutForm.controls.cardNumber.errors&&e.checkoutForm.controls.cardNumber.errors.invalidNumber?10:-1),n(5),f("appMask",e.maskMonthYearOptions),n(),l(e.checkoutForm.controls.monthYear.errors&&e.checkoutForm.controls.monthYear.errors.required?16:-1),n(),l(e.checkoutForm.controls.monthYear.errors&&e.checkoutForm.controls.monthYear.errors.invalidMonthYear?17:-1),n(5),f("appMask",e.maskSecurityCodeOptions),n(),l(e.checkoutForm.controls.securityCode.errors&&e.checkoutForm.controls.securityCode.errors.required?23:-1),n(),l(e.checkoutForm.controls.securityCode.errors&&e.checkoutForm.controls.securityCode.errors.minlength?24:-1),n(),l(e.checkoutForm.controls.securityCode.errors&&e.checkoutForm.controls.securityCode.errors.maxlength?25:-1)}}function Hi(t,c){if(t&1){let e=P();i(0,"div",115)(1,"button",130),S("click",function(){b(e);let r=m(3);return F(r.linkNewBankAccount())}),a(2," Link Bank "),o()()}}function Wi(t,c){t&1&&(i(0,"mat-error"),a(1," Card number is "),i(2,"strong"),a(3,"required"),o()())}function Ki(t,c){t&1&&(i(0,"mat-error"),a(1," Card number is not valid "),o())}function Ji(t,c){if(t&1&&(i(0,"mat-hint"),a(1),V(2,"centsToCurrency"),o()),t&2){let e=m(4);n(),y("Balance: ",ue(2,1,e.givingCard.balance,"$","1.2-2"))}}function Zi(t,c){if(t&1&&(i(0,"div",83)(1,"mat-form-field")(2,"mat-label",131),a(3,"Card number"),o(),u(4,"input",132),d(5,Wi,4,0,"mat-error"),d(6,Ki,2,0,"mat-error"),d(7,Ji,3,5,"mat-hint"),o()()),t&2){let e=m(3);n(5),l(e.checkoutForm.controls.givingCardNumber.errors&&e.checkoutForm.controls.givingCardNumber.errors.required?5:-1),n(),l(e.checkoutForm.controls.givingCardNumber.errors&&e.checkoutForm.controls.givingCardNumber.errors.minlength?6:-1),n(),l(e.checkoutForm.controls.givingCardNumber.valid?7:-1)}}function Xi(t,c){if(t&1&&(i(0,"div",133)(1,"p",138),a(2,"Fund Holder"),o(),i(3,"p",139),a(4),o()()),t&2){let e=m(4);n(4),Te(" ",e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null?null:e.checkout.paymentParameters.cft_daf_payment_method_data.title," ",e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null?null:e.checkout.paymentParameters.cft_daf_payment_method_data.first_name," ",e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null?null:e.checkout.paymentParameters.cft_daf_payment_method_data.last_name," (",e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null?null:e.checkout.paymentParameters.cft_daf_payment_method_data.email,") ")}}function en(t,c){t&1&&(i(0,"div",134)(1,"div",140)(2,"span",44),u(3,"i",141),o(),i(4,"span"),a(5,"Admin Entry Mode"),o()()())}function tn(t,c){if(t&1&&(i(0,"div",135)(1,"div",142),u(2,"span",143),V(3,"safe"),o()()),t&2){let e=m(4);n(2),f("innerHTML",w(3,1,e.donationInstructions,"html"),W)}}function on(t,c){t&1&&(i(0,"mat-error"),a(1," Constituent ID is "),i(2,"strong"),a(3,"required"),o()())}function nn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Constituent ID"),o(),u(4,"input",144),d(5,on,4,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.constituentId.errors!=null&&e.checkoutForm.controls.constituentId.errors.required?5:-1)}}function an(t,c){t&1&&(i(0,"mat-error"),a(1," Fund Holder Email is "),i(2,"strong"),a(3,"required"),o()())}function rn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Fund Holder Email"),o(),u(4,"input",145),i(5,"mat-hint"),a(6,"Hidden from organization. For confirmation email only."),o(),d(7,an,4,0,"mat-error"),o()()),t&2){let e=m(4);n(7),l(e.checkoutForm.controls.fundholderEmail.errors!=null&&e.checkoutForm.controls.fundholderEmail.errors.required?7:-1)}}function cn(t,c){t&1&&(i(0,"mat-error"),a(1," Fund ID is "),i(2,"strong"),a(3,"required"),o()())}function sn(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function dn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Fund ID"),o(),u(4,"input",146),d(5,cn,4,0,"mat-error"),d(6,sn,2,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.fundId.errors!=null&&e.checkoutForm.controls.fundId.errors.required?5:-1),n(),l(e.checkoutForm.controls.fundId.errors!=null&&e.checkoutForm.controls.fundId.errors.creditCardLike?6:-1)}}function ln(t,c){t&1&&(i(0,"mat-hint"),a(1,"Optional"),o())}function mn(t,c){t&1&&(i(0,"mat-error"),a(1," Fund name is "),i(2,"strong"),a(3,"required"),o()())}function un(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function pn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Fund Name"),o(),u(4,"input",147),d(5,ln,2,0,"mat-hint"),d(6,mn,4,0,"mat-error"),d(7,un,2,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.fund_id?5:-1),n(),l(e.checkoutForm.controls.fundName.errors!=null&&e.checkoutForm.controls.fundName.errors.required?6:-1),n(),l(e.checkoutForm.controls.fundName.errors!=null&&e.checkoutForm.controls.fundName.errors.creditCardLike?7:-1)}}function hn(t,c){if(t&1&&(i(0,"mat-option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e.fund_id),n(),y(" ",e.fund_name," ")}}function _n(t,c){t&1&&(i(0,"mat-error"),a(1," Fund selection is "),i(2,"strong"),a(3,"required"),o()())}function Cn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"CFT Fund"),o(),i(4,"mat-select",148),E(5,hn,2,2,"mat-option",69,Qo),o(),d(7,_n,4,0,"mat-error"),o()()),t&2){let e=m(4);n(5),A(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null?null:e.checkout.paymentParameters.cft_daf_payment_method_data.funds),n(2),l(e.checkoutForm.controls.fundId.errors!=null&&e.checkoutForm.controls.fundId.errors.required?7:-1)}}function fn(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function yn(t,c){if(t&1&&(d(0,Xi,5,4,"div",133)(1,en,6,0,"div",134),d(2,tn,4,4,"div",135),d(3,nn,6,1,"div",133),d(4,rn,8,1,"div",133),d(5,dn,7,2,"div",133),d(6,pn,8,3,"div",133)(7,Cn,8,1,"div",133),i(8,"div",133)(9,"mat-form-field")(10,"mat-label"),a(11,"Notes/Dedications"),o(),u(12,"textarea",136),i(13,"mat-hint"),a(14,"Optional"),o(),i(15,"mat-hint",137),a(16),o(),d(17,fn,2,0,"mat-error"),o()()),t&2){let e=m(3);l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.admin_entry?1:0),n(2),l(e.donationInstructions?2:-1),n(),l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.show_constituent_id?3:-1),n(),l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.admin_entry?4:-1),n(),l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.admin_entry?5:-1),n(),l(!(e.checkout.paymentParameters==null||e.checkout.paymentParameters.cft_daf_payment_method_data==null)&&e.checkout.paymentParameters.cft_daf_payment_method_data.admin_entry?6:7),n(10),y("",e.checkoutForm.value.noteToAdvisor==null?null:e.checkoutForm.value.noteToAdvisor.length,"/500"),n(),l(e.checkoutForm.controls.noteToAdvisor.errors!=null&&e.checkoutForm.controls.noteToAdvisor.errors.creditCardLike?17:-1)}}function kn(t,c){if(t&1&&(i(0,"div",133)(1,"div",142),u(2,"span",143),V(3,"safe"),o()()),t&2){let e=m(4);n(2),f("innerHTML",w(3,1,e.checkout.paymentParameters.external_payment_settings.external_payment_method_help_text,"html"),W)}}function vn(t,c){if(t&1&&(i(0,"mat-option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e.id),n(),y(" ",e.name," ")}}function gn(t,c){t&1&&(i(0,"mat-error"),a(1," Institution is "),i(2,"strong"),a(3,"required"),o()())}function xn(t,c){if(t&1&&(i(0,"mat-option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e),n(),y(" ",e," ")}}function bn(t,c){t&1&&(i(0,"mat-error"),a(1," Asset type is "),i(2,"strong"),a(3,"required"),o()())}function Fn(t,c){t&1&&(i(0,"mat-error"),a(1," Institution name is "),i(2,"strong"),a(3,"required"),o()())}function Sn(t,c){if(t&1&&(i(0,"div",65)(1,"mat-form-field")(2,"mat-label"),a(3,"Institution name"),o(),u(4,"input",153),d(5,Fn,4,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.otherAdvisorFirmName.errors!=null&&e.checkoutForm.controls.otherAdvisorFirmName.errors.required?5:-1)}}function Pn(t,c){if(t&1&&(i(0,"div",152)(1,"div",142),u(2,"span",143),V(3,"safe"),o()()),t&2){let e=m(4);n(2),f("innerHTML",w(3,1,e.donationInstructions,"html"),W)}}function Tn(t,c){t&1&&(i(0,"mat-error"),a(1," Fund name is "),i(2,"strong"),a(3,"required"),o()())}function Vn(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function En(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Fund Name"),o(),u(4,"input",147),d(5,Tn,4,0,"mat-error"),d(6,Vn,2,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.fundName.errors!=null&&e.checkoutForm.controls.fundName.errors.required?5:-1),n(),l(e.checkoutForm.controls.fundName.errors!=null&&e.checkoutForm.controls.fundName.errors.creditCardLike?6:-1)}}function An(t,c){t&1&&(i(0,"mat-error"),a(1," Fund ID is "),i(2,"strong"),a(3,"required"),o()())}function Dn(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function Mn(t,c){if(t&1&&(i(0,"div",133)(1,"mat-form-field")(2,"mat-label"),a(3,"Fund ID"),o(),u(4,"input",146),d(5,An,4,0,"mat-error"),d(6,Dn,2,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.fundId.errors!=null&&e.checkoutForm.controls.fundId.errors.required?5:-1),n(),l(e.checkoutForm.controls.fundId.errors!=null&&e.checkoutForm.controls.fundId.errors.creditCardLike?6:-1)}}function wn(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function In(t,c){t&1&&(i(0,"mat-error"),a(1," Enter valid "),i(2,"strong"),a(3,"email"),o(),a(4," address "),o())}function Nn(t,c){if(t&1&&(i(0,"div",152)(1,"div",46)(2,"div",83)(3,"mat-form-field")(4,"mat-label"),a(5,"Relationship manager name"),o(),u(6,"input",154),i(7,"mat-hint"),a(8,"(Optional)"),o(),d(9,wn,2,0,"mat-error"),o()(),i(10,"div",83)(11,"mat-form-field")(12,"mat-label"),a(13,"Relationship manager email"),o(),u(14,"input",155),i(15,"mat-hint"),a(16,"(Optional) Transaction details may be shared"),o(),d(17,In,5,0,"mat-error"),o()(),i(18,"div",83)(19,"mat-form-field")(20,"mat-label"),a(21,"Relationship manager phone"),o(),u(22,"input",156),i(23,"mat-hint"),a(24,"(Optional)"),o()()()()()),t&2){let e=m(4);n(9),l(e.checkoutForm.controls.advisorName.errors!=null&&e.checkoutForm.controls.advisorName.errors.creditCardLike?9:-1),n(8),l(e.checkoutForm.controls.advisorEmail.errors!=null&&e.checkoutForm.controls.advisorEmail.errors.invalidEmail?17:-1)}}function On(t,c){t&1&&(i(0,"mat-error"),a(1," Please do not enter a credit card number "),o())}function Bn(t,c){if(t&1&&(i(0,"div",65)(1,"mat-form-field",73)(2,"mat-label"),a(3,"Details of commitment"),o(),u(4,"textarea",157),i(5,"mat-hint"),a(6,"(Optional)"),o(),i(7,"mat-hint",137),a(8),o(),d(9,On,2,0,"mat-error"),o()()),t&2){let e=m(4);n(8),y("",e.checkoutForm.value.noteToAdvisor==null?null:e.checkoutForm.value.noteToAdvisor.length,"/500"),n(),l(e.checkoutForm.controls.noteToAdvisor.errors!=null&&e.checkoutForm.controls.noteToAdvisor.errors.creditCardLike?9:-1)}}function Ln(t,c){if(t&1&&(d(0,kn,4,4,"div",133),i(1,"div",65)(2,"div",46)(3,"div",83)(4,"mat-form-field")(5,"mat-label"),a(6,"Institution"),o(),i(7,"mat-select",149),E(8,vn,2,2,"mat-option",69,Ao),o(),d(10,gn,4,0,"mat-error"),o()(),i(11,"div",150)(12,"mat-form-field")(13,"mat-label"),a(14,"Asset type"),o(),i(15,"mat-select",151),E(16,xn,2,2,"mat-option",69,J),o(),d(18,bn,4,0,"mat-error"),o()()()(),d(19,Sn,6,1,"div",65),d(20,Pn,4,4,"div",152),d(21,En,7,2,"div",133),d(22,Mn,7,2,"div",133),d(23,Nn,25,2,"div",152),d(24,Bn,10,2,"div",65)),t&2){let e=m(3);l(e.checkout.paymentParameters.external_payment_settings.external_payment_method_help_text?0:-1),n(8),A(e.checkout.paymentParameters.external_payment_settings.opted_in_advisor_firms),n(2),l(e.checkoutForm.controls.advisorFirmId.errors!=null&&e.checkoutForm.controls.advisorFirmId.errors.required?10:-1),n(),f("hidden",e.checkout.paymentParameters.external_payment_settings.external_payment_asset_types.length===1),n(5),A(e.checkout.paymentParameters.external_payment_settings.external_payment_asset_types),n(2),l(e.checkoutForm.controls.giftType.errors!=null&&e.checkoutForm.controls.giftType.errors.required?18:-1),n(),l(e.enableOtherAdvisorFirmName?19:-1),n(),l(e.donationInstructions?20:-1),n(),l(e.dis
3playFundName?21:-1),n(),l(e.displayFundId?22:-1),n(),l(e.displayRelationshipManagerDetails?23:-1),n(),l(e.displayCommitmentDetails?24:-1)}}function Gn(t,c){if(t&1&&(i(0,"mat-error"),a(1),i(2,"strong"),a(3,"required"),o()()),t&2){let e=m(5);n(),y(" ",e.addressPlaceholder," is ")}}function qn(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function Rn(t,c){if(t&1&&(i(0,"div",135)(1,"mat-form-field")(2,"mat-label",158),a(3),o(),u(4,"input",159),d(5,Gn,4,1,"mat-error"),d(6,qn,5,0,"mat-error"),o()()),t&2){let e=m(4);n(3),L(e.addressPlaceholder),n(2),l(e.checkoutForm.controls.address1.errors&&e.checkoutForm.controls.address1.errors.required?5:-1),n(),l(e.checkoutForm.controls.address1.errors&&e.checkoutForm.controls.address1.errors.creditCardLike?6:-1)}}function Un(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function Yn(t,c){if(t&1){let e=P();i(0,"div",65)(1,"div",160),S("click",function(){b(e);let r=m(4);return F(r.showAddress2Field=!0)})("keydown.enter",function(){b(e);let r=m(4);return F(r.showAddress2Field=!0)}),i(2,"p",139)(3,"span",44),u(4,"i",161),i(5,"span",162),a(6,"Add"),o()(),i(7,"strong"),a(8,"Address line 2"),o()()(),i(9,"mat-form-field",15)(10,"mat-label",163),a(11,"Address 2"),o(),u(12,"input",164),d(13,Un,5,0,"mat-error"),o()()}if(t&2){let e=m(4);n(),f("hidden",e.showAddress2Field),n(8),f("hidden",!e.showAddress2Field),n(4),l(e.checkoutForm.controls.address2.errors&&e.checkoutForm.controls.address2.errors.creditCardLike?13:-1)}}function Qn(t,c){t&1&&(i(0,"mat-error"),a(1," City is "),i(2,"strong"),a(3,"required"),o()())}function jn(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function $n(t,c){if(t&1&&(i(0,"div",83)(1,"mat-form-field")(2,"mat-label",165),a(3,"City"),o(),u(4,"input",166),d(5,Qn,4,0,"mat-error"),d(6,jn,5,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.city.errors&&e.checkoutForm.controls.city.errors.required?5:-1),n(),l(e.checkoutForm.controls.city.errors&&e.checkoutForm.controls.city.errors.creditCardLike?6:-1)}}function zn(t,c){if(t&1&&(i(0,"option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e.code),n(),y(" ",e.name," ")}}function Hn(t,c){t&1&&(i(0,"mat-error"),a(1," State is "),i(2,"strong"),a(3,"required"),o()())}function Wn(t,c){if(t&1&&(i(0,"mat-form-field")(1,"mat-label",167),a(2,"State"),o(),i(3,"select",168),u(4,"option",169),E(5,zn,2,2,"option",69,Do),o(),d(7,Hn,4,0,"mat-error"),o()),t&2){let e=m(5);n(5),A(e.states),n(2),l(e.checkoutForm.controls.state.errors&&e.checkoutForm.controls.state.errors.required?7:-1)}}function Kn(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function Jn(t,c){if(t&1&&(i(0,"mat-form-field")(1,"mat-label"),a(2,"State/Province"),o(),u(3,"input",170),d(4,Kn,5,0,"mat-error"),o()),t&2){let e=m(5);n(4),l(e.checkoutForm.controls.state.errors&&e.checkoutForm.controls.state.errors.creditCardLike?4:-1)}}function Zn(t,c){if(t&1&&(i(0,"div",83),d(1,Wn,8,1,"mat-form-field")(2,Jn,5,1,"mat-form-field"),o()),t&2){let e=m(4);n(),l(e.hideStateSelectField?2:1)}}function Xn(t,c){if(t&1&&(i(0,"option",69),a(1),o()),t&2){let e=c.$implicit;f("value",e.code),n(),y(" ",e.name," ")}}function ea(t,c){if(t&1&&(i(0,"div",83)(1,"mat-form-field")(2,"mat-label",171),a(3,"Country"),o(),i(4,"select",172),E(5,Xn,2,2,"option",69,Do),o()()()),t&2){let e=m(4);n(5),A(e.countries)}}function ta(t,c){t&1&&(i(0,"mat-error"),a(1," ZIP / Post code is "),i(2,"strong"),a(3,"required"),o()())}function oa(t,c){t&1&&(i(0,"mat-error"),a(1," Enter "),i(2,"strong"),a(3,"valid"),o(),a(4," ZIP / Post code "),o())}function ia(t,c){t&1&&(i(0,"mat-error"),a(1," Do "),i(2,"strong"),a(3,"not"),o(),a(4," include payment card number "),o())}function na(t,c){if(t&1&&(i(0,"div",83)(1,"mat-form-field")(2,"mat-label",173),a(3,"ZIP / Post code"),o(),u(4,"input",174),d(5,ta,4,0,"mat-error"),d(6,oa,5,0,"mat-error"),d(7,ia,5,0,"mat-error"),o()()),t&2){let e=m(4);n(5),l(e.checkoutForm.controls.postalCode.errors&&e.checkoutForm.controls.postalCode.errors.required?5:-1),n(),l(e.checkoutForm.controls.postalCode.errors&&e.checkoutForm.controls.postalCode.errors.invalidZipCode?6:-1),n(),l(e.checkoutForm.controls.postalCode.errors&&e.checkoutForm.controls.postalCode.errors.creditCardLike?7:-1)}}function aa(t,c){if(t&1&&(d(0,Rn,7,3,"div",135),d(1,Yn,14,3,"div",65),d(2,$n,7,2,"div",83),d(3,Zn,3,1,"div",83),d(4,ea,7,0,"div",83),d(5,na,8,3,"div",83)),t&2){let e=m(3);l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank?0:-1),n(),l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank?1:-1),n(),l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank?2:-1),n(),l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank?3:-1),n(),l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank||e.checkout.paymentType==="creditCard"||e.checkout.paymentType==="stripe"||e.checkout.paymentType==="bankAccount"||e.checkout.paymentType==="tempBankAccount"?4:-1),n(),l(!e.isStoredCard&&!e.isStoredBankAccount&&!e.isStoredPayment&&e.checkout.donorExperience.show_donation_address||e.editStoredCard||e.editStoredBank||e.checkout.paymentType==="creditCard"||e.checkout.paymentType==="stripe"||e.checkout.paymentType==="bankAccount"||e.checkout.paymentType==="tempBankAccount"?5:-1)}}function ra(t,c){if(t&1){let e=P();i(0,"div",65)(1,"mat-checkbox",175),a(2," Remember payment method "),i(3,"span",176,7),S("click",function(){b(e);let r=B(4);
3return F(r.toggle())})("keyup.enter",function(){b(e);let r=B(4);return F(r.toggle())})("keyup.space",function(){b(e);let r=B(4);return F(r.toggle())}),u(5,"i",177),o()()()}}function ca(t,c){if(t&1&&(i(0,"div",65)(1,"p",139),a(2),o(),i(3,"p",139),a(4),o(),i(5,"p",139),a(6),o(),i(7,"p",139),a(8),o()()),t&2){let e=m(4);n(2),y(" ",e.addressValues.address1," "),n(2),y(" ",e.addressValues.address2," "),n(2),le(" ",e.addressValues.city&&e.addressValues.state?`${e.addressValues.city}, `:"","",e.addressValues.state," ",e.addressValues.postalCode," "),n(2),y(" ",e.addressValues.country," ")}}function sa(t,c){if(t&1){let e=P();i(0,"div",65)(1,"button",178),S("click",function(){b(e);let r=m(4);return F(r.editStoredCardClick())}),u(2,"i",179),o()()}}function da(t,c){if(t&1){let e=P();i(0,"div",65)(1,"button",180),S("click",function(){b(e);let r=m(4);return F(r.editStoredBankClick())}),u(2,"i",179),o()()}}function la(t,c){if(t&1&&(i(0,"div",65)(1,"div",97),d(2,ca,9,6,"div",65),d(3,sa,3,0,"div",65),d(4,da,3,0,"div",65),o()()),t&2){let e=m(3);n(2),l(e.addressValues?2:-1),n(),l((e.isStoredCard||e.isStoredPayment)&&!e.editStoredCard?3:-1),n(),l(e.isStoredBankAccount&&!e.editStoredBank?4:-1)}}function ma(t,c){if(t&1&&(i(0,"div",49)(1,"div",97)(2,"div",83)(3,"mat-form-field")(4,"mat-label"),a(5,"Payment method"),o(),i(6,"mat-select",98)(7,"mat-select-trigger"),a(8),K(9,Ni,1,0,"ng-container",99),o(),E(10,Bi,3,6,"mat-option",69,Eo),o(),i(12,"mat-hint"),d(13,Li,3,5,"span"),d(14,Gi,2,0,"span"),o()()(),d(15,zi,26,10,"div",83),ae(16),i(17,"div",100,5)(19,"div",101)(20,"div",65)(21,"content-loader",102),q(),u(22,"rect",24),o()()(),U(),i(23,"div",101)(24,"div",83)(25,"div",103),u(26,"div",104),i(27,"label",105),a(28,"Card number"),o(),u(29,"div",106),o(),u(30,"p",107),o(),i(31,"div",108)(32,"div",103),u(33,"div",109),i(34,"label",110),a(35,"MM / YY"),o(),u(36,"div",106),o(),u(37,"p",111),o(),i(38,"div",108)(39,"div",103),u(40,"div",112),i(41,"label",113),a(42,"CVC"),o(),u(43,"div",106),o(),u(44,"p",114),o()()(),re(),d(45,Hi,3,0,"div",115),d(46,Zi,8,3,"div",83),d(47,yn,18,8),d(48,Ln,25,10),ae(49),i(50,"div",116,6)(52,"div",101)(53,"div",65)(54,"content-loader",102),q(),u(55,"rect",24),o()()(),U(),i(56,"div",101)(57,"div",83)(58,"div",103)(59,"label",117),a(60,"Card number"),o(),u(61,"div",118),o(),u(62,"p",107),o(),i(63,"div",108)(64,"div",103)(65,"label",119),a(66,"MM / YY"),o(),u(67,"div",120),o(),u(68,"p",111),o(),i(69,"div",108)(70,"div",103)(71,"label",121),a(72,"CVC"),o(),u(73,"div",122),o(),u(74,"p",114),o()()(),re(),d(75,aa,6,6),d(76,ra,6,0,"div",65),d(77,la,5,3,"div",65),o()()),t&2){let e=m(2),s=B(32);n(8),y(" ",e.paymentMethodTriggerText," "),n(),f("ngTemplateOutlet",s)("ngTemplateOutletContext",me(19,Vo,e.paymentMethodTriggerText)),n(),A(e.checkout.paymentMethods),n(3),l(e.selectedGivingFund!=null&&e.selectedGivingFund.id?13:-1),n(),l(e.checkoutForm.value.paymentMethod==="bankAccount"&&e.checkout.paymentParameters.recommended_value_to_use_bank_account>0&&e.unformattedAmount>=e.checkout.paymentParameters.recommended_value_to_use_bank_account?14:-1),n(),l(e.checkoutForm.controls.paymentMethod.value==="creditCard"||e.editStoredCard?15:-1),n(2),f("hidden",e.checkoutForm.controls.paymentMethod.value!=="stripe"),n(2),f("hidden",!e.stripeElements.loading),n(4),f("hidden",e.stripeElements.loading),n(22),l(e.checkout.paymentType==="bankAccount"?45:-1),n(),l(e.checkoutForm.controls.paymentMethod.value==="givingCard"?46:-1),n(),l(e.checkout.paymentType==="cftDafPayment"?47:-1),n(),l(e.checkout.paymentType==="externalPayment"?48:-1),n(2),f("hidden",e.checkoutForm.controls.paymentMethod.value!=="braintree"),n(2),f("hidden",!e.braintreeObj.loading),n(4),f("hidden",e.braintreeObj.loading),n(19),l(e.checkout.paymentType!=="applePay"&&e.checkout.paymentType!=="braintreePaypal"&&e.checkout.paymentType!=="braintreeApplePay"&&e.checkout.paymentType!=="braintreeGooglePay"?75:-1),n(),l((e.checkout.paymentType==="creditCard"||e.checkout.paymentType==="bankAccount"||e.checkout.paymentType==="tempBankAccount"||e.checkout.paymentType==="braintree"||e.checkout.paymentType==="braintreePaypal"||e.checkout.paymentType==="braintreeVenmo"||e.checkout.paymentType==="braintreeApplePay"||e.checkout.paymentType==="braintreeGooglePay")&&e.checkout.story.kind!=="Personal"&&e.checkoutForm.controls.donationType.value==="1"&&!e.hideMonthlyDonation?76:-1),n(),l((e.isStoredCard||e.isStoredPayment)&&!e.editStoredCard||e.isStoredBankAccount&&!e.editStoredBank?77:-1)}}function ua(t,c){if(t&1){let e=P();
3i(0,"mat-chip-row",186),S("removed",function(){let r=b(e).$implicit,p=m(4);return F(p.removeGroup(r.key))}),a(1),u(2,"mat-icon",187),o()}if(t&2){let e=c.$implicit;f("selectable",!0)("removable",!0),n(),y(" ",e.value.title," ")}}function pa(t,c){t&1&&(i(0,"mat-error"),a(1,"Please select an option"),o())}function ha(t,c){t&1&&(i(0,"mat-option",185),u(1,"mat-spinner",188),o()),t&2&&f("disabled",!0)}function _a(t,c){if(t&1&&(i(0,"small"),a(1),o()),t&2){let e=m().$implicit;n(),y(" | ",e.details.for_label)}}function Ca(t,c){if(t&1&&(i(0,"mat-option",69),u(1,"img",189),i(2,"span"),a(3),o(),d(4,_a,2,1,"small"),o()),t&2){let e=c.$implicit;f("value",e),n(),f("src",e.thumbnail,j),n(2),L(e.title),n(),l(e.details&&e.details.for_label!=="Group"?4:-1)}}function fa(t,c){if(t&1&&E(0,Ca,5,4,"mat-option",69,J),t&2){let e=m(4);A(e.filteredGroups)}}function ya(t,c){if(t&1){let e=P();i(0,"div",33)(1,"mat-form-field")(2,"mat-chip-grid",181,8),E(4,ua,3,3,"mat-chip-row",182,jo),V(6,"keyvalue"),i(7,"input",183,9),S("focus",function(r){b(e);let p=m(3);return F(p.focusGroupIdsInput(r))})("matChipInputTokenEnd",function(r){b(e);let p=m(3);return F(p.addGroup(r))}),o()(),d(9,pa,2,0,"mat-error"),o(),i(10,"mat-autocomplete",184,10),S("optionSelected",function(r){b(e);let p=m(3);return F(p.selectedGroup(r))}),d(12,ha,2,1,"mat-option",185)(13,fa,2,0),o()()}if(t&2){let e=B(3),s=B(11),r=m(3);n(4),A(Q(6,7,r.selectedGroups)),n(3),f("placeholder",Ve(r.checkout.paymentParameters.group_giving_prompt_text))("matAutocomplete",s)("matChipInputFor",e)("matChipInputAddOnBlur",!0),n(2),l(r.error.groupIds?9:-1),n(3),l(r.loadingGroups?12:13)}}function ka(t,c){if(t&1){let e=P();i(0,"div",85)(1,"mat-checkbox",190),S("change",function(){let r=b(e).$implicit,p=m(4);return F(p.changeGroupIdsCheckbox(r))}),a(2),o()()}if(t&2){let e=c.$implicit,s=m(4);n(),se("ng-invalid",s.checkoutForm.controls.groupIds.errors==null?null:s.checkoutForm.controls.groupIds.errors.required),f("checked",s.selectedGroups[e.id]),n(),y(" ",e.title," ")}}function va(t,c){t&1&&(i(0,"div",65)(1,"p",191),a(2,"Please select an option"),o()())}function ga(t,c){if(t&1&&(i(0,"div",33)(1,"p"),a(2),o(),i(3,"div",46),E(4,ka,3,4,"div",85,Ao),d(6,va,3,0,"div",65),o()()),t&2){let e=m(3);n(2),L(e.checkout.paymentParameters.group_giving_prompt_text),n(2),A(e.checkout.paymentParameters.group_list),n(2),l((!e.checkoutForm.value.groupIds||(e.checkoutForm.value.groupIds==null?null:e.checkoutForm.value.groupIds.length)===0)&&e.error.groupIds?6:-1)}}function xa(t,c){if(t&1&&(i(0,"div"),d(1,ya,14,9,"div",33)(2,ga,7,2,"div",33),o()),t&2){let e=m(2);n(),l(e.checkout.paymentParameters.group_giving_checkbox_format?2:1)}}function ba(t,c){if(t&1&&(i(0,"div"),u(1,"app-custom-questions-form",192,11),o()),t&2){m();let e=B(2),s=m();n(),f("questions",s.checkout.donorExperience.brand_custom_questions_list)("parentForm",e)("donationAmount",s.unformattedAmount)("anonymousDonation",s.checkoutForm.value.anonymous)}}function Fa(t,c){if(t&1){let e=P();i(0,"app-donation-tip-jar",193),S("selectionChange",function(r){b(e);let p=m(2);return F(p.onHostTipSelectionChange(r))}),o()}if(t&2){let e=m(2);f("defaultCurrency",e.checkout.paymentParameters.default_currency)("tipSettings",e.checkout.paymentParameters.host_tips_params)("amount",e.unformattedAmount)}}function Sa(t,c){if(t&1&&(i(0,"span"),a(1),V(2,"uppercase"),o()),t&2){let e=m(3);n(),y(" ",Q(2,1,e.checkout.paymentParameters.default_currency)," ")}}function Pa(t,c){t&1&&(i(0,"p",197),a(1,"Includes donation, additional gift, and fees."),o())}function Ta(t,c){if(t&1&&(i(0,"div",198)(1,"span",206),a(2),V(3,"currency"),o()()),t&2){let e=m(3);n(2),y(" ",w(3,1,e.totalAmount/26,e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency))," deduction per pay period for 26 periods ")}}function Va(t,c){if(t&1){let e=P();i(0,"div",199)(1,"mat-checkbox",207)(2,"span"),a(3,"Cover fees so "),i(4,"strong"),a(5),o(),a(6," gets my full donation"),o()(),u(7,"div",26),i(8,"button",43),S("click",function(){b(e);let r=m(3);return F(r.feeInfo())}),i(9,"span",44),u(10,"i",208),o(),a(11,"Fee info "),o()()}if(t&2){let e=m(3);n(5),L(e.checkout.story.org_name)}}function Ea(t,c){t&1&&(i(0,"span"),a(1,"Other"),o())}function Aa(t,c){if(t&1&&(i(0,"span"),a(1),V(2,"number"),o()),t&2){let e=m().$implicit,s=m(4);n(),de(" ",s.getNarrowCurrencySymbol(s.checkout.paymentParameters.default_currency),"",w(2,2,e.amount,"1.2-2")," ")}}function Da(t,c){if(t&1&&(i(0,"mat-option",69),d(1,Ea,2,0,"span")(2,Aa,3,5,"span"),o()),t&2){let e=c.$implicit;f("value",e.amount),n(),l(e.amount==="other"?1:2)}}function Ma(t,c){if(t&1&&(i(0,"div",200)(1,"div",209)(2,"p",210),a(3,"Includes a platform tip of:"),o(),i(4,"mat-form-field",211)(5,"mat-select",212),E(6,Da,3,2,"mat-option",69,ne),o()()()()),t&2){let e=m(3);n(6),A(e.checkout.tips)}}function wa(t,c){if(t&1&&(i(0,"span",215),a(1),V(2,"uppercase"),o()),t&2){let e=m(4);n(),y(" ",Q(2,1,e.checkout.paymentParameters.default_currency)," ")}}function Ia(t,c){if(t&1&&(i(0,"div",201)(1,"mat-form-field")(2,"mat-label"),a(3,"Custom tip"),o(),u(4,"input",213),i(5,"span",214),a(6),o(),d(7,wa,3,3,"span",215),o()()),t&2){let e=m(3);n(4),f("appMask",e.maskAmountOptions),n(2),L(e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency)),n(),l(e.checkout.paymentParameters.default_currency==="cad"?7:-1)}}function Na(t,c){if(t&1&&(i(0,"span"),a(1),V(2,"uppercase"),o()),t&2){let e=m(4);n(),y(" ",Q(2,1,e.checkout.paymentParameters.default_currency)," ")}}function Oa(t,c){t&1&&(i(0,"span",219),a(1,"/month"),o())}function Ba(t,c){if(t&1&&(i(0,"div",65)(1,"div",216),u(2,"app-donation-clickwrap"),o(),i(3,"div",217)(4,"button",218)(5,"span"),a(6),V(7,"currency"),o(),d(8,Na,3,3,"span"),d(9,Oa,2,0,"span",219),o()()()),t&2){let e=m(3);n(4),f("active",e.checkout.processing),n(2),y("Pay ",w(7,4,e.totalAmount,e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency))),n(2),l(e.checkout.paymentParameters.default_currency==="cad"?8:-1),n(),l(e.checkoutForm.controls.donationType.value==="2"?9:-1)}}function La(t,c){if(t&1){let e=P();i(0,"div",202)(1,"div",216),u(2,"app-donation-clickwrap"),o(),i(3,"app-paypal-api-btn",220),S("orderCapture",function(r){b(e);let p=m(3);return F(p.onPaypalComplete(r))}),o()()}if(t&2){let e=m(3);f("hidden",e.checkoutForm.controls.paymentMethod.value!=="braintreePaypal"),n(3),f("braintreeSdk",!0)("formValidity",e.checkoutForm.valid)}}function Ga(t,c){if(t&1&&(i(0,"div",221)(1,"div",216),u(2,"app-donation-clickwrap"),o(),i(3,"button",222)(4,"span",44),a(5,"Pay with"),o(),u(6,"img",223),o()()),t&2){let e=m(4);n(3),f("active",e.checkout.processing),n(3),f("src",`${e.staticServerPath}/assets/svgs/logos/venmo-logo.svg`,j)}}function qa(t,c){if(t&1&&d(0,Ga,7,2,"div",221),t&2){let e=m(3);l(e.checkoutForm.controls.paymentMethod.value==="braintreeVenmo"?0:-1)}}function Ra(t,c){t&1&&(i(0,"div",203)(1,"div",216),u(2,"app-donation-clickwrap"),o(),u(3,"button",224),o())}function Ua(t,c){if(t&1&&(i(0,"div",204)(1,"div",216),u(2,"app-donation-clickwrap"),o(),u(3,"app-gpay-api-btn",225),o()),t&2){let e=m(3);f("hidden",e.checkoutForm.controls.paymentMethod.value!=="braintreeGooglePay"),n(3),f("braintreeSdk",!0)("formValidity",e.checkoutForm.valid)}}function Ya(t,c){if(t&1&&(i(0,"span"),a(1),o()),t&2){let e=m(5);n(),y("(",e.paymentMethodTriggerText,")")}}function Qa(t,c){if(t&1&&(i(0,"span"),a(1),d(2,Ya,2,1,"span"),a(3),V(4,"currency"),o()),t&2){let e=m(4);n(),y(" By clicking Pay, I authorize ",e.achCompanyName," to charge my bank account "),n(),l(e.paymentMethodTriggerText?2:-1),n(),y(" today for the amount of ",w(4,3,e.totalAmount,e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency)),". Payments cannot be canceled once submitted. ")}}function ja(t,c){if(t&1&&(i(0,"span"),a(1),o()),t&2){let e=m(5);n(),y("(",e.paymentMethodTriggerText,")")}}function $a(t,c){if(t&1&&(i(0,"span"),a(1),d(2,ja,2,1,"span"),a(3),V(4,"currency"),o()),t&2){let e=m(4);n(),y(" By clicking Pay, I authorize ",e.achCompanyName," to charge my bank account "),n(),l(e.paymentMethodTriggerText?2:-1),n(),le(" today for the amount of ",w(4,5,e.totalAmount,e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency)),". This charge will recur each month and my authorization can be revoked by contacting ",e.achCompanyName," at ",e.supp
3ortEmail," or by logging into my user account at least 10 days prior to the scheduled charge date. Today's charge cannot be canceled once submitted. ")}}function za(t,c){if(t&1&&(i(0,"div",205)(1,"div",226),d(2,Qa,5,6,"span"),d(3,$a,5,8,"span"),o()()),t&2){let e=m(3);n(2),l(e.checkoutForm.controls.donationType.value==="1"?2:-1),n(),l(e.checkoutForm.controls.donationType.value==="2"?3:-1)}}function Ha(t,c){if(t&1&&(i(0,"div",35,12)(2,"div",194)(3,"p",195),a(4),o(),i(5,"p",196),a(6),V(7,"currency"),d(8,Sa,3,3,"span"),o(),d(9,Pa,2,0,"p",197),d(10,Ta,4,4,"div",198),d(11,Va,12,1,"div",199),o(),d(12,Ma,8,0,"div",200),u(13,"div",26),d(14,Ia,8,3,"div",201),u(15,"div",26),d(16,Ba,10,7,"div",65),d(17,La,4,3,"div",202),d(18,qa,1,1),d(19,Ra,4,0,"div",203),d(20,Ua,4,3,"div",204),d(21,za,4,2,"div",205),o()),t&2){let e=m(2);n(4),L(e.checkoutForm.controls.donationType.value==="2"?"Total today":"Total"),n(2),y(" ",w(7,14,e.totalAmount,e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency))," "),n(2),l(e.checkout.paymentParameters.default_currency==="cad"?8:-1),n(),l(e.checkout.donationBooster&&e.checkoutForm.value.hostTipAmount>0?9:-1),n(),l((e.checkoutForm.controls==null||e.checkoutForm.controls.giftType==null?null:e.checkoutForm.controls.giftType.value)==="Payroll Deduction"&&(e.advisorFirmSelected==null?null:e.advisorFirmSelected.name)==="Hunt Cares"?10:-1),n(),l(e.checkout.donationBooster?11:-1),n(),l(e.checkout.tipsInfo&&e.checkout.tipsInfo.canAcceptTips?12:-1),n(2),l(e.customTips?14:-1),n(2),l(e.checkoutForm.controls.paymentMethod.value!=="paypal"&&e.checkoutForm.controls.paymentMethod.value!=="applePay"&&e.checkoutForm.controls.paymentMethod.value!=="braintreePaypal"&&e.checkoutForm.controls.paymentMethod.value!=="braintreeVenmo"&&e.checkoutForm.controls.paymentMethod.value!=="braintreeApplePay"&&e.checkoutForm.controls.paymentMethod.value!=="braintreeGooglePay"?16:-1),n(),l(e.braintreeObj.paypalCheckout?17:-1),n(),l(e.braintreeObj.venmoCheckout?18:-1),n(),l(e.checkoutForm.controls.paymentMethod.value==="applePay"||e.checkoutForm.controls.paymentMethod.value==="braintreeApplePay"?19:-1),n(),l(e.braintreeObj.googlePayCheckout?20:-1),n(),l(e.checkout.paymentType==="bankAccount"||e.checkout.paymentType==="tempBankAccount"||e.checkout.paymentType==="storedBankAccount"?21:-1)}}function Wa(t,c){if(t&1){let e=P();i(0,"section")(1,"form",31,1),S("ngSubmit",function(){b(e);let r=m();return F(r.onFormSubmit())}),d(3,Ko,7,2,"div",32),i(4,"div",33),d(5,Jo,8,0,"mat-radio-group",34),d(6,ti,3,0,"div",35),i(7,"div",35)(8,"div",36)(9,"mat-form-field")(10,"mat-label",37),a(11,"Donation amount"),o(),i(12,"input",38,2),S("ngModelChange",function(r){b(e);let p=m();return F(p.resetSelectedAmount(r))}),o(),i(14,"span",39),a(15),o(),d(16,oi,3,3,"span",40),d(17,ii,2,0,"span",40),d(18,ni,4,0,"mat-error"),d(19,ai,3,5,"mat-error"),o()()(),i(20,"div",35)(21,"div",36)(22,"mat-checkbox",41),a(23," Hide amount from public "),o(),u(24,"div",26),i(25,"mat-checkbox",42),a(26," Hide name from public "),o(),d(27,ci,5,1),u(28,"div",26),i(29,"button",43),S("click",function(){b(e);let r=m();return F(r.privacyInfo())}),i(30,"span",44),u(31,"i",45),o(),a(32,"Privacy info "),o()()()(),d(33,Ci,6,1,"div",33),d(34,yi,9,0,"div",33),d(35,ki,3,4,"div"),i(36,"div",46)(37,"div",47),d(38,vi,5,0,"div"),d(39,gi,5,3,"div"),o()(),i(40,"div",48),d(41,xi,12,3,"div",33),d(42,Ii,27,8,"div",33),o(),d(43,ma,78,21,"div",49),d(44,xa,3,1,"div"),d(45,ba,3,4,"div"),d(46,Fa,1,3,"app-donation-tip-jar",50),d(47,Ha,22,17,"div",35),o()()}if(t&2){let e=m();n(),f("formGroup",e.checkoutForm)("appComponentPalette",e.themePalette),n(2),l(e.checkout.paymentParameters.matching_grant_details!=null&&e.checkout.paymentParameters.matching_grant_details.active?3:-1),n(2),l(e.hideMonthlyDonation?-1:5),n(),l(e.checkout.donorExperience?6:-1),n(6),f("appMask",e.maskAmountOptions),n(3),y("",e.getNarrowCurrencySymbol(e.checkout.paymentParameters.default_currency),"\xA0"),n(),l(e.checkout.paymentParameters.default_currency==="cad"?16:-1),n(),l(e.checkoutForm.controls.donationType.value==="2"?17:-1),n(),l(e.checkoutForm.controls.amount.errors&&e.checkoutForm.controls.amount.errors.required?18:-1),n(),l(e.checkoutForm.controls.amount.errors&&e.checkoutForm.controls.amount.errors.invalidAmount?19:-1),n(8),l(e.checkout.paymentParameters!=null&&e.checkout.paymentParameters.allow_fully_anonymous_donations?27:-1),n(6),l(e.checkout.donorExperience.enable_donation_dedication?33:-1),n(),l(e.checkout.donorExperience.enable_donation_designation&&!e.checkout.donorExperience.brand_disable_donation_designation?34:-1),n(),l(e.checkout.donorExperience.enable_donation_questions?35:-1),n(3),l(e.checkout.cart.number_of_items===0&&e.brand.id!==1?38:-1),n(),l(e.checkout.cart.number_of_items>=1?39:-1),n(2),l(e.user.id&&e.checkout.cart.number_of_items===0?41:-1),n(),l(!e.user.id&&e.checkout.cart.number_of_items===0?42:-1),n(),l(e.checkout.cart.number_of_items===0?43:-1),n(),l((e.cookie.groupId||e.checkout.paymentParameters.enable_group_giving)&&e.checkout.cart.number_of_items===0?44:-1),n(),l(e.checkout.donorExperience.enable_brand_custom_questions&&e.checkout.cart.number_of_items===0?45:-1),n(),l(e.appService.shouldShowTipJar(e.brand)&&e.checkout.cart.number_of_items===0&&e.checkout.paymentParameters.host_tips_params?46:-1),n(),l(e.checkout.cart.number_of_items===0?47:-1)}}function Ka(t,c){t&1&&(i(0,"span",227),u(1,"i",229)(2,"i",230)(3,"i",231)(4,"i",232),o())}function Ja(t,c){t&1&&(i(0,"span",228),u(1,"i",233),o())}function Za(t,c){t&1&&(i(0,"span",228),u(1,"i",234),o())}function Xa(t,c){t&1&&(i(0,"span",228),u(1,"i",235),o())}function er(t,c){t&1&&(i(0,"span",228),u(1,"i",236),o())}function tr(t,c){t&1&&(i(0,"span",228),u(1,"i",237),o())}function or(t,c){t&1&&(i(0,"span",228),u(1,"i",238),o())}function ir(t,c){if(t&1&&(i(0,"span"),u(1,"img",239),o()),t&2){let e=m(2);n(),f("src",`${e.staticServerPath}/assets/svgs/logos/google-pay-mark.svg`,j)}}function nr(t,c){if(t&1&&(d(0,Ka,5,0,"span",227),d(1,Ja,2,0,"span",228),d(2,Za,2,0,"span",228),d(3,Xa,2,0,"span",228),d(4,er,2,0,"span",228),d(5,tr,2,0,"span",228),d(6,or,2,0,"span",228),d(7,ir,2,1,"span")),t&2){let e=c.paymentMethodText;l(e==="Credit card"||e==="New credit card"?0:-1),n(),l(e==="Bank account"||e==="New bank account"?1:-1),n(),l(e==="PayPal"?2:-1),n(),l(e==="Venmo"?3:-1),n(),l(e==="Giving Card"?4:-1),n(),l(e==="Apple Pay"?5:-1),n(),l(e==="My CFT Fund"?6:-1),n(),l(e==="Google Pay"?7:-1)}}var Ac=(()=>{class t{donationService=g(_o);checkoutService=g(lo);awsCaptchaService=g(vo);cartService=g($e);appService=g(Ye);localeService=g(Zt);
3fb=g(st);route=g(Oe);tipsService=g(uo);userService=g(Nt);dialog=g(ze);snackBar=g(Ot);breakpointObserver=g(Qe);userPaymentMethodService=g(bo);searchService=g(eo);cookieService=g(Re);feeService=g(mo);router=g(Be);brandNavService=g(to);stripeService=g(ho);plaidService=g(yo);socialService=g(Lt);webStorageService=g(jt);scrollService=g(Bt);decimalPipe=g(pe);webAnalyticsService=g($t);pageTagsService=g(Le);braintreeService=g(po);paletteService=g(Ge);vwoService=g(Ue);checkoutFlowRoutingService=g(Fo);checkoutNgFormElement=I("checkoutNgForm");donationAmtInput=I("donationAmtInput");matAutocompleteForGroup=I("groupAutoComplete");groupChipList=I("groupChipList");groupIdsInput=I("groupIdsInput");stripePaymentElement=I("stripePayment");braintreePaymentElement=I("braintreePayment");customQuestionsFormComponent=I("donationCustomQuestionsFormComponent");brandCustomQuestionsFormComponent=I("brandCustomQuestionsFormComponent");paypalApiBtnComponent=I(X);gpayApiBtnComponent=I(ee);socialLoginFormForRockfoc=I("socialLoginFormForRockfoc");set paymentSectionRef(e){e&&!this.paymentSectionTracked&&$(this.platformId)&&this.setupPaymentSectionObserver(e.nativeElement)}staticServerPath;checkout;themePalette;brand;supportEmail;isXSmall=!1;setup=!1;states;countries;selectedAmount;isStoredCard;isGivingFund;isStoredBankAccount;isStoredPayment;editStoredCard;editStoredBank;storedCardMonthYear;hideStateSelectField;totalAmount=0;customTips=!1;knownEmail=!1;beginCheckoutTracked=!1;givingCard={balance:0,allowCoveredFees:void 0};user;hideMonthlyDonation=!1;showAddress2Field=!1;emailLookupData;addressValues;selectedGivingFund;selectedBankAccountId;addToCart={processing:!1};paymentMethodTriggerText;loadingGroups=!1;filteredGroups;selectedGroups={};suggestStoryParams={type:"groupPicker",term:"",searchSortOrder:"title"};suggestionLevelsStyles;stripeElements={loading:!1,cardNumber:null,cardExp:null,cardCvc:null};error={groupIds:!1};cookie={groupId:null};addressPlaceholder="Billing address";unformattedAmount=0;enableOtherAdvisorFirmName=!1;advisorFirmSelected;displayCommitmentDetails;displayFundId;
3displayFundName;displayRelationshipManagerDetails;cftFundSelected;donationInstructions;hasAddedToCart=!1;showTaxCreditWarning=!1;braintreeObj={clientInstance:null,loading:!1,paypalCheckout:!1,venmoCheckout:!1,applePayCheckout:!1,googlePayCheckout:!1};achCompanyName;socialLoginUrl={};maskAmountOptions={numeral:!0,numeralThousandsGroupStyle:"thousand",numeralPositiveOnly:!0};maskMonthYearOptions={date:!0,datePattern:["m","y"],onValueChanged:e=>{this.checkoutForm.controls.monthYear.setValue(e.target.value),e.target.value!==this.storedCardMonthYear?(this.checkoutForm.controls.securityCode.setValidators(this.securityCodeValidator),this.checkoutForm.controls.securityCode.updateValueAndValidity()):(this.checkoutForm.controls.securityCode.clearValidators(),this.checkoutForm.controls.securityCode.updateValueAndValidity())}};maskPhoneNumberOptions={phone:!0,phoneRegionCode:"US"};maskCreditCardOptions={creditCard:!0,onCreditCardTypeChanged:e=>{this.checkout.creditCardType=e,this.checkoutForm.controls.securityCode.setValue(""),this.checkout.creditCardType===T.Amex?this.securityCodeValidator=C.compose([C.required,C.minLength(4)]):this.securityCodeValidator=C.compose([C.required,C.minLength(3)]),this.checkoutForm.controls.securityCode.setValidators(this.securityCodeValidator),this.checkout.donationBooster&&this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)},onValueChanged:e=>{this.checkoutForm.controls.cardNumber.setValue(e.target.value)}};maskSecurityCodeOptions={blocks:[4],numericOnly:!0};checkoutForm=this.fb.group({donationType:["1"],suggestionId:[],suggestionSetId:[],amount:["",C.compose([C.required,k.minAmountValidator(5)])],hideAmount:[!1],hideName:[!1],anonymous:[!1],designation:[""],dedication:[!1],dedicationType:[""],dedicationName:["",k.noCreditCardLikePanValidator],dedicationEmailNotification:[!1],dedicationEmail:[""],dedicationEmailMessage:[""],firstName:["",C.compose([C.required,k.noCreditCardLikePanValidator])],lastName:["",C.compose([C.required,k.noCreditCardLikePanValidator])],email:["",C.compose([C.required,k.emailValidator])],paymentMethod:[h.CreditCard],cardNumber:[""],monthYear:[""],securityCode:[""],country:["USA"],address1:["",k.noCreditCardLikePanValidator],address2:["",k.noCreditCardLikePanValidator],city:["",k.noCreditCardLikePanValidator],state:["",k.noCreditCardLikePanValidator],postalCode:["",k.noCreditCardLikePanValidator],coverFees:[""],rememberCard:[""],tips:[""],customTips:[""],givingCardNumber:[""],customQuestions:[""],brandCustomQuestions:[""],groupIds:[""],hostTipAmount:[0],advisorFirmId:[],otherAdvisorFirmName:[""],giftType:[],advisorName:["",k.noCreditCardLikePanValidator],advisorPhone:[],advisorEmail:["",k.emailValidator],noteToAdvisor:["",k.noCreditCardLikePanValidator],fundName:["",k.noCreditCardLikePanValidator],constituentId:[""],fundId:["",k.noCreditCardLikePanValidator],fundholderEmail:[""]});skipBankAccountRecommendation=!1;paymentMethodObj=null;formSubmitterName=null;paymentSectionObserver=null;paymentSectionTracked=!1;subscription=new Ce;postalCodeValidator=C.compose([C.required,k.zipCodeValidatorUSA,k.noCreditCardLikePanValidator]);cardNumberValidator=C.compose([C.required,k.ccNumberValidator]);monthYearValidator=C.compose([C.required,k.ccMonthYearValidator]);securityCodeValidator=C.compose([C.required,C.minLength(3)]);platformId=g(ke);constructor(){this.staticServerPath=this.appService.staticServerPath,this.user=this.userService.currentUser,this.appService.header=!0,this.appService.footer=!0,this.brandNavService.configuration={color:"dark"}}ngOnInit(){if(this.feeService.setCoverFeesExplanationContextProvider(()=>this.getCoverFeesExplanationContext(),"legacy"),this.checkout=this.donationService.details,this.brand=this.appService.currentBrand,this.appService.currentBrandObservable.subscribe(()=>{this.brand?.brand_details?.processing_entity?.key==="MCF"?this.achCompanyName="Mightycause":this.achCompanyName=this.brand.name,this.brand.id===1&&(this.appService.footer=!1)}),this.countries=this.localeService.countriesList,this.states=this.localeService.statesList,this.supportEmail=this.appService.supportEmail,this.checkout.story={urn:this.route.
3snapshot.params.urn},this.cookie.groupId=$(this.platformId)?this.cookieService.get(qe.GroupId):null,this.cookie.groupId!==null){let e={type:"suggest_by_id",kw:`group_${this.cookie.groupId}`};z(this.searchService.getSearchResults(e)).then(s=>{let r=s[0];r&&(this.selectedGroups[r.id]=r,this.checkout.groupIds=Object.keys(this.selectedGroups),this.checkoutForm.controls.groupIds.setValue(this.checkout.groupIds))})}this.awsCaptchaService.loadAwsWafScripts(),this.setupFlow(),this.user&&this.user.id?this.clearUserDetailsValidation():this.subscription.add(this.userService.changeCurrentUser.subscribe(()=>{this.user&&this.user.id?(this.clearUserDetailsValidation(),!this.checkout.savedCards&&!this.checkout.givingFunds&&!this.checkout.savedBankAccounts&&this.donationService.setPaymentMethods(this.braintreeObj)):(this.setUserDetailsValidation(),this.donationService.resetPaymentMethods(this.unformattedAmount,this.braintreeObj)),this.handleDonationType()})),this.subscription.add(this.checkoutForm.get("amount").valueChanges.pipe(G(500)).subscribe(e=>{if(this.unformattedAmount=new Co().transform(e)/100,!this.beginCheckoutTracked&&e){let p=parseFloat(String(e).replace(/,/g,""))||0;p>0&&this.trackBeginCheckout(p)}let s=parseFloat(String(e).replace(/,/g,""))||0;s>0&&!this.checkoutForm.get("suggestionId")?.value&&this.trackAmountSelection(s,!0);let r=!(this.checkoutForm.controls.paymentMethod.touched||this.checkoutForm.controls.cardNumber.touched);if(this.donationService.addBankAccountPaymentMethod(e,r),this.advisorFirmSelected?.id)this.recomputeFeesForAdvisorFirm(this.advisorFirmSelected.allow_covered_fees,this.advisorFirmSelected.apply_cover_fee_below_amount_in_cents);else if(this.checkout.donationBooster)this.donationService.updateTotalAmount(e,this.checkoutForm.get("coverFees").value);else if(this.checkout.tipsInfo&&this.checkout.tipsInfo.canAcceptTips){let p=this.tipsService.calculateAndGetTips(this.checkout.paymentParameters.tips_params,e);this.checkout.tips=p,this.checkout.tips.push({amount:"other",percent:null}),setTimeout(()=>{this.checkoutForm.controls.tips.setValue(this.checkout.tips[1].amount)}),this.donationService.updateTotalAmount(e,!1,this.checkout.tips[1].amount)}else this.donationService.updateTotalAmount(e,!1)})),this.subscription.add(this.donationService.changeTotalAmount.subscribe(e=>{this.totalAmount=e})),this.subscription.add(this.checkoutForm.get("anonymous").valueChanges.subscribe(e=>{e?(this.checkoutForm.controls.hideName.disable(),this.checkoutForm.controls.hideName.setValue(!0)):this.checkoutForm.controls.hideName.enable()})),this.subscription.add(this.checkoutForm.get("coverFees").valueChanges.subscribe(e=>{if(this.checkout.paymentParameters.fees_covered&&!e){this.checkoutForm.get("coverFees").setValue(!0,{emitEvent:!1}),this.feeService.confirmCoverFeesOptOut(this.getCoverFeesExplanationContext(),this.totalAmount,{checkoutSurface:"legacy",paymentMethod:String(this.checkoutForm.get("paymentMethod").value),onKeepCovering:()=>{},onDontCoverFees:()=>{this.checkoutForm.get("coverFees").setValue(!1,{emitEvent:!1}),this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,!1),this.webAnalyticsService.mcTrackClick({action:"coverFeesToggled",category:"checkout",data:{coverFees:!1}})}});return}this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,e),this.webAnalyticsService.mcTrackClick({action:"coverFeesToggled",category:"checkout",data:{coverFees:e}})})),this.subscription.add(this.checkoutForm.get("tips").valueChanges.subscribe(e=>{e==="other"?this.customTips=!0:(this.customTips=!1,this.checkoutForm.controls.customTips.setValue(e),this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,!1,e))})),this.subscription.add(this.checkoutForm.get("customTips").valueChanges.pipe(G(500)).subscribe(e=>{let s=Math.floor(e*100)/100;this.customTips&&this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,!1,s)})),this.subscription.add(this.checkoutForm.get("hostTipAmount").valueChanges.pipe(G(500)).subscribe(()=>{let e=0;this.checkout.tipsInfo&&this.checkout.tipsInfo.canAcceptTips&&(e=this.customTips?this.checkoutForm.value.customTips:this.checkoutForm.value.tips),this.donationService.updateTotalAmount(this.checkoutForm.value.amount,this.checkoutForm.value.coverFees,e)})),this.subscription.add(this.checkoutForm.get("email").valueChanges.pipe(G(1e3),H()).subscribe(e=>{this.checkoutForm.get("email").valid&&this.emailLookup(e)})),this.subscription.add(this.donationService.changeDefaultPaymentMethod.subscribe(e=>{if(this.checkoutForm.controls.paymentMethod.touched||this.checkoutForm.controls.cardNumber.touched||(e.value===h.BraintreeGooglePay||e.value===h.BraintreeApplePay)&&(!/\D/.test(this.checkoutForm.value.paymentMethod)||this.checkoutForm.value.paymentMethod===h.BankAccount||e.value===h.BraintreeGooglePay&&this.checkoutForm.value.paymentMethod===h.BraintreeApplePay))return;let s=e.id||e.value;if(this.checkoutForm.controls.paymentMethod.setValue(s),this.paymentMethodTriggerText=e.viewValue,e.id&&e.card_type){if(e.card_type!=="BankAccount"&&e.card_type!=="GivingFund"){let r=e.expiration_month?.toString().length===1?"0"+e.expiration_month:e.expiration_month,p=e.expiration_year%100;this.storedCardMonthYear=r+"/"+p}e.card_type==="GivingFund"&&(this.givingCard.balance=e.balance_in_cents,this.givingCard.allowCoveredFees=e.allow_covered_fees,this.checkout.fees.givingCardFeeOverrides=e.fee_overrides,this.recomputeFeesForGivingCard()),this.addressValues={address1:e.address1,address2:e.address2,city:e.city,state:e.state,country:e.country,postalCode:e.postal_code},this.clearAddressValidation()}})),this.subscription.add(this.checkoutForm.get("paymentMethod").valueChanges.subscribe(e=>{let s=this.checkout.paymentMethods.find(r=>r.value===e);this.paymentMethodObj=s,this.paymentMethodValidation()})),this.subscription.add(this.donationService.removedPaymentMethods.subscribe(()=>{let e=!1;this.checkout.paymentMethods.forEach(s=>{s.value===this.checkoutForm.value.paymentMethod&&(e=!0)}),e||(this.checkoutForm.controls.paymentMethod.markAsUntouched(),this.checkoutForm.controls.cardNumber.markAsUntouched(),this.donationService.changeDefaultPaymentMethod.next(this.checkout.paymentMethods[0]))})),this.subscription.add(this.checkoutForm.get("country").valueChanges.pipe(H()).subscribe(e=>{e!=="USA"?(this.hideStateSelectField=!0,this.checkoutForm.controls.state.setValue(""),this.checkoutForm.controls.state.clearValidators(),this.checkoutForm.controls.state.updateValueAndValidity()):(this.hideStateSelectField=!1,(this.checkout.donorExperience.show_donation_address||this.isStoredCard||this.isStoredPayment)&&(this.checkoutForm.controls.state.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.state.updateValueAndValidity())),e!=="USA"&&e!=="CA"&&e!=="GB"?(this.checkoutForm.controls.postalCode.clearValidators(),this.checkoutForm.controls.postalCode.updateValueAndValidity(),this.postalCodeValidator=void 0):(e==="USA"?this.postalCodeValidator=C.compose([C.required,k.zipCodeValidatorUSA,k.noCreditCardLikePanValidator]):e==="CA"?this.postalCodeValidator=C.compose([C.required,k.zipCodeValidatorCA,k.noCreditCardLikePanValidator]):e==="GB"&&(this.postalCodeValidator=C.compose([C.required,k.zipCodeValidatorGB,k.noCreditCardLikePanValidator])),this.setPostalCodeValidation())})),this.subscription.add(this.checkoutForm.get("dedication").valueChanges.subscribe(e=>{e?(this.checkoutForm.get("dedicationType").setValue("Dedicated to"),this.checkoutForm.controls.dedicationType.setValidators([C.required]),this.checkoutForm.controls.dedicationType.updateValueAndValidity(),this.checkoutForm.controls.dedicationName.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.dedicationName.updateValueAndValidity()):(this.checkoutForm.get("dedicationType").setValue(""),this.checkoutForm.controls.dedicationType.clearValidators(),this.checkoutForm.controls.dedicationType.updateValueAndValidity(),this.checkoutForm.controls.dedicationName.clearValidators(),this.checkoutForm.controls.dedicationName.updateValueAndValidity(),this.checkoutForm.get("dedicationEmailNotification").setValue(!1))})),this.subscription.add(this.checkoutForm.get("dedicationEmailNotification").valueChanges.subscribe(e=>{e?(this.checkoutForm.controls.dedicationEmail.setValidators(C.compose([C.required,k.emailValidator])),this.checkoutForm.controls.dedicationEmail.updateValueAndValidity()):(this.checkoutForm.controls.dedicationEmail.clearValidators(),this.checkoutForm.controls.dedicationEmail.updateValueAndValidity())})),this.subscription.add(this.checkoutForm.get("groupIds").valueChanges.pipe(G(500),ie(()=>this.loadingGroups=!0),ye(e=>typeof e!="string"||e.trim()===""?(this.loadingGroups=!1,this.filteredGroups=[],this.filteredGroups):this.searchService.suggestStory({type:"groupPicker",term:e,searchSortOrder:"title"}).pipe(fe(()=>this.loadingGroups=!1)))).subscribe(e=>this.filteredGroups=e)),this.subscription.add(this.checkoutForm.controls.advisorFirmId.valueChanges.subscribe(e=>{e&&(this.advisorFirmSelected=this.checkout.paymentParameters.external_payment_settings.opted_in_advisor_firms.find(s=>s.id===e),this.advisorFirmSelected?.name==="Other"?(this.enableOtherAdvisorFirmName=!0,this.checkoutForm.controls.otherAdvisorFirmName.setValue(""),this.checkoutForm.controls.otherAdvisorFirmName.setValidators(C.required),this.checkoutForm.controls.otherAdvisorFirmName.updateValueAndValidity()):(this.enableOtherAdvisorFirmName=!1,this.checkoutForm.controls.otherAdvisorFirmName.clearValidators(),this.checkoutForm.controls.otherAdvisorFirmName.updateValueAndValidity()),this.displayCommitmentDetails=this.advisorFirmSelected.display_commitment_details,this.donationInstructions=this.advisorFirmSelected.donation_form_instructions,this.displayFundId=this.advisorFirmSelected.display_fund_id,this.displayFundName=this.advisorFirmSelected.display_fund_name,this.displayRelationshipManagerDetails=this.advisorFirmSelected.display_relationship_manager_details,this.displayFundId?this.setFundIdValidation():this.clearFundIdValidation(),this.displayFundName?this.setFundNameValidation():this.clearFundNameValidation(),this.checkout.fees.advisorFirmFeeOverrides=this.advisorFirmSelected.fee_overrides,this.checkout.fees.advisorFirmAdditionalFeeInfoText=this.advisorFirmSelected.additional_fee_info,this.recomputeFeesForAdvisorFirm(this.advisorFirmSelected.allow_covered_fees,this.advisorFirmSelected.apply_cover_fee_below_amount_in_cents))})),this.subscription.add(this.checkoutForm.controls.fundId.valueChanges.subscribe(e=>{e&&!this.checkout.paymentParameters?.cft_daf_payment_method_data?.admin_entry&&(this.cftFundSelected=this.checkout.paymentParameters?.cft_daf_payment_method_data?.funds.find(s=>s.fund_id===e),this.cftFundSelected?.fund_name&&this.checkoutForm.controls.fundName.setValue(this.cftFundSelected.fund_name))})),this.subscription.add(this.checkoutForm.get("givingCardNumber").valueChanges.pipe(G(2e3),H()).subscribe(e=>{let s={code:e.trim()};s.code.length>
3=6&&this.checkoutService.getGivingCardDetails(s).subscribe({next:r=>{this.givingCard.balance=r.balance,this.givingCard.allowCoveredFees=r.allow_covered_fees,this.checkout.fees.givingCardFeeOverrides=r.fee_overrides,this.recomputeFeesForGivingCard()},error:r=>{this.givingCard.balance=null,this.givingCard.allowCoveredFees=null,this.checkout.fees.givingCardFeeOverrides=null,this.recomputeFeesForGivingCard()}})})),this.subscription.add(this.checkoutForm.get("anonymous").valueChanges.subscribe(e=>{this.showTaxCreditWarning=e&&this.checkout?.donorExperience?.tax_credits_info?.has_anonymous_warning===!0})),this.breakpointObserver.observe([je.XSmall]).subscribe(e=>{this.isXSmall=!!e.matches})}addGroup(e){if(!this.matAutocompleteForGroup().isOpen){let s=e.input,r=e.value;r&&r.id&&(this.selectedGroups.id=r,this.checkout.groupIds=Object.keys(this.selectedGroups)),s&&(s.value=""),this.validateGroupChipList()}}removeGroup(e){this.selectedGroups[e]&&(delete this.selectedGroups[e],this.checkout.groupIds=Object.keys(this.selectedGroups),this.checkoutForm.controls.groupIds.setValue(this.checkout.groupIds)),this.validateGroupChipList()}selectedGroup(e){e.option.value&&(this.selectedGroups[e.option.value.id]=e.option.value,this.checkout.groupIds=Object.keys(this.selectedGroups),this.groupIdsInput().nativeElement.value=""),this.validateGroupChipList()}validateGroupChipList(){if(this.checkout.paymentParameters.enable_group_giving&&this.checkout.paymentParameters.group_selection_required)if(this.checkout.groupIds&&this.checkout.groupIds.length>0){this.error.groupIds=!1;let e=this.groupChipList();e&&(e.errorState=!1)}else{this.error.groupIds=!0;let e=this.groupChipList();e&&(e.errorState=!0)}}focusGroupIdsInput(){let e,s=this.groupIdsInput();s.nativeElement.value===""?e=this.searchService.getSearchResults({groupScope:"on",suggestion_format:!0}):e=this.searchService.suggestStory({type:"groupPicker",term:s.nativeElement.value,searchSortOrder:"title"}),z(e.pipe(G(500),ie(()=>this.loadingGroups=!0))).then(r=>{r.search_items?this.filteredGroups=r.search_items:this.filteredGroups=r,this.loadingGroups=!1})}setupFlow(){$(this.platformId)&&this.donationService.setUp((e,s)=>{if(e==="success"){if(this.setCftDonorUserDetails(),this.pageTagsService.setPageTitle(this.checkout.paymentParameters.story.title+" | Donate"),this.pageTagsService.setNoIndexTag(),this.webAnalyticsService.mcTrackPageView({urn:this.checkout.paymentParameters.story.urn,category:"checkout",disableStorage:!0}),this.webAnalyticsService.pageView(this.checkout.paymentParameters.story.analytics_trackers),this.checkout.paymentParameters.story.theme&&this.checkout.paymentParameters.story.theme.theme_color&&(this.themePalette=this.paletteService.generatePaletteWithPrefix("--mc-primary-",this.checkout.paymentParameters.story.theme.theme_color)),this.route.snapshot.queryParams.amount){let p=this.route.snapshot.queryParams.amount;isNaN(p)||(this.checkoutForm.controls.amount.setValue(p),this.resetSelectedAmount(this.route.snapshot.queryParams.amount))}this.checkout.paymentParameters.min_donation_amount!==5&&(this.checkoutForm.controls.amount.setValidators(C.compose([C.required,k.minAmountValidator(this.checkout.paymentParameters.min_donation_amount)])),this.checkoutForm.controls.amount.updateValueAndValidity()),this.hideMonthlyDonation=this.route.snapshot.queryParams.one_time_only,this.hideMonthlyDonation||(this.hideMonthlyDonation=!this.checkout.paymentParameters.enable_recurring_donation||this.checkout.donorExperience.hide_recurring_donation),!this.hideMonthlyDonation&&(this.route.snapshot.queryParams.recurring||this.checkout.donorExperience.default_donation_type==="recurring")&&this.checkoutForm.controls.donationType.setValue("2"),this.checkout.paymentParameters.enable_braintree_payment&&this.initializeBraintreeClient().then(()=>{this.checkout.paymentParameters.enable_braintree_paypal&&this.braintreeService.PAYPAL.createPaypalCheckoutComponent(this.braintreeObj.clientInstance).then(p=>{p&&(this.braintreeObj.paypalCheckout=!0,this.donationService.addBraintreePaymentMethod("paypal"))}),this.checkout.paymentParameters.enable_braintree_venmo&&this.braintreeService.VENMO.createVenmoComponent(this.braintreeObj.clientInstance).then(p=>{p&&this.braintreeService.VENMO.isVenmoSupportedOnBrowser()&&(this.braintreeObj.venmoCheckout=!0,this.donationService.addBraintreePaymentMethod("venmo"))}),this.checkout.paymentParameters.enable_apple_pay&&this.checkout.paymentParameters.enable_braintree_apple_pay&&this.braintreeService.APPLEPAY.createApplePayComponent(this.braintreeObj.clientInstance).then(p=>{if(p){this.braintreeObj.applePayCheckout=!0;let x=!this.checkout.paymentParameters?.cft_daf_payment_method_data?.enabled;this.donationService.addBraintreePaymentMethod("applePay",x)}}),this.checkout.paymentParameters.enable_braintree_google_pay&&this.braintreeService.GOOGLEPAY.createGooglePayComponent(this.braintreeObj.clientInstance,this.checkout.paymentParameters.payment_account_id).then(p=>{if(p.result){this.braintreeObj.googlePayCheckout=!0;let x=p.paymentMethodPresent&&!this.checkout.paymentParameters?.cft_daf_payment_method_data?.enabled;this.donationService.addBraintreePaymentMethod("googlePay",x)}})}).catch(p=>{}),this.setup=!0,this.showTaxCreditWarning=this.checkoutForm.get("anonymous").value&&this.checkout?.donorExperience?.tax_credits_info?.has_anonymous_warning===!0,this.adjustSuggestionsBtnsStyles(),this.setDefaultSuggestionSetId(),this.checkoutForm.get("coverFees").setValue(this.checkout.paymentParameters.fees_covered,{emitEvent:!1}),this.setGroupIdsValidation(),this.checkout.donorExperience.enable_donation_designation&&!this.checkout.donorExperience.brand_disable_donation_designation&&this.checkoutForm.controls.designation.setValue(this.checkout.donorExperience.default_donation_designation),this.checkout.paymentParameters.donation_booster_default_state=this.checkout.paymentParameters.fees_covered,this.checkout.paymentMethods.length===1&&(this.checkout.paymentMethods[0].value===h.CreditCard?(this.checkout.paymentType=h.CreditCard,this.paymentMethodTriggerText=this.checkout.paymentMethods[0].viewValue,this.setCreditCardValidation(),this.clearGivingCardValidation()):this.checkout.paymentMethods[0].value===h.GivingCard&&(this.checkout.paymentType=h.GivingCard,this.checkoutForm.controls.paymentMethod.setValue(h.GivingCard),this.paymentMethodTriggerText=this.checkout.paymentMethods[0].viewValue,this.setGivingCardValidation(),this.clearCreditCardValidation()),this.checkout.paymentMethods[0].value===h.Stripe&&(this.checkout.paymentType=h.Stripe,this.checkoutForm.controls.paymentMethod.setValue(h.Stripe),this.paymentMethodTriggerText=this.checkout.paymentMethods[0].viewValue,this.clearCreditCardValidation(),this.clearGivingCardValidation()),this.checkout.donorExperience.show_donation_address?this.setAddressValidation():this.clearAddressValidation());let r=this.webStorageService.getSessionStorageData(this.sessionStorageKey);if(r&&r!==""){let p=JSON.parse(r);this.evalDesignationExists(this.checkout.donorExperience.designation_options,p.designation)||delete p.designation,this.checkoutForm.patchValue(p),this.checkout.paymentParameters.group_giving_checkbox_format?this.checkoutForm.value.groupIds&&this.checkoutForm.value.groupIds.length>0&&(this.checkoutForm.value.groupIds.forEach(x=>{this.selectedGroups[x]=x}),this.checkout.groupIds=this.checkoutForm.value.groupIds):this.checkoutForm.controls.groupIds.setValue([])}this.checkoutForm.value.donationType==="2"&&this.handleDonationType(),this.route.
3snapshot.fragment==="userInfo"&&setTimeout(()=>{this.scrollService.scrollToId("userInfo")}),this.route.snapshot.queryParams.plaid_state_id&&this.linkNewBankAccount()}else e==="error"&&this.handleCheckoutRedirect(s)})}trackAmountSelection(e,s){let p=(this.checkoutForm.get("donationType")?.value||"1")==="2"?"monthly":"one_time";this.vwoService.pushEvent(Z.amountSelected,{amount:Math.round(e*100)/100,recurranceType:p,pageType:"checkout",isCustomAmount:s}),this.webAnalyticsService.mcTrackClick({action:"amountSelected",category:"checkout",data:{amount:Math.round(e*100)/100,recurranceType:p,pageType:"checkout",isCustomAmount:s}})}trackBeginCheckout(e){if(this.beginCheckoutTracked||!this.setup)return;this.beginCheckoutTracked=!0;let s={perm_urn:this.checkout.paymentParameters.story.perm_urn||this.checkout.paymentParameters.story.urn,fundraiser_title:this.checkout.paymentParameters.story.title,organization_title:this.checkout.paymentParameters.story?.org_name||this.checkout.paymentParameters.story?.organization_title,kind:this.checkout.paymentParameters.story?.story_kind||this.checkout.paymentParameters.story.kind,amount:e||0};this.webAnalyticsService.fbTrackEvent("InitiateCheckout",{currency:"USD",value:e||0},this.checkout.paymentParameters.story.analytics_trackers),this.webAnalyticsService.trackEvent(he.beginCheckout,{currency:"USD",event_action:"Begin Donation Checkout",event_category:"Donation Flow",value:e||0,items:[this.webAnalyticsService.getGtagCartItem(s)]},this.checkout.paymentParameters.story.analytics_trackers)}ngOnDestroy(){this.feeService.clearCoverFeesExplanationContextProvider(),this.subscription.unsubscribe(),this.paymentSectionObserver?.disconnect(),this.stripeElements.cardNumber&&this.stripeElements.cardNumber.destroy(),this.stripeElements.cardExp&&this.stripeElements.cardExp.destroy(),this.stripeElements.cardCvc&&this.stripeElements.cardCvc.destroy(),this.braintreeObj.clientInstance&&this.braintreeService.teardownHostedFields()}updateAmount(e){this.donationAmtInput().nativeElement.focus();let s=e.value_in_cents/100,r=this.decimalPipe.transform(s,"1.0-0");if(this.selectedAmount=r,this.checkoutForm.controls.amount.setValue(r),this.checkoutForm.controls.suggestionId.setValue(e.suggestion_id),this.checkoutForm.controls.suggestionSetId.setValue(e.donation_suggestion_set_id),!this.beginCheckoutTracked&&r){let p=parseFloat(r.replace(/,/g,""))||0;p>0&&this.trackBeginCheckout(p)}this.trackAmountSelection(s,!1)}resetSelectedAmount(e){if(this.selectedAmount!==e&&(this.selectedAmount=e,this.checkoutForm.controls.suggestionId.setValue(null),!this.beginCheckoutTracked&&e)){let s=parseFloat(e.replace(/,/g,""))||0;s>0&&this.trackBeginCheckout(s)}}adjustSuggestionsBtnsStyles(){if(!this.checkout.donorExperience)return;let e=this.checkout.donorExperience.donation_suggestions||[];for(let s of e)if(s.description){this.suggestionLevelsStyles="col-sm-6 mb-3 min-height";break}else this.suggestionLevelsStyles=this.checkoutForm.controls.donationType.value==="1"?"col-md-3 col-lg-2 mb-3":"col-md-4 col-lg-3 mb-3"}setDefaultSuggestionSetId(){if(!this.checkout.donorExperience)return;let e=this.checkout.donorExperience.donation_suggestions||[];e.length>0&&e[0].donation_suggestion_set_id&&this.checkoutForm.controls.suggestionSetId.setValue(e[0].donation_suggestion_set_id)}handleDonationType(){if(this.checkoutForm.value.donationType==="1"&&this.donationService.details.paymentParameters)this.donationService.details.paymentParameters.allow_giving_card&&(this.checkout.paymentMethods.find(e=>e.value===h.GivingCard)||this.checkout.paymentMethods.push({value:h.GivingCard,viewValue:"Giving Card"})),this.donationService.details.paymentParameters.external_payment_settings&&this.donationService.details.paymentParameters.external_payment_settings.enable_external_payment_method&&(this.checkout.paymentMethods.find(e=>e.value===h.ExternalPayment)||this.donationService.details.paymentMethods.push({value:h.ExternalPayment,viewValue:this.donationService.details.paymentParameters.external_payment_settings.external_payment_method_label})),this.donationService.details.paymentParameters.cft_daf_payment_method_data?.constituent_id&&(this.checkout.paymentMethods.find(e=>e.value===h.CftDaf)||this.donationService.details.paymentMethods.splice(0,0,{value:h.CftDaf,viewValue:"My CFT Fund"}));else if(this.checkoutForm.value.donationType==="2"){this.checkoutForm.controls.rememberCard.setValue(!1);for(let e=this.checkout.paymentMethods.length-1;e>=0;e--){let s=this.checkout.paymentMethods[e];(s.value===h.GivingCard||s.value===h.ExternalPayment||s.value===h.CftDaf)&&this.checkout.paymentMethods.splice(e,1)}this.donationService.removedPaymentMethods.next(!0)}this.adjustSuggestionsBtnsStyles()}paymentMethodValidation(){return oe(this,arguments,function*(e={}){let s=this.paymentMethodObj;if(s){if(!this.skipBankAccountRecommendation){let r=this.checkout.paymentType,p=this.checkoutForm.value.paymentMethod,x=s.type||s.value;if(yield this.donationService.checkBankAccountRecommendation({amount:this.unformattedAmount,currentPaymentType:x,prevPaymentType:r,recommendedValueToUseBankAccount:this.checkout.paymentParameters.recommended_value_to_use_bank_account})){this.checkout.paymentType=r,this.checkoutForm.controls.paymentMethod.setValue(p||r);return}}if(this.checkout.paymentType=s.type||s.value,this.paymentMethodTriggerText=s.viewValue,this.isStoredCard=s.type===h.StoredCard,this.isGivingFund=s.type===h.GivingFund,this.isStoredBankAccount=s.type===h.StoredBankAccount,this.isStoredPayment=s.type===h.StoredPayment,e.skipResetFields||(this.editStoredCard=!1,this.editStoredBank=!1,this.showAddress2Field=!1,this.checkoutForm.controls.monthYear.setValue(""),this.checkoutForm.controls.cardNumber.enable(),this.selectedGivingFund=null,this.selectedBankAccountId=null),this.checkout.paymentType===h.ApplePay||this.checkout.paymentType===h.BraintreePaypal||this.checkout.paymentType===h.BraintreeApplePay||this.checkout.paymentType===h.BraintreeGooglePay?(this.clearAddressValidation(),this.checkout.creditCardType=T.Others):this.checkout.donorExperience.show_donation_address&&!this.isStoredCard&&!this.isStoredBankAccount&&!this.isStoredPayment?this.setAddressValidation():this.clearAddressValidation(),this.isStoredCard){let r;for(r of this.checkout.savedCards)if(r.id===s.value){this.addressValues={address1:r.address1,address2:r.address2,city:r.city,state:r.state,country:r.country,postalCode:r.postal_code};let x=r.expiration_month.toString().length===1?"0"+r.expiration_month:r.expiration_month,O=r.expiration_year%100;this.storedCardMonthYear=x+"/"+O,this.checkout.creditCardType=r.card_type==="American Express"?T.Amex:T.Credit
3Card}this.setCreditCardValidation()}else if(this.isStoredBankAccount)for(let r of this.checkout.savedBankAccounts)r.id===s.value&&(this.addressValues={address1:r.address1,address2:r.address2,city:r.city,state:r.state,country:r.country,postalCode:r.postal_code},this.checkout.creditCardType=T.StoredBankAccount);else if(this.isGivingFund){let r;for(r of this.checkout.givingFunds)r.id===s.value&&(this.selectedGivingFund=r,this.checkout.creditCardType=T.GivingCard,this.givingCard.balance=r.balance_in_cents,this.givingCard.allowCoveredFees=r.allow_covered_fees,this.recomputeFeesForGivingCard(),this.setPostalCodeValidation())}else if(this.isStoredPayment){let r;for(r of this.checkout.savedCards)if(r.id===s.value)if(r.card_type==="PayPalAccount"||r.card_type==="VenmoAccount")this.checkout.creditCardType=T.Others;else{this.addressValues={address1:r.address1,address2:r.address2,city:r.city,state:r.state,country:r.country,postalCode:r.postal_code};let x=r.expiration_month?.toString()?.length===1?"0"+r.expiration_month:r.expiration_month,O=r.expiration_year%100;this.storedCardMonthYear=x+"/"+O,this.checkout.creditCardType=r.card_type==="American Express"?T.Amex:T.CreditCard}}if(this.checkout.paymentType===h.CreditCard?(this.setCreditCardValidation(),this.checkout.creditCardType=T.CreditCard):this.checkout.paymentType===h.Stripe?(this.clearCreditCardValidation(),this.setPostalCodeValidation(),this.checkout.creditCardType=T.CreditCard,e.skipStripeCreateElements||(this.stripeElements.loading=!0,this.stripeService.initStripe().then(()=>{this.createStripeElements(),this.stripeElements.loading=!1}))):this.checkout.paymentType===h.Braintree?(this.clearCreditCardValidation(),this.setPostalCodeValidation(),this.checkout.creditCardType=T.CreditCard,this.initializeBraintreeClient().then(()=>(this.braintreeObj.loading=!0,this.braintreeService.initHostedFields(this.braintreeObj.clientInstance))).then(()=>{this.createBraintreeElements(),this.braintreeObj.loading=!1}).catch(r=>{})):this.checkout.paymentType===h.BraintreeVenmo?(this.clearCreditCardValidation(),this.setPostalCodeValidation(),this.addressPlaceholder="Address",this.checkout.creditCardType=T.Others):this.checkout.paymentType===h.TempBankAccount?(this.clearCreditCardValidation(),this.setPostalCodeValidation(),this.selectedBankAccountId=this.plaidService.getBankAccountId(s.value),this.checkout.creditCardType=T.TempBankAccount):this.checkout.paymentType===h.BankAccount?(this.clearCreditCardValidation(),this.setPostalCodeValidation(),this.checkout.creditCardType=T.TempBankAccount):this.clearCreditCardValidation(),this.checkout.paymentType===h.GivingCard?(this.setGivingCardValidation(),this.setPostalCodeValidation(),this.checkout.creditCardType=T.GivingCard,this.addressPlaceholder="Address"):this.checkout.paymentType===h.GivingFund?this.setPostalCodeValidation():this.checkout.paymentType===h.BraintreeVenmo||(this.clearGivingCardValidation(),e.skipResetFields||(this.addressPlaceholder="Billing address",this.checkout.donationBooster=this.checkout.tipsInfo.canAcceptTips?!1:!this.checkout.paymentParameters.hide_donation_booster,this.checkout.tipsInfo.canAcceptTips||this.checkoutForm.controls.coverFees.setValue(this.checkout.paymentParameters.fees_covered,{emitEvent:!1}))),this.checkout.paymentType===h.ExternalPayment){let r=this.checkout.paymentParameters.external_payment_settings.external_payment_asset_types;r.length===1&&!this.checkoutForm.value.giftType&&this.checkoutForm.controls.giftType.setValue(r[0]),this.setExternalPaymentValidation(),this.checkout.creditCardType=T.ExternalPayment,this.addressPlaceholder="Donor address",this.checkout.paymentParameters.external_payment_settings.opted_in_advisor_firms.length===1?this.checkoutForm.controls.advisorFirmId.setValue(this.checkout.paymentParameters.external_payment_settings.opted_in_advisor_firms[0].id):this.checkoutForm.value.advisorFirmId||(this.checkoutForm.controls.coverFees.setValue(!1,{emitEvent:!1}),this.checkout.donationBooster=!1)}else this.clearExternalPaymentValidation(),this.advisorFirmSelected=null;if(this.checkout.paymentType===h.CftDaf?(this.checkoutForm.controls.giftType.setValue("Donor Advised Fund (DAF)"),this.checkoutForm.controls.constituentId.setValue(this.checkout.paymentParameters?.cft_daf_payment_method_data?.constituent_id),this.checkoutForm.controls.advisorFirmId.setValue(this.checkout.paymentParameters?.cft_daf_payment_method_data?.advisor_firm_id),this.checkout.creditCardType=T.Others,this.addressPlaceholder="Donor address",this.checkoutForm.controls.coverFees.setValue(!1,{emitEvent:!1}),this.checkout.donationBooster=!1,this.setCftDafPaymentValidation()):this.clearCftDafPaymentValidation(),!e.skipResetFields)if(this.checkout.tipsInfo.canAcceptTips){let r=this.customTips?this.checkoutForm.get("customTips").value:this.checkoutForm.get("tips").value;this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,!1,r)}else this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)}})}setCreditCardValidation(){this.isStoredCard?(this.checkoutForm.controls.cardNumber.clearValidators(),this.checkoutForm.controls.cardNumber.updateValueAndValidity()):(this.checkoutForm.controls.cardNumber.setValidators(this.cardNumberValidator),this.checkoutForm.controls.cardNumber.updateValueAndValidity()),this.checkoutForm.controls.monthYear.setValidators(this.monthYearValidator),this.checkoutForm.controls.monthYear.updateValueAndValidity(),this.isStoredCard?(this.checkoutForm.controls.securityCode.clearValidators(),this.checkoutForm.controls.securityCode.updateValueAndValidity()):(this.checkoutForm.controls.securityCode.setValidators(this.securityCodeValidator),this.checkoutForm.controls.securityCode.updateValueAndValidity()),this.setPostalCodeValidation()}clearCreditCardValidation(){this.checkoutForm.controls.cardNumber.setValue(""),this.checkoutForm.controls.cardNumber.clearValidators(),this.checkoutForm.controls.cardNumber.updateValueAndValidity(),this.checkoutForm.controls.monthYear.setValue(""),this.checkoutForm.controls.monthYear.clearValidators(),this.checkoutForm.controls.monthYear.updateValueAndValidity(),this.checkoutForm.controls.securityCode.setValue(""),this.checkoutForm.controls.securityCode.clearValidators(),this.checkoutForm.controls.securityCode.updateValueAndValidity(),this.checkoutForm.controls.postalCode.clearValidators(),this.checkoutForm.controls.postalCode.updateValueAndValidity()}setGivingCardValidation(){this.checkoutForm.controls.givingCardNumber.setValidators(C.compose([C.required,C.minLength(6)])),this.checkoutForm.controls.givingCardNumber.updateValueAndValidity()}clearGivingCardValidation(){this.checkoutForm.controls.givingCardNumber.setValue(""),this.checkoutForm.controls.givingCardNumber.clearValidators(),this.checkoutForm.controls.givingCardNumber.updateValueAndValidity()}setExternalPaymentValidation(){this.checkoutForm.controls.giftType.setValidators(C.required),this.checkoutForm.controls.giftType.updateValueAndValidity(),this.checkoutForm.controls.advisorFirmId.setValidators(C.required),this.checkoutForm.controls.advisorFirmId.updateV
3alueAndValidity()}clearExternalPaymentValidation(){this.checkoutForm.controls.giftType.setValue(null),this.checkoutForm.controls.giftType.clearValidators(),this.checkoutForm.controls.giftType.updateValueAndValidity(),this.checkoutForm.controls.advisorFirmId.setValue(null),this.checkoutForm.controls.advisorFirmId.clearValidators(),this.checkoutForm.controls.advisorFirmId.updateValueAndValidity(),this.checkoutForm.controls.otherAdvisorFirmName.setValue(""),this.checkoutForm.controls.otherAdvisorFirmName.clearValidators(),this.checkoutForm.controls.otherAdvisorFirmName.updateValueAndValidity(),this.checkout.paymentType!==h.ExternalPayment&&this.checkout.paymentType!==h.CftDaf&&(this.checkoutForm.controls.fundName.setValue(null),this.checkoutForm.controls.fundName.clearValidators(),this.checkoutForm.controls.fundName.updateValueAndValidity(),this.checkoutForm.controls.fundId.setValue(null),this.checkoutForm.controls.fundId.clearValidators(),this.checkoutForm.controls.fundId.updateValueAndValidity())}setFundIdValidation(){this.checkoutForm.controls.fundId.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.fundId.updateV
3alueAndValidity()}clearFundIdValidation(){this.checkoutForm.controls.fundId.setValue(null),this.checkoutForm.controls.fundId.clearValidators(),this.checkoutForm.controls.fundId.updateValueAndValidity()}setFundNameValidation(){this.checkoutForm.controls.fundName.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.fundName.updateValueAndValidity()}clearFundNameValidation(){this.checkoutForm.controls.fundName.setValue(null),this.checkoutForm.controls.fundName.clearValidators(),this.checkoutForm.controls.fundName.updateValueAndValidity()}setCftDafPaymentValidation(){if(this.checkoutForm.controls.fundId.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.fundId.updateValueAndValidity(),this.checkout.paymentParameters?.cft_daf_payment_method_data?.admin_entry){let e=this.checkout.paymentParameters?.cft_daf_payment_method_data?.prefill_data;e&&(this.checkoutForm.controls.address1.setValue(e.address1),this.checkoutForm.controls.city.setValue(e.city),this.checkoutForm.controls.state.setValue(e.state),this.checkoutForm.controls.postalCode.setValue(e.postal_code),this.checkoutForm.controls.email.setValue(e.email)),this.checkout.paymentParameters?.cft_daf_payment_method_data?.show_constituent_id&&(this.checkoutForm.controls.constituentId.setValidators(C.required),this.checkoutForm.controls.constituentId.updateValueAndValidity()),this.checkoutForm.controls.fundName.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.fundName.updateValueAndValidity(),this.checkoutForm.controls.fundholderEmail.setValidators(C.compose([C.required,k.emailValidator])),this.checkoutForm.controls.fundholderEmail.updateValueAndValidity()}}clearCftDafPaymentValidation(){this.checkout.paymentType!==h.ExternalPayment&&this.checkout.paymentType!==h.CftDaf&&(this.checkoutForm.controls.fundName.setValue(null),this.checkoutForm.controls.fundName.clearValidators(),this.checkoutForm.controls.fundName.updateValueAndValidity(),this.checkoutForm.controls.fundId.setValue(null),this.checkoutForm.controls.fundId.clearValidators(),this.checkoutForm.controls.fundId.updateV
3alueAndValidity()),this.checkoutForm.controls.constituentId.setValue(null),this.checkoutForm.controls.constituentId.clearValidators(),this.checkoutForm.controls.constituentId.updateValueAndValidity(),this.checkoutForm.controls.fundholderEmail.setValue(null),this.checkoutForm.controls.fundholderEmail.clearValidators(),this.checkoutForm.controls.fundholderEmail.updateValueAndValidity()}setUserDetailsValidation(){this.checkoutForm.controls.firstName.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.firstName.updateValueAndValidity(),this.checkoutForm.controls.lastName.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.lastName.updateValueAndValidity(),this.checkoutForm.controls.email.setValidators(C.compose([C.required,k.emailValidator])),this.checkoutForm.controls.email.updateValueAndValidity(),this.setCftDonorUserDetails()}setCftDonorUserDetails(){this.checkout.paymentParameters?.cft_daf_payment_method_data?.enabled&&(this.checkoutForm.value.firstName||this.checkoutForm.controls.firstName.setValue(this.checkout.paymentParameters?.cft_daf_payment_method_data?.first_name),this.checkoutForm.value.lastName||this.checkoutForm.controls.lastName.setValue(this.checkout.paymentParameters?.cft_daf_payment_method_data?.last_name),this.checkoutForm.value.email||this.checkoutForm.controls.email.setValue(this.checkout.paymentParameters?.cft_daf_payment_method_data?.email))}clearUserDetailsValidation(){this.checkoutForm.controls.firstName.setValue(""),this.checkoutForm.controls.firstName.clearValidators(),this.checkoutForm.controls.firstName.updateValueAndValidity(),this.checkoutForm.controls.lastName.setValue(""),this.checkoutForm.controls.lastName.clearValidators(),this.checkoutForm.controls.lastName.updateValueAndValidity(),this.checkoutForm.controls.email.setValue(""),this.checkoutForm.controls.email.clearValidators(),this.checkoutForm.controls.email.updateValueAndValidity()}setAddressValidation(){this.checkoutForm.controls.address1.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.address1.updateValueAndValidity(),this.checkoutForm.controls.city.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.city.updateValueAndValidity(),this.checkoutForm.controls.state.setValidators([C.required,k.noCreditCardLikePanValidator]),this.checkoutForm.controls.state.updateValueAndValidity(),this.checkoutForm.value.country||this.checkoutForm.controls.country.setValue("USA"),this.checkoutForm.controls.country.setValidators([C.required]),this.checkoutForm.controls.country.updateValueAndValidity(),this.setPostalCodeValidation()}clearAddressValidation(){this.checkoutForm.controls.address1.setValue(""),this.checkoutForm.controls.address1.clearValidators(),this.checkoutForm.controls.address1.updateValueAndValidity(),this.checkoutForm.controls.city.setValue(""),this.checkoutForm.controls.city.clearValidators(),this.checkoutForm.controls.city.updateValueAndValidity(),this.checkoutForm.controls.state.setValue(""),this.checkoutForm.controls.state.clearValidators(),this.checkoutForm.controls.state.updateValueAndValidity(),this.checkout.paymentType===h.GivingCard||this.checkout.paymentType===h.GivingFund||this.checkout.paymentType===h.StoredCard||this.checkout.paymentType===h.StoredBankAccount||this.checkout.paymentType===h.ApplePay||this.checkout.paymentType===h.BraintreePaypal||this.checkout.paymentType===h.BraintreeVenmo||this.checkout.paymentType===h.BraintreeApplePay||this.checkout.paymentType===h.BraintreeGooglePay||this.checkout.paymentType===h.StoredPayment||this.formSubmitterName==="addToCartBtn"?(this.checkoutForm.controls.country.setValue(""),this.checkoutForm.controls.country.clearValidators(),this.checkoutForm.controls.country.updateValueAndValidity(),this.checkoutForm.controls.postalCode.setValue(""),this.checkoutForm.controls.postalCode.clearValidators(),this.checkoutForm.controls.postalCode.updateValueAndValidity()):(this.checkoutForm.value.country||this.checkoutForm.controls.country.setValue("USA"),this.checkoutForm.controls.country.setValidators([C.required]),this.checkoutForm.controls.country.updateV
3alueAndValidity(),this.setPostalCodeValidation())}setPostalCodeValidation(){this.postalCodeValidator&&(this.checkoutForm.controls.postalCode.setValidators(this.postalCodeValidator),this.checkoutForm.controls.postalCode.updateValueAndValidity())}setGroupIdsValidation(){this.checkout.paymentParameters.enable_group_giving&&this.checkout.paymentParameters.group_selection_required&&(this.checkoutForm.controls.groupIds.setValidators([C.required]),this.checkoutForm.controls.groupIds.updateValueAndValidity())}clearGroupIdsValidation(){this.error.groupIds=!1,this.checkoutForm.controls.groupIds.clearValidators(),this.checkoutForm.controls.groupIds.updateValueAndValidity()}updateFormAddressFields(){this.addressValues.address1&&this.checkoutForm.controls.address1.setValue(this.addressValues.address1),this.addressValues.address2&&this.checkoutForm.controls.address2.setValue(this.addressValues.address2),this.addressValues.city&&this.checkoutForm.controls.city.setValue(this.addressValues.city),this.addressValues.state&&this.checkoutForm.controls.state.setValue(this.addressValues.state.toUpperCase()),this.addressValues.country&&this.checkoutForm.controls.country.setValue(this.addressValues.country),this.addressValues.postalCode&&this.checkoutForm.controls.postalCode.setValue(this.addressValues.postalCode)}changeGroupIdsCheckbox(e){let s="groupIds";this.selectedGroups[e.id]?delete this.selectedGroups[e.id]:this.selectedGroups[e.id]=e,this.checkout.groupIds=Object.keys(this.selectedGroups),this.checkout.groupIds&&this.checkout.groupIds.length>0?this.checkoutForm.controls[s].setValue(this.checkout.groupIds):this.checkoutForm.controls[s].setValue("")}emailLookup(e){if(e==="")return;this.userService.emailKnowledge(e,!0).subscribe({next:p=>{this.knownEmail=!p.unknown,this.emailLookupData=p},error:p=>{}});let s=this.checkoutForm.value.firstName||void 0,r=this.checkoutForm.value.lastName||void 0;this.userService.trackCartAbandonment(e,s,r).subscribe({error:()=>{}})}editStoredCardClick(){this.editStoredCard=!0,this.showAddress2Field=!0,this.checkoutForm.controls.cardNumber.disable(),this.checkoutForm.controls.monthYear.setValue(this.storedCardMonthYear),this.setCreditCardValidation(),this.setAddressValidation(),this.updateFormAddressFields()}editStoredBankClick(){this.editStoredBank=!0,this.showAddress2Field=!0,this.setAddressValidation(),this.updateFormAddressFields()}signIn(){this.storeCheckoutData(),this.dialog.open(zt,{data:{email:this.checkoutForm.value.email}})}logout(){this.userService.logout().subscribe({next:()=>{this.userService.currentUser=null},error:e=>{}})}addToCartSubmit(){if(this.addToCart.processing||this.checkoutForm.invali
3d)return;this.addToCart.processing=!0;let e={identifies_id:this.checkout.story.id,identifies_type:this.checkout.story.type,recurring_donation:this.checkoutForm.value.donationType==="2"?"monthly":"One Time",designation:this.checkoutForm.value.designation,dedication:null,hide_donation_amount:this.checkoutForm.value.hideAmount,publicly_hidden:this.checkoutForm.value.hideName||this.checkoutForm.value.anonymous,anonymous:this.checkoutForm.value.anonymous,is_general_fund:this.route.snapshot.queryParams.is_general_fund,campaign_id:this.route.snapshot.queryParams.campaign_id,campaign_parent_id:this.route.snapshot.queryParams.campaign_parent_id,group_ids:this.checkout.groupIds,selected_suggestion_id:this.checkoutForm.value.suggestionId,donation_suggestion_set_id:this.checkoutForm.value.suggestionSetId};this.checkoutForm.value.dedicationType&&(e.dedication={dedication_type:this.checkoutForm.value.dedicationType,dedication_name:this.checkoutForm.value.dedicationName,send_email_notification:this.checkoutForm.value.dedicationEmailNotification,dedication_email_address:this.checkoutForm.value.dedicationEmail,dedication_email_message:this.checkoutForm.value.dedicationEmailMessage},e.dedication.send_email_notification||(e.dedication.dedication_email_address=null,e.dedication.dedication_email_message=null));let s=this.customQuestionsFormComponent();if(s){let r=s.customQuestionAnswers;r.length>0&&(e.form_question_answers=r)}this.cartService.saveCart(e,this.unformattedAmount).subscribe({next:()=>{this.cartService.getCart().subscribe({next:r=>{this.addToCart.processing=!1,this.cartService.cart=r,this.webAnalyticsService.trackEvent(he.addToCart,{event_action:"Add to Cart",event_category:"Donation Flow",value:this.unformattedAmount,currency:"USD",items:this.webAnalyticsService.getGtagCartItemArray([this.cartService.cart.cart_items?.at(-1)])},this.checkout.paymentParameters.story.analytics_trackers),this.webAnalyticsService.fbTrackEvent("AddToCart",{currency:"USD",value:this.unformattedAmount},this.checkout.paymentParameters.story.analytics_trackers);let x=(this.checkoutForm.get("donationType")?.value||"1")==="2"?"monthly":"one_time";this.vwoService.pushEvent(Z.addToCart,{amount:Math.round(this.unformattedAmount*100)/100,pageType:"checkout",recurranceType:x}),this.dialog.open(ko,{data:{}}).afterClosed().subscribe(N=>{N==="checkout"?this.router.navigate(["/checkout/cart"]):N&&N.indexOf("multigive")>=0?this.router.navigateByUrl(this.router.parseUrl(N)):this.router.navigate(["/search"])})},error:r=>{this.addToCart.processing=!1}})},error:r=>{this.addToCart.processing=!1}})}addToCartAction(){this.hasAddedToCart=!0,this.formSubmitterName="addToCartBtn",this.checkoutNgFormElement().onSubmit(void 0)}onFormSubmit(){this.error.groupIds=!1;let e=this.formSubmitterName==="addToCartBtn"?"addToCart":"checkout",s=this.unformattedAmount||parseFloat(String(this.checkoutForm.get("amount")?.value||0).replace(/,/g,""))||0,p=(this.checkoutForm.get("donationType")?.value||"1")==="2"?"monthly":"one_time";if(this.vwoService.pushEvent(Z.step1ProceedAttempt,{intent:e,amount:Math.round(s*100)/100,recurranceType:p,pageType:"checkout"}),e==="checkout"&&this.webAnalyticsService.mcTrackClick({action:"paymentSubmitAttempt",category:"checkout",data:{paymentMethod:String(this.checkoutForm.get("paymentMethod")?.value||"")}}),this.formSubmitterName==="addToCartBtn"){this.clearAddressValidation(),this.clearCreditCardValidation(),this.clearGivingCardValidation(),this.clearUserDetailsValidation(),this.clearGroupIdsValidation(),this.clearExternalPaymentValidation(),this.clearCftDafPaymentValidation(),this.clearFundIdValidation(),this.clearFundNameValidation();let _=this.brandCustomQuestionsFormComponent();this.checkout.donorExperience.enable_brand_custom_questions&&_&&_.clearValidators(),this.addToCartSubmit(),this.formSubmitterName=null;return}this.paymentMethodValidation({skipStripeCreateElements:!0,skipResetFields:!0}),this.setGroupIdsValidation();let x=this.brandCustomQuestionsFormComponent();this.checkout.donorExperience.enable_brand_custom_questions&&x&&x.setValidators(),this.user.user_id?this.clearUserDetailsValidation():this.setUserDetailsValidation();let O=this.checkoutForm.controls.postalCode.value.trim();if(this.checkoutForm.controls.postalCode.setValue(O),this.checkoutForm.controls.postalCode.updateValueAndValidity(),this.checkoutForm.invali
3d||this.checkout.paymentParameters.enable_group_giving&&this.checkout.paymentParameters.group_selection_required&&(!this.checkout.groupIds||this.checkout.groupIds?.length===0)){this.snackBar.open("Fill in mandatory fields.","",{duration:5e3}),this.validateGroupChipList();return}if(this.checkoutForm.controls.paymentMethod.value===h.Braintree){let _=this.braintreeService.getState();if(!Object.keys(_.fields).every(R=>_.fields[R].isValid)){this.snackBar.open("Fill in credit card fields.","",{duration:5e3});return}}else if(this.checkoutForm.controls.paymentMethod.value===h.Stripe){let _=!0;if(this.stripeElements.cardNumber._empty||this.stripeElements.cardNumber._invalid?(_=!1,this.stripeElements.cardNumber.focus()):this.stripeElements.cardExp._empty||this.stripeElements.cardExp._invalid?(_=!1,this.stripeElements.cardExp.focus()):(this.stripeElements.cardCvc._empty||this.stripeElements.cardCvc._invalid)&&(_=!1,this.stripeElements.cardCvc.focus()),!_){this.snackBar.open("Fill in credit card fields.","",{duration:5e3});return}}if(this.checkout.paymentType===h.BankAccount||this.checkout.paymentType===h.TempBankAccount&&!this.selectedBankAccountId){this.snackBar.open("Please select a valid payment option.","",{duration:5e3});return}if(this.checkoutForm.controls.paymentMethod.value===h.GivingCard&&this.givingCard.balance/100<this.totalAmount){let _=this.givingCard.balance/100;this.snackBar.open(`Your donation amount has been changed from
4          $${this.totalAmount} to $${_}, the maximum donation
5          you can make with this giving card.`,"",{duration:5e3}),this.checkoutForm.controls.amount.setValue(_);return}this.checkout.processing=!0,this.checkout.recurring=this.checkoutForm.value.donationType==="2",this.checkout.story.kind==="Personal"&&(this.checkout.recurring=!1);let N,Y;if(this.checkoutForm.value.monthYear){let _=this.checkoutForm.value.monthYear.match(/^(\d{2})\/(\d{2})/);N=_[1],Y=_[2]}this.isStoredCard||this.isStoredPayment?this.checkout.storedCreditCardId=this.checkoutForm.controls.paymentMethod.value:this.checkout.storedCreditCardId=null,this.isStoredBankAccount?this.checkout.storedBankAccountId=this.checkoutForm.controls.paymentMethod.value:this.checkout.storedBankAccountId=null,this.isGivingFund?this.checkout.givingFundId=this.checkoutForm.controls.paymentMethod.value:this.checkout.givingFundId=null,this.checkout.user={firstName:this.user.first_name||this.checkoutForm.value.firstName,lastName:this.user.last_name||this.checkoutForm.value.lastName,fullName:this.user.full_name||this.checkoutForm.value.firstName+" "+this.checkoutForm.value.lastName,email:this.checkoutForm.value.email.trim()||this.user.email},this.checkout.address={address1:this.checkoutForm.value.address1,address2:this.checkoutForm.value.address2,city:this.checkoutForm.value.city,state:this.checkoutForm.value.state,country:this.checkoutForm.value.country,postalCode:this.checkoutForm.value.postalCode},this.checkout.creditCardDetails={cardNumber:this.checkoutForm.value.cardNumber,expirationMonth:N,expirationYear:Y,securityCode:this.checkoutForm.value.securityCode},this.checkout.givingCardNumber=this.checkoutForm.value.givingCardNumber.trim(),this.checkout.rememberCard=this.checkoutForm.value.rememberCard,this.checkout.hideAmount=this.checkoutForm.value.hideAmount,this.checkout.hideName=this.checkoutForm.value.hideName||this.checkoutForm.value.anonymous,this.checkout.anonymous=this.checkoutForm.value.anonymous,this.checkout.designation=this.checkoutForm.value.designation,this.checkout.dedication={dedication_type:this.checkoutForm.value.dedicationType,dedication_name:this.checkoutForm.value.dedicationName,send_email_notification:this.checkoutForm.value.dedicationEmailNotification,dedication_email_address:this.checkoutForm.value.dedicationEmail,dedication_email_message:this.checkoutForm.value.dedicationEmailMessage},this.checkout.coverFees=this.checkoutForm.value.coverFees,this.checkout.tipAmount=this.customTips?this.checkoutForm.value.customTips:this.checkoutForm.value.tips,this.checkout.suggestionId=this.checkoutForm.value.suggestionId,this.checkout.suggestionSetId=this.checkoutForm.value.suggestionSetId;let D=this.customQuestionsFormComponent();if(D){let _=D.customQuestionAnswers;_.length>0&&(this.checkout.donationParams.formQuestionAnswers=_)}if(x){let _=x.customQuestionAnswers;_.length>0&&(this.checkout.donationParams.formQuestionAnswers&&this.checkout.donationParams.formQuestionAnswers.length>0?_.forEach(v=>this.checkout.donationParams.formQuestionAnswers.push(v)):this.checkout.donationParams.formQuestionAnswers=_)}if((this.isStoredCard||this.isStoredBankAccount||this.isStoredPayment)&&(this.checkoutForm.controls.address1.touched&&this.checkoutForm.controls.address1.value||this.checkoutForm.controls.address2.touched&&this.checkoutForm.controls.address2.value||this.checkoutForm.controls.city.touched&&this.checkoutForm.controls.city.value||this.checkoutForm.controls.country.touched&&this.checkoutForm.controls.country.value||this.checkoutForm.controls.state.touched&&this.checkoutForm.controls.state.value||this.checkoutForm.controls.postalCode.touched&&this.checkoutForm.controls.postalCode.value||this.checkoutForm.controls.monthYear.touched&&this.checkoutForm.controls.monthYear.value))if(this.isStoredBankAccount){let _={address1:this.checkout.address.address1,address2:this.checkout.address.address2,city:this.checkout.address.city,country:this.checkout.address.country,state:this.checkout.address.state,postal_code:this.checkout.address.postalCode};this.userPaymentMethodService.updateStoredPayment(this.user.user_id,this.checkout.storedBankAccountId,_).subscribe({next:()=>{this.donationService.processDonation()},error:v=>{this.checkout.processing=!1}})}else{let _={address1:this.checkout.address.address1,address2:this.checkout.address.address2,city:this.checkout.address.city,country:this.checkout.address.country,state:this.checkout.address.state,postal_code:this.checkout.address.postalCode,security_code:this.checkoutForm.value.securityCode,expiration_month:N,expiration_year:Y};this.userPaymentMethodService.updateStoredPayment(this.user.user_id,this.checkout.storedCreditCardId,_).subscribe({next:()=>{this.donationService.processDonation()},error:v=>{this.checkout.processing=!1}})}else if(this.checkoutForm.controls.paymentMethod.value===h.Stripe)this.stripeService.createToken(this.stripeElements.cardNumber,{name:this.checkout.user.fullName,address_line1:this.checkout.address.address1,address_city:this.checkout.address.city,address_state:this.checkout.address.state,address_zip:this.checkout.address.postalCode}).then(_=>
5{this.checkout.creditCardDetails.stripeTokenId=_.id,this.checkout.creditCardDetails.expirationMonth=_.card.exp_month,this.checkout.creditCardDetails.expirationYear=_.card.exp_year,this.checkout.creditCardDetails.cardType=_.card.brand,this.checkout.creditCardDetails.last4=_.card.last4,this.donationService.processDonation()}).catch(_=>{});else if(this.checkout.paymentType===h.Braintree){let _={cardholderName:this.user.full_name||this.checkoutForm.value.firstName+" "+this.checkoutForm.value.lastName,postalCode:this.checkoutForm.value.postalCode};this.braintreeService.tokenize(_).then(v=>{this.checkout.creditCardDetails.btPaymentNonce=v.nonce,this.checkout.creditCardDetails.expirationMonth=v.details.expirationMonth,this.checkout.creditCardDetails.expirationYear=v.details.expirationYear,this.checkout.creditCardDetails.cardType=v.details.cardType,this.checkout.creditCardDetails.last4=v.details.lastFour,this.checkout.btDeviceData=this.braintreeService.DATACOLLECTOR.deviceData(),this.donationService.processDonation()}).catch(v=>{})}else if(this.checkout.paymentType===h.BraintreePaypal){let _=this.donationService.createLineItemsForPaypal(),v=this.checkout.recurring||this.checkout.rememberCard,R=this.donationService.createBraintreePaypalOrder(this.totalAmount,_,v);R&&R.then(te=>{this.paypalApiBtnComponent().resolveCreateOrder({id:te})}).catch(te=>{this.paypalApiBtnComponent().rejectCreateOrder(te)})}else if(this.checkout.paymentType===h.BraintreeVenmo)this.donationService.initializeVenmoPayment().then(_=>{this.checkout.creditCardDetails.cardType=_.type,this.checkout.creditCardDetails.btPaymentNonce=_.nonce,this.checkout.btDeviceData=this.braintreeService.DATACOLLECTOR.deviceData();let v=_.details;this.checkout.creditCardDetails.venmoUsername=v.username,this.checkout.creditCardDetails.venmoMetadata=v,this.donationService.processDonation()}).catch(_=>{console.warn("Venmo tokenize payment failed: ",_?.message),this.checkout.processing=!1});else if(this.checkout.paymentType===h.BraintreeApplePay)this.braintreeService.APPLEPAY.applePayCreatePaymentRequest(this.donationService.createLineItemsForApplePay(),this.totalAmount).then(_=>{this.checkout.creditCardDetails.btPaymentNonce=_.applePayTokenPayload.nonce,this.checkout.creditCardDetails.cardType=_.applePayTokenPayload.details.cardType,this.checkout.creditCardDetails.last4=_.applePayTokenPayload.details.last4,this.checkout.btDeviceData=this.braintreeService.DATACOLLECTOR.deviceData(),_.billingContact&&(_.billingContact.addressLines&&_.billingContact.addressLines.length>0&&(this.checkout.address.address1=_.billingContact.addressLines[0],this.checkout.address.address2=_.billingContact.addressLines[1]),this.checkout.address.city=_.billingContact.locality,this.checkout.address.state=_.billingContact.administrativeArea,this.checkout.address.country=_.billingContact.countryCode,this.checkout.address.postalCode=_.billingContact.postalCode);let v=_.applePayTokenPayload?.details?.email||_.billingContact?.emailAddress||this.checkout.user?.email||"";if(!this.donationService.validateEmailAndNotify(v)){this.braintreeService.APPLEPAY.completeApplePayPayment("fail",_.applePaySession),this.checkout.processing=!1;return}this.checkout.user.email=v.trim(),this.checkout.creditCardDetails.applePayCardMetadata=_.applePayTokenPayload,this.donationService.processDonation(()=>{this.braintreeService.APPLEPAY.completeApplePayPayment("success",_.applePaySession),this.checkout.processing=!1,this.donationService.redirectAfterSuccess()}),this.donationService.processDonationErrorEvent.subscribe(()=>{this.braintreeService.APPLEPAY.completeApplePayPayment("fail",_.applePaySession)})}).catch(_=>{});else if(this.checkout.paymentType===h.BraintreeGooglePay){let _=this.gpayApiBtnComponent();if(!this.braintreeObj?.googlePayCheckout&&!_)return;_.tokenizePayment(this.totalAmount).then(v=>{if(v.success){this.checkout.creditCardDetails.cardType=v.payload.details.cardType,this.checkout.creditCardDetails.btPaymentNonce=v.payload.nonce,this.checkout.creditCardDetails.last4=v.payload.details.lastFour,this.checkout.creditCardDetails.googlePayCardMetadata=v.payload,this.checkout.btDeviceData=this.braintreeService.DATACOLLECTOR.deviceData(),v.payload.billingAddress&&(this.checkout.address.address1=v.payload.billingAddress.address1,this.checkout.address.address2=v.payload.billingAddress.address2,this.checkout.address.city=v.payload.billingAddress.city,this.checkout.address.state=v.payload.billingAddress.state,this.checkout.address.country=v.payload.billingAddress.country,this.checkout.address.postalCode=v.payload.billingAddress.postalCode);let R=v.payload?.details?.email||v.payload?.payerEmail||this.checkout.user?.email||"";if(!this.donationService.validateEmailAndNotify(R)){this.gpayApiBtnComponent().processingStatus=!1,this.checkout.processing=!1;return}this.checkout.user.email=R.trim(),this.donationService.processDonation()}}).catch(v=>{}),this.donationService.processDonationErrorEvent.subscribe(()=>{this.gpayApiBtnComponent().processingStatus=!1})}else if(this.checkout.paymentType===h.TempBankAccount){this.checkout.creditCardDetail
5s.achPublicToken=this.checkoutForm.controls.paymentMethod.value;let _=this.plaidService.getBankAccountMetadata(this.checkoutForm.controls.paymentMethod.value);this.checkout.creditCardDetails.achMetadata=_,this.donationService.processDonation()}else this.checkout.paymentType===h.ExternalPayment?(this.checkout.creditCardDetails.advisorFirmId=this.checkoutForm.controls.advisorFirmId.value,this.checkout.creditCardDetails.advisorMetadata={gift_type:this.checkoutForm.controls.giftType.value,advisor_name:this.checkoutForm.controls.advisorName.value,advisor_phone:this.checkoutForm.controls.advisorPhone.value,advisor_email:this.checkoutForm.controls.advisorEmail.value,note_to_advisor:this.checkoutForm.controls.noteToAdvisor.value,fund_id:this.checkoutForm.controls.fundId.value,fund_name:this.checkoutForm.controls.fundName.value},this.enableOtherAdvisorFirmName&&(this.checkout.creditCardDetails.advisorMetadata.other_advisor_firm_name=this.checkoutForm.value.otherAdvisorFirmName),this.donationService.processDonation()):this.checkout.paymentType===h.CftDaf?(this.checkout.creditCardDetails.advisorFirmId=this.checkoutForm.controls.advisorFirmId.value,this.checkout.creditCardDetails.advisorMetadata={gift_type:this.checkoutForm.controls.giftType.value,note_to_advisor:this.checkoutForm.controls.noteToAdvisor.value,fundholder_title:this.checkout.paymentParameters?.cft_daf_payment_method_data?.title,fundholder_first_name:this.checkout.paymentParameters?.cft_daf_payment_method_data?.first_name,fundholder_last_name:this.checkout.paymentParameters?.cft_daf_payment_method_data?.last_name,fundholder_email:this.checkout.paymentParameters?.cft_daf_payment_method_data?.email,constituent_id:this.checkoutForm.controls.constituentId.value,fund_id:this.checkoutForm.controls.fundId.value,fund_name:this.checkoutForm.controls.fundName.value,admin_entry:this.checkout.paymentParameters?.cft_daf_payment_method_data?.admin_entry},this.checkout.paymentParameters?.cft_daf_payment_method_data?.admin_entry&&(this.checkout.creditCardDetails.advisorMetadata.fundholder_first_name=this.checkoutForm.value.firstName,this.checkout.creditCardDetails.advisorMetadata.fundholder_last_name=this.checkoutForm.value.lastName,this.checkout.creditCardDetails.advisorMetadata.fundholder_email=this.checkoutForm.value.fundholderEmail),this.donationService.processDonation()):this.donationService.processDonation()}onPaypalComplete(e){if(e.success){this.checkout.creditCardDetails.cardType=e.payload.type,this.checkout.creditCardDetails.btPaymentNonce=e.payload.nonce;let s=e.payload.details;if(this.checkout.creditCardDetails.paypalPayerId=s.payerId,this.checkout.creditCardDetails.paypalMetadata=s,this.checkout.btDeviceData=this.braintreeService.DATACOLLECTOR.deviceData(),!this.user?.id&&s){s.firstName&&(this.checkout.user.firstName=s.firstName),s.lastName&&(this.checkout.user.lastName=s.lastName),(s.firstName||s.lastName)&&(this.checkout.user.fullName=`${s.firstName||""} ${s.lastName||""}`.trim());let r=s?.email||this.checkout.user?.email||"";if(!this.donationService.validateEmailAndNotify(r)){this.paypalApiBtnComponent().processingStatus=!1,this.checkout.processing=!1;return}if(this.checkout.user.email=r.trim(),s.shippingAddress){let p=s.shippingAddress;this.checkout.address.address1=p.line1||"",this.checkout.address.address2=p.line2||"",this.checkout.address.city=p.city||"",this.checkout.address.state=p.state||"",this.checkout.address.country=p.countryCode||"",this.checkout.address.postalCode=p.postalCode||""}}this.donationService.processDonation(),this.donationService.processDonationErrorEvent.subscribe(()=>{this.paypalApiBtnComponent().processingStatus=!1})}}getNarrowCurrencySymbol(e){return this.donationService.getNarrowCurrencySymbol(e)}linkNewBankAccount(){return oe(this,null,function*(){this.storeCheckoutData();let e={paymentAccountId:this.checkout.paymentParameters.payment_account_id},s=this.route.snapshot.queryParams.plaid_state_id;if(s)try{let r=yield z(this.checkoutService.retrievePlaidLinkTokenData(s));r&&(e.linkToken=r.link_token,e.receivedRedirectUri=r.received_redirect_uri),this.router.navigate([],{queryParams:{plaid_state_id:void 0},queryParamsHandling:"merge"})}catch{}this.plaidService.initPlaid(e).then(()=>{this.selectedBankAccountId=null,this.plaidService.open().then(r=>{if(r.status===_e.SUCCESS){let p=this.plaidService.populateDropdownData(r.public_token);this.selectedBankAccountId=r.account_id,this.checkout.paymentMethods.splice(1,0,Object.assign(p,{type:h.TempBankAccount})),this.checkoutForm.controls.paymentMethod.setValue(p.value),this.paymentMethodTriggerText=p.viewValue}else r.status===_e.EXIT&&(this.skipBankAccountRecommendation=!0,this.checkoutForm.controls.paymentMethod.setValue(this.checkout.paymentMethods[0].value),this.paymentMethodTriggerText=this.checkout.paymentMethods[0].viewValue)}
5).catch(r=>{})})})}socialLogin(e){if(this.storeCheckoutData(),e==="mit_sso")window.location.href="/api/v4/mit_sso";else{let s={redirectTo:window.location.pathname+"#userInfo"},r=this.socialService.generateSocialLoginUrl(e,s);this.socialLoginUrl[e]=r,setTimeout(()=>{let p;e==="rockfoc_sso"&&(p="socialLoginFormForRockfoc"),this[p]&&this[p].nativeElement.submit()})}}canDeactivate(e,s,r){return new Promise(p=>{/\/donate\/[^/]+\/thankyou/.test(r.url)||this.hasAddedToCart?(this.webStorageService.removeSessionStorageData(this.sessionStorageKey),p(!0)):(this.storeCheckoutData(),p(!0))})}compareCustomDropdownQuestion(e,s){return e.label?e.label===s.label:e===s}onHostTipSelectionChange(e){let s=Number(this.checkoutForm.value.hostTipAmount)||0,r;e.selected?(this.checkout.hostTipItem=e.value,r=e.value.tipAmountInCents/100):(this.checkout.hostTipItem=null,r=0),this.checkoutForm.controls.hostTipAmount.setValue(r),s!==r&&this.webAnalyticsService.mcTrackClick({action:"tipAmountChanged",category:"checkout",data:{tipAmount:r}})}privacyInfo(){this.dialog.open(xo,{data:{anonymous:this.checkout.paymentParameters?.allow_fully_anonymous_donations}})}feeInfo(){this.feeService.openFeeInfoModal(this.getCoverFeesExplanationContext(),"legacy")}getCoverFeesExplanationContext(){return{kind:this.checkout.story.kind,fee:this.checkout.fees,applyAdditionalPlatformFee:this.checkout.paymentParameters.apply_additional_platform_fee,cardType:this.checkout.creditCardType,amount:this.checkoutForm.get("amount").value,beneficiaryLabel:this.checkout.story.org_name,showCoverFeesOption:this.checkout.donationBooster}}storeCheckoutData(){if(this.webStorageService.sessionStorageEnabled){let e=this.checkoutForm.getRawValue();["cardNumber","monthYear","securityCode","givingCardNumber","coverFees","rememberCard","tips","customTips","paymentMethod"].forEach(r=>delete e[r]),this.webStorageService.setSessionStorageData(this.sessionStorageKey,JSON.stringify(e))}}evalDesignationExists(e,s){return e.findIndex(p=>p==s)>=0}recomputeFeesForGivingCard(){this.addressPlaceholder="Address";let e=!this.checkout.paymentParameters.hide_donation_booster&&this.givingCard.allowCoveredFees;(this.checkout.donationBooster&&!e||!this.checkout.donationBooster&&e)&&(this.checkout.donationBooster=e,e?this.checkoutForm.controls.coverFees.setValue(this.checkout.paymentParameters.fees_covered,{emitEvent:!1}):this.checkoutForm.controls.coverFees.setValue(!1,{emitEvent:!1})),this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)}recomputeFeesForAdvisorFirm(e,s){let r=this.checkoutForm.get("amount").value.replace(/[,-]/g,""),p=Math.floor(parseFloat(r)*100),x=(this.appService.currentBrand.show_covered_fees||!this.checkout.paymentParameters.hide_donation_booster)&&e&&(!s||p<s);(this.checkout.donationBooster&&!x||!this.checkout.donationBooster&&x)&&(this.checkout.donationBooster=x,x?this.checkoutForm.controls.coverFees.setValue(this.checkout.paymentParameters.fees_covered,{emitEvent:!1}):this.checkoutForm.controls.coverFees.setValue(!1,{emitEvent:!1})),this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)}createStripeElements(){try{let e=this.stripePaymentElement().nativeElement,s=e.querySelector("#stripe-card-number"),r=e.querySelector("#stripe-card-exp"),p=e.querySelector("#stripe-card-cvc"),x=this.stripeService.getElementsObj();this.stripeElements.cardNumber=this.stripeService.createAndMountElement(x,"cardNumber",s),this.stripeElements.cardExp=this.stripeService.createAndMountElement(x,"cardExpiry",r),this.stripeElements.cardCvc=this.stripeService.createAndMountElement(x,"cardCvc",p);let O=e.querySelector(".card-number-error"),N=e.querySelector(".card-exp-error"),Y=e.querySelector(".card-cvc-error");this.stripeElements.cardNumber.on("change",D=>{this.checkout.creditCardType!==D.brand&&(this.checkout.creditCardType=D.brand,this.checkout.donationBooster&&this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)),D.error?O.textContent=D.error.message:O.textContent=""}),this.stripeElements.cardExp.on("change",D=>{D.error?N.textContent=D.error.message:N.textContent=""}),this.stripeElements.cardCvc.on("change",D=>{D.error?Y.textContent=D.error.message:Y.textContent=""})}catch(e){console.error(e.message)}}createBraintreeElements(){try{let e=this.braintreePaymentElement().nativeElement;this.braintreeService.setDefaultEvents(e),this.subscription.add(this.braintreeService.changeCardType.subscribe(s=>{this.checkout.creditCardType=s==="american-express"?T.Amex:T.Credit
5Card,this.braintreeService.clearHostedField("cvv"),this.checkout.donationBooster&&this.donationService.updateTotalAmount(this.checkoutForm.get("amount").value,this.checkoutForm.get("coverFees").value)}))}catch(e){console.error(e.message)}}initializeBraintreeClient(){return new Promise((e,s)=>{this.braintreeObj.clientInstance&&e(!0),this.braintreeService.initClientSdk(this.checkout.paymentParameters).then(r=>{this.braintreeObj.clientInstance=r,e(!0)}).catch(r=>s(r))})}get sessionStorageKey(){return Qt.DonatePage+(this.checkout?.paymentParameters?.story?.perm_urn||"")}setupPaymentSectionObserver(e){this.paymentSectionObserver?.disconnect(),this.paymentSectionObserver=new IntersectionObserver(s=>{if(this.paymentSectionTracked)return;s[0]?.isIntersecting&&(this.paymentSectionTracked=!0,this.webAnalyticsService.mcTrackClick({action:"paymentSectionViewed",category:"checkout"}),this.paymentSectionObserver?.disconnect())},{threshold:.25}),this.paymentSectionObserver.observe(e)}handleCheckoutRedirect(e){if(!$(this.platformId))return!1;if(e?.status===302&&e.headers?.get("location"))return To.handleMaskedDomainRedirectResponse(e),!0;let s=this.getCheckoutRedirectUrl(e);return s?(window.location.href=s,!0):!1}getCheckoutRedirectUrl(e){if(e?.status!==422)return null;if(e.error?.host&&e.error?.urn){let s=this.brandRedirectQueryString(e.error),r=this.route.snapshot.queryParams.is_general_fund?this.checkout.story.urn:e.error.urn;return`${e.error.host}${this.checkoutFlowRoutingService.donateStepPath()}/${r}${s}`.replace("7000",window.location.port)}return e.error?.new_url?e.error.new_url.replace("7000",window.location.port):null}brandRedirectQueryString(e){let s=window.location.search||e.query_string||"";if(!s)return"";let r=new URLSearchParams(s.startsWith("?")?s.slice(1):s);r.delete("urn");let p=r.toString();return p?`?${p}`:""}static \u0275fac=function(s){return new(s||t)};static \u0275cmp=ve({type:t,selectors:[["app-donation-process"]],viewQuery:function(s,r){if(s&1&&(M(r.checkoutNgFormElement,Mo,5),M(r.donationAmtInput,wo,5),M(r.matAutocompleteForGroup,Io,5),M(r.groupChipList,No,5),M(r.groupIdsInput,Oo,5),M(r.stripePaymentElement,Bo,5),M(r.braintreePaymentElement,Lo,5),M(r.customQuestionsFormComponent,Go,5),M(r.brandCustomQuestionsFormComponent,qo,5),M(r.paypalApiBtnComponent,X,5),M(r.gpayApiBtnComponent,ee,5),M(r.socialLoginFormForRockfoc,Ro,5),ge(Uo,5)),s&2){Fe(12);let p;xe(p=be())&&(r.paymentSectionRef=p.first)}},decls:33,vars:6,consts:[["paymentMethodIconTemplate",""],["checkoutNgForm","ngForm"],["donationAmtInput",""],["donationCustomQuestionsFormComponent",""],["socialLoginFormForRockfoc",""],["stripePayment",""],["braintreePayment",""],["rememberCardTooltip","matTooltip"],["groupChipList",""],["groupIdsInput",""],["groupAutoComplete","matAutocomplete"],["brandCustomQuestionsFormComponent",""],["paymentSectionAnchor",""],[1,"bg-light","pt-6","min-vh-100"],[1,"container-fluid","pb-7","pt-sm-5"],[3,"hidden"],[1,"row","align-items-end","pt-4","mb-4"],[1,"col-12","col-md-6","col-lg-7","mb-3"],[1,"display-2","mb-2"],[1,"text-secondary","mb-0"],[1,"col-12","col-md-6","col-lg-5","mb-3","text-md-end"],[1,"row","pt-4",3,"hidden"],[1,"col-5","mb-4"],["viewBox","0 0 25 10"],["x","0","y","0","rx","0.5","ry","0.5","width","100%","height","100%"],[1,"col-5","offset-2","mb-4"],[1,"w-100"],[1,"col-12","mb-4"],["viewBox","0 0 100 25"],["x","0","y","0","rx","2","ry","2","width","100%","height","100%"],[3,"urn"],["appScrollToFirstInvalid","",3,"ngSubmit","formGroup","appComponentPalette"],[1,"text-center"],[1,"shadow-sm","mb-3","white-container"],["aria-label","Select donation type","formControlName","donationType"],[1,"row","justify-content-center"],[1,"col-12","col-lg-6"],["for","amount"],["matInput","","id","amount","type","text","formControlName","amount","inputmode","numeric","pattern","[0-9.,]*",3,"ngModelChange","appMask"],["matTextPrefix","",1,"text-secondary"],["matTextSuffix","",1,"text-secondary"],["color","primary","formControlName","hideAmount","id","hideAmount"],["color","primary","formControlName","hideName","id","hideName"],["type","button",1,"btn-link","text-secondary","sm",3,"click"],[1,"me-1"],[1,"fa-solid","fa-user-secret"],[1,"row"],[1,"col-12","text-center","mb-4","mt-2"],["id","userInfo"],["id","paymentMethodContainer",1,"shadow-sm","mb-3","white-container"],[3,"defaultCurrency","tipSettings","amount"],[1,"status-box","mb-2"],[1,"fal","fa-clone"],["aria-label","Select donation type","formControlName","donationType",3,"change"],[1,"col-12","col-sm-6","mb-3","text-sm-end"],["value","1","color","primary"],[1,"col-12","col-sm-6","mb-3"],["value","2","color","primary"],[3,"class"],["type","button",1,"donation-suggestion-btn",3,"click"],[1,"lead","amount"],[1,"description"],["color","primary","formControlName","anonymous","id","anonymous"],[1,"status-box","multi-line","mb-2","sm"],[1,"fa-solid","fa-info-circle"],[1,"col-12"],["color","primary","formControlName","dedication","id","dedication"],[1,"ms-3"],["formControlName","dedicationType","id","dedicationType"],[3,"value"],["type","text","matInput","","formControlName","dedicationName","autocomplete","new-addressee-name","id","dedicationName"],["color","primary","formControlName","dedicationEmailNotification"],["type","email","id","dedicationEmail","matInput","","formControlName","dedicationEmail","autocomplete","new-addressee-email"],["appearance","outline"],["matInput","","formControlName","dedicationEmailMessage","autocomplete","off"],["formControlName","designation","id","designation"],["formControlName","customQuestions",1,"nested-form",3,"questions","parentForm","donationAmount","anonymousDonation"],["type","button","id","addToCart","name","addToCartBtn","mat-raised-button","","color","accent",1,"custom","auto",3,"click"],[1,"left-icon"],[1,"fa-light","fa-cart-plus"],["type","button","id","addToCart","name","addToCartBtn","mat-raised-button","","color","primary","appLoadingBtn","",1,"custom","auto",3,"click","active"],[1,"sm","text-center","mb-0"],["type","button",1,"btn-link",3,"click"],[1,"col-12","col-sm-6"],[1,"row","g-0"],[1,"col-6"],["type","text","matInput","","id","firstName","formControlName","firstName","autocomplete","given-name"],["type","text","matInput","","id","lastName","formControlName","lastName","autocomplete","family-name"],["type","text","id","email","matInput","","formControlName","email","autocomplete","email"],[1,"col","text-center"],[1,"text-secondary"],[1,"h3","text-secondary","mb-0"],["type","button",1,"btn-link","mit-red",3,"click"],["type","button",1,"btn-link","rockfoc-red",3,"click"],["ngNoForm","","method","POST","target","_self","enctype","application/x-www-form-urlencoded",3,"action"],["type","submit","mat-raised-button","","color","primary","hidden",""],["type","button","mat-raised-button","","color","accent",1,"custom",3,"click"],[1,"row","align-items-center"],["formControlName","paymentMethod","id","paymentMethod"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"col-12","col-sm-6","stripe-payment-wrapper",3,"hidden"],[1,"row","g-0",3,"hidden"],["viewBox","0 0 90 10"],[1,"card-element"],["id","stripe-card-number",1,"input","empty"],["for","stripe-card-number",1,"mb-0"],[1,"baseline"],["role","alert",1,"card-number-error","sm","mb-0"],[1,"col-6","col-sm-3"],["id","stripe-card-exp",1,"input","empty"],["for","stripe-card-exp",1,"mb-0"],["role","alert",1,"card-exp-error","sm","mb-0"],["
5id","stripe-card-cvc",1,"input","empty"],["for","stripe-card-cvc",1,"mb-0"],["role","alert",1,"card-cvc-error","sm","mb-0"],[1,"col-12","col-sm-3"],[1,"col-12","col-sm-6","braintree-payment-wrapper",3,"hidden"],["for","braintree-card-number",1,"hosted-field--label","mb-0"],["id","braintree-card-number",1,"hosted-field"],["for","braintree-card-exp",1,"hosted-field--label","mb-0"],["id","braintree-card-exp",1,"hosted-field"],["for","braintree-card-cvc",1,"hosted-field--label","mb-0"],["id","braintree-card-cvc",1,"hosted-field"],["for","cardNumber"],[1,"far","fa-credit-card-front"],["type","text","matInput","","id","cardNumber","formControlName","cardNumber","autocomplete","cc-number","inputmode","numeric","pattern","[0-9\\s]*",3,"appMask"],["for","monthYear"],["type","text","matInput","","maxlength","5","id","monthYear","formControlName","monthYear","autocomplete","cc-exp","inputmode","numeric","pattern","[0-9\\/]*",3,"appMask"],["for","securityCode"],["type","text","matInput","","id","securityCode","maxlength","4","formControlName","securityCode","autocomplete","cc-csc","inputmode","numeric","pattern","[0-9]*",3,"appMask"],["mat-raised-button","","color","primary","type","button",1,"custom",3,"click"],["for","givingCardNumber"],["type","text","id","givingCardNumber","matInput","","formControlName","givingCardNumber"],[1,"col-12","col-sm-6","mb-2"],[1,"col-12","col-sm-6","mb-2","text-center"],[1,"col-12","mt-2"],["matInput","","rows","1","maxlength","500","formControlName","noteToAdvisor","autocomplete","off"],["align","end"],[1,"sm","mb-0","text-secondary"],[1,"mb-0"],[1,"status-box","me-2"],[1,"fal","fa-user-gear"],[1,"status-box","sm"],[3,"innerHTML"],["type","text","matInput","","formControlName","constituentId","autocomplete","off"],["type","text","matInput","","formControlName","fundholderEmail","autocomplete","off"],["type","text","matInput","","formControlName","fundId"],["type","text","matInput","","formControlName","fundName","autocomplete","off"],["formControlName","fundId"],["formControlName","advisorFirmId"],[1,"col-12","col-sm-6",3,"hidden"],["formControlName","giftType"],[1,"col-12","mb-2"],["type","text","matInput","","formControlName","otherAdvisorFirmName","autocomplete","off"],["type","text","matInput","","formControlName","advisorName","autocomplete","off"],["type","text","matInput","","formControlName","advisorEmail","autocomplete","off"],["type","text","matInput","","formControlName","advisorPhone","autocomplete","off"],["matInput","","rows","2","maxlength","500","formControlName","noteToAdvisor","autocomplete","off"],["for","address1"],["type","text","matInput","","formControlName","address1","id","address1","autocomplete","billing street-address"],["tabindex","0","role","button",1,"sm","text-center","text-secondary","mb-1","cursor-pointer",3,"click","keydown.enter","hidden"],["aria-hidden","true",1,"fas","fa-plus-circle"],[1,"sr-only"],["for","address2"],["type","text","matInput","","placeholder","Address 2","formControlName","address2","id","address2","autocomplete","billing address-line2"],["for","city"],["type","text","matInput","","placeholder","City","formControlName","city","id","city","autocomplete","billing address-level2"],["for","state"],["matNativeControl","","formControlName","state","id","state","autocomplete","billing address-level1"],["label","Select state","selected","","disabled",""],["type","text","matInput","","placeholder","State/Province","formControlName","state","id","state","autocomplete","billing address-level1"],["for","country"],["matNativeControl","","formControlName","country","id","country","autocomplete","billing country-name"],["for","postalCode"],["type","text","matInput","","placeholder","ZIP / Post code","formControlName","postalCode","id","postalCode","autocomplete","billing postal-code","maxlength","20"],["color","primary","formControlName","rememberCard","id","rememberCard"],["matTooltip","We'll store a secure, encrypted version of your payment method on file so you can make easier donations in the future.","matTooltipClass","tooltip shadow-sm","tabindex","0",1,"ms-1","cursor-pointer",3,"click","keyup.enter","keyup.space"],[1,"fas","fa-question-circle"],["mat-fab","","type","button","aria-label","Edit stored card information",1,"custom","primary",3,"click"],[1,"fal","fa-pencil"],["mat-fab","","type","button","aria-label","Edit stored payment information",1,"custom","primary",3,"click"],["aria-label","Group selection"],[3,"selectable","removable"],["matInput","","formControlName","groupIds",3,"focus","matChipInputTokenEnd","matAutocomplete","matChipInputFor","matChipInputAddOnBlur","placeholder"],[3,"optionSelected"],[1,"loading-groups",3,"disabled"],[3,"removed","selectable","removable"],["matChipRemove","","fontSet","fas","fontIcon","fa-times-circle"],["diameter","30"],["alt","Group Image","height","40",1,"story-image",3,"src"],["color","primary",3,"change","checked"],["role","alert",1,"sm","text-danger"],["formControlName","brandCustomQuestions",1,"nested-form",3,"questions","parentForm","donationAmount","anonymousDonation"],[3,"selectionChange","defaultCurrency","tipSettings","amount"],[1,"col-12","text-center"],[1,"display-2","mb-0"],[1,"display-2","mt-0","mb-0"],[1,"sm","mt-2"],[1,"status-box","mt-2","p-2"],[1,"mt-3"],[1,"col-12","col-md-6","text-center"],[1,"col-12","col-md-5"],[1,"col-12","col-sm-6","mt-3","mb-5","text-center",3,"hidden"],[1,"col-12","col-md-4","text-center","mt-3","mb-5"],[1,"col-12","col-md-4","text-center","mt-3","mb-5",3,"hidden"],[1,"col-10","text-center"],[1,"h6","m-0"],["color","primary","formControlName","coverFees","id","coverFees"],[1,"fa-solid","fa-circle-info"],[1,"mt-2","d-flex","align-items-center"],[1,"mb-0","me-2","text-secondary"],[1,"auto"],["placeholder","Tips","formControlName","tips","id","tips"],["matInput","","placeholder","Enter amount","type","text","formControlName","customTips","id","customTips","inputmode","numeric","pattern","[0-9.,]*",3,"appMask"],["matPrefix","",1,"text-secondary"],["matSuffix","",1,"text-secondary"],[1,"mt-2"],[1,"mb-5","text-center"],["type","submit","mat-raised-button","","color","primary","name","payBtn","appLoadingBtn","",1,"custom","lg","pill","auto",3,"active"],[1,"month-text"],[3,"orderCapture","braintreeSdk","formValidity"],[1,"col-12","col-sm-6","mt-3","mb-5","text-center"],["type","submit","mat-raised-button","","name","venmoBtn","color","venmo","appLoadingBtn","",1,"custom",3,"active"],["alt","Venmo",3,"src"],["type","submit","name","appleBtn","aria-label","Pay with Apple Pay",1,"apple-pay-button","apple-pay-button-black"],[3,"braintreeSdk","formValidity"],[1,"status-box","multi-line","mb-2","p-2"],[1,"ms-2","text-dark"],[1,"ms-2"],[1,"me-1","fab","fa-cc-visa"],[1,"me-1","fab","fa-cc-mastercard"],[1,"me-1","fab","fa-cc-discover"],[1,"fab","fa-cc-amex"],[1,"text-dark","far","fa-university"],[1,"text-dark","fab","fa-paypal"],[1,"text-dark","fak","fa-venmo-icon"],[1,"text-dark","far","fa-gift-card"],[1,"text-dark","fab","fa-apple-pay"],[1,"text-dark","fak","fa-cft-logo"],["alt","Google Pay",2,"height","2rem",3,"src"]],template:function(s,r){s&1&&(i(0,"main")(1,"div",13)(2,"div",14)(3,"header",15)(4,"div",16)(5,"div",17)(6,"h2",18),a(7),o(),d(8,zo,5,2,"p",19),o(),d(9,Ho,2,1,"div",20),o()(),i(10,"section")(11,"div",21)(12,"div",22)(13,"content-loader",23),q(),u(14,"rect",24),o()(),U(),i(15,"div",25)(16,"content-loader",23),q(),u(17,"rect",24),o()(),U(),u(18,"div",26),i(19,"div",27)(20,"content-loader",28),q(),u(21,"rect",29),o()(),U(),u(22,"div",26),i(23,"div",27)(24,"content-loader",28),q(),u(25,"rect",29),o()(),U(),u(26,"div",26),i(27,"div",27)(28,"content-loader",28),q(),u(29,"re
5ct",29),o()()()(),d(30,Wa,48,24,"section"),o()()(),K(31,nr,8,8,"ng-template",null,0,De)),s&2&&(n(3),f("hidden",!r.setup),n(4),L(r.brand==null?null:r.brand.donate_button_text),n(),l(r.setup?8:-1),n(),l(r.setup?9:-1),n(2),f("hidden",r.setup),n(19),l(r.setup?30:-1))},dependencies:[Me,dt,et,nt,at,Je,it,Ze,Xe,rt,ct,lt,tt,ot,gt,ft,ut,ht,pt,_t,Ct,St,Ft,Ke,He,We,Yt,Rt,Ut,Wt,Ht,Vt,Pt,Tt,mt,Jt,Kt,bt,xt,At,Et,co,ao,ro,io,no,vt,yt,kt,qt,Gt,fo,oo,Dt,Mt,wt,go,So,Po,X,ee,Ne,pe,Ie,we,Xt,It,so],styles:['.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]{position:relative;width:100%;height:50px;margin-top:.6em}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   label[_ngcontent-%COMP%]{position:absolute;width:100%;padding-left:.5rem;bottom:8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;transform-origin:0 50%;cursor:text;transition-property:color,transform;transition-duration:.3s;transition-timing-function:cubic-bezier(.165,.84,.44,1)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .baseline[_ngcontent-%COMP%]{position:absolute;width:100%;height:2px;left:0;bottom:0;transition:background-color .3s cubic-bezier(.165,.84,.44,1)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]{position:absolute;width:100%;padding-left:.5rem;bottom:0;padding-bottom:7px;color:var(--mc-neutral-max);background-color:transparent;opacity:0;transition:opacity .3s cubic-bezier(.165,.84,.44,1);will-change:opacity}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.empty){opacity:1}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.focused) + label[_ngcontent-%COMP%]{color:var(--mc-secondary-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.focused) + label[_ngcontent-%COMP%] + .baseline[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.focused) + .baseline[_ngcontent-%COMP%]{background-color:var(--mc-secondary-200)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::-webkit-input-placeholder{color:transparent;transition:color .3s cubic-bezier(.165,.84,.44,1)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]::-moz-placeholder{color:transparent;transition:color .3s cubic-bezier(.165,.84,.44,1)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:-ms-input-placeholder{color:transparent;transition:color .3s cubic-bezier(.165,.84,.44,1)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%]::-webkit-input-placeholder, .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.empty)::-webkit-input-placeholder{color:var(--mc-secondary-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%]::-moz-placeholder, .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.empty)::-moz-placeholder{color:var(--mc-secondary-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%]:-ms-input-placeholder, .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.empty):-ms-input-placeholder{color:var(--mc-secondary-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%] + label[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input[_ngcontent-%COMP%]:not(.empty) + label[_ngcontent-%COMP%]{transform:scale(.85) translateY(-25px);cursor:default}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.invalid[_ngcontent-%COMP%] + label[_ngcontent-%COMP%]{color:var(--mc-danger-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused[_ngcontent-%COMP%] + label[_ngcontent-%COMP%] + .baseline[_ngcontent-%COMP%]{background-color:var(--mc-secondary-700)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused.invalid[_ngcontent-%COMP%] + label[_ngcontent-%COMP%] + .baseline[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]   .input.focused.invalid[_ngcontent-%COMP%] + .baseline[_ngcontent-%COMP%]{background-color:var(--mc-danger-500)}.stripe-payment-wrapper[_ngcontent-%COMP%]   .card-number-error[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-exp-error[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-cvc-error[_ngcontent-%COMP%], .stripe-payment-wrapper[_ngcontent-%COMP%]   .card-error[_ngcontent-%COMP%]{color:var(--mc-danger-500);min-height:25px;font-size:13.5px}.braintree-payment-wrapper[_ngcontent-%COMP%]   .card-element[_ngcontent-%COMP%]{position:relative;width:100%;margin-top:.75em}.braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label[_ngcontent-%COMP%]{position:absolute;width:100%;padding-left:.5rem;bottom:4px;overflow:hidden;transform-origin:0 50%;cursor:text;transition-property:all;transition-duration:.3s;transition-timing-function:cubic-bezier(.165,.84,.44,1);color:var(--mc-secondary-500)}.braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label.focused[_ngcontent-%COMP%], .braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label.invali
5d[_ngcontent-%COMP%], .braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label.filled[_ngcontent-%COMP%]{text-overflow:ellipsis;color:var(--mc-primary-500);transform:scale(.85) translateY(-30px)}.braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label.filled[_ngcontent-%COMP%]{color:#0000008a}.braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field--label.invalid[_ngcontent-%COMP%]{color:var(--mc-danger-500)}.braintree-payment-wrapper[_ngcontent-%COMP%]   .hosted-field[_ngcontent-%COMP%]{height:40px;margin-bottom:1em;display:block;background-color:transparent;color:#000000de;border:none;border-bottom:2px solid var(--mc-secondary-500);outline:0;width:100%;font-size:"16px";padding:0;box-shadow:none;border-radius:var(--mc-radius-0);position:relative}.braintree-payment-wrapper[_ngcontent-%COMP%]   .braintree-hosted-fields-focused[_ngcontent-%COMP%]{border-bottom:2px solid var(--mc-primary-500);transition:all .2s ease}.braintree-payment-wrapper[_ngcontent-%COMP%]   .braintree-hosted-fields-invalid[_ngcontent-%COMP%]{border-bottom:2px solid var(--mc-danger-500);transition:all .2s ease}.container-fluid[_ngcontent-%COMP%]{max-width:980px}.white-container[_ngcontent-%COMP%]{position:relative;background-color:var(--mc-neutral-min);padding:30px;border-radius:var(--mc-radius-5)}@media (max-width: 575.98px){.white-container[_ngcontent-%COMP%]{padding-left:0;padding-right:0;border-radius:var(--mc-radius-0)}.white-container[_ngcontent-%COMP%]:after, .white-container[_ngcontent-%COMP%]:before{content:"";position:absolute;width:12px;top:0;bottom:0;background:var(--mc-neutral-min)}.white-container[_ngcontent-%COMP%]:after{left:-12px}.white-container[_ngcontent-%COMP%]:before{right:-12px}}.suggestion-levels.min-height[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{min-height:80px}@media (max-width: 575.98px){.suggestion-levels.min-height[_ngcontent-%COMP%]   .description[_ngcontent-%COMP%]{min-height:66px}}@media (max-width: 575.98px){.suggestion-levels[_ngcontent-%COMP%]{margin-bottom:30px}}.story-image[_ngcontent-%COMP%]{vertical-align:middle;margin-right:8px;border-radius:var(--mc-radius-5)}.loading-groups[_ngcontent-%COMP%]     .mdc-list-item__primary-text{display:flex;justify-content:center}.mit-red[_ngcontent-%COMP%]{color:var(--mc-mit-red)}.rockfoc-red[_ngcontent-%COMP%]{color:var(--mc-rockfoc)}.apple-pay-button[_ngcontent-%COMP%]{display:inline-block;-webkit-appearance:-apple-pay-button;-apple-pay-button-type:plain;width:100%;height:4rem}.apple-pay-button-black[_ngcontent-%COMP%]{-apple-pay-button-style:black}.apple-pay-button-white[_ngcontent-%COMP%]{-apple-pay-button-style:white}.apple-pay-button-white-with-line[_ngcontent-%COMP%]{-apple-pay-button-style:white-outline}']})}return t})();export{Ac as DonationProcessComponent};
6
7//# debugId=519b88b3-bd8f-5dff-85b4-ef9adb671123

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.