function scrollToTop(a){a.newURL.split("#")[1].includes("scroll")||(window.scrollTo(0,0),window.removeEventListener("hashchange",scrollToTop))}var $c=document.createElement.bind(document),$el=document.getElementById.bind(document);util={getReferrerTag:function(){var a=document.referrer;return a.indexOf("facebook.com")!==-1?"from-facebook":a.indexOf("twitter.com")!==-1||a.indexOf("t.co")!==-1?"from-twitter":a.indexOf("reddit.com")!==-1?"from-reddit":window.location.href.indexOf("_src=ga")!==-1?"from-google-adwords":a.indexOf("google.com")!==-1?"from-google":void 0}},function(a,b){"use strict";function c(c){var d=a.createElement("img");d.setAttribute("src",c.target.getAttribute("src")),d.setAttribute("alt",c.target.getAttribute("alt")),d.setAttribute("width",c.target.getAttribute("width")),d.setAttribute("height",c.target.getAttribute("height")),d.setAttribute("id","modal-photo-fullsize"),b.modals.generateModal(d,!1,"photo")}b.media=b.media||{};var d,e;for(void 0!==a.getElementsByClassName("photograph")&&(e=a.getElementsByClassName("photograph")),d=e.length;d--;)e[d].addEventListener("click",c)}(document,window),function(a,b){"use strict";function c(){var c=a.getElementsByClassName("modal-content")[0];void 0!==c&&(a.getElementsByClassName("overlay")[0].remove(),c.removeAttribute("style"),c.classList.add("off-screen"),b.setTimeout(function(){c.remove()},420))}function d(d,e,i){function j(){var a,c;c=n.height-b.innerHeight,a=n.width-b.innerWidth,(c>0||a>0)&&m[l]()}var k,l,m,n,o,p=a.createElement("div"),q=a.createElement("div");for(void 0===d.length&&(d=[d]),"boolean"!=typeof e&&(e=!1),void 0===i&&(i="text"),p.id=e?"no-click-for-you":"dismiss-me",p.classList.add("overlay"),q.classList.add("modal-content","off-screen"),e||(o=a.createElement("button"),o.classList.add("close-modal"),o.innerHTML="×",q.appendChild(o),o.addEventListener("click",c),p.addEventListener("click",c)),f=0;fn.width?"portrait":"landscape",m={portrait:function(){(n.height>b.innerHeight||n.width>b.innerWidth)&&(k.style.width=.9*b.innerWidth+"px",k.style.height="auto")},landscape:function(){(n.height>b.innerHeight||n.width>b.innerWidth)&&(k.style.height=.9*b.innerHeight+"px",k.style.width="auto")}}),b.setTimeout(function(){q.classList.remove("off-screen"),"photo"===i&&(j(),q.style.top=(b.innerHeight-q.scrollHeight)/2+"px",q.style.width=k.width+30+"px",q.style.left=(b.innerWidth-q.scrollWidth)/2+"px")},50)}function e(){c();var b=a.createElement("h2");b.innerHTML="Something went wrong.
Do you have a network connection?",d([b])}b.modals=b.modals||{};var f,g=a.getElementsByTagName("body")[0],h=a.createElement("div");h.classList.add("modal-parent"),b.modals.dismissModal=c,b.modals.generateModal=d,b.modals.noConnectionModal=e}(document,window),function(a,b){"use strict";function c(b,c){function d(){g+=k,(g>=f||g>=i)&&(g=f,clearInterval(e)),h.setAttribute("value",g),h.setAttribute("title","$"+g),h.innerHTML="$"+g}var e,f=c.isNaN?0:c,g=0,h=a.getElementById("campaign-progress-bar"),i=parseInt(h.getAttribute("max"),10),j=.0063*b/(f/i),k=Math.ceil(.0063*i);e=setInterval(function(){d()},j)}function d(){function d(){c(1e3,.06*g)}var e=a.getElementById("progress-container"),f=a.getElementById("campaign-progress-bar"),g=f.getAttribute("max"),h=a.getElementById("percent-to-goal"),i=a.getElementById("total-donors"),j=e.dataset.target,k=e.dataset.start,l=e.dataset.end,m=e.dataset.tags,n=e.dataset.external,o=new XMLHttpRequest;o.open("GET",b.config.mothership_url+"/donations/stats?since="+encodeURIComponent(k)+"&before="+encodeURIComponent(l)+"&tags="+encodeURIComponent(m),!0),o.addEventListener("load",function(){var b={num_records:4,num_records_last_24:0,total:20,total_last_24:0,members:3,members_last_24:1};o.status>=200&&o.status<400&&(b=JSON.parse(o.responseText)),b.total=parseInt(b.total,10),b.num_records=parseInt(b.num_records,10),(isNaN(b.total)||0===b.total)&&(b.total=Math.ceil(.06*g)),(isNaN(b.num_records)||0===b.num_records)&&(b.num_records=2),0===parseInt(b.members,10)&&(b.members=2),""!==n&&(b.total=b.total+parseInt(n,10)),b.total>g&&(b.total=Math.ceil(.9*g)),c(10,void 0===b[j]?b.total:b[j]),0!==a.getElementsByClassName("stats").length&&(h.innerHTML=Math.floor(b.total/g*100)+"%",i.innerHTML=b.num_records+" Donors")}),o.addEventListener("error",function(){d()}),o.send()}a.getElementById("campaign-progress-bar")&&d()}(document,window),function(a){"use strict";function b(a,b){function c(b){var c=b.getElementsByTagName("input")[0],d=b.getElementsByTagName("div")[0];c.addEventListener("focus",function(){c.select()},!0),c.addEventListener("blur",function(){b.classList.remove("copied")},!0),d.addEventListener("click",function(){c.focus();try{a.execCommand("copy"),b.classList.add("copied")}catch(d){}},!0)}function d(){for(var b=a.querySelectorAll(".click-to-copy"),d=b.length;d--;)c(b[d])}function e(){var b=a.getElementById("show-more");b.addEventListener("click",function(a){a.preventDefault&&a.preventDefault(),b.classList.add("open")},!0)}d(),e()}a.views=a.views||{},a.views.cryptocurrency=b}(window),window.views=window.views||{},window.views["default"]=function(a,b){"use strict";function c(a){var c,d=parseInt(a,10);if(b.helpers.checkDigits(a)){if(0===a)for(c=F.elements.amount.length;c--;)F.elements.amount[c].setAttribute("checked",!1);else void 0!==b.tiers[N.frequency]&&$el(N.frequency+"-"+a).setAttribute("checked",!0);N.amount=d,G.elements.a3.value=a,H.elements.amount.value=a,$el("donation-amount").innerHTML="$"+b.helpers.numberWithCommas(a)}}function d(a){if(P.indexOf(a)>-1){for(var b=0;b0){if(L.indexOf("membership")>-1&&!g())return!1;f(2)}}function i(a){a&&a.preventDefault(),f(1)}function j(a){"frequency"===a.target.name?(d(a.target.value),c(0)):"amount"===a.target.name&&(c(a.target.value),h())}function k(a){a.preventDefault(),""!==F.elements["other-amount"].value&&(c(F.elements["other-amount"].value),h())}function l(a){a.frequency&&d(a.frequency),a.amount&&c(a.amount)}function m(a){y=a.timeStamp}function n(a){b.removeEventListener("click",n),ga("send","event","Interaction","click","First interaction",a.timestamp-y)}function o(){S.open=function(a){var c=$c("h2"),d=$c("p");c.innerHTML="Oh no, our credit card processor is unavailable!",d.innerHTML="Try PayPal instead, or give it a shot again later.",b.modals.generateModal([c,d])}}function p(a){a=a||{},a.success=a.success||function(){},a.error=a.error||function(){};var c={amount:N.amount,recurring:"just-once"===N.frequency?0:1,recurring_type:function(){return"just-once"!==N.frequency?"year"===N.frequency?"annual":"monthly":0}(),is_member:0,tag:O,test_name:C.name||b.config.testName||"",test_option:C.option||b.config.testOption||"",referrer:util.getReferrerTag()?util.getReferrerTag():"",org:b.helpers.org,anonymous:$el("anonymous").checked?1:0,street_address:$el("street_address").value,phone_number:$el("phone_number").value,name:$el("name").value,zip:$el("zip").value},d=c.length,e="",f=new XMLHttpRequest;for(d in c)c.hasOwnProperty(d)&&(e+="&"+encodeURIComponent(d)+"="+encodeURIComponent(c[d]));e=e.substr(1),f.open("POST",b.config.mothership_url+"/donations/pending",!0),f.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),f.onload=function(){f.status>=200&&f.status<400?a.success(JSON.parse(f.responseText)):a.error()},f.onerror=b.modals.noConnectionModal,f.send(e)}function q(a){function c(a){"just-once"===N.frequency?(H.item_number.value=a.id,H.submit()):(G.item_number.value=a.id,G.submit())}return a.preventDefault(),!!g()&&(ga("send","event","conversion","paypal"),b.modals.generateModal(I,!0),void p({success:function(a){c(a)}.bind(this),error:function(){c({id:""})}.bind(this)}))}function r(a){for(var b={},c=("?"===a[0]?a.substr(1):a).split("&"),d=0;d1?b[b.length-1]:null;return a.fundraiser||c||"default"}function t(a){function c(){if(d.status>=200&&d.status<400){var a,c=JSON.parse(d.responseText),e={id:c.id,affiliation:b.helpers.org,revenue:N.amount.toString()},h={id:c.id,name:"$"+N.amount+function(){return"just-once"===N.frequency?" One-time Donation":"year"===N.frequency?" Annual Donation":" Monthly Donation"}(),sku:N.amount+"_"+function(){return"just-once"===N.frequency?"one-time":"year"===N.frequency?"annual":"monthly"}(),category:"just-once"!==N.frequency?"subscription":"one-time",price:N.amount.toString(),quantity:"1"};c.error?(b.modals.dismissModal(),a=$c("p"),a.innerHTML=c.error,b.modals.generateModal(a)):(ga("ecommerce:addTransaction",e),ga("ecommerce:addItem",h),ga("ecommerce:send"),b.location.replace("/thanks/?org="+b.helpers.org))}else d.status>=500?(b.modals.dismissModal(),f.innerHTML="Something went wrong with our credit card processor.",g.innerHTML="This is an error on their end, and your credit card has not been charged. Please try again in a bit.",b.modals.generateModal([f,g])):(b.modals.dismissModal(),f.innerHTML="Something went wrong with the transaction.",g.innerHTML="This is an error on our end, and your credit card has not been charged. Please try again in a bit.",b.modals.generateModal([f,g]))}b.modals.generateModal(I,!0);var d=new XMLHttpRequest,e={stripe_id:a.id,amount:N.amount,email:a.email,tag:O,recurring:"just-once"===N.frequency?0:1,recurring_type:function(){return"just-once"!==N.frequency?"year"===N.frequency?"annual":"monthly":0}(),is_member:0,test_name:C.name||b.config.testName||"",test_option:C.option||b.config.testOption||"",referrer:util.getReferrerTag()?util.getReferrerTag():"",org:b.helpers.org,anonymous:$el("anonymous").checked?1:0,street_address:$el("street_address").value,phone_number:$el("phone_number").value,zip:$el("zip").value,name:$el("name").value,campaign_id:s()},f=$c("h2"),g=$c("p");e=JSON.stringify(e),d.open("POST","/stripe",!0),d.setRequestHeader("Content-type","application/json"),d.addEventListener("load",c),d.addEventListener("error",b.modals.noConnectionModal),d.send(e)}function u(a){return a.preventDefault(),!("just-once"!==N.frequency&&!g())&&(ga("send","event","conversion","stripe"),void S.open({description:"$"+N.amount+("just-once"!==N.frequency?" per "+N.frequency:"")+" donation",amount:100*N.amount,bitcoin:"just-once"===N.frequency}))}function v(){N.amount=N.amount||b.config.amount||!1,N.frequency=N.frequency||b.helpers.getRadioValue("frequency"),c(N.amount),d(N.frequency);try{S=StripeCheckout.configure(R)}catch(a){o()}"just-once"===N.frequency&&N.amount>0?(h(),$el("variable-amount").setAttribute("value",N.amount)):b.tiers[N.frequency]&&b.tiers[N.frequency].indexOf(N.amount)>-1?h():i()}function w(){var c,d=a.getElementsByClassName("amount-option"),f=a.querySelectorAll(".recurring-options li");for(c=d.length;c--;)"variable-amount"!==d[c].id&&d[c].addEventListener("click",j);for(c=f.length;c--;)f[c].addEventListener("click",j);J.addEventListener("click",e),K.addEventListener("click",k),A[2].addEventListener("click",h),A[1].addEventListener("click",i),E.addEventListener("click",i),b.addEventListener("DOMContentLoaded",v),b.addEventListener("DOMContentLoaded",m),b.addEventListener("click",n),$el("pay-with-paypal").addEventListener("click",q);var g=b.helpers.parseQueryString(location.search),l="0"===g.c;$el("pay-with-credit-card").addEventListener("click",function(a){function c(){b.modals.noConnectionModal()}return a.preventDefault(),l?u(a):void grecaptcha.ready(function(){grecaptcha.execute(b.config.recaptcha_public_key,{action:"submitCreditCard"}).then(function(a){var b=new XMLHttpRequest;b.open("POST","/recaptcha",!0),b.setRequestHeader("Content-type","application/json"),b.addEventListener("load",function(a){var b=JSON.parse(a.currentTarget.responseText);b.success&&b.score>=.5?(l=!0,u(a)):c()}),b.addEventListener("error",c),b.send(JSON.stringify({token:a}))})})})}function x(){void 0!==M.email_subject?(C.name="subject",C.option=M.email_subject):(C.name=M.testName,C.option=M.testOption),l(M),I.innerHTML="Please wait…",R.token=t,w()}var y,z=a.querySelector(".choose"),A={1:a.querySelector('[href="#page-1"]')||$c("a"),2:a.querySelector('[href="#page-2"]')||$c("a")},B=document.querySelectorAll(".page"),C={},D=a.getElementsByTagName("body")[0],E=$el("donation-information"),F=a.forms["lead-form"],G=a.forms["paypal-recurring"],H=a.forms["paypal-onetime"],I=$c("h2"),J=a.querySelector(".frequency")||$c("ul"),K=$el("other-amount-go")||$c("button"),L=D.dataset.components.split(" "),M=b.helpers.parseQueryString(b.location.search),N={},O=b.config.tag||M.tag||F.dataset.tag||"",P=["just-once","year","month"],Q="fftf"===b.helpers.org?b.config.stripe_public_key:b.config.stripe_public_key_ef,R={key:Q,image:"https://s3.fightforthefuture.org/donate/images/fftf_avatar.png",name:b.helpers.org.toUpperCase()+" Donation"+(Q.indexOf("test")>-1?" (TEST)":""),panelLabel:"Donate!",allowRememberMe:!0},S={};x()},window.addEventListener("hashchange",scrollToTop),window.views=window.views||{},window.views.thanks=function(a,b){"use strict";function c(a){a.preventDefault(),b.open(g.getAttribute("href"),"facebookShare","menubar=no,locationbar=no,location=no,addressbar=no,resizable=yes,status=no,innerWidth=560,innerHeight=600")}function d(a){a.preventDefault(),b.open(h.getAttribute("href"),"twitterShare","menubar=no,locationbar=no,location=no,addressbar=no,resizable=yes,status=no,innerWidth=520,innerHeight=440")}function e(){g.addEventListener("click",c),h.addEventListener("click",d)}function f(){e()}var g,h;void 0!==a.getElementById("thanks")&&(g=a.getElementById("facebook-share"),h=a.getElementById("twitter-share")),f()},window.views=window.views||{},window.views["two-column"]=function(a,b){"use strict";function c(){function c(b){for(var c=a.querySelectorAll(".two-column-item"),d=c.length;d--;)b?c[d].classList.add("stuck"):c[d].classList.remove("stuck")}var d=b.scrollY+k.clientHeight+100;b.scrollY>105&&b.innerWidth>=640?(c(!0),d>=h.offsetTop&&(k.style.top=h.offsetTop-d+"px",j.style.top=h.offsetTop-d+k.clientHeight+20+"px")):(c(!1),k.removeAttribute("style"))}function d(){b.scrollY+b.innerHeight-i.clientHeight>k.offsetTop?i.classList.add("hidden"):i.classList.remove("hidden")}function e(){for(var c=a.getElementById("two-column-container"),d=parseInt(a.getElementById("form-parent").dataset.order,10),e=c.children,f=10,g=10,h=30,i=e.length;i--;)parseInt(e[i].dataset.order,10)=640?c.style.height=(f>g?f:g)+"px":c.removeAttribute("style")}function f(){a.querySelector('[data-sticky="true"]')&&c(),e(),d()}function g(){i.classList.contains("hidden")||(b.scrollY=k.offsetTop)}var h=a.querySelector(".two-column-footer"),i=a.querySelector(".sticky-donate-button"),j=a.getElementById("progress-container"),k=a.getElementById("form-parent");i.addEventListener("click",g),b.addEventListener("load",f),b.addEventListener("scroll",f),b.addEventListener("resize",f)},function(a,b){"use strict";function c(c){c.preventDefault();var d=a.createElement("h2"),e=a.createElement("p"),g=a.createElement("address");d.innerHTML="How to donate by check",e.innerHTML="Please send check payments to:","fftf"===f?g.innerHTML="Fight for the Future
\nPO Box 55071 #95005
\nBoston, MA 02205":g.innerHTML="Fight for the Future Education Fund
\nPO Box 55071 #95005
\nBoston, MA 02205",b.modals.generateModal([d,e,g])}function d(){for(var c=e.dataset.components.split(" "),d=c.length;d--;)""!==c[d]&&void 0!==b.views[c[d]]&&b.views[c[d]](a,b)}var e=a.getElementsByTagName("body")[0],f=function(){return b.location.host.indexOf("fftfef")!==-1||b.location.search.indexOf("fftfef")!==-1?"fftfef":"fftf"}();"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode.removeChild(this)}),a.getElementsByTagName("body")[0].classList.add(f),"fftf"===f||(a.forms["paypal-onetime"]&&(a.getElementById("paypal-email").value="publicfreedomorg@gmail.com",a.getElementById("paypal-item").value="Fight for the Future Education Fund Donation"),a.forms["paypal-recurring"]&&(a.getElementById("paypal-recur-email").value="publicfreedomorg@gmail.com",a.getElementById("paypal-recur-item").value="Fight for the Future Education Fund Donation")),($el("check")||$c("button")).addEventListener("click",c),b.tiers={month:[1e3,500,250,100,75,50,35,30,25,20,15,10,5],year:[1e4,5e3,2500,1e3,500,250,100,75,50,35,30,25,20,15,10,5]},b.helpers={org:f,parseQueryString:function(a){var b,c,d,e={},f="";for("?"===a[0]&&(f=a.substr(1)),d=f.split("&"),b=0;b