\nYou can be the difference in a child making a decision to follow Jesus at camp this summer. Will you help a kid get to Eagle Lake Camps of The Navigators this summer? Give here »\n
',position:"append"});})("body")}}, R_722072_157_1_2_1:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1744048814304"]')).remove();})("body")}}, C_722072_157_1_2_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("content",".pushdown-copy > p:nth-of-type(1)"); vwo_debug*/el=vwo_$(".pushdown-copy > p:nth-of-type(1)"),vwo_$(".pushdown-copy > p:nth-of-type(1)").each((function(){this.__vwoControlOuterHTML=this.__vwoControlOuterHTML||this.outerHTML,!vwo_$(this).find('[vwo-op-1744062807509-0=""]').length&&vwo_$(this).append('Will you help a kid get to Eagle Lake Camps of The Navigators this summer?'),vwo_$(this).nonEmptyContents().eq(0).replaceWith2(document.createTextNode("You can be the difference in a child making a decision to follow Jesus at camp this summer. "))})),el=vwo_$(".pushdown-copy > p:nth-of-type(1)");})(".pushdown-copy > p:nth-of-type(1)")}}, R_722072_157_1_2_2:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","content",".pushdown-copy > p:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".pushdown-copy > p:nth-of-type(1)")).revertContentOp(),el=vwo_$(".pushdown-copy > p:nth-of-type(1)");})(".pushdown-copy > p:nth-of-type(1)")}}, C_722072_157_1_2_3:{ fn:function(log,nonce=''){return (function(x) {})(".na-pushdown-wrapper,.mw-w-button,input.mw-w-button,#page,.pushdownbar,.div-block-16,.pushdownheadline,.pushdown,.div-block-7,.div-block-8,.paragraph-2,.div-block-15,.mw-btn,.mw-btn:visited,.mw-white,.mw-btn.mw-white,.mw-btn.mw-whitemw-btn:link,.na-pushdown-wrapper .close span,.na-pushdown-wrapper .close,.fa-angle-down:before,/*#donate-menu,.close-wrapper,.btn-dismiss,#masthead .close-menu,.pushdown .pushdown__row,.pushdown .pushdown__col,.pushdown .pushdown__content,.pushdown .pushdown-copy > *:last-child,.pushdown .grid-area,.pushdown .grid-card,.pushdown .grid-card div > p,.pushdown .grid-card div > p > span,.pushdown .grid-card .flex-col,.pushdown .grid-card div > p > b,.pushdown .grid-card button,.pushdown div div.centered,.pushdown div a.other-link,.pushdown .pushdown__close,.pushdown .grid-card p:nth-of-type(3),.pushdown .grid-card p > b")}}, R_722072_157_1_2_3:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
})(".na-pushdown-wrapper,.mw-w-button,input.mw-w-button,#page,.pushdownbar,.div-block-16,.pushdownheadline,.pushdown,.div-block-7,.div-block-8,.paragraph-2,.div-block-15,.mw-btn,.mw-btn:visited,.mw-white,.mw-btn.mw-white,.mw-btn.mw-whitemw-btn:link,.na-pushdown-wrapper .close span,.na-pushdown-wrapper .close,.fa-angle-down:before,/*#donate-menu,.close-wrapper,.btn-dismiss,#masthead .close-menu,.pushdown .pushdown__row,.pushdown .pushdown__col,.pushdown .pushdown__content,.pushdown .pushdown-copy > *:last-child,.pushdown .grid-area,.pushdown .grid-card,.pushdown .grid-card div > p,.pushdown .grid-card div > p > span,.pushdown .grid-card .flex-col,.pushdown .grid-card div > p > b,.pushdown .grid-card button,.pushdown div div.centered,.pushdown div a.other-link,.pushdown .pushdown__close,.pushdown .grid-card p:nth-of-type(3),.pushdown .grid-card p > b")}}, C_722072_157_1_3_0:{ fn:function(log,nonce=''){return (function(x) {;var _vwo_sel=vwo_$("");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, R_722072_157_1_3_0:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var ctx=vwo_$(x),el;
/*vwo_debug log("Revert","content",""); vwo_debug*/;
el=vwo_$('[vwo-element-id="1744062807520"]');
el.revertContentOp().remove();})("HEAD")}}, C_722072_157_1_3_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("addElement","body"); vwo_debug*/!(el=vwo_$("body")).find('[vwo-op-1744062806872=""]').length&&el.vwoElement({html:'
\n \x3c!--
\n
\n \n
\n
--\x3e\n
\n
\n \n
\n
\n
\n
\n \n \x3c!--
\n If you have a moment...\n
--\x3e\n
\n You can be the difference in a child making a decision to follow Jesus at camp this summer. Will you help a kid get to Eagle Lake Camps of The Navigators this summer? Give here »\n
',position:"append"});})("body")}}, R_722072_157_1_3_1:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1744062806843"]')).remove();})("body")}}, C_722072_157_1_3_2:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("content",".pushdown-copy > p:nth-of-type(1)"); vwo_debug*/el=vwo_$(".pushdown-copy > p:nth-of-type(1)"),vwo_$(".pushdown-copy > p:nth-of-type(1)").each((function(){this.__vwoControlOuterHTML=this.__vwoControlOuterHTML||this.outerHTML,!vwo_$(this).find('[vwo-op-1744062807520-0=""]').length&&vwo_$(this).append('Will you help a kid get to Eagle Lake Camps of The Navigators this summer?'),vwo_$(this).nonEmptyContents().eq(0).replaceWith2(document.createTextNode("You can be the difference in a child making a decision to follow Jesus at camp this summer. "))})),el=vwo_$(".pushdown-copy > p:nth-of-type(1)");})(".pushdown-copy > p:nth-of-type(1)")}}, R_722072_157_1_3_2:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","content",".pushdown-copy > p:nth-of-type(1)"); vwo_debug*/(el=vwo_$(".pushdown-copy > p:nth-of-type(1)")).revertContentOp(),el=vwo_$(".pushdown-copy > p:nth-of-type(1)");})(".pushdown-copy > p:nth-of-type(1)")}}, C_722072_157_1_3_3:{ fn:function(log,nonce=''){return (function(x) {})(".na-pushdown-wrapper,.mw-w-button,input.mw-w-button,#page,.pushdownbar,.div-block-16,.pushdownheadline,.pushdown,.div-block-7,.div-block-8,.paragraph-2,.div-block-15,.mw-btn,.mw-btn:visited,.mw-white,.mw-btn.mw-white,.mw-btn.mw-whitemw-btn:link,.na-pushdown-wrapper .close span,.na-pushdown-wrapper .close,.fa-angle-down:before,/*#donate-menu,.close-wrapper,.btn-dismiss,#masthead .close-menu,.pushdown .pushdown__row,.pushdown .pushdown__col,.pushdown .pushdown__content,.pushdown .pushdown-copy > *:last-child,.pushdown .grid-area,.pushdown .grid-card,.pushdown .grid-card div > p,.pushdown .grid-card div > p > span,.pushdown .grid-card .flex-col,.pushdown .grid-card div > p > b,.pushdown .grid-card button,.pushdown div div.centered,.pushdown div a.other-link,.pushdown .pushdown__close,.pushdown .grid-card p:nth-of-type(3),.pushdown .grid-card p > b")}}, R_722072_157_1_3_3:{ fn:function(log,nonce=''){return (function(x) {
if(!vwo_$.fn.vwoRevertHtml){
return;
};
})(".na-pushdown-wrapper,.mw-w-button,input.mw-w-button,#page,.pushdownbar,.div-block-16,.pushdownheadline,.pushdown,.div-block-7,.div-block-8,.paragraph-2,.div-block-15,.mw-btn,.mw-btn:visited,.mw-white,.mw-btn.mw-white,.mw-btn.mw-whitemw-btn:link,.na-pushdown-wrapper .close span,.na-pushdown-wrapper .close,.fa-angle-down:before,/*#donate-menu,.close-wrapper,.btn-dismiss,#masthead .close-menu,.pushdown .pushdown__row,.pushdown .pushdown__col,.pushdown .pushdown__content,.pushdown .pushdown-copy > *:last-child,.pushdown .grid-area,.pushdown .grid-card,.pushdown .grid-card div > p,.pushdown .grid-card div > p > span,.pushdown .grid-card .flex-col,.pushdown .grid-card div > p > b,.pushdown .grid-card button,.pushdown div div.centered,.pushdown div a.other-link,.pushdown .pushdown__close,.pushdown .grid-card p:nth-of-type(3),.pushdown .grid-card p > b")}}, C_722072_70_1_2_0:{ fn:function(log,nonce=''){return (function(x) {try{const MAX_ONETIME_AMOUNT=500,RECURRING_ASK=t=>{let e;return e=t>=400&&t<500?50:t>=300&&t<400?40:t>=200&&t<300?30:t>=100&&t<200?15:10,e};function waitForElement(t,e,o=(t=>{}),n=30){return t?(o(t),!0):setTimeout(e,n)}function vwoCustomEvent(t){window.VWO=window.VWO||[],VWO.event=VWO.event||function(){VWO.push(["event"].concat([].slice.call(arguments)))},VWO.event("customEvent",{label:t.toString()})}function entangleElements(t,e,o="innerHTML",n={attributes:!0,childList:!0,subtree:!0}){if(!t||!e)return console.error(`entangleElements: ${!t&&"element1"}${t||e?" ":" and "} ${!e&&"element2"} ${t||e?"is":"are"} undefined.`);console.log("Entangling:\n",t," ",e,"\nElement 2 will mirror Element 1's values.");const i=new MutationObserver((n,i)=>{for(const i of n)switch(i.type){case"attributes":const{attributeName:n,oldValue:r}=i;if("style"!==n){const o=t.getAttribute(n);null===o?e.removeAttribute(n):e.setAttribute(n,o)}break;default:e[o]=t[o]}});return i.observe(t,n),i}function init(){customElements.whenDefined("c-donate-community-giving-options").then(()=>{customElements.whenDefined("lightning-card").then(()=>{customElements.whenDefined("c-donate-community-donate-buttons").then(()=>{customElements.whenDefined("lightning-input").then(()=>{const t=[...document.querySelector("c-donate-community-giving-options").shadowRoot.querySelectorAll("lightning-card")][1].shadowRoot.querySelector(".slds-card__body").getSlotNodes(1).querySelector("c-donate-community-donate-buttons").shadowChildren(0),e={getGiftArrayButtons:function(){let e=t;return Array.from(e.children).slice(0,Array.from(e.children).indexOf(e.querySelector(".slds-form-element"))).map(t=>t.querySelector("button"))},getAmount:function(){const e=t=>t.replace(/[\$\,]/gm,"");let o=this.getGiftArrayButtons().filter(t=>t.classList.contains("donate-selected"))[0];return o||(o=t.querySelector("lightning-input").shadowChildren(0).shadowChildren(0).querySelector("input")),parseFloat(e(o.value))},setAmount:function(e){const o=t.querySelector("lightning-input").shadowChildren(0).shadowChildren(0).querySelector("input");for(const t of this.getGiftArrayButtons())if(parseFloat(t.value)===parseFloat(e))return o.value="",t.click(),this.getAmount()===parseFloat(e);return o.value=parseFloat(e),o.dispatchEvent(new Event("change",{bubbles:!0})),this.getAmount()===parseFloat(e)},getRecurring:function(){return[...t.querySelector(".slds-grid").querySelectorAll("lightning-input")][0].shadowChildren(0).shadowChildren(0).querySelector('input[type="checkbox"]').checked},setRecurring:function(e=!0){const o=[...t.querySelector(".slds-grid").querySelectorAll("lightning-input")][0].shadowChildren(0).shadowChildren(0).querySelector('input[type="checkbox"]'),n=this.getRecurring();return(!n&&e||n&&!e)&&o.click(),this.getRecurring()===e},submit:function(t=this.buttons["Donate Now"]){return t.click()}};e.giftArrayButtons=e.getGiftArrayButtons(),window.NA=window.NA||{},window.NA.MiniDonationForm=e,waitForElement(t.querySelector("button"),init,e=>{window.NA.MiniDonationForm.buttons={"Donate Now":Array.from(t.children).slice(Array.from(t.children).indexOf(t.querySelector(".slds-form-element"))).map(t=>t.querySelector("button")).filter(t=>t)[0],"Add to Basket":Array.from(t.children).slice(Array.from(t.children).indexOf(t.querySelector(".slds-form-element"))).map(t=>t.querySelector("button")).filter(t=>t)[1]},window.NA.MiniDonationForm.cloneSubmitButton=function(t=this.buttons["Donate Now"]){const e=t.cloneNode(!0);return e.attributes=t.attributes,e.style&&(e.style=t.style),t.after(e),e},waitForElement(document.querySelector("dialog.donation-interrupter"),init,t=>{console.log("dialog found:",t);try{const e={dialog:t||document.querySelector("dialog.donation-interrupter"),_tokenName:"DonationInterrupter_",_memoryMode:sessionStorage,status:"ready",getStatus:function(){return this._memoryMode.getItem(this._tokenName+"_status")||void 0},setStatus:function(t){return this._memoryMode.setItem(this._tokenName+"_status",t),this.status=t,this.getStatus()},conditions:!0,newAmount:function(t){return t/12},onShow:function(t){},onHide:function(t){},show:function(t){this.dialog.showModal(),this.dialog.addEventListener("keydown",t=>{"Escape"===t.key&&(t.preventDefault(),t.stopImmediatePropagation())}),this.setStatus("shown"),"function"==typeof this.onShow&&this.onShow.call(null,t)},hide:function(t){this.setStatus("dismissed"),this.dialog.close(),"function"==typeof this.onHide&&this.onHide.call(null,t)},updateDialogData:function(){if(this.dialog){let t=window.NA.MiniDonationForm.getAmount(),e=this.newAmount(t);[...this.dialog.querySelectorAll('span[data="amount_original"]')].forEach(e=>e.textContent=t.toString()),[...this.dialog.querySelectorAll('span[data="amount_suggested"]')].forEach(t=>t.textContent=e.toString())}}};window.NA=window.NA||{},window.NA.DonationInterrupter=e||window.NA.DonationInterrupter,window.NA.MiniDonationForm&&window.NA.DonationInterrupter&&main(window.NA.MiniDonationForm,window.NA.DonationInterrupter)}catch(t){console.error("Failed to interface with donation interrupter.")}},100)},100)})})})})}function main(t,e,o=0){if(!t.buttons)return setTimeout(init,100);if(!e.buttons)return e.buttons={yes:[...e.dialog.querySelectorAll("button")][0],no:[...e.dialog.querySelectorAll("button")][1]},main(t,e,o);window.NA.DonationInterrupter.setStatus(window.NA.DonationInterrupter._memoryMode.getItem(window.NA.DonationInterrupter._tokenName+"_status")||"ready"),window.NA.DonationInterrupter.newAmount=RECURRING_ASK;try{for(const n of Object.values(t.buttons)){const i=n,r=t.cloneSubmitButton(i);i.style.display="none",r.style.setProperty("margin-left","0","important"),setInterval(()=>r.disabled=i.disabled,50),r.addEventListener("click",n=>{let i=t.getAmount(),r=t.getRecurring(),s="shown"===e.status||"dismissed"===e.status;o&&(console.groupCollapsed("Check conditions"),console.info(i,"< 500",i<500),console.info(r,"=== false",!1===r),console.info(s,"=== false",!1===s),console.groupEnd("Check conditions"));const l=[i<500,!1===r,!1===s].every(t=>!!t);o&&console.info("showPopup?",l),n.srcElement.textContent===t.buttons["Add to Basket"].textContent?l?e.show(n):t.submit(t.buttons["Add to Basket"]):l?e.show(n):t.submit()})}}catch(t){console.error("Failed to clone submit button and add event listener.",t)}window.NA.DonationInterrupter.onShow=n=>{window.NA.DonationInterrupter.updateDialogData(),vwoCustomEvent("donationInterrupterShown");try{const i=window.NA.DonationInterrupter.buttons,{yes:r,no:s}=i;n.srcElement.textContent===t.buttons["Add to Basket"].textContent?(r.addEventListener("click",n=>{o&&console.groupCollapsed('"Yes" clicked'),vwoCustomEvent("yes");const i=t.getAmount(),r=window.NA.DonationInterrupter.newAmount(i);o&&console.log(i,"->",r),t.setRecurring(!0),t.setAmount(r),e.hide(),t.submit(t.buttons["Add to Basket"]),o&&console.groupEnd('"Yes" clicked')}),s.addEventListener("click",n=>{o&&console.groupCollapsed('"No" clicked'),vwoCustomEvent("no"),e.hide(),t.submit(t.buttons["Add to Basket"]),o&&console.groupEnd('"No" clicked')})):(r.addEventListener("click",n=>{o&&console.groupCollapsed('"Yes" clicked'),vwoCustomEvent("yes");const i=t.getAmount(),r=window.NA.DonationInterrupter.newAmount(i);o&&console.log(i,"->",r),t.setRecurring(!0),t.setAmount(r),e.hide(),t.submit(),o&&console.groupEnd('"Yes" clicked')}),s.addEventListener("click",n=>{o&&console.groupCollapsed('"No" clicked'),vwoCustomEvent("no"),e.hide(),t.submit(),o&&console.groupEnd('"No" clicked')})),o&&console.log("added handlers to buttons",i)}catch(t){console.error("Failed to attach event listeners to dialog buttons.",t)}}}window.HTMLElement.prototype.getSlot=window.HTMLElement.prototype.getSlot||function(){return this.querySelector("slot")||this.shadowRoot.querySelector("slot")},window.HTMLElement.prototype.getSlotNodes=window.HTMLElement.prototype.getSlotNodes||function(t){return"NaN"!==parseInt(t)&&t>=0?Array.from(this.getSlot().assignedNodes({flatten:!0})).at(t):Array.from(this.getSlot().assignedNodes({flatten:!0}))},window.HTMLElement.prototype.shadowChildren=window.HTMLElement.prototype.shadowChildren||function(t){return"NaN"!==parseInt(t)&&t>=0?Array.from(this.shadowRoot.children).at(t):Array.from(this.shadowRoot.children)},setTimeout(init,500);}catch(e){} ;var _vwo_sel=vwo_$("");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, C_722072_70_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x);
/*vwo_debug log("addElement","body"); vwo_debug*/!(el=vwo_$("body")).find('[vwo-op-1715610703351=""]').length&&el.vwoElement({html:'',position:"append"});})("body")}}, C_722072_158_1_2_1:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1743104387380').length && vwo_$('head').append(_vwo_sel);}catch(e) {VWO._.vAEH(e);}
try{}catch(e) {VWO._.vAEH(e);}
try{const config = {
donationForm: {
defaultRecurring: false, // true for "Recurring" default, false for "One-Time" default
giftArrayAmounts: [], // an array of numbers (like [ 5, 10, 15, 25 ]) or `null` or `[]` for default gift array amounts
defaultAmount: null, // a number or `null` for no default
anonymousDefault: null, // true/false or null for no default
tributeDefault: null, // true/false or null for no default
hideCheckboxesAll: true, // true/false to hide the checkboxes button
hideCheckboxFreqeuncy: false,
hideCheckboxAnonymous: false,
hideCheckboxTribute: false,
hideCartButton: false, // true/false to hide the "Add to Basket" button
},
tabs: {
"one-time": {
text: "One-Time Gift",
giftArrayAmounts: [], // changing the gift array here overrides the one set above for the donationForm
},
"recurring": {
text: "Recurring Gift",
giftArrayAmounts: [], // changing the gift array here overrides the one set above for the donationForm
}
}
};
const configDonationInterrupter = {
enabled: true,
uniqueName: "NA__NAV-DonationInterrupterV2",
content: {
headingSection: `
Before you go, would you consider becoming a monthly partner?
`,
bodySection: `
Your monthly partnership will:
provide the funds needed to bring Eagle Lake Camp to places where many kids don’t get the opportunity to experience camp
ensure supplies are ready and counselors are properly trained and equipped to preach the gospel
allow camp to be accessible to kids despite any financial barriers their families may face
Most importantly, you will play an active role in this ongoing work of bringing campers to meet Jesus and grow in their walks with Him. Would you consider becoming a monthly partner today?
`,
ctaButtons: {
"Yes": ``,
"No": ``,
},
closeButton: false,
theme: "NAV",
},
memoryMode: 'session', // "session" or "forever"; indicates how long the last interacted state should be remembered
minAmount: 5.00, // gift under this amount will be processed (if above the form minimum) and not shown the donation interrupter
maxAmount: 100.00, // gifts equal to and above this amount will be processed and not shown the donation interrupter
askConditions: function (originalAmount, originalFrequency, state) {
const conditions = [
originalFrequency === "One-Time", // "One-Time" or "Recurring"
originalAmount > this.minAmount,
originalAmount < this.maxAmount,
state && state.status !== "shown" && state.status !== "dismissed" && state.status !== "converted", // do not show if the user has already seen the donation interrupter, dismissed the donation interrupter, or converted from the donation interrupter
];
return conditions.every((condition) => typeof condition === 'function' ? !!condition.call(null) : !!condition); // return true if every condition in the array evaluates to true
},
askAmount: function (originalAmount) {
let askAmount;
if (originalAmount >= 400 && originalAmount < 500) { // $400.00 - $499.99
askAmount = 50;
} else if (originalAmount >= 300 && originalAmount < 400) { // $300.00 - $399.99
askAmount = 40;
} else if (originalAmount >= 200 && originalAmount < 300) { // $200.00 - $299.99
askAmount = 30;
} else if (originalAmount >= 100 && originalAmount < 200) { // $100.00 - $199.99
askAmount = 15;
} else { // $ 0.01 - $ 99.99
askAmount = 10;
}
return parseFloat(askAmount);
},
};
//
//
//
//
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
//
//
//
//
// Run code with configuration from above
(function(){
console.log("init");
window.NA.DonationForm.init(config).then((donationFormApi) => {
console.log("initialized:", donationFormApi);
if (configDonationInterrupter && configDonationInterrupter.enabled === true) {
donationFormApi.DonationInterrupter(configDonationInterrupter);
console.log("initialized:", donationFormApi.DonationInterrupter);
donationFormApi.interceptSubmit(function (capturedEvent) {
try {
const donationInterrupterApi = this.DonationInterrupter;
if (donationFormApi && donationInterrupterApi) {
if (donationInterrupterApi.evaluateConditions()) {
console.log(donationFormApi);
donationInterrupterApi.show();
return false; // do not submit
} else {
console.warn("Condtions check failed: Donation Interrupter will not be shown.");
return true; // submit
}
} else {
throw new ReferenceError("DonationFormApi or DonationInterrupterApi is not defined.");
}
} catch (error) {
console.error("An error occured when handling submit:", error);
window.NA?.DonationForm && window.NA.DonationForm.submit(); // retry submit
} finally {
return false;
}
});
}
}).catch((error) => {
console.error("Error creating donation form API:", error);
});
})();
}catch(e) {VWO._.vAEH(e);}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_722072_158_1_2_0:{ fn:function(log,nonce=''){return (function(x) {
try{
var ctx=vwo_$(x),el;
/*vwo_debug log("Revert","content",""); vwo_debug*/;
el=vwo_$('[vwo-element-id="1743104387377"]');
el.revertContentOp().remove();
} catch(e) {VWO._.vAEH(e);}
try{
var el,ctx=vwo_$(x);
/*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1743104387378"]')).remove();
} catch(e) {VWO._.vAEH(e);}
return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_722072_121_1_2_0:{ fn:function(log,nonce=''){return (function(x) {
try{
var _vwo_sel = vwo_$("`);
!vwo_$("head").find('#1734023482004').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{}catch(e) {console.error(e)}
try{const DEFAULT_DONATION_FREQUENCY="One-Time";function getQueryParam(e){let t=window.location.search.match(e+"=([^&]*)");return t?t[1]:void 0}function initOnElement(e,t,n){const i=e.getElementsByTagName(t);return i.length?n(i):setTimeout(initOnElement,500,e,t,n)}window.DonationForm=window.DonationForm||{recurring_checkbox:null,submit_button:null,other_amt:null,gift_array_elements:[],onetime_gift_array:[],recurring_gift_array:[10,20,30,40],setRecurring:function(e){console.log("setRecurring",e,this.recurring_checkbox),(!this.recurring_checkbox.checked&&e||this.recurring_checkbox.checked&&!e)&&(console.log("checked",this.recurring_checkbox.checked,"(before click)"),this.recurring_checkbox.click(),console.log("checked",this.recurring_checkbox.checked,"(after click)"))},selectGiftArray:function(e){this.gift_array_elements[e].click()},modifyGiftArray:function(e){this.gift_array_elements.forEach((t,n)=>{t.value=e[n],t.textContent="$"+e[n]})},setOneTimeGiftArrayValues:function(){let e=this;this.gift_array_elements.forEach(t=>{e.onetime_gift_array.push(parseInt(t.value))})},setFirstNamePersonalization:function(e){const t=void 0===getQueryParam("first_name")||""===getQueryParam("first_name")?"Friend":getQueryParam("first_name");for(let n=0;n<=e.length-1;n++)e[n].innerHTML.includes("[Name]")&&(e[n].innerHTML=e[n].innerHTML.replace(/\[[^\]]*]/,t)),e[n].innerHTML.includes("Friend")&&(e[n].innerHTML=e[n].innerHTML.replace("Friend",t))},init:function(){document.querySelectorAll(".tab").forEach(e=>{e.addEventListener("click",(function(e){this.classList.add("selected"),this.classList.contains("recurring")?(document.querySelector(".tab.onetime").classList.remove("selected"),DonationForm.setRecurring(!0)):(document.querySelector(".tab.recurring").classList.remove("selected"),DonationForm.setRecurring(!1))}))}),this.hasOwnProperty("setOneTimeGiftArrayValues")&&this.setOneTimeGiftArrayValues(),this.setRecurring(!1),this.hasOwnProperty("selectGiftArray")&&this.selectGiftArray(0)}},initOnElement(document,"c-donate-community-staff-information",(function(e){initOnElement(e[0],"div",(function(e){e[0].querySelectorAll("div.slds-col")[0].classList.add("page-image");const t=e[0].querySelectorAll("div.slds-col")[1];if(t.classList.add("donation-form-content"),t.querySelector(".tabs"))return;const n=t.querySelectorAll("div,lightning-formatted-rich-text");for(let e=0;e<=n.length-1;e++)0==e&&n[e].classList.add("page-title"),1==e&&n[e].classList.add("page-action-text"),2==e&&n[e].classList.add("donation-form"),3==e&&n[e].classList.add("bottom-title"),4==e&&n[e].classList.add("page-text");n[4]&&n[4].shadowRoot&&n[4].shadowRoot.querySelectorAll("div p")&&DonationForm.setFirstNamePersonalization(n[4].shadowRoot.querySelectorAll("div p")),n[1].before(n[4]);const i=document.createElement("div");i.classList.add("tabs"),i.innerHTML='
One-Time Gift
Recurring Gift
',n[2].before(i),initOnElement(n[2],"c-donate-community-donate-buttons",(function(e){initOnElement(e[0].shadowRoot.querySelector("div"),"div",(function(e){for(let t=0;tdialog.donation-interrupter {\n --dialog-margin: 2rem;\n --dialog-padding: 3rem;\n position: fixed;\n outline: none;\n border: none;\n padding: 0;\n box-sizing: border-box;\n max-width: calc(100% - calc(2 * var(--dialog-margin)));\n width: 800px;\n}\ndialog::backdrop { background-color: rgba(0, 0, 0, 0.4); }\ndialog.donation-interrupter > .wrapper {\n position: relative;\n margin: calc(var(--dialog-padding));\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\ndialog.donation-interrupter section {\n display: flex;\n flex-direction: column;\n gap: 1rem;\n}\ndialog.donation-interrupter section > div {\n display: flex;\n flex-direction: row;\n gap: 1rem;\n}\ndialog.donation-interrupter section.donation-interrupter--cta button > * {\n font-family: inherit;\n color: inherit;\n background-color: transparent;\n display: inline;\n padding: 0;\n margin: 0;\n font-size: inherit !important;\n text-transform: inherit;\n}\ndialog.donation-interrupter button[data-action=\"dismiss\"] {\n --scale: 3;\n position: absolute;\n top: -1.5rem;\n right: -1.5rem;\n display: flex;\n justify-content: center;\n align-items: center;\n background: none;\n border: none;\n outline: none;\n box-sizing: border-box;\n padding: 0;\n margin: 0;\n line-height: 0;\n width: calc(1rem * var(--scale));\n height: calc(1rem * var(--scale));\n font-size: calc(1rem * var(--scale));\n}\ndialog.donation-interrupter > div span[before]::before { content: attr(before); }\ndialog.donation-interrupter button.btn-dismiss {\n color: rgba(0, 0, 0, 0.5);\n background-color: rgba(255, 255, 255, 0.5);\n border-radius: 100%;\n}\ndialog.donation-interrupter button[data-action=\"dismiss\"] + section { max-width: calc(100% - 1rem); } /* clear dismiss button */\n@media only screen and (max-width: 500px) {\n dialog.donation-interrupter section.donation-interrupter--cta > div { flex-direction: column; }\n dialog.donation-interrupter {\n --dialog-margin: 0.5rem !important;\n --dialog-padding: 0.5rem !important;\n max-width: calc(100% - calc(2 * var(--dialog-margin)));\n width: 100%;\n max-height: calc(100vh - calc(2 * var(--dialog-margin)));\n height: min-content;\n overflow: hidden;\n }\n dialog.donation-interrupter > .wrapper { padding: .75rem !important; }\n}\n@media only screen and (max-width: 375px) {\n dialog.donation-interrupter {\n --dialog-margin: 0rem !important;\n --dialog-padding: 0.5rem !important;\n max-width: calc(100% - calc(2 * var(--dialog-margin)));\n width: 100%;\n max-height: 100vh;\n height: 100vh;\n overflow: hidden;\n border-radius: 0 !important;\n }\n dialog.donation-interrupter > .wrapper {\n padding: .75rem !important;\n height: calc(100% - 2* 0.5rem) !important;\n overflow: hidden;\n justify-content: space-evenly;\n }\n}\n/* NAV THEME ===================================================================================== */\ndialog.donation-interrupter[theme=\"NAV\"] h1,\ndialog.donation-interrupter[theme=\"NAV\"] h2,\ndialog.donation-interrupter[theme=\"NAV\"] h3,\ndialog.donation-interrupter[theme=\"NAV\"] h4,\ndialog.donation-interrupter[theme=\"NAV\"] h5,\ndialog.donation-interrupter[theme=\"NAV\"] h6,\ndialog.donation-interrupter[theme=\"NAV\"] ul,\ndialog.donation-interrupter[theme=\"NAV\"] p {\n margin: 0;\n line-height: 1.5;\n}\ndialog.donation-interrupter[theme=\"NAV\"] {\n --primary-color: #e16b2a;\n --secondary-color: #008C95;\n --dialog-padding: 1.5rem;\n border-radius: 0.5rem;\n font: 16px \"Montserrat\";\n color: #54473f;\n}\ndialog.donation-interrupter[theme=\"NAV\"] button[data-action=\"dismiss\"] {\n --scale: 4;\n top: -2rem;\n right: -2rem;\n display: none;\n}\ndialog.donation-interrupter[theme=\"NAV\"] .wrapper {\n border: 2px solid var(--secondary-color);\n padding: 1.5rem;\n}\ndialog.donation-interrupter[theme=\"NAV\"] .wrapper > section {\n gap: 0.5rem;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--heading > h2 {\n margin: 0;\n color: #303030;\n line-height: 1.3;\n font-size: 2em;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body p,\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body li,\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta p {\n color: #404040;\n line-height: 1.8;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body ul {\n list-style: disc;\n padding-left: 1.15rem;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta p {\n /*font-weight: bold;*/\n margin: 0;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta > div { \n justify-content: flex-start;\n align-items: center;\n align-items: stretch;\n align-content: center;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta button {\n width: 100%;\n padding: 0.5rem 1rem;\n /*font-size: 0.9em;*/\n font-weight: 500;\n border-radius: 0;\n box-sizing: border-box;\n /*text-transform: uppercase !important;*/\n letter-spacing: 0.5px;\n line-height: 1.5;\n max-width: unset;\n transition: all 200ms ease;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta button b {\n /*font-size: 1.05em !important;*/\n text-transform: uppercase;\n font-weight: 700;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta div > button:first-child {\n color: white;\n background: var(--primary-color);\n border: none;\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta div > button:first-child:hover {\n border-color: color-mix(in srgb, var(--primary-color) 90%, black); /* darken */\n background: color-mix(in srgb, var(--primary-color) 90%, black); /* darken */\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta div > button:last-child {\n color: black;\n background: white;\n border: 2px solid var(--secondary-color);\n}\ndialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta div > button:last-child:hover {\n color: white;\n border-color: color-mix(in srgb, var(--secondary-color) 90%, black); /* darken */\n background: color-mix(in srgb, var(--secondary-color) 90%, black); /* darken */\n}\n@media only screen and (max-width: 768px) {\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--heading > h2 { font-size: 1.85em; }\n}\n@media only screen and (max-width: 500px) {\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--heading > h2 { font-size: 1.6em; }\n} \n@media only screen and (max-width: 375px) {\n dialog.donation-interrupter {\n --dialog-margin: 0rem !important;\n --dialog-padding: 0.5rem !important;\n max-width: calc(100% - calc(2 * var(--dialog-margin)));\n width: 100%;\n max-height: 100vh;\n height: 100vh;\n overflow: hidden;\n border-radius: 0 !important;\n }\n dialog.donation-interrupter > .wrapper {\n border: none;\n padding: .75rem !important;\n height: calc(100% - 2* 0.5rem) !important;\n overflow: hidden;\n overflow-y: scroll;\n justify-content: space-evenly;\n }\n}\n@media only screen and (max-width: 375px) {\n dialog.donation-interrupter[theme=\"NAV\"] > .wrapper {\n border: none;\n padding: 0;\n }\n}\n@media only screen and (max-width: 440px) {\n dialog.donation-interrupter[theme=\"NAV\"] > .wrapper { gap: 0.5rem }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--heading > h2 {\n font-size: 1.4em;\n line-height: 1.4;\n letter-spacing: -0.25px;\n }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body { gap: 0.35rem }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body p,\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body li { line-height: 1.5 }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta > div { gap: 0.75rem }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta button {\n font-size: 0.9em;\n line-height: 1.2;\n letter-spacing: -0.15px;\n }\n}\n@media only screen and (max-width: 280px) { /* Z fold, folded (edge case) */\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--body p,\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta p {\n line-height: 1.25;\n }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--heading > h2 {\n font-size: 1.5em;\n line-height: 1.25;\n }\n dialog.donation-interrupter[theme=\"NAV\"] section.donation-interrupter--cta button {\n font-size: 0.8em;\n line-height: 1.15;\n }\n}\n`);
!vwo_$("head").find('#1734023482010').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)}
try{;
/*vwo_debug log("addElement","body"); vwo_debug*/;
el=vwo_$("body")
;
!el.find('[vwo-op-1734023482012=""]').length && el.vwoElement({"position":"append","html":""});}catch(e) {console.error(e)}
try{const DONATION_INTERRUPTER_GROUP_NAME = "MemorizeScripture2" /* all the popups in this test will share the same group name so that the metrics for them are all counted in the test */;
window.HTMLElement.prototype.getSlot = window.HTMLElement.prototype.getSlot || function () { return this.querySelector('slot') || this.shadowRoot.querySelector('slot'); }
window.HTMLElement.prototype.getSlotNodes = window.HTMLElement.prototype.getSlotNodes || function (n) { return (parseInt(n) !== 'NaN' && n >= 0) ? Array.from(this.getSlot().assignedNodes({ flatten: true })).at(n) : Array.from(this.getSlot().assignedNodes({ flatten: true })); }
window.HTMLElement.prototype.shadowChildren = window.HTMLElement.prototype.shadowChildren || function (n) { return (parseInt(n) !== 'NaN' && n >= 0) ? Array.from(this.shadowRoot.children).at(n) : Array.from(this.shadowRoot.children); }
function waitForElement (el, retry, onSuccess = (el) => {}, delay = 30) {
if ( !el ) return setTimeout(retry, delay);
onSuccess(el);
return true;
}
//
function vwoSendEvent (eventName = "customEvent", object = { label: '' }) {
window.VWO = window.VWO || [];
VWO.event = VWO.event || function () {VWO.push(["event"].concat([].slice.call(arguments)));};
VWO.event(eventName, object);
console.log(eventName, object);
}
const vwoSendEvent_DonationInterrupter = (action, group = undefined) => {
if (action === "Shown")
vwoSendEvent("custom_DonationInterrupter_Shown", { shown: true, group: group });
else if (action === "Yes")
vwoSendEvent("custom_DonationInterrupter_Yes", { yes: true, group: group });
else if (action === "No")
vwoSendEvent("custom_DonationInterrupter_No", { donationInterrupterNoClicked: true, group: group });
};
//
function entangleElements (element1, element2, method = 'innerHTML', options = { attributes: true, childList: true, subtree: true }) {
if (!element1 || !element2)
return console.error(`entangleElements: ${!element1 && "element1"}${!element1 && !element2 ? " and " : " "} ${!element2 && "element2"} ${!element1 && !element2 ? "are" : "is"} undefined.`);
console.log("Entangling:\n", element1, ' ', element2, "\nElement 2 will mirror Element 1's values.");
const handleMutation = (mutationList, observer) => { // Callback function to execute when mutations are observed
let lastAttributeValues = {};
for (const mutation of mutationList) {
switch (mutation.type) {
case "attributes":
const { attributeName, oldValue } = mutation;
if (attributeName !== "style") { // ignore changes to style attribute
const currentValue = element1.getAttribute(attributeName);
if (currentValue === null) {
element2.removeAttribute(attributeName); // mirror element 1 attributes on element 2 by removing null value attribute
} else {
element2.setAttribute(attributeName, currentValue); // mirror element 1 attributes on element 2
}
}
break;
default:
element2[method] = element1[method];
break;
}
}
};
const observer = new MutationObserver(handleMutation);
observer.observe(element1, options); // Start observing the target node for configured mutations
return observer;
}
//
//
//
//
function init () {
try {
customElements.whenDefined("c-donate-community-staff-information").then(() => {
customElements.whenDefined("c-donate-community-donate-buttons").then(() => {
customElements.whenDefined("lightning-input").then(() => {
const wrapperForm = document.querySelector('c-donate-community-staff-information');
const wrapperFormInteractive = wrapperForm.shadowRoot.querySelector('c-donate-community-donate-buttons').shadowChildren(0);
/// Interface with the giving form and create a window object
const form = {
getGiftArrayButtons: function () {
let w = wrapperFormInteractive;
return Array.from(w.children).slice(0, Array.from(w.children).indexOf(w.querySelector('.slds-form-element'))).map(x => x.querySelector('button'));
},
getAmount: function () {
const sanitizeAmount = a => a.replace(/[^\d\.]/,''); // remove non-digit characters (except for decimals)
let selected = this.getGiftArrayButtons().filter(x => x.classList.contains("donate-selected"))[0];
if (selected) {
return parseFloat(selected.value);
} else {
selected = wrapperFormInteractive.querySelector('lightning-input').shadowChildren(0).shadowChildren(0).querySelector('input');
return parseFloat(sanitizeAmount(selected.value));
}
console.warn("Amount is not defined: no option is selected.")
return undefined;
},
setAmount: function (n) {
let match;
const otherAmount = wrapperFormInteractive.querySelector('lightning-input').shadowChildren(0).shadowChildren(0).querySelector('input');
for (const button of this.getGiftArrayButtons()) { // iterate over gift array buttons
if (parseFloat(button.value) === parseFloat(n) ) { // if matching button found for amount
otherAmount.value = ''; // clear other amount
button.click(); // click the matching button
return this.getAmount() === parseFloat(n); // return true if the getAmount() matches the input value
}
}
otherAmount.value = parseFloat(n); // set the other amount field value to the input value
otherAmount.dispatchEvent(new Event('change', { bubbles: true })); // trigger a change event to cause the input to be formatted
return this.getAmount() === parseFloat(n); // return true if the getAmount() matches the input value
},
getRecurring: function () {
const checkbox = [...wrapperFormInteractive.querySelector(".slds-grid").querySelectorAll("lightning-input")][0].shadowChildren(0).shadowChildren(0).querySelector('input[type="checkbox"]');
return checkbox.checked;
},
setRecurring: function (toRecurring = true) {
const checkbox = [...wrapperFormInteractive.querySelector(".slds-grid").querySelectorAll("lightning-input")][0].shadowChildren(0).shadowChildren(0).querySelector('input[type="checkbox"]');
const isRecurring = this.getRecurring(), isOnetime = !isRecurring, toOnetime = !toRecurring; // semantic booleans
if ( (isOnetime && toRecurring) || (isRecurring && toOnetime)) {
checkbox.click();
}
return this.getRecurring() === toRecurring;
},
submit: function (btn = this.buttons["Donate Now"]) {
return btn.click();
},
};
//form.giftArrayButtons = form.getGiftArrayButtons();
window.NA = window.NA || {};
window.NA.MiniDonationForm = form;
waitForElement(wrapperFormInteractive.querySelector('button'), init, (el) => { // wait for form buttons
window.NA.MiniDonationForm.buttons = {
"Donate Now": Array.from(wrapperFormInteractive.children).slice(Array.from(wrapperFormInteractive.children).indexOf(wrapperFormInteractive.querySelector('.slds-form-element'))).map(x => x.querySelector('button')).filter(y => y)[0],
"Add to Basket": Array.from(wrapperFormInteractive.children).slice(Array.from(wrapperFormInteractive.children).indexOf(wrapperFormInteractive.querySelector('.slds-form-element'))).map(x => x.querySelector('button')).filter(y => y)[1],
};
window.NA.MiniDonationForm.cloneSubmitButton = function (originalButton = this.buttons["Donate Now"]) {
const clonedButton = originalButton.cloneNode(true); // clone the button and its children
clonedButton.attributes = originalButton.attributes; // copy attributes
if (clonedButton.style) clonedButton.style = originalButton.style; // copy styles
originalButton.after(clonedButton); // insert the fake button after the original
//entangleElements(originalButton, clonedButton, 'outerHTML'); // quantum entangle the elements via outerHTML -- does not work if the element is fully replaced when state changed
return clonedButton; // return the fake button
};
/// Interface with the Donation Interrupter