");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, R_725969_176_1_2_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="1746468826117"]'); el.revertContentOp().remove();})("HEAD")}}, C_725969_176_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).addClass("_vwo_coal_1697827292277");})(".btn")}}, C_725969_177_1_2_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_725969_177_1_2_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="1746468897295"]'); el.revertContentOp().remove();})("HEAD")}}, R_725969_176_1_2_2:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; })("dialog::backdrop,.dear-reader-dialog,.dear-reader,.dear-reader+hr,.dear-reader .btn,.dear-reader img,.dear-reader p,#book-img")}}, R_725969_177_1_2_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).removeClass("_vwo_coal_1697827292277");})(".btn")}}, C_725969_177_1_2_2:{ fn:function(log,nonce=''){return (function(x) {})("dialog::backdrop,.dear-reader-dialog,.dear-reader,.dear-reader+hr,.dear-reader .btn,.dear-reader img,.dear-reader p,#book-img")}}, R_725969_177_1_2_2:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; })("dialog::backdrop,.dear-reader-dialog,.dear-reader,.dear-reader+hr,.dear-reader .btn,.dear-reader img,.dear-reader p,#book-img")}}, C_725969_177_1_3_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1746468897320').length && vwo_$('head').append(_vwo_sel);}catch(e) {VWO._.vAEH(e);} try{}catch(e) {VWO._.vAEH(e);} try{const dailyGoals=[{date:"April 29, 2025",value:50},{date:"May 1, 2025",value:5},{date:"May 2, 2025",value:4},{date:"May 3, 2025",value:5},{date:"May 4, 2025",value:6},{date:"May 5, 2025",value:5},{date:"May 6, 2025",value:6},{date:"May 7, 2025",value:5},{date:"May 8, 2025",value:6},{date:"May 9, 2025",value:5},{date:"May 10, 2025",value:5},{date:"May 11, 2025",value:5},{date:"May 12, 2025",value:6},{date:"May 13, 2025",value:5},{date:"May 14, 2025",value:6},{date:"May 15, 2025",value:4},{date:"May 16, 2025",value:5},{date:"May 17, 2025",value:7},{date:"May 18, 2025",value:5},{date:"May 19, 2025",value:6},{date:"May 20, 2025",value:15},{date:"May 21, 2025",value:10},{date:"May 22, 2025",value:7},{date:"May 23, 2025",value:9},{date:"May 24, 2025",value:6},{date:"May 25, 2025",value:9},{date:"May 26, 2025",value:8},{date:"May 27, 2025",value:10},{date:"May 28, 2025",value:25},{date:"May 29, 2025",value:50},{date:"May 30, 2025",value:40},{date:"May 31, 2025",value:60}],testDate=null;function getTodayFormatted(){return(new Date).toLocaleString("default",{month:"long",day:"numeric",year:"numeric"})}function getGoalForToday(){const e=getTodayFormatted(),t=dailyGoals.find(t=>t.date===e);return t?t.value:0}!function(){const e=Date.now(),t=localStorage.getItem("popupDismissedUntil");if(t&&e\n \n \n \n

Dear Listener,

\n

Have FamilyLife’s biblical resources helped strengthen your family and your walk with Christ?

\n
\n \n \n
\n ',document.body.appendChild(a);const o=document.createElement("dialog");function n(e){e instanceof HTMLDialogElement&&e.close(),e.style.display="none"}function l(){const e=getGoalForToday();var t=!1;window.nextafterPixel=function(a){t=!0;var n=0;a&&a.hits&&(n=parseInt(a.hits,10)||0);var l=e-n,r=document.querySelector(".dear-reader .counter");l<=0?r&&(r.style.display="none"):r&&(r.textContent=String(l)),setTimeout(()=>{void 0!==o&&o.showModal&&o.showModal()},100)};var a=document.createElement("script");a.src="https://pxl.nextafter.org/get.php?id=13&callback=nextafterPixel",a.id="nextafterPixelScript",document.body.appendChild(a),setTimeout(()=>{if(!t){console.warn("Pixel did not respond, showing fallback popup");var a=document.querySelector(".dear-reader .counter");a&&(a.textContent=String(e)),setTimeout(()=>{void 0!==o&&o.showModal&&o.showModal()},100)}},5e3)}o.classList.add("dear-reader-dialog"),o.innerHTML='\n
\n \n \n \n \n

Great!

\n

We’re blessed to know that our resources encouraged your family.

\n

We want you to have this inspirational new devotional from bestselling author Jackie Hill Perry, Upon Waking. It’s an invitation to step away from your to-do lists and anxiety and into a daily reminder of what truly matters.

\n

It is our gift to you when you become one of the X new monthly donors we\'re looking for today. As a FamilyLife partner, your gift will strengthen your family and other families all year. \n

\n

\n Get your devotional\n

\n
',document.body.appendChild(o),a.querySelector("svg").onclick=()=>n(a),o.querySelector("svg").onclick=()=>n(o),a.querySelector("#popup-no").onclick=()=>{const e=Date.now()+6048e5;localStorage.setItem("popupDismissedUntil",String(e)),n(a)},a.querySelector("#popup-yes").onclick=()=>{n(a),setTimeout(l,300)},setTimeout(()=>a.showModal(),3e3)}();}catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_725969_177_1_3_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="1746468897320"]'); 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="1746468897321"]')).remove(); } catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_725969_177_1_3_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).addClass("_vwo_coal_1697827292277");})(".btn")}}, R_725969_177_1_3_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).removeClass("_vwo_coal_1697827292277");})(".btn")}}, R_725969_183_1_2_1:{ 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="1746479885398"]'); 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="1746479885399"]')).remove(); } catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_725969_177_1_2_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).addClass("_vwo_coal_1697827292277");})(".btn")}}, R_725969_176_1_3_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).removeClass("_vwo_coal_1697827292277");})(".btn")}}, C_725969_176_1_3_1:{ fn:function(log,nonce=''){return (function(x) {var el,ctx=vwo_$(x); /*vwo_debug log("_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).addClass("_vwo_coal_1697827292277");})(".btn")}}, R_725969_176_1_3_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="1746468826149"]'); 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="1746468826150"]')).remove(); } catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_725969_176_1_3_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1746468826149').length && vwo_$('head').append(_vwo_sel);}catch(e) {VWO._.vAEH(e);} try{}catch(e) {VWO._.vAEH(e);} try{const dailyGoals=[{date:"April 29, 2025",value:50},{date:"May 1, 2025",value:5},{date:"May 2, 2025",value:4},{date:"May 3, 2025",value:5},{date:"May 4, 2025",value:6},{date:"May 5, 2025",value:5},{date:"May 6, 2025",value:6},{date:"May 7, 2025",value:5},{date:"May 8, 2025",value:6},{date:"May 9, 2025",value:5},{date:"May 10, 2025",value:5},{date:"May 11, 2025",value:5},{date:"May 12, 2025",value:6},{date:"May 13, 2025",value:5},{date:"May 14, 2025",value:6},{date:"May 15, 2025",value:4},{date:"May 16, 2025",value:5},{date:"May 17, 2025",value:7},{date:"May 18, 2025",value:5},{date:"May 19, 2025",value:6},{date:"May 20, 2025",value:15},{date:"May 21, 2025",value:10},{date:"May 22, 2025",value:7},{date:"May 23, 2025",value:9},{date:"May 24, 2025",value:6},{date:"May 25, 2025",value:9},{date:"May 26, 2025",value:8},{date:"May 27, 2025",value:10},{date:"May 28, 2025",value:25},{date:"May 29, 2025",value:50},{date:"May 30, 2025",value:40},{date:"May 31, 2025",value:60}],testDate=null;function getTodayFormatted(){return(new Date).toLocaleString("default",{month:"long",day:"numeric",year:"numeric"})}function getGoalForToday(){const e=getTodayFormatted(),t=dailyGoals.find(t=>t.date===e);return t?t.value:0}!function(){const e=Date.now(),t=localStorage.getItem("popupDismissedUntil");if(t&&e\n \n \n \n

Dear Reader,

\n

Have FamilyLife’s biblical resources helped strengthen your family and your walk with Christ?

\n
\n \n \n
\n ',document.body.appendChild(a);const o=document.createElement("dialog");function n(e){e instanceof HTMLDialogElement&&e.close(),e.style.display="none"}function l(){const e=getGoalForToday();var t=!1;window.nextafterPixel=function(a){t=!0;var n=0;a&&a.hits&&(n=parseInt(a.hits,10)||0);var l=e-n,r=document.querySelector(".dear-reader .counter");l<=0?r&&(r.style.display="none"):r&&(r.textContent=String(l)),setTimeout(()=>{void 0!==o&&o.showModal&&o.showModal()},100)};var a=document.createElement("script");a.src="https://pxl.nextafter.org/get.php?id=13&callback=nextafterPixel",a.id="nextafterPixelScript",document.body.appendChild(a),setTimeout(()=>{if(!t){console.warn("Pixel did not respond, showing fallback popup");var a=document.querySelector(".dear-reader .counter");a&&(a.textContent=String(e)),setTimeout(()=>{void 0!==o&&o.showModal&&o.showModal()},100)}},5e3)}o.classList.add("dear-reader-dialog"),o.innerHTML='\n
\n \n \n \n \n

Great!

\n

We’re blessed to know that our resources encouraged your family.

\n

We want you to have this inspirational new devotional from bestselling author Jackie Hill Perry, Upon Waking. It’s an invitation to step away from your to-do lists and anxiety and into a daily reminder of what truly matters.

\n

It is our gift to you when you become one of the X new monthly donors we\'re looking for today. As a FamilyLife partner, your gift will strengthen your family and other families all year. \n

\n

\n Get your devotional\n

\n
',document.body.appendChild(o),a.querySelector("svg").onclick=()=>n(a),o.querySelector("svg").onclick=()=>n(o),a.querySelector("#popup-no").onclick=()=>{const e=Date.now()+6048e5;localStorage.setItem("popupDismissedUntil",String(e)),n(a)},a.querySelector("#popup-yes").onclick=()=>{n(a),setTimeout(l,300)},setTimeout(()=>a.showModal(),3e3)}();}catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_725969_176_1_2_1:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; var el,ctx=vwo_$(x); /*vwo_debug log("Revert","_clickElement",".btn"); vwo_debug*/(el=vwo_$(".btn")).removeClass("_vwo_coal_1697827292277");})(".btn")}}, C_725969_176_1_2_2:{ fn:function(log,nonce=''){return (function(x) {})("dialog::backdrop,.dear-reader-dialog,.dear-reader,.dear-reader+hr,.dear-reader .btn,.dear-reader img,.dear-reader p,#book-img")}}, C_725969_183_1_2_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1746479885395').length && vwo_$('head').append(_vwo_sel);}catch(e) {VWO._.vAEH(e);} try{}catch(e) {VWO._.vAEH(e);} try{function getCurrentDate (d = new Date()) { return d.toISOString().split('T')[0] } function vwoCustomEvent (labelValue) { window.VWO = window.VWO || []; VWO.event = VWO.event || function () {VWO.push(["event"].concat([].slice.call(arguments)))}; VWO.event("customEvent", { "label": labelValue.toString() }); } function vwoDonationInterrupter2 (id, type) { window.VWO = window.VWO || []; VWO.event = VWO.event || function () {VWO.push(["event"].concat([].slice.call(arguments)))}; if (type === "shown" || type === "error") { VWO.event("donationInterrupter2", { "id": id?.toString(), "type": type?.toString(), }); } else { VWO.event("donationInterrupter2action", { "id": id?.toString(), "type": type?.toString(), }); } } class SortOfSimpleCountdownTimer{constructor(t,i=document.createElement("div"),e={onEnd:function(t){t.hide()},onChange:function(t){}}){return console.log(t),this._time={end:t instanceof Date?t:new Date(t).getTime(),now:new Date().getTime()},this._time.remaining=this._time.end-this._time.now,this._data=null,i.classList.contains("countdown")||i.classList.add("countdown"),this.element=i,this.callbacks=e,setTimeout(()=>this.init(),50),this}init(){console.log("Countdown Timer initialized."),this._interval=setInterval(t=>t.update(),1e3,this),this.update()}update(){try{this.now=new Date().getTime(),this.remaining=this.end-this.now,this.now;let t=this.remaining;if(!this.remaining||"NaN"==this.remaining){console.warn("Remaining time is not a number or is falsy.");return}if(this.remaining<=0)this.finish(),this.hide();else{let i={days:Math.floor(t/864e5),hours:Math.floor(t%864e5/36e5),minutes:Math.floor(t%36e5/6e4),seconds:Math.floor(t%6e4/1e3)};this.data=i;let e=[];Object.entries(i).filter(([t,i])=>"seconds"==t).forEach(([t,i])=>e.push(`
${i||0}
`)),this.element.innerHTML=e.join("\n")}this.callbacks&&"function"==typeof this.callbacks.onChange&&this.callbacks.onChange.call(this,this.element)}catch(n){this.element.style.setProperty("display","none"),console.error(n)}}finish(){this._interval?(clearInterval(this._interval),console.info("Countdown finished.")):console.error("Failed to clear interval."),this.callbacks&&"function"==typeof this.callbacks.onEnd&&this.callbacks.onEnd.call(this,this.element)}hide(){this.element.style.setProperty("display","none")}get now(){return this._time.now}set now(t){this._time.now=t||new Date().getTime()}get end(){return this._time.end}set end(t){this._time.end=t}get remaining(){return this._time.remaining}set remaining(t){this._time.remaining=t||this._time.end-this._time.now}get data(){return this._data}set data(t){this._data=t}} class NextAfterDonationMicrosite_GiftArrayButton { static activeClass = 'active'; constructor (element) { if (!(element instanceof HTMLElement) || !(element.classList.contains('amt-button') || element.classList.contains('option'))) throw new TypeError("Argument 0 must be an instance of HTMLElement with a class of '.amt-button' or '.option'."); this.button = element; } get value () { return parseInt(this.button.dataset.amt); } set value (newValue) { this.button.dataset.amt = parseInt(newValue); } get text () { return this.button.textContent; } set text (newText) { this.button.textContent = newText; } get active () { return this.button.classList.contains(NextAfterDonationMicrosite_GiftArrayButton.activeClass) ? true : false; } set active (boolean) { if (boolean) { this.select(); if (!this.active) // if for some reason the button was selected but still does not have the active class this.button.classList.add(NextAfterDonationMicrosite_GiftArrayButton.activeClass); } else { this.button.classList.remove(NextAfterDonationMicrosite_GiftArrayButton.activeClass); } } click () { this.button.click() } select () { this.click() } addEventListener (eventType, eventHandlerCallback) { this.button.addEventListener(eventType, eventHandlerCallback); } get amount () { return this.value; } set amount (newAmount) { if (Number.isNaN(parseInt(newAmount)) || parseInt(newAmount) < 0) throw new Error("New amount must be a valid number greater than 0."); newAmount = parseInt(newAmount); this.text = parseFloat(newAmount).toLocaleString('en-US', { format: 'currency', currency: 'USD', minimumFractionDigits: 0, maximumFractionDigits: 0 }); this.value = parseInt(newAmount); } } class NextAfterDonationMicrosite_GiftArrayButtonRadio extends NextAfterDonationMicrosite_GiftArrayButton { constructor (element) { super(element); this.radio = element.matches('input[type="radio"]') ? element : element.querySelector('input[type="radio"]'); } get value () { return parseInt(this.radio.value); } set value (newValue) { this.radio.value = parseInt(newValue); } set text (newText) { const textNode = this.radio.nextSibling.nodeType === Node.TEXT_NODE ? this.radio.nextSibling : [...this.element.childNodes].find(({ nodeType, nodeValue }) => nodeType === Node.TEXT_NODE && nodeValue.length > 0); textNode.nodeValue = newText.toString(); } addEventListener (eventType, eventHandlerCallback) { if (eventType == 'click') { this.button.addEventListener(eventType, eventHandlerCallback); } else { this.radio.addEventListener(eventType, eventHandlerCallback); } } } class NextAfterDonationMicrosite_GiftArrayOtherAmount { constructor (element) { if (!(element instanceof HTMLInputElement) || !(element.type == 'text')) throw new TypeError("Argument 0 must be an instance of HTMLInputElement with a 'type' of 'text'."); this.input = element; } get value () { return this.input.value; } set value (newValue) { this.input.dispatchEvent(new Event('click')); this.input.dispatchEvent(new Event('focus')); this.input.value = newValue; // this.input.dispatchEvent(new Event('keyup')); this.input.dispatchEvent(new Event('input')); this.input.dispatchEvent(new Event('change')); this.input.dispatchEvent(new Event('blur')); } get text () { return this.input.placeholder; } set text (newPlaceholderText) { this.input.placeholder = newPlaceholderText; } get amount () { return parseFloat(this.value); } set amount (newAmount) { if (Number.isNaN(parseInt(newAmount)) || parseInt(newAmount) <= 0) throw new Error("New amount must be a valid number greater than 0."); newAmount = parseFloat(newAmount); this.value = newAmount; } addEventListener (eventType, eventHandlerCallback) { this.input.addEventListener(eventType, eventHandlerCallback); } } class NextAfterDonationMicrosite_GiftArray extends Array { constructor (items) { if (!Array.isArray(items) && items.length === 0) { throw !Array.isArray(items) ? new TypeError("GiftArray: Arugment 1 is not an instance of Array:" + items.join(', ')) : new RangeError("GiftArray: Arugment 1 is not an instance of Array with a length greater than 0:" + items.join(', ')); } if (items.every((item) => item instanceof NextAfterDonationMicrosite_GiftArrayButton || item instanceof NextAfterDonationMicrosite_GiftArrayOtherAmount)) { if (items.find((item) => item instanceof NextAfterDonationMicrosite_GiftArrayOtherAmount)) { // if the array is mixed (both GiftArrayButton and GiftArrayButtonOtherAmount) let temp = items.find((item) => item instanceof NextAfterDonationMicrosite_GiftArrayOtherAmount); // temporarily hold the other amount items = items.filter((item) => item instanceof NextAfterDonationMicrosite_GiftArrayButton); // assign items to be only the gift array button temporarily (removed the other amount) items.push(temp); // add back the other amount to items so that it's always the last entry in the array } } else if (items.every((item) => item instanceof HTMLElement)) { items = items.map((item) => { if (item.matches('.stripe-donation-other-amt, .option-other-text')) return new NextAfterDonationMicrosite_GiftArrayOtherAmount(item); return item.querySelector('input[type="radio"]') ? new NextAfterDonationMicrosite_GiftArrayButtonRadio(item) : new NextAfterDonationMicrosite_GiftArrayButton(item); }); } else { throw new Error("GiftArray: Arugment 1 is not of type HTMLElement[], or GiftArrayButton[]:" + items.join(', ')); } super(...items); this.Buttons = items.filter((item) => item instanceof NextAfterDonationMicrosite_GiftArrayButton) ?? []; this.OtherAmountInput = items.find((item) => item instanceof NextAfterDonationMicrosite_GiftArrayOtherAmount) ?? null; } get amount () { const activeButton = this.Buttons.find((item) => item.active); if (activeButton) { // active button was found in the gift array return activeButton.amount; } else { return this.OtherAmountInput.amount; } } set amount (newAmount) { if (Number.isNaN(parseInt(newAmount)) || parseInt(newAmount) <= 0) throw new Error("New amount must be a valid number greater than 0."); newAmount = parseFloat(newAmount); const matchingButton = this.find((item) => parseFloat(item.value) === newAmount); if (matchingButton) { matchingButton.click(); } else { this.OtherAmountInput.amount = newAmount; const activeButton = this.Buttons.find((item) => item.active); if (activeButton) activeButton.active = false; } } addEventListeners (eventType, eventHandlerCallback) { this.forEach((item) => item.addEventListener(eventType, eventHandlerCallback)); } } class NextAfterDonationMicrosite_FrequencyToggle { constructor (element) { if (!(element instanceof HTMLInputElement) || !(element.type == 'checkbox')) throw new TypeError("Argument 0 must be an instance of HTMLInputElement with a 'type' of 'checkbox'."); this.checkbox = element; } get frequency () { return this.checkbox.checked ? true : false; } set frequency (boolean) { if (boolean !== this.frequency) { // only if the arugment is different from what is already set if (boolean === true) this.checkbox.checked = true; if (boolean === false) this.checkbox.checked = true; } } get recurring () { return this.frequency ? true : false; } set recurring (bool) { this.frequency = bool; } addEventListener (eventType, eventHandlerCallback) { this.checkbox.addEventListener(eventType, eventHandlerCallback); } } class NextAfterDonationMicrosite_FrequencyRadio { constructor (element) { if (!(element instanceof HTMLInputElement) || !(element.type == 'radio')) throw new TypeError("Argument 0 must be an instance of HTMLInputElement with a 'type' of 'radio'."); this.radio = element; } get value () { return this.radio.value; } set value (newValue) { this.radio.value = newValue; } get frequency () { return this.radio.checked ? true : false; } set frequency (boolean) { if (boolean !== this.frequency) { // only if the arugment is different from what is already set if (boolean === true) this.radio.checked = true; if (boolean === false) this.radio.checked = true; } } get recurring () { return this.frequency ? true : false; } set recurring (bool) { this.frequency = bool; } get checked () { return this.radio.checked; } set checked (bool) { this.radio.checked = bool ? true : false; } click () { this.radio.click(); } addEventListener (eventType, eventHandlerCallback) { this.radio.addEventListener(eventType, eventHandlerCallback); } } class NextAfterDonationMicrosite_FrequencyArray extends Array { constructor (items) { if (!Array.isArray(items) && items.length === 0) { throw !Array.isArray(items) ? new TypeError("FrequencyArray: Arugment 1 is not an instance of Array:" + items.join(', ')) : new RangeError("FrequencyArray: Arugment 1 is not an instance of Array with a length greater than 0:" + items.join(', ')); } if (items.every((item) => item instanceof NextAfterDonationMicrosite_FrequencyRadio)) { items = items; } else if (items.every((item) => item instanceof HTMLElement)) { items = items.map((item) => (item instanceof HTMLInputElement && item.type === 'radio') ? new NextAfterDonationMicrosite_FrequencyRadio(item) : undefined); } else { throw new Error("FrequencyArray: Arugment 1 is not of type HTMLInputElement[]|HTMLElement[], or FrequencyRadio[]:" + items.join(', ')); } super(...items); this.Options = items.filter((item) => item instanceof NextAfterDonationMicrosite_FrequencyRadio) ?? []; } get frequency () { const checkedRadio = this.Options.find(({ radio }) => radio.checked); if (checkedRadio) { // active button was found in the gift array return checkedRadio.value; } else { return undefined; } } set frequency (newFrequency) { const matchingRadio = this.Options.find(({ value }) => value === newFrequency); if (matchingRadio) { matchingRadio.click(); } else { console.warn("Invalid frequency: ", newFrequency); } } addEventListener (eventType, eventHandlerCallback) { this.Options.forEach((option) => option.addEventListener(eventType, eventHandlerCallback)); } } class NextAfterDonationMicrosite_FrequencyTab { constructor (element) { if (!(element instanceof HTMLElement)) throw new TypeError("Argument 0 must be an instance of HTMLElement."); this.element = element; } get text () { return this.element.textContent; } set text (newText) { this.element.textContent = newText; } click () { this.element.click(); } addEventListener (eventType, eventHandlerCallback) { this.radio.addEventListener(eventType, eventHandlerCallback); } } class NextAfterDonationMicrosite_FrequencyTabs extends Array { constructor (items) { if (!Array.isArray(items) && items.length === 0) { throw !Array.isArray(items) ? new TypeError("FrequencyTabs: Arugment 1 is not an instance of Array:" + items.join(', ')) : new RangeError("FrequencyTabs: Arugment 1 is not an instance of Array with a length greater than 0:" + items.join(', ')); } if (items.every((item) => item instanceof NextAfterDonationMicrosite_FrequencyTab)) { items = items; } else if (items.every((item) => item instanceof HTMLElement)) { items = items.map((item) => new NextAfterDonationMicrosite_FrequencyTab(item) ?? undefined); } else { throw new Error("FrequencyTabs: Arugment 1 is not of type HTMLElement[], or FrequencyTab[]:" + items.join(', ')); } super(...items); this.Buttons = items.filter((item) => item instanceof NextAfterDonationMicrosite_FrequencyTab) ?? []; } select (value) { const matchingTab = this.Buttons.find(({ text }) => text.match(value) || text.includes(value)); if (matchingTab) { matchingTab.click(); } else { console.warn("Invalid value: ", value); } } addEventListener (eventType, eventHandlerCallback) { this.Buttons.forEach((option) => option.addEventListener(eventType, eventHandlerCallback)); } } // const lockedProperty = { writable: false, configurable: false, enumerable: true }; function DonationFormAPI (elements, options = {}) { const defaultOptions = { min: 1.00, max: 999999.99, makeTabbed: false, fakeSubmit: true, overrideGiftArrayValues: false, }; options = { ...defaultOptions, ...options }; // const { recurringOptions, amountButtons, submitButton, root } = elements; const debug = { log: (...args) => window.NA.DonationForm.DEBUG_MODE && console.log(...args), info: (...args) => window.NA.DonationForm.DEBUG_MODE && console.log(...args), warn: (...args) => window.NA.DonationForm.DEBUG_MODE && console.log(...args), error: (...args) => window.NA.DonationForm.DEBUG_MODE && console.log(...args), }; // const api = new Object(); Object.defineProperty(api, 'root', { value: root, writable: false, configurable: true, enumerable: true, }); Object.defineProperties(api, { FORM_MINIMUM: { // constant value: options.min || 0, ...lockedProperty }, FORM_MAXIMUM: { // constant value: options.max || Infinity, ...lockedProperty }, }); Object.defineProperties(api, { GiftArray: { // variable value: new NextAfterDonationMicrosite_GiftArray(amountButtons), writable: false, configurable: true, enumerable: true, }, Frequency: { // variable value: Array.isArray(recurringOptions) ? new NextAfterDonationMicrosite_FrequencyArray(recurringOptions) : new NextAfterDonationMicrosite_FrequencyToggle(recurringOptions), writable: false, configurable: true, enumerable: true, }, SubmitButton: { // variable value: submitButton, writable: false, configurable: false, enumerable: true, } }); if (elements.tabs && Array.isArray(elements.tabs) && elements.tabs.length >= 2 && elements.tabs.every((item) => item instanceof HTMLElement)) { Object.defineProperty(api, 'Tabs', { value: new NextAfterDonationMicrosite_FrequencyTabs(elements.tabs), writable: false, configurable: true, enumerable: true, }); } Object.defineProperties(api, { getFrequency: { // function value: async function () { if (!this || this === null) throw new Error("validate: Unable to read API context."); /*if (this.Tabs && this.Tabs instanceof NextAfterDonationMicrosite_FrequencyTabs) { // tabs } else*/ if (this.Frequency instanceof NextAfterDonationMicrosite_FrequencyArray) { // radios return new Promise((resolve, reject) => { try { resolve(this.Frequency.frequency); } catch (error) { reject(error); } }); } else if (this.Frequency instanceof NextAfterDonationMicrosite_FrequencyToggle) { // checkbox return new Promise((resolve, reject) => { try { resolve(this.Frequency.frequency); } catch (error) { reject(error); } }); } }, ...lockedProperty }, setFrequency: { // function value: async function (frequency) { if (!this || this === null) throw new Error("validate: Unable to read API context."); if (this.Frequency instanceof NextAfterDonationMicrosite_FrequencyArray) { // radios if (this.Tabs && this.Tabs instanceof NextAfterDonationMicrosite_FrequencyTabs) { // tabs let index = this.Frequency.Options.findIndex(({ value }) => value.trim().match(new RegExp(frequency, 'i')) || value.trim().includes(frequency)) ?? -1; if (index > -1 && index < this.Tabs.Buttons.length) { this.Tabs.Buttons[index]?.click(); } else { this.Tabs.select(frequency); } } return new Promise(async (resolve, reject) => { try { this.Frequency.frequency = frequency; if (await this.getFrequency() === frequency) resolve(frequency); } catch (error) { reject(error); } }); } if (this.Frequency instanceof NextAfterDonationMicrosite_FrequencyToggle) { // checkbox if (this.Tabs && this.Tabs instanceof NextAfterDonationMicrosite_FrequencyTabs) { // tabs let index = this.Frequency.Options.findIndex(({ value }) => value.trim().match(new RegExp(frequency, 'i')) || value.trim().includes(frequency)) ?? -1; if (index > -1 && index < this.Tabs.Buttons.length) { this.Tabs.Buttons[index]?.click(); } else { this.Tabs.select(frequency); } } return new Promise(async (resolve, reject) => { try { this.Frequency.frequency = frequency; if (await this.getFrequency() === frequency) resolve(frequency); } catch (error) { reject(error); } }); } }, ...lockedProperty }, getAmount: { // function value: async function () { if (!this || this === null) throw new Error("validate: Unable to read API context."); return new Promise((resolve, reject) => { try { resolve(this.GiftArray.amount); } catch (error) { reject(error); } }); }, ...lockedProperty }, setAmount: { // function value: async function (amount, frequency = undefined) { if (!this || this === null) throw new Error("validate: Unable to read API context."); return new Promise(async (resolve, reject) => { try { this.GiftArray.amount = amount; if (await this.getAmount() === amount) resolve(amount); } catch (error) { reject(error); } }); }, ...lockedProperty }, getRecurring: { // function value: async function () { if (!this || this === null) throw new Error("validate: Unable to read API context."); return new Promise((resolve, reject) => { try { resolve(this.Frequency.recurring); } catch (error) { reject(error); } }); }, ...lockedProperty }, setRecurring: { // function value: async function (bool) { if (!this || this === null) throw new Error("validate: Unable to read API context."); return new Promise(async (resolve, reject) => { try { this.Frequency.frequency = bool ? true : false; if (await this.getRecurring() === bool) resolve(bool); } catch (error) { reject(error); } }); }, ...lockedProperty }, freqency: { get () { return this.getFrequency() }, set (value) { this.setFrequency(value) }, enumerable: true, configurable: true, }, amount: { get () { return this.getAmount() }, set (value) { this.setAmount(value) }, enumerable: true, configurable: true, }, recurring: { get () { return this.getRecurring() }, set (value) { this.setRecurring(value) }, enumerable: true, configurable: true, }, }); Object.defineProperties(api, { submit: { // function value: async function (condition = this.validate||function(){return true}) { //this.hooks['onBeforeSubmit'].forEach((callback) => callback.call(this)); let result; const isAsyncFunction = (func) => func.constructor.name === "AsyncFunction"; if (Array.isArray(condition)) { if (condition.every((c) => typeof c === 'function' && isAsyncFunction(c))) { result = await Promise.all(condition.map(async (c) => await c.call(this))); } else if (condition.every((c) => typeof c === 'function')) { result = condition.every((c) => c.call(this)); } else if (condition.every((c) => c === true || c === false)) { result = condition.every((c) => c); } } else if (typeof condition === 'function' && isAsyncFunction(condition)) { result = await condition.call(this); } else if (typeof condition === 'function') { result = condition.call(this); } else if (condition === true || condition === false) { result = condition; } else { console.error("Unknown error."); debugger; } // if (result === true) { if (window.NA.DonationForm.hasOwnProperty("DEBUG_MODE") && window.NA.DonationForm["DEBUG_MODE"] == true) return console.log("Submit aborted (debug mode is enabled)."); this.SubmitButton.click(), this.hooks['onSubmit'].forEach((callback) => callback.call(this)); //this.hooks['onAfterSubmit'].forEach((callback) => callback.call(this)); } else { return console.log("Submit failed (conditions did not evaluate to true)."); } }, ...lockedProperty }, interceptSubmit: { // function value: function (handleInterceptedSubmit = () => { return new Promise((resolve) => resolve(undefined)) }) { try { window.NA.DonationForm.SubmitButtonCopy = window.NA.DonationForm.SubmitButtonCopy || createNewSubmitButton(window.NA.DonationForm.SubmitButton, { cloneOriginal: false, hideOriginal: true, observeOriginal: false }); window.NA.DonationForm.SubmitButtonCopy.addEventListener('click', async (event) => { event.preventDefault(), event.stopPropagation(); const shouldRetryInterrupterAfterFailedSubmit = false; const shouldFormSubmit = await handleInterceptedSubmit.call(this, event); if (shouldFormSubmit) { console.info("Submit allowed by initial interceptSubmit callback function resulting in a truthy evaluation."); const formIsValid = await window.NA.DonationForm.validate(); if (!formIsValid) { // if the the form SHOULD submit (based on handleInterceptedSubmit return value) and if the form IS NOT valid (there are known errors in the form found by calling the form API's validate function) console.warn("Form has known errors. Attempting to submit to show errors then retrying."); console.log("Submitting..."); window.NA.DonationForm.submit(true); // submit anyway to trigger the error to be shown if (shouldRetryInterrupterAfterFailedSubmit) { // if true, the fake button that will intercept submit will be shown again after a failed submit, otherwise it will show the original to ensure it submits the next time window.NA.DonationForm.SubmitButton.style.setProperty("display", "none"), debug.info("SubmitButton hidden."); // hide the original submit button again // window.NA.DonationForm.SubmitButtonCopy.style.setProperty("display", "none"), debug.info("SubmitButtonCopy hidden."); // hide the copy of the submit button again window.NA.DonationForm.SubmitButtonCopy.style.removeProperty("display"), debug.info("SubmitButtonCopy unhidden."); // show the copy of the submit button } else { window.NA.DonationForm.SubmitButtonCopy.style.setProperty("display", "none"), debug.info("SubmitButtonCopy hidden."); // hide the copy of the submit button again // window.NA.DonationForm.SubmitButton.style.setProperty("display", "none"), debug.info("SubmitButton hidden."); // hide the copy of the submit button again window.NA.DonationForm.SubmitButton.style.removeProperty("display"), debug.info("SubmitButton unhidden."); // hide the original submit button again } } else { // if the the form SHOULD submit (based on handleInterceptedSubmit return value) and if the form IS valid console.log("Submitting..."); window.NA.DonationForm.submit(true); } } else { // if the form SHOULD NOT submit (based on handleInterceptedSubmit return value) -- usually means show donation interrupter after preventing submit action console.log("Submit prevented."), console.info("Next submit will be allowed."); window.NA.DonationForm.SubmitButton.style.removeProperty("display"), debug.info("SubmitButton unhidden."); // show the original submit button so that if something goes wrong the user can still click the submit button window.NA.DonationForm.SubmitButtonCopy.style.setProperty("display", "none"), debug.info("SubmitButtonCopy hidden."); // hide the copy of the submit button that intercepts submit attempts so that there aren't two buttons } }); console.log("Submit intercept added.\nButton:", window.NA.DonationForm.SubmitButtonCopy); } catch (error) { console.error("Failed to add submit intercept:", error); } }, ...lockedProperty }, validate: { // function value: async function (root = undefined) { if (!this || this === null) throw new Error("validate: Unable to read API context."); root = root || this.root; const flattenArray = (array) => array.reduce((flat, toFlatten) => flat.concat(Array.isArray(toFlatten) ? flattenArray(toFlatten) : toFlatten), []); try { const isRecurring = await this.getFrequency(), amount = await this.getAmount(); if (isRecurring === null || isRecurring === undefined) return false; if (!amount) return false; if (amount < this.FORM_MINIMUM || amount > this.FORM_MAXIMUM) return console.error("validate:", "Gift amount is invalid:", amount), false; const chosenPaymentMethod = root.querySelector('.payment-option-holder .active')?.textContent.trim(); const requiredFields = Array.from(root.querySelectorAll('input[required]')) const valid = requiredFields.every((input) => { const type = input.tagName.toLowerCase() === 'select' ? 'select' : input.type; const { name, value, id } = input; //console.log(type, name, value); if (input.classList.contains('stripe-donation-card-number')) { // if the required input is the CC field AND the selected payment is CC if (chosenPaymentMethod == 'Credit Card') { if (input.value.trim().length === 16) // if the card number is 16 digits return true; // mark as valid return false; } else { // CC isn't even selected so don't even need to validate it return true; } } if (input.classList.contains('stripe-donation-routing-number') || input.classList.contains('stripe-donation-account-number') || input.classList.contains('stripe-donation-account-number-check')) { // if the required input is the CC field AND the selected payment is CC if (chosenPaymentMethod == 'Bank Account') { const trimmedValue = input.value.trim(); if (input.classList.contains('stripe-donation-routing-number')) { // routing number if (trimmedValue.length === 9) // if the routing number is 9 digits return true; // mark as valid return false; } else { // account number if (trimmedValue.length >= 8 && trimmedValue.length <= 17) // if the routing number is 9 digits return true; // mark as valid return false; } } else { // ACH isn't even selected so don't even need to validate it return true; } } switch (type) { case 'email': const emailRegex = /^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/; if (!emailRegex.test(value)) return console.error("validate:", name+':', "Email address is invalid.\n", input, value), false; return true; case 'tel': if (!value || value.length < 10) return console.error("validate:", name+':', "Phone number is invalid.\n", input, value), false; return true; case 'select': case 'radio': case 'text': if (!value || value.length === 0) return console.error("validate:", name+':', "Field is invalid.\n", input, value), false; return true; default: debug.log("default"); return true; } /*if (!value || value.length === 0) return false;*/ }); return valid; } catch (error) { console.error(error); return false; } }, ...lockedProperty }, DonationInterrupter: { value: { init: initDonationInterrupter.bind(api) }, enumerable: true, configurable: true, writable: true, } }); initHooks(api, ['onFrequencyChange', 'onAmountChange', 'onTrySubmit', 'onSubmit']); api.Frequency.addEventListener('change', (event) => { if (event.target.checked) { api.hooks['onFrequencyChange'].forEach((callback) => { callback.call(api, event.target.value); }); } }); api.GiftArray.addEventListeners('change', (event) => { if (event.target.checked) { api.hooks['onAmountChange'].forEach((callback) => { callback.call(api, event.target.value); }); } }); api.SubmitButton.addEventListener('click', (event) => { api.hooks['onTrySubmit'].forEach((callback) => callback.call(api, event)); }); api.root.addEventListener('submit', (event) => { api.hooks['onSubmit'].forEach((callback) => callback.call(api, event)); }); if (options.makeTabbed) api.makeTabbed(); /*if (options.fakeSubmit) window.NA.DonationForm.SubmitButtonCopy = window.NA.DonationForm.SubmitButtonCopy || createNewSubmitButton(window.NA.DonationForm.SubmitButton, { cloneOriginal: false, hideOriginal: true, observeOriginal: false });*/ return api; } function createNewSubmitButton (originalSubmitButton = window.NA.DonationForm.SubmitButton, options = {}) { const defaultOptions = { cloneOriginal: true, hideOriginal: true, observeOriginal: true, }; options = { ...defaultOptions, ...options }; const newSubmitButton = document.createElement('button'); newSubmitButton.id = "submit-button-copy"; newSubmitButton.classList.add(...originalSubmitButton.classList.values()); newSubmitButton.textContent = originalSubmitButton.value; originalSubmitButton.after(newSubmitButton); options.hideOriginal && originalSubmitButton.style.setProperty("display", "none"); return newSubmitButton; } function initHooks (api, hookNames = []) { const hooks = Object.fromEntries(hookNames.map((hookName) => ([hookName, new Array()]))); Object.defineProperty(api, 'hooks', { value: hooks, ...lockedProperty }); } function initDonationInterrupter (options = {}) { const getExpId = (matching = /Donation Interrupter/) => { let experiments = window._vwo_exp; experiments = Object.entries(window._vwo_exp); let id = experiments.find(([id, data]) => { const name = data.name, status = data.status, variation = data.hasOwnProperty('combination_chosen') ? data.combination_chosen : null; return variation && status === 'RUNNING' && name.match(matching); })[1]?.id; return id; }; const getExpVariation = (id) => { let experiment = window._vwo_exp[id]; return experiment.combination_chosen || experiment.combination_selected; }; const defaultOptions = { id: [ 'VWO', getExpId(), getExpVariation(getExpId()) ].join('-'), tokenName: ("NA__THF_DonationInterrupter:" + [ 'VWO', getExpId(), getExpVariation(getExpId()) ].join('-')), min: 10, max: 100, askAmount: (originalAmount) => { if (originalAmount > 500) // $500+ return false; // don't show if (originalAmount >= 400) // $400-$500 return 50; if (originalAmount >= 300) // $300-$399 return 40; if (originalAmount >= 200) // $200-$299 return 30; if (originalAmount >= 100) // $100-$199 return 15; if (originalAmount < 100) // $100- return 10; return false; }, askFrequency: (originalFrequency) => { return true; }, popupHTML: { headingHTML: (` `), bodyHTML: (` `), footerHTML: (``), }, countdownSeconds: null, }; options = { ...defaultOptions, ...options }; console.log("Initializing donation interrupter."); return new Promise((resolve, reject) => { try { const dialogElement = document.createElement('dialog'); dialogElement.id = options.id; dialogElement.classList.add("popup", "donation-interrupter", "NA"); dialogElement.innerHTML = `
${options.popupHTML.headingHTML} ${options.popupHTML.bodyHTML} ${options.popupHTML.footerHTML}
`; document.body.appendChild(dialogElement); // // const api = new Object({ askAmount: options.askAmount, askFrequency: options.askFrequency, }); Object.defineProperties(api, { id: { value: options.id, writable: false, enumerable: true, configurable: false, }, tokenName: { value: options.tokenName, writable: false, enumerable: true, configurable: false, }, Dialog: { value: dialogElement, writable: false, enumerable: true, configurable: true, }, show: { value: function () { this.update(), this.Dialog.showModal(), // vwoCustomEvent(`${this.id}:DonationInterrupter:shown`); vwoDonationInterrupter2(this.id, 'shown'); this.storedState.updateTokenProperty("lastShown", getCurrentDate()); this.hooks['onShow'].forEach((callback) => callback.call(this)); }, ...lockedProperty }, hide: { value: function () { this.Dialog.close(), this.hooks['onHide'].forEach((callback) => callback.call(this)); }, ...lockedProperty }, update: { value: function () { this.Dialog.dispatchEvent(new CustomEvent('update'), { bubbles: false }); }, ...lockedProperty }, autoSubmitCountdownSeconds: { value: options.countdownSeconds ?? null, writable: true, configurable: true, enumerable: true, } }); Object.defineProperty(api, 'storedState', { value: { storageApi: localStorage, getToken: (function () { const tokenName = this.tokenName, storageApi = this.storedState.storageApi; return JSON.parse(storageApi.getItem(tokenName)) || null; }).bind(api), setToken: (function (tokenValue) { const tokenName = this.tokenName, storageApi = this.storedState.storageApi; return storageApi.setItem(tokenName, JSON.stringify(tokenValue)); }).bind(api), updateTokenProperty: (function (tokenPropertyName, tokenPropertyValue) { let state = this.storedState.getToken() || {}; state[tokenPropertyName] = tokenPropertyValue; this.storedState.setToken(state); return (this.storedState.getToken() || {})[tokenPropertyName] || undefined; }).bind(api), } }); initHooks(api, ['onShow', 'onHide', 'onUpdate', 'onYes', 'onNo']); // const abortCountdown = (function () { if (this.SubmitCountdown) { this.SubmitCountdown.callbacks.onEnd = []; this.SubmitCountdown.finish(); console.log("Countdown cancelled."); } }).bind(api); const handleYes = (async function () { // vwoCustomEvent(`${this.id}:DonationInterrupter:yes`); vwoDonationInterrupter2(this.id, 'yes'); const currentAmount = await window.NA.DonationForm.getAmount(), currentFrequency = await window.NA.DonationForm.getFrequency(); const catchAsyncError = (error) => { console.error("An error occured:", error); debugger; this.hide(); }; abortCountdown(); window.NA.DonationForm.setFrequency(this.askFrequency(currentFrequency)).then((frequency) => { console.log("Updated frequency:", frequency); window.NA.DonationForm.setAmount(this.askAmount(currentAmount)).then((amount) => { console.log("Updated amount:", amount); setTimeout(() => { console.log("Submitting..."); try { window.NA.DonationForm.submit(); } catch (error) { vwoDonationInterrupter2(this.id, 'error'); console.error("🛑 " + "Error when submitting."); } finally { this.hide(); } }, 100); }).catch(catchAsyncError); }).catch(catchAsyncError); this.storedState.updateTokenProperty("lastConverted", getCurrentDate()); }).bind(api); const handleNo = (function () { // vwoCustomEvent(`${this.id}:DonationInterrupter:no`); vwoDonationInterrupter2(this.id, 'no'); abortCountdown(); setTimeout(() => { console.log("Submitting..."); try { window.NA.DonationForm.submit(); } catch (error) { vwoDonationInterrupter2(this.id, 'error'); console.error("🛑 " + "Error when submitting."); } finally { this.hide(); } }, 100); this.storedState.updateTokenProperty("lastDismissed", getCurrentDate()); }).bind(api); const handleCancel = (function () { // vwoDonationInterrupter2(this.id, 'cancel'); abortCountdown(); this.hide(); this.storedState.updateTokenProperty("lastDismissed", getCurrentDate()); }).bind(api); // function handleDialogUpdate (event) { // update dynamic text in the dialog Array.from(this.Dialog.querySelectorAll('[data-value]')).forEach(async (el) => { const attributeValue = el.getAttribute('data-value'); const currentAmount = await window.NA.DonationForm.getAmount(), currentFrequency = await window.NA.DonationForm.getFrequency(); if (attributeValue.match("askAmount")) { el.textContent = this.askAmount(currentAmount); } else if (attributeValue.match("askFrequency")) { el.textContent = this.askFrequency(currentFrequency) === true ? "monthly" : "one-time"; } else if (attributeValue.match("originalAmount") || attributeValue.match("amount")) { el.textContent = currentAmount; } else if (attributeValue.match("originalFrequency") || attributeValue.match("frequency")) { el.textContent = currentFrequency === true ? "monthly" : "one-time"; } }); // const countdownTimerElement = this.Dialog.querySelector('.countdown-timer') || null; if (countdownTimerElement && this.autoSubmitCountdownSeconds && this.autoSubmitCountdownSeconds > 0) { let newEndDateTimeString = new Date((new Date).getTime() + ((this.autoSubmitCountdownSeconds + 1) * 1000)).toISOString();//.split('.')[0]; countdownTimerElement.setAttribute("data-endDateTime", newEndDateTimeString), console.log("Countdown timer expiration set:", newEndDateTimeString); this.SubmitCountdown = initCountdown(countdownTimerElement, function onCountdownEnd (element) { console.log("Countdown expired!"); handleNo(); }); } // this.hooks['onUpdate'].forEach((callback) => callback.call(this)); } api.Dialog.addEventListener('update', handleDialogUpdate.bind(api)); // async function handleDialogButtonClick (event) { event.preventDefault(); if (event.target.hasAttribute('data-action')) { if (event.target.getAttribute('data-action').match("yes")) { await handleYes.call(this); this.hooks['onYes'].forEach((callback) => callback.call(this)); } if (event.target.getAttribute('data-action').match("no")) { await handleNo.call(this); this.hooks['onNo'].forEach((callback) => callback.call(this)); } } } Array.from(api.Dialog.querySelectorAll('.popup__actions button')).forEach((button) => button.addEventListener('click', handleDialogButtonClick.bind(api))); // if (api.Dialog.querySelector('.btn-dismiss')) api.Dialog.querySelector('.btn-dismiss').onclick = handleCancel; window.NA.DonationForm.DonationInterrupter = api; // function initCountdown (element, callback = (element) => {}) { const countdownTarget = element; if (countdownTarget && countdownTarget.getAttribute("data-endDateTime")) { const handleCountdownTimeChange = async function (element) { console.log(`Countdown: auto-submitting original $${await window.NA.DonationForm.getAmount()} donation in`, this.data.seconds, "seconds...") }; try { const countdownEndDateTime = new Date(countdownTarget.getAttribute("data-endDateTime")); const countdownTimer = new SortOfSimpleCountdownTimer(countdownEndDateTime, undefined, { onEnd: callback, onChange: handleCountdownTimeChange }); countdownTarget.append(countdownTimer.element); return countdownTimer; } catch (error) { countdownTarget.style.setProperty("display", "none"); console.error(error); } } } async function shouldDonationInterrupterShow () { return new Promise(async (resolve, reject) => { const shouldSubmit = true, shouldNotSubmit = false; const shouldShow = () => { this.show(), resolve(shouldNotSubmit) }, shouldNotShow = () => resolve(shouldSubmit); try { const formIsValid = await window.NA.DonationForm.validate(); if (!formIsValid) return console.log("🟠 One or more donation form fields are invalid; donation interrupter will not be shown."), shouldNotShow(); const currentFrequency = await window.NA.DonationForm.getFrequency(), currentAmount = await window.NA.DonationForm.getAmount(), askFrequency = this.askFrequency(currentFrequency), askAmount = this.askAmount(currentAmount); if (currentFrequency === undefined || currentFrequency === null || askFrequency == currentFrequency) return console.log("🟠 Ask frequency returned undefined or null; donation interrupter will not be shown."), shouldNotShow(); if (askAmount == false || askAmount <= 0) return console.log("🟠 Ask amount returned undefined, null, false, or invalid; donation interrupter will not be shown."), shouldNotShow(); } catch (error) { return console.error("🔴 " + error), shouldNotShow(); } try { /// Summary: shows when not seen before at all, or if seen and dismissed on a day that is not the current day (e.g. yesterday) const storedState = this.storedState.getToken(); if (!storedState || !storedState.hasOwnProperty("lastShown")) { // has not been seen before; first time return console.log("🟢 Donation interrupter not seen yet; donation interrupter will be shown."), shouldShow(); } else { // returning visitors if (storedState.hasOwnProperty("lastConverted")) { // the user has converted from the popup before return console.log("🟡 Already converted; donation interrupter will not be shown."), shouldNotShow(); } else if (storedState.hasOwnProperty("lastDismissed") && storedState['lastDismissed'] !== getCurrentDate()) { // if the popup has been dismissed before but the last time it was dismissed is NOT today return console.log("🟢 Donation interrupter dismissed, but not today; donation interrupter will be shown."), shouldShow(); } else { return console.log("🟡 Donation interrupter already seen and/or dismissed today; donation interrupter will not be shown."), shouldNotShow(); } } } catch (error) { return console.error("🔴 " + error), shouldNotShow(); } }); } window.NA.DonationForm.interceptSubmit(shouldDonationInterrupterShow.bind(api)); resolve(api); } catch (error) { console.error(error); } }); } window.NA = window.NA || {}; window.NA.DonationForm = window.NA.DonationForm || {}; window.NA.DonationForm.init = async function init () { console.log("Initializing donation form API. Waiting for required elements...."); return new Promise((resolve, reject) => { const asyncWaitForElement=async function(e,r=100,t=1e4){r=Number.isInteger(r)&&r>0&&r<=100?r:parseInt(r);let n="Array";if("NaN"==r)return console.error("Invalid refresh interval:",r);Array.isArray(e)||"string"!=typeof e||(n="string",e=[e]);let l=e=>document.querySelector(e),i=e=>e.every(e=>!!l(e));return new Promise((R,a)=>{let m=(e,r=null)=>(r&&clearInterval(r),R("Array"==n||e.length>1?e.map(e=>l(e)):l(e[0]))),o=n=>{console.error(`${n.name}: ${n.message}`);let l=()=>asyncWaitForElement(e,r=100,t=1e4);return a(n,l)};try{if(i(e))return m(e);let s=setInterval(()=>{if(i(e))return m(e,s)},1e3/r);setTimeout(()=>{try{if(!i(e)){clearInterval(s);let r=Error(`Failed to find matching elements within ${t}ms`);throw r.name="Timed Out",r}}catch(n){return o(n)}},t)}catch(u){return o(u)}})}; asyncWaitForElement([ '.stripe-donation-form, .donation-form', '.stripe-donation-form .amt-holder, .donation-form .gift-array', '.stripe-donation-form .amt-holder, .donation-form .gift-frequency', '.stripe-donation-form input[type="submit"], .donation-form #btnSubmit' ]).then(([ form, formAmountSection, formFrequencySection, formSubmitButton ]) => { const recurringCheckbox = formAmountSection.querySelector('#recurring, input[name="DonationFrequency"][value="Recurring"]') ?? null; const recurringRadios = formFrequencySection.querySelectorAll('input[name="DonationFrequency"]').length > 0 ? [...formFrequencySection.querySelectorAll('input[name="DonationFrequency"]')] : null; const amountButtons = formAmountSection.querySelectorAll('.amt-button, .stripe-donation-other-amt, .option, .option-other-text'); // gift array buttons and other amount input !formSubmitButton.classList.contains("submit-button") && formSubmitButton.classList.add("submit-button"); const tabs = document.querySelector('.tabs') ? [...document.querySelectorAll('.tabs a')] : undefined; const api = DonationFormAPI({ root: form, recurringOptions: recurringCheckbox || recurringRadios, amountButtons: [...amountButtons], submitButton: formSubmitButton, tabs: tabs, }); window.NA.DonationForm = { ...window.NA.DonationForm, ...api }; resolve(window.NA.DonationForm); }).catch((error) => reject(error)); }); }; }catch(e) {VWO._.vAEH(e);} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}},rules:[{"triggers":["9591582"],"tags":[{"id":"sampleVisitor","data":{"priority":2,"samplingRate":0}}]},{"triggers":["13865307"],"tags":[{"data":{"campaigns":[{"c":177,"g":3}],"type":"g"},"metricId":0,"id":"metric"}]},{"triggers":["13391538"],"tags":[{"id":"sampleVisitor","data":{"priority":1,"samplingRate":-2}}]},{"triggers":["1895897"],"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.177"},{"priority":4,"id":"runCampaign","data":"campaigns.176"}]},{"triggers":["13612644"],"tags":[{"data":{"campaigns":[{"c":187,"g":11}],"type":"g"},"metricId":0,"id":"metric"}]},{"triggers":["13865310"],"tags":[{"data":{"campaigns":[{"c":177,"g":4}],"type":"g"},"metricId":0,"id":"metric"}]},{"triggers":["13865268"],"tags":[{"data":{"campaigns":[{"c":176,"g":3}],"type":"g"},"metricId":0,"id":"metric"}]},{"triggers":["13865409"],"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.183"}]},{"triggers":["13865271"],"tags":[{"data":{"campaigns":[{"c":176,"g":4}],"type":"g"},"metricId":0,"id":"metric"}]},{"triggers":["13612542"],"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.187"}]},{"triggers":["13391544"],"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.3"}]},{"triggers":["1520996"],"tags":[{"data":{"campaigns":[{"c":177,"g":6}],"type":"m"},"metricId":208693,"id":"metric"},{"data":{"campaigns":[{"c":176,"g":6}],"type":"m"},"metricId":208693,"id":"metric"},{"data":{"campaigns":[{"c":183,"g":6}],"type":"m"},"metricId":208693,"id":"metric"}]},{"triggers":["1520999"],"tags":[{"data":{"campaigns":[{"c":177,"g":5}],"type":"m"},"metricId":208690,"id":"metric"},{"data":{"campaigns":[{"c":176,"g":5}],"type":"m"},"metricId":208690,"id":"metric"},{"data":{"campaigns":[{"c":183,"g":5}],"type":"m"},"metricId":208690,"id":"metric"}]},{"triggers":["1327296"],"tags":[{"data":{"campaigns":[{"c":177,"g":2}],"type":"m"},"metricId":171541,"id":"metric"},{"data":{"campaigns":[{"c":176,"g":2}],"type":"m"},"metricId":171541,"id":"metric"},{"data":{"campaigns":[{"c":183,"g":2}],"type":"m"},"metricId":171541,"id":"metric"}]},{"triggers":["13391556"],"tags":[{"priority":4,"id":"runCampaign","data":"campaigns.2"}]},{"triggers":["1327293"],"tags":[{"data":{"campaigns":[{"c":177,"g":1}],"type":"m"},"metricId":171544,"id":"metric"},{"data":{"campaigns":[{"c":176,"g":1}],"type":"m"},"metricId":171544,"id":"metric"},{"data":{"campaigns":[{"c":183,"g":1}],"type":"m"},"metricId":171544,"id":"metric"}]},{"triggers":["5"],"tags":[{"id":"checkEnvironment"}]},{"triggers":["8"],"tags":[{"priority":3,"id":"prePostMutation"},{"priority":2,"id":"groupCampaigns"}]},{"triggers":["9"],"tags":[{"priority":2,"id":"visibilityService"}]},{"triggers":["2"],"tags":[{"id":"runTestCampaign"}]},{"triggers":["75"],"tags":[{"id":"urlChange"}]}],pages:{"ec":[{"1674516":{"inc":["o",["url","urlReg","(?i).*"]]}},{"2223906":{"inc":["o",["url","urlReg","(?i).*https?\\:\\\/\\\/(w{3}\\.)?donate\\.familylife\\.com.*"],["url","urlReg","(?i).*https?\\:\\\/\\\/(w{3}\\.)?familylife\\.com\\\/weekend\\-to\\-remember.*"],["url","urlReg","(?i).*https?\\:\\\/\\\/(w{3}\\.)?shop\\.familylife\\.com.*"],["url","urlReg","(?i).*https?\\:\\\/\\\/(w{3}\\.)?familylife\\.com\\\/familylife\\-equip.*"]]}}]},pagesEval:{"ec":[1674516,2223906]},stags:{}}})(); ;;var commonWrapper=function(argument){if(!argument){argument={valuesGetter:function(){return{}},valuesSetter:function(){},verifyData:function(){return{}}}}const getVisitorUuid=function(){if(window._vwo_acc_id>=1037725){return window.VWO&&window.VWO.get("visitor.id")}else{return window.VWO._&&window.VWO._.cookies&&window.VWO._.cookies.get("_vwo_uuid")}};var pollInterval=100;var timeout=6e4;return function(){var accountIntegrationSettings={};var _interval=null;function waitForAnalyticsVariables(){try{accountIntegrationSettings=argument.valuesGetter();accountIntegrationSettings.visitorUuid=getVisitorUuid()}catch(error){accountIntegrationSettings=undefined}if(accountIntegrationSettings&&argument.verifyData(accountIntegrationSettings)){argument.valuesSetter(accountIntegrationSettings);return 1}return 0}var currentTime=0;_interval=setInterval((function(){currentTime=currentTime||performance.now();var result=waitForAnalyticsVariables();if(result||performance.now()-currentTime>=timeout){clearInterval(_interval)}}),pollInterval)}}; commonWrapper({valuesGetter:function(){return {"ga4s":0}},valuesSetter:function(data){var singleCall=data["ga4s"]||0;if(singleCall){window.sessionStorage.setItem("vwo-ga4-singlecall",true)}var ga4_device_id="";if(typeof window.VWO._.cookies!=="undefined"){ga4_device_id=window.VWO._.cookies.get("_ga")||""}if(ga4_device_id){window.vwo_ga4_uuid=ga4_device_id.split(".").slice(-2).join(".")}},verifyData:function(data){if(typeof window.VWO._.cookies!=="undefined"){return window.VWO._.cookies.get("_ga")||""}else{return false}}})(); var pushBasedCommonWrapper=function(argument){var firedCamp={};if(!argument){argument={integrationName:"",getExperimentList:function(){},accountSettings:function(){},pushData:function(){}}}return function(){window.VWO=window.VWO||[];const getVisitorUuid=function(){if(window._vwo_acc_id>=1037725){return window.VWO&&window.VWO.get("visitor.id")}else{return window.VWO._&&window.VWO._.cookies&&window.VWO._.cookies.get("_vwo_uuid")}};var sendDebugLogsOld=function(expId,variationId,errorType,user_type,data){try{var errorPayload={f:argument["integrationName"]||"",a:window._vwo_acc_id,url:window.location.href,exp:expId,v:variationId,vwo_uuid:getVisitorUuid(),user_type:user_type};if(errorType=="initIntegrationCallback"){errorPayload["log_type"]="initIntegrationCallback";errorPayload["data"]=JSON.stringify(data||"")}else if(errorType=="timeout"){errorPayload["timeout"]=true}if(window.VWO._.customError){window.VWO._.customError({msg:"integration debug",url:window.location.href,lineno:"",colno:"",source:JSON.stringify(errorPayload)})}}catch(e){window.VWO._.customError&&window.VWO._.customError({msg:"integration debug failed",url:"",lineno:"",colno:"",source:""})}};var sendDebugLogs=function(expId,variationId,errorType,user_type){var eventName="vwo_debugLogs";var eventPayload={};try{eventPayload={intName:argument["integrationName"]||"",varId:variationId,expId:expId,type:errorType,vwo_uuid:getVisitorUuid(),user_type:user_type};if(window.VWO._.event){window.VWO._.event(eventName,eventPayload,{enableLogs:1})}}catch(e){eventPayload={msg:"integration event log failed",url:window.location.href};window.VWO._.event&&window.VWO._.event(eventName,eventPayload)}};const callbackFn=function(data){if(!data)return;var expId=data[1],variationId=data[2],repeated=data[0],singleCall=0,debug=0;var experimentList=argument.getExperimentList();var integrationName=argument["integrationName"]||"vwo";if(typeof argument.accountSettings==="function"){var accountSettings=argument.accountSettings();if(accountSettings){singleCall=accountSettings["singleCall"];debug=accountSettings["debug"]}}if(debug){sendDebugLogs(expId,variationId,"intCallTriggered",repeated)}if(singleCall&&(repeated==="vS"||repeated==="vSS")||firedCamp[expId]){return}window.expList=window.expList||{};var expList=window.expList[integrationName]=window.expList[integrationName]||[];if(expId&&variationId&&["VISUAL_AB","VISUAL","SPLIT_URL"].indexOf(_vwo_exp[expId].type)>-1){if(experimentList.indexOf(+expId)!==-1){firedCamp[expId]=variationId;var visitorUuid=getVisitorUuid();var pollInterval=100;var currentTime=0;var timeout=6e4;var user_type=_vwo_exp[expId].exec?"vwo-retry":"vwo-new";var interval=setInterval((function(){if(expList.indexOf(expId)!==-1){clearInterval(interval);return}currentTime=currentTime||performance.now();var toClearInterval=argument.pushData(expId,variationId,visitorUuid);if(debug&&toClearInterval){sendDebugLogsOld(expId,variationId,"",user_type);sendDebugLogs(expId,variationId,"intDataPushed",user_type)}var isTimeout=performance.now()-currentTime>=timeout;if(isTimeout&&debug){sendDebugLogsOld(expId,variationId,"timeout",user_type);sendDebugLogs(expId,variationId,"intTimeout",user_type)}if(toClearInterval||isTimeout){clearInterval(interval)}if(toClearInterval){window.expList[integrationName].push(expId)}}),pollInterval||100)}}};window.VWO.push(["onVariationApplied",callbackFn]);window.VWO.push(["onVariationShownSent",callbackFn])}}; var surveyDataCommonWrapper=function(argument){if(!argument){argument={getCampaignList:function(){return[]},surveyStatusChange:function(){},answerSubmitted:function(){}}}return function(){window.VWO=window.VWO||[];function getValuesFromAnswers(answers){var values=[];for(var i=0;i=timeout;if(toClearInterval||isTimeout){clearInterval(interval)}}),pollInterval)}}window.VWO.push(["onSurveyShown",function(data){commonSurveyCallback(data,argument.surveyStatusChange,"surveyShown")}]);window.VWO.push(["onSurveyCompleted",function(data){commonSurveyCallback(data,argument.surveyStatusChange,"surveyCompleted")}]);window.VWO.push(["onSurveyAnswerSubmitted",function(data){commonSurveyCallback(data,argument.answerSubmitted,"surveySubmitted")}])}}; (function(){var VWOOmniTemp={};window.VWOOmni=window.VWOOmni||{};for(var key in VWOOmniTemp)Object.prototype.hasOwnProperty.call(VWOOmniTemp,key)&&(window.VWOOmni[key]=VWOOmniTemp[key]);window._vwoIntegrationsLoaded=1;pushBasedCommonWrapper({integrationName:"GA4",getExperimentList:function(){return [176,177,183]},accountSettings:function(){var accountIntegrationSettings={"setupVia":"gtm","manualSetup":true,"dataVariable":"dataLayer"};if(accountIntegrationSettings["debugType"]=="ga4"&&accountIntegrationSettings["debug"]){accountIntegrationSettings["debug"]=1}else{accountIntegrationSettings["debug"]=0}return accountIntegrationSettings},pushData:function(expId,variationId){var accountIntegrationSettings={"setupVia":"gtm","manualSetup":true,"dataVariable":"dataLayer"};var ga4Setup=accountIntegrationSettings["setupVia"]||"gtag";if(typeof window.gtag!=="undefined"&&ga4Setup=="gtag"){window.gtag("event","VWO",{vwo_campaign_name:window._vwo_exp[expId].name+":"+expId,vwo_variation_name:window._vwo_exp[expId].comb_n[variationId]+":"+variationId});window.gtag("event","experience_impression",{exp_variant_string:"VWO-"+expId+"-"+variationId});return true}return false}})();pushBasedCommonWrapper({integrationName:"GA4-GTM",getExperimentList:function(){return [176,177,183]},accountSettings:function(){var accountIntegrationSettings={"setupVia":"gtm","manualSetup":true,"dataVariable":"dataLayer"};if(accountIntegrationSettings["debugType"]=="gtm"&&accountIntegrationSettings["debug"]){accountIntegrationSettings["debug"]=1}else{accountIntegrationSettings["debug"]=0}return accountIntegrationSettings},pushData:function(expId,variationId){var accountIntegrationSettings={"setupVia":"gtm","manualSetup":true,"dataVariable":"dataLayer"};var ga4Setup=accountIntegrationSettings["setupVia"]||"gtm";var dataVariable=accountIntegrationSettings["dataVariable"]||"dataLayer";if(typeof window[dataVariable]!=="undefined"&&ga4Setup=="gtm"){window[dataVariable].push({event:"vwo-data-push-ga4",vwo_exp_variant_string:"VWO-"+expId+"-"+variationId});return true}return false}})(); ;})();(function(){window.VWO=window.VWO||[];var pollInterval=100;var _vis_data={};var intervalObj={};var analyticsTimerObj={};var experimentListObj={};window.VWO.push(["onVariationApplied",function(data){if(!data){return}var expId=data[1],variationId=data[2];if(expId&&variationId&&["VISUAL_AB","VISUAL","SPLIT_URL"].indexOf(window._vwo_exp[expId].type)>-1){}}])})();; ;var vD=VWO.data||{};VWO.data={content:{"fns":{"list":{"args":{"1":{}},"vn":1}}},as:"r6.visualwebsiteoptimizer.com",dacdnUrl:"https://dev.visualwebsiteoptimizer.com",accountJSInfo:{"ts":1746843431,"pvn":0,"url":{},"pc":{"a":100,"t":100},"rp":60,"noSS":false}};for(var k in vD){VWO.data[k]=vD[k]};;var gcpfb=function(a,loadFunc,status,err,success){function vwoErr() {_vwo_err({message:"Google_Cdn failing for " + a + ". Trying Fallback..",code:"cloudcdnerr",status:status});} if(a.indexOf("/cdn/")!==-1){loadFunc(a.replace("cdn/",""),err,success); vwoErr(); return true;} else if(a.indexOf("/dcdn/")!==-1&&a.indexOf("evad.js") !== -1){loadFunc(a.replace("dcdn/",""),err,success); vwoErr(); return true;}};window.VWO=window.VWO || [];window.VWO._= window.VWO._ || {};window.VWO._.gcpfb=gcpfb;;var d={cookie:document.cookie,URL:document.URL,referrer:document.referrer};var w={VWO:{_:{}},location:{href:window.location.href,search:window.location.search},_vwoCc:window._vwoCc};;window._vwo_cdn="https://dev.visualwebsiteoptimizer.com/cdn/";window._vwo_apm_debug_cdn="https://dev.visualwebsiteoptimizer.com/cdn/";window.VWO._.useCdn=true;window.vwo_eT="br";window._VWO=window._VWO||{};window._VWO.fSeg={};window._VWO.dcdnUrl="/dcdn/settings.js";window.VWO.sTs=1746813122;window._VWO._vis_nc_lib=window._vwo_cdn+"edrv/nc-dfdc2d253f5db0207d2bf0b70396b215br.js";var loadWorker=function(url){_vwo_code.load(url, { dSC: true, onloadCb: function(xhr,a){window._vwo_wt_l=true;if(xhr.status===200 ||xhr.status===304){var code="var window="+JSON.stringify(w)+",document="+JSON.stringify(d)+";window.document=document;"+xhr.responseText;var blob=new Blob([code||"throw new Error('code not found!');"],{type:"application/javascript"}),url=URL.createObjectURL(blob);window.mainThread={webWorker:new Worker(url)};window.vwoChannelFW=new MessageChannel();window.vwoChannelToW=new MessageChannel();window.mainThread.webWorker.postMessage({vwoChannelToW:vwoChannelToW.port1,vwoChannelFW:vwoChannelFW.port2},[vwoChannelToW.port1, vwoChannelFW.port2]);if(!window._vwo_mt_f)return window._vwo_wt_f=true;_vwo_code.addScript({text:window._vwo_mt_f});delete window._vwo_mt_f}else{if(gcpfb(a,loadWorker,xhr.status)){return;}_vwo_code.finish("&e=loading_failure:"+a)}}, onerrorCb: function(a){if(gcpfb(a,loadWorker)){return;}window._vwo_wt_l=true;_vwo_code.finish("&e=loading_failure:"+a);}})};loadWorker("https://dev.visualwebsiteoptimizer.com/cdn/edrv/worker-e94512e06ec724b92513f0b4ae3131fabr.js");;var _vis_opt_file;var _vis_opt_lib;if(window.VWO._.allSettings.dataStore.previewExtraSettings!=undefined&&window.VWO._.allSettings.dataStore.previewExtraSettings.isSurveyPreviewMode){var surveyHash=window.VWO._.allSettings.dataStore.plugins.LIBINFO.SURVEY_DEBUG_EVENTS.HASH;var param1="evad.js?va=";var param2="&d=debugger_new";var param3="&sp=1&a=725969&sh="+surveyHash;_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?param1+"vanj"+param2:param1+"va_gq"+param2:param1+"edrv/va_gq-acd7a320b0168785e2194a31f953a5bdbr.js"+param2;_vis_opt_file=_vis_opt_file+param3;_vis_opt_lib="https://dev.visualwebsiteoptimizer.com/dcdn/"+_vis_opt_file}else if(window.VWO._.allSettings.dataStore.mode!=undefined&&window.VWO._.allSettings.dataStore.mode=="PREVIEW"){ var path1 = 'edrv/pd_'; var path2 = window.VWO._.allSettings.dataStore.plugins.LIBINFO.EVAD.HASH + ".js"; ;_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?path1+"vanj.js":path1+"va_gq"+path2:path1+"edrv/va_gq-acd7a320b0168785e2194a31f953a5bdbr.js"+path2;_vis_opt_lib="https://dev.visualwebsiteoptimizer.com/cdn/"+_vis_opt_file}else{_vis_opt_file=vwoCode.use_existing_jquery&&typeof vwoCode.use_existing_jquery()!=="undefined"?vwoCode.use_existing_jquery()?"edrv/vanj-87cfdeebda402bd7ad27802ab1bdc6e2br.js":"edrv/va_gq-acd7a320b0168785e2194a31f953a5bdbr.js":"edrv/va_gq-acd7a320b0168785e2194a31f953a5bdbr.js"}window._vwo_library_timer=setTimeout((function(){vwoCode.removeLoaderAndOverlay&&vwoCode.removeLoaderAndOverlay();vwoCode.finish()}),vwoCode.library_tolerance&&typeof vwoCode.library_tolerance()!=="undefined"?vwoCode.library_tolerance():2500),_vis_opt_lib=typeof _vis_opt_lib=="undefined"?window._vwo_cdn+_vis_opt_file:_vis_opt_lib;var loadLib=function(url){_vwo_code.load(url, { dSC: true, onloadCb:function(xhr,a){window._vwo_mt_l=true;if(xhr.status===200 || xhr.status===304){if(!window._vwo_wt_f)return window._vwo_mt_f=xhr.responseText;_vwo_code.addScript({text:xhr.responseText});delete window._vwo_wt_f;}else{if(gcpfb(a,loadLib,xhr.status)){return;}_vwo_code.finish("&e=loading_failure:"+a);}}, onerrorCb: function(a){if(gcpfb(a,loadLib)){return;}window._vwo_mt_l=true;_vwo_code.finish("&e=loading_failure:"+a);}})};loadLib(_vis_opt_lib);VWO.load_co=function(u,opts){return window._vwo_code.load(u,opts);};;;}}catch(e){_vwo_code.finish();_vwo_code.removeLoaderAndOverlay&&_vwo_code.removeLoaderAndOverlay();_vwo_err(e);window.VWO.caE=1}})();
Best Sellers 🔥

Resurrection Eggs® 30th Anniversary Edition

5.00
(Read 1 review)

$21.99

See, touch, and hear the story of Easter. Celebrate three decades of cherished tradition with this special 30th Anniversary Edition of Resurrection Eggs.

Vea, toque y escucha la historia de la Pascua. ¡Celebra tres décadas de tradición querida con la edición especial del 30 aniversario de los Huevos de Resurrección!

10216 in stock

View All Available Bulk Discounts

Available Discounts

Quantity Discount
1 - 9 0%
10 - 24 10%
25 - 49 15%
50 + 20%
The offer will automatically be applied in cart.
+
-
Free standard shipping on all orders $75 and up.
Overview

Celebrate the 30th anniversary by continuing the tradition of sharing the joy and meaning of Easter with Resurrection Eggs.

Send your children on a hunt that will lead them to the treasure of Easter!

Read the story together, open each egg, and find the surprise inside—a symbol of Jesus’ journey to the cross. It’s a great way to connect while reliving the events of those history-changing hours.

¡Mande a sus hijos a una búsqueda que los llevará al tesoro de la Pascua!

Lean la historia juntos, abra cada huevito y encuentre la sorpresa adentro—un símbolo del camino de Jesús a la cruz. Formarán una buena conexión al revivir los eventos de esas horas que cambiaron la historian.

This 30th-anniversary version includes 14 activity cards (+ 1 instruction card) that include scripture memory, discussion questions, free songs from Seeds Worship, and other fun activities.

Includes: 1 egg carton, 12 plastic eggs with new and improved symbols inside, 1 beautifully illustrated, bilingual storybook (English and Spanish), 1 set of colorful Easter story stickers, a new set of 14 activity cards, and the (video access to snippets from) The Jesus Film Project to enhance conversations with your child.

Recommended ages 3-10.

Want to host a neighborhood Resurrection Eggs Easter egg hunt? Or maybe you just want some extra Easter activities and coloring pages to share with your children or Sunday school class?

Download the Resurrection Eggs printable activity pack in English or Spanish!

About the Author

Easter with FamilyLife is a curated collection of resources designed to help families experience the hope and joy of Easter together. From the beloved Resurrection Eggs to engaging books and activities, these tools make it easy for parents to share the story of Jesus in meaningful and memorable ways. This special category brings all of FamilyLife’s Easter-themed products into one place, making it simple to find everything you need to celebrate Christ’s resurrection with your family.

Vida en Familia

Si bien el ministerio fuera de los EE. UU. Comenzó a fines de la década de 1970, FamilyLife América Latina comenzó oficialmente en 1992. Hoy, Vida en Familia® tiene eventos, grupos pequeños y transmisiones de radio (Vida en Familia Hoy®) en todo el continente.

  • Nuestra Misión: Desarrollar efectivamente a matrimonios y familias santas que cambiarán al mundo, un hogar a la vez.
  • Capacitación: El enfoque de FamilyLife es proporcionar capacitación para ayudar a los pastores y líderes en América Latina a establecer ministerios familiares en sus comunidades locales, proporcionando la visión bíblica y los recursos prácticos para fortalecer sus propios, y también los matrimonios y los matrimonios y familias de la comunidad.
  • Recursos y Apoyo: FamilyLife® está brindando ayuda para hoy y esperanza para mañana en América Latina al proporcionar recursos en cada país para que sean de provecho para la comunidad.

Conozca más sobre nosotros aquí.

Product Details
SKU: RPK21615
ISBN: 978-1602009189
Publisher: FamilyLife
Language: English, Spanish
Size: 12.2 × 5 × 3.2 in
Author: Easter with FamilyLife, FamilyLife - Vida En Familia
Format: Resource Pack
Tags: Español, Spanish
Shipping & Returns

We offer free shipping for orders with subtotals of $75 or greater. You’ll find shipping options and delivery dates at checkout. Please allow 7-10 business days for standard shipping, expedited shipping is available for an additional fee. Orders received after 12 p.m. CST on Fridays will not be processed until the following Monday. You can view our return policy here.

Reviews
5.00
1
  1. Such a cute tool!Yes, I recommend this product

    Bethany K. ,

    My son has loved opening the eggs and learning about each item. I’m so pleasantly surprised by how easy it is to teach him about Jesus and the sacrifice he made for us!

Write A Review

Got questions?

Our friendly specialists are here to help. Give us a call now or chat with us.