");vwo_$('head').append(_vwo_sel);return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("HEAD")}}, R_766555_68_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="1732561117269"]'); el.revertContentOp().remove();})("HEAD")}}, C_766555_68_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-1732561116039=""]').length&&el.vwoElement({html:'',position:"append"});})("body")}}, R_766555_68_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="1732561115996"]')).remove();})("body")}}, C_766555_68_1_3_2:{ fn:function(log,nonce=''){return (function(x) {})(".popup,.popup::backdrop,body[dialog-open=\"true\"],.popup h3,.popup .wrapper,.popup .wrapper > div,.flex-y,.flex-x,.popup .flex-x,.popup .btn-cta,.popup .btn-cta.btn-cta-no,.popup > button.btn-dismiss[data-action=\"dismiss\"],.popup > button.btn-dismiss")}}, C_766555_88_1_2_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1734551954386').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-1734551954389=""]').length && el.vwoElement({"position":"append","html":"
"});}catch(e) {console.error(e)} try{const isBeforeDate=(e,n=new Date)=>(e=typeof e!=typeof new Date?new Date(e):e)-(n=typeof n!=typeof new Date?new Date(n):n)>0; const isAfterDate=(...args)=>!isBeforeDate(...args); const isBetweenDates=(date1,date2)=>(isAfterDate(date1)&&isBeforeDate(date2)); const getCurrentDate = (d = new Date()) => d.toISOString().split('T')[0]; const useStorageApi = localStorage; const getToken = (t) => JSON.parse(useStorageApi.getItem(t)) || null; const setToken = (t, v) => useStorageApi.setItem(t, JSON.stringify(v)); const updateTokenProperty = (t, p, v) => { let state = getToken(t) || {}; state[p] = v; setToken(t, state); return (getToken(t) || {})[p] || undefined; }; function main (stickybar) { } (function(){ 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([ "#site-header", ".stickybar" ]).then(([ header, stickybar ]) => { if (isBeforeDate(new Date("2024-12-31T23:59:59"))) { function handleStickybarResize (entries, observer = undefined) { const elementToOffset = document.getElementById("panel-content"); if (Array.isArray(entries)) { for (const entry of entries) { let stickybarHeight = entry.contentRect.height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } } else if (entries.hasOwnProperty("type") && entries.type == "resize") { const event = entries; const { target } = event; let stickybarHeight = target.getBoundingClientRect().height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } else { const target = entries; let stickybarHeight = target.getBoundingClientRect().height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } } const stickybarResizeObserver = new ResizeObserver(handleStickybarResize); stickybarResizeObserver.observe(stickybar); // header.insertAdjacentElement('afterbegin', stickybar); main(stickybar); handleStickybarResize(stickybar); } else { return console.warn("Invalid time. Never showing stickybar."), slideup.style.setProperty("display", "none", "important"), null; } }); })(); }catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_766555_88_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="1734551954386"]'); el.revertContentOp().remove(); } catch(e) {console.error(e)} try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1734551954388"]')).remove(); } catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_766555_88_1_2_1:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1734551954388').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_766555_88_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="1734551954388"]'); el.revertContentOp().remove(); } catch(e) {console.error(e)} try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1734551954389"]')).remove(); } catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_766555_88_1_3_0:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1734551954391').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-1734551954393=""]').length && el.vwoElement({"position":"append","html":" "});}catch(e) {console.error(e)} try{const SLIDEUP_DELAY_SECONDS = 2; const HREF = "https://www.imb.org/generosity/cye-2024/?utm_campaign=cye"; const HREF_SRC_VALUE = "cyestickybar2"; // ex: src=slideup const TEST_TOKEN_NAME = "NA__IMB-Slideup-Nov2024"; const isBeforeDate=(e,n=new Date)=>(e=typeof e!=typeof new Date?new Date(e):e)-(n=typeof n!=typeof new Date?new Date(n):n)>0; const isAfterDate=(...args)=>!isBeforeDate(...args); const isBetweenDates=(date1,date2)=>(isAfterDate(date1)&&isBeforeDate(date2)); const getCurrentDate = (d = new Date()) => d.toISOString().split('T')[0]; const useStorageApi = localStorage; const getToken = (t) => JSON.parse(useStorageApi.getItem(t)) || null; const setToken = (t, v) => useStorageApi.setItem(t, JSON.stringify(v)); const updateTokenProperty = (t, p, v) => { let state = getToken(t) || {}; state[p] = v; setToken(t, state); return (getToken(t) || {})[p] || undefined; }; // const onScrollDepth = (callback, depthPercent = 0.5, once = true) => { // if (depthPercent < 0 || depthPercent > 1) throw new Error("depthPercent must be a percent represented as a decimal from 0 to 1."); // const callbackIf = (e) => { // the provided callback needs to be wrapped in another function that checks the condition // let scrollTop = window.scrollY, // docHeight = document.body.offsetHeight, // winHeight = window.innerHeight, // scrollPercent = scrollTop / (docHeight - winHeight), // scrollPercentRounded = Math.round(scrollPercent * 100); // if (scrollPercent >= depthPercent) { // callback(e); // once && document.removeEventListener('scroll', callbackIf); // } // }; // return document.addEventListener('scroll', callbackIf); // }; function handleSlideupDonateButtonClick (e) { updateTokenProperty(TEST_TOKEN_NAME, "status", "converted"); // mark as converted; both links and buttons will do this if (e.target.tagName.toLowerCase() != 'a') { // buttons (not links) will need to generate a URL based on the buttons data attributes that are set const REDIRECT_URL = HREF; const value = parseFloat(e.target.getAttribute("data-value")); const frequency = parseInt(e.target.getAttribute("data-recurring")) === 1 ? "monthly" : "one-time"; const params = { "src": HREF_SRC_VALUE, "amount": value, "frequency": frequency, }; let paramString = Object.entries(params).reduce((str, [key, value]) => str + (str && '&') + [key, value].join('='), ''); let url = REDIRECT_URL + (REDIRECT_URL.includes('?') ? '&' : '?') + paramString; window.location.assign(url); } } function main (slideup) { const backdrop = slideup.previousElementSibling?.classList.contains('slideup-backdrop') ? slideup.previousElementSibling : document.querySelector('.slideup-backdrop'); const gridButtons = Array.from(document.querySelectorAll('[data-action="slideup-donate"]')); const showSlideup = (slideup) => { //if (slideup.classList.contains("hidden")) slideup.classList.remove("hidden"); //if (!slideup.classList.contains("show")) slideup.classList.add("show"); //!backdrop.classList.contains("active") && backdrop.classList.add("active"); updateTokenProperty(TEST_TOKEN_NAME, "status", "shown"); }; const hideSlideup = (slideup) => { //if (slideup.classList.contains("show")) slideup.classList.remove("show"); //if (!slideup.classList.contains("hide")) slideup.classList.add("hide"); //backdrop.classList.contains("active") && backdrop.classList.remove("active"); updateTokenProperty(TEST_TOKEN_NAME, "status", "dismissed"); updateTokenProperty(TEST_TOKEN_NAME, "lastDismissedDate", getCurrentDate()); slideup.dispatchEvent(new Event('resize')); }; const lastDismissedWithin7Days = () => { const state = getToken(TEST_TOKEN_NAME) || {}; if (state && state.hasOwnProperty("status") && state.status === "dismissed") { if (state.hasOwnProperty("lastDismissedDate")) { let deltaDays = ((new Date(getCurrentDate())) - (new Date(state.lastDismissedDate))) / (1000 * 60 * 60 * 24); return deltaDays < 7 ? true : false; } else { return false } } else { return false } }; slideup.querySelector('.dismiss-btn')?.addEventListener('click', (e) => hideSlideup(slideup)) backdrop.addEventListener('click', (e) => hideSlideup(slideup)); const otherLink = slideup.querySelector('.other-link'); const links = [ ...gridButtons ]; otherLink && links.push(otherLink); links.forEach((gridButtonOrLink) => { gridButtonOrLink?.addEventListener('click', handleSlideupDonateButtonClick); }); /*const INITIAL_STATE = { lastShownDate: getCurrentDate(), lastDismissedDate: null, status: "shown", }; let state = getToken(TOKEN_NAME) || {}; if ( !state && !state.hasOwnProperty("lastShownDate") ) { // first time; not seen yet console.warn("Not seen yet. Showing slideup."); setToken(TOKEN_NAME, INITIAL_STATE); state = getToken(TOKEN_NAME); } else if (false && state.status == "converted") { // if the user clicked a CTA link then don't show again return console.warn("Already converted. Not showing slideup."), slideup.style.setProperty("display", "none", "important"), null; } else if (false && state.status == "dismissed" && lastDismissedWithin7Days()) { // if already been dismissed AND was dismissed within the last 7 days, then don't show again return console.warn("Dismissed within last 7 days. Not showing slideup."), slideup.style.setProperty("display", "none", "important"), null; } // else if (state.status == "dismissed" && state.lastDismissedDate == getCurrentDate()) { // subsequent times; if already seen AND dismissed then don't show again // return console.warn("Already converted. Not showing slideup."), slideup.style.setProperty("display", "none", "important"), null; // } else { // subsequent times; already seen BUT NOT dismissed or converted (or dimissed date passed 7 days) console.warn("Seen but not dismissed or last dismissed more than 7 days ago. Showing slideup."); updateTokenProperty(TOKEN_NAME, "lastShownDate", getCurrentDate()); state = getToken(TOKEN_NAME); }*/ // setTimeout(() => { showSlideup(slideup); // }, (SLIDEUP_DELAY_SECONDS * 1000) + (SLIDEUP_DELAY_SECONDS * 50)); } (function(){ 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([ "#site-header", "#imb-cye-slideup.stickybar" ]).then(([ header, stickybar ]) => { if (isBeforeDate(new Date("2024-12-31T23:59:59"))) { function handleStickybarResize (entries, observer = undefined) { const elementToOffset = document.getElementById("panel-content"); if (Array.isArray(entries)) { for (const entry of entries) { let stickybarHeight = entry.contentRect.height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } } else if (entries.hasOwnProperty("type") && entries.type == "resize") { const event = entries; const { target } = event; let stickybarHeight = target.getBoundingClientRect().height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } else { const target = entries; let stickybarHeight = target.getBoundingClientRect().height; if (!stickybarHeight || stickybarHeight <= 0 || window.getComputedStyle(stickybar)?.display == "none") { elementToOffset?.style.removeProperty("margin-top"); } else { elementToOffset?.style.setProperty("margin-top", `${stickybarHeight}px`); } } } const stickybarResizeObserver = new ResizeObserver(handleStickybarResize); stickybarResizeObserver.observe(stickybar); // header.insertAdjacentElement('afterbegin', stickybar); main(stickybar); handleStickybarResize(stickybar); } else { return console.warn("Invalid time. Never showing stickybar."), slideup.style.setProperty("display", "none", "important"), null; } }); // asyncWaitForElement("#imb-cye-slideup").then((slideup) => { // if (isBeforeDate(new Date("2024-12-31T23:59:59"))) { // main(slideup); // } else { // return console.warn("Invalid time. Never showing slideup."), slideup.style.setProperty("display", "none", "important"), null; // } // }); })(); }catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_766555_88_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="1734551954391"]'); el.revertContentOp().remove(); } catch(e) {console.error(e)} try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1734551954392"]')).remove(); } catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, C_766555_88_1_3_1:{ fn:function(log,nonce=''){return (function(x) { try{ var _vwo_sel = vwo_$("`); !vwo_$("head").find('#1734551954393').length && vwo_$('head').append(_vwo_sel);}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} try{}catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_766555_88_1_3_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="1734551954393"]'); el.revertContentOp().remove(); } catch(e) {console.error(e)} try{ var el,ctx=vwo_$(x); /*vwo_debug log("Revert","addElement","body"); vwo_debug*/(el=vwo_$('[vwo-element-id="1734551954394"]')).remove(); } catch(e) {console.error(e)} return vwo_$('head')[0] && vwo_$('head')[0].lastChild;})("head")}}, R_766555_68_1_3_2:{ fn:function(log,nonce=''){return (function(x) { if(!vwo_$.fn.vwoRevertHtml){ return; }; })(".popup,.popup::backdrop,body[dialog-open=\"true\"],.popup h3,.popup .wrapper,.popup .wrapper > div,.flex-y,.flex-x,.popup .flex-x,.popup .btn-cta,.popup .btn-cta.btn-cta-no,.popup > button.btn-dismiss[data-action=\"dismiss\"],.popup > button.btn-dismiss")}}, C_766555_68_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_766555_68_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="1732561117261"]'); el.revertContentOp().remove();})("HEAD")}}, C_766555_68_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-1732561116024=""]').length&&el.vwoElement({html:'',position:"append"});})("body")}}, R_766555_68_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="1732561115989"]')).remove();})("body")}}, C_766555_68_1_2_2:{ fn:function(log,nonce=''){return (function(x) {})(".popup,body[dialog-open=\"true\"],.popup h3,.popup .wrapper,.popup .wrapper > div,.flex-y,.flex-x,.popup .btn-cta,.popup button[data-action=\"dismiss\"],.popup button.btn-dismiss")}}},rules:[{"triggers":["9544914"],"tags":[{"priority":4,"data":"campaigns.77","id":"runCampaign"}]},{"triggers":["2775037"],"tags":[{"metricId":287644,"data":{"type":"m","campaigns":[{"g":1,"c":79}]},"id":"metric"},{"metricId":287644,"data":{"type":"m","campaigns":[{"g":5,"c":86}]},"id":"metric"}]},{"triggers":["2385589"],"tags":[{"metricId":287632,"data":{"type":"m","campaigns":[{"g":5,"c":79}]},"id":"metric"},{"metricId":287632,"data":{"type":"m","campaigns":[{"g":2,"c":88}]},"id":"metric"},{"metricId":287632,"data":{"type":"m","campaigns":[{"g":1,"c":86}]},"id":"metric"},{"metricId":287632,"data":{"type":"m","campaigns":[{"g":1,"c":68}]},"id":"metric"}]},{"triggers":["10040257"],"tags":[{"priority":4,"data":"campaigns.88","id":"runCampaign"}]},{"triggers":["2385586"],"tags":[{"metricId":287635,"data":{"type":"m","campaigns":[{"g":4,"c":79}]},"id":"metric"},{"metricId":287635,"data":{"type":"m","campaigns":[{"g":1,"c":88}]},"id":"metric"},{"metricId":287635,"data":{"type":"m","campaigns":[{"g":4,"c":86}]},"id":"metric"},{"metricId":287635,"data":{"type":"m","campaigns":[{"g":2,"c":68}]},"id":"metric"}]},{"triggers":["10204507"],"tags":[{"metricId":0,"data":{"type":"g","campaigns":[{"g":5,"c":88}]},"id":"metric"}]},{"triggers":["2434495"],"tags":[{"metricId":287641,"data":{"type":"m","campaigns":[{"g":2,"c":79}]},"id":"metric"},{"metricId":287641,"data":{"type":"m","campaigns":[{"g":4,"c":88}]},"id":"metric"},{"metricId":287641,"data":{"type":"m","campaigns":[{"g":2,"c":86}]},"id":"metric"},{"metricId":287641,"data":{"type":"m","campaigns":[{"g":7,"c":68}]},"id":"metric"}]},{"triggers":["9546714"],"tags":[{"priority":0,"data":"campaigns.79","id":"runCampaign"}]},{"triggers":["3190046"],"tags":[{"priority":4,"data":"campaigns.68","id":"runCampaign"}]},{"triggers":["9943939"],"tags":[{"priority":0,"data":"campaigns.86","id":"runCampaign"}]},{"triggers":["2434492"],"tags":[{"metricId":287638,"data":{"type":"m","campaigns":[{"g":3,"c":79}]},"id":"metric"},{"metricId":287638,"data":{"type":"m","campaigns":[{"g":3,"c":88}]},"id":"metric"},{"metricId":287638,"data":{"type":"m","campaigns":[{"g":3,"c":86}]},"id":"metric"},{"metricId":287638,"data":{"type":"m","campaigns":[{"g":6,"c":68}]},"id":"metric"}]},{"triggers":["10204357"],"tags":[{"metricId":0,"data":{"type":"g","campaigns":[{"g":4,"c":68}]},"id":"metric"}]},{"triggers":["10204360"],"tags":[{"metricId":0,"data":{"type":"g","campaigns":[{"g":5,"c":68}]},"id":"metric"}]},{"triggers":["9545082"],"tags":[{"priority":4,"data":"campaigns.78","id":"runCampaign"}]},{"triggers":["8"],"tags":[{"priority":2,"id":"groupCampaigns"},{"priority":3,"id":"prePostMutation"}]},{"triggers":["9"],"tags":[{"priority":2,"id":"visibilityService"}]},{"triggers":["2"],"tags":[{"id":"runTestCampaign"}]},{"triggers":["75"],"tags":[{"id":"urlChange"}]},{"triggers":["5"],"tags":[{"id":"checkEnvironment"}]}],pages:{"ec":[{"1308877":{"inc":["o",["url","urlReg","(?i).*"]]}},{"1761067":{"exc":["o",["url","urlReg","(?i)^https?\\:\\\/\\\/(w{3}\\.)?imb\\.org\\\/generosity.*"],["url","urlReg","(?i)^https?\\:\\\/\\\/(w{3}\\.)?imb\\.org\\\/generosity.*"]],"inc":["o",["url","urlReg","(?i)^https?\\:\\\/\\\/(w{3}\\.)?imb\\.org.*"],["url","urlReg","(?i)^https?\\:\\\/\\\/(w{3}\\.)?imb\\.org.*"]]}}]},pagesEval:{"ec":[1308877,1761067]}}})(); ;;var commonWrapper=function(argument){if(!argument){argument={valuesGetter:function(){return{}},valuesSetter:function(){},verifyData:function(){return{}}}}var pollInterval=100;var timeout=6e4;return function(){var accountIntegrationSettings={};var _interval=null;function waitForAnalyticsVariables(){try{accountIntegrationSettings=argument.valuesGetter()}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||[];var sendDebugLogs=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:window.VWO._&&window.VWO._.cookies&&window.VWO._.cookies.get("_vwo_uuid"),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:""})}};const callbackFn=function(data){if(window._vwo_acc_id===958122||window._vwo_acc_id===900503){sendDebugLogs(0,0,"initIntegrationCallback","",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(singleCall&&repeated==="vS"||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 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);if(debug&&toClearInterval){sendDebugLogs(expId,variationId,"",user_type)}var isTimeout=performance.now()-currentTime>=timeout;if(isTimeout&&debug){sendDebugLogs(expId,variationId,"timeout",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