1/**handles:wc-donation-frontend-script,sourcebuster-js,wc-order-attribution**/ 2$=jQuery;let flag=!0;function formatTime(e){var t=e.getHours(),e=e.getMinutes();return(t<10?"0":"")+t+":"+(e<10?"0":"")+e}function formatDuration(e){var t=Math.floor(e/3600),o=(e%=3600,Math.floor(e/60)),e=Math.floor(e%60);return(t<10?"0":"")+t+":"+(o<10?"0":"")+o+":"+(e<10?"0":"")+e}function add_popup_before_order(){jQuery.ajax({url:wcOrderScript.donationToOrder.ajaxUrl,type:"POST",dataType:"json",data:{action:"add_popup_before_order",nonce:wcOrderScript.donationToOrder.nonce},beforeSend:function(){},success:function(e){var t,e;"success"==e.status?(jQuery(".wc-donation-popup").find("#wc-donation-price-"+e.campaign_id).val(e.donation),e=jQuery(".wc-donation-popup").find(".donation_text").text().replace("%amount%",e.donation),jQuery(".wc-donation-popup").find(".donation_text").text(e),jQuery(".wc-donation-popup:not(.cart-campaign-popup)").addClass("wc-popup-show")):(flag=!1,jQuery(".wc-block-components-checkout-place-order-button").trigger("click"),jQuery("form.woocommerce-checkout").submit())}})}function NumbersOnly(e,t,o){var n=!1,a,r;if(window.event)a=window.event.keyCode;else{if(!t)return!0;a=t.which}var r=String.fromCharCode(a),t=t.srcElement||t.target;return null==a||0==a||9==a||13==a||27==a||-1<"0123456789".indexOf(r)||(o&&"."==r?-1==t.value.indexOf("."):!(!o||","!=r)&&-1==t.value.indexOf(","))}function addDonationToOrder(o,e,t,n,a,r,i,c,s,d,u,l,p,y="",w="",m="",_,h,j,Q,f,v,g,b){var k=!1,e,e;return"roundoff-skip"===o?(flag=!1,jQuery(".wc-block-components-checkout-place-order-button").trigger("click"),jQuery("form.woocommerce-checkout").submit(),!0):0!=e&&null!=e&&0<e?(jQuery.ajax({url:wcOrderScript.donationToOrder.ajaxUrl,type:"POST",dataType:"json",data:{action:wcOrderScript.donationToOrder.action,nonce:wcOrderScript.donationToOrder.nonce,campaign_id:a,amount:e,selectedLabel:b,cause:l,fees:p,type:o,tribute:w,tribute_message:m,e_card_email:_,gift_aid:y,is_recurring:r,new_period:i,new_length:c,new_interval:s,cc_processing_fee:h,wps_sfw_subscription_number:Q,wps_sfw_subscription_interval:f,wps_sfw_subscription_expiry_number:v,wps_sfw_subscription_expiry_interval:g},beforeSend:function(){jQuery(j).parents(".wc_donation_on_cart").append('<div class="wc-donation-loader-css"><div class="wc-donation-blur-effect"></div><div class="wc-donation-loader" style="display:block;"></div></div>'),jQuery(j).parents(".widget_wc-donation-widget").append('<div class="wc-donation-loader-css"><div class="wc-donation-blur-effect"></div><div class="wc-donation-loader" style="display:block;"></div></div>')},success:function(e){var t,t;"success"==e.response&&(jQuery(`input[value="${a}"]`).closest(".wc_donation_on_cart").find("div.wc-donation-loader-css").remove(),jQuery(`input[value="${a}"]`).closest(".widget_wc-donation-widget").find("div.wc-donation-loader-css").remove(),jQuery("[name='update_cart']").prop("disabled",!1),jQuery("[name='update_cart']").trigger("click"),"roundoff"===o&&jQuery(".wc-donation-popup").removeClass("wc-popup-show"),jQuery("body").trigger("update_checkout"),"undefined"!=typeof wc&&void 0!==wc.blocksCheckout&&(flag=!1,{extensionCartUpdate:t}=wc.blocksCheckout,t({namespace:"dfw",data:{}})),jQuery("#wc-donation-woocommerce-notices-wrapper").length&&(jQuery("#wc-donation-woocommerce-notices-wrapper").show(),document.getElementById("wc-donation-woocommerce-notices-wrapper").scrollIntoView({behavior:"smooth"})),""!=e.cart_url&&(window.location.href=e.cart_url),""!=e.checkoutUrl&&(window.location.href=e.checkoutUrl),jQuery("body").trigger("wc_donation_checkout_event")),"failed"===e.response&&(jQuery(`input[value="${a}"]`).closest(".wc_donation_on_cart").find("div.wc-donation-loader-css").remove(),jQuery(`input[value="${a}"]`).closest(".widget_wc-donation-widget").find("div.wc-donation-loader-css").remove(),jQuery(`input[value="${a}"]`).siblings("div").hasClass("cc-require-message")||(t=jQuery('<div class="cc-require-message">'+e.message+"</div>"),jQuery(`input[value="${a}"]`).siblings("button").after(t))),"error"===e.response&&location.reload()}}),void setTimeout(function(){jQuery(".cc-require-message").remove()}
2,7e3)):(e=(e=(e=wcOrderScript.donationToOrder.other_amount_placeholder).replace("%min%",t)).replace("%max%",n),"both"!=u&&"predefined"!=u||1==d?alert(""+e):alert("Please select amount"),!0)}function dispaly_socialshare_links(e){jQuery(document).ready(function(){jQuery(document).on("click","#wc-donation-social-share",function(){jQuery("#social-share-popup").css({display:"flex","justify-content":"center","align-items":"center",overflow:"hidden"}).show()}),jQuery(".close").click(function(){jQuery("#social-share-popup").hide()}),jQuery(window).click(function(e){jQuery(e.target).is("#social-share-popup")&&jQuery("#social-share-popup").hide()}),jQuery("#copy-link").click(function(e){e.preventDefault();var e=jQuery(this).data("url"),t=jQuery("<input>");jQuery("body").append(t),t.val(e).select(),document.execCommand("copy"),t.remove(),alert("Link copied to clipboard!")}),jQuery("#print-poster").click(function(e){e.preventDefault();var t=window.open("","_blank"),e=document.getElementById("print-section").innerHTML;t.document.write("<html><head><title>Print Poster</title>"),t.document.write("</head><body>"),t.document.write(e),t.document.write("</body></html>"),t.document.close(),t.onload=function(){t.print(),t.close()}})})}0<jQuery("form.woocommerce-checkout").length&&!jQuery("form.woocommerce-checkout").hasClass("wc-roundoff")&&jQuery("form.woocommerce-checkout").addClass("wc-roundoff"),dispaly_socialshare_links(jQuery),jQuery(window).on("load",function(){wcOrderScript.donationToOrder.is_checkout&&"yes"==wcOrderScript.donationToOrder.is_roundOff&&jQuery(".wc-block-components-checkout-place-order-button").on("click",function(e){flag&&(e.stopPropagation(),add_popup_before_order())})}),jQuery(window).on("load",function(){jQuery(".flip-clock").each(function(){var e=jQuery(this),t,o=jQuery(this).data("start-time"),n,a=jQuery(this).data("end-time").split(":"),o=o.split(":"),r=new Date,o=new Date(r.getFullYear(),r.getMonth(),r.getDate(),parseInt(o[0]),parseInt(o[1]),0),a=new Date(r.getFullYear(),r.getMonth(),r.getDate(),parseInt(a[0]),parseInt(a[1]),0),i=(a.getTime()<r.getTime()&&a.setDate(a.getDate()+1),a.getTime()/1e3-r.getTime()/1e3),i=Math.max(i,0),c=(e.addClass("non-clickable"),t=jQuery(this).FlipClock(i,{clockFace:"HourlyCounter",countdown:!0}),console.log("startTime"),console.log(o),console.log("endTime"),console.log(a),setInterval(function(){var e;r=new Date,t.getTime().time<=0&&(clearInterval(c),console.log("Reloading page"),location.reload())},1e3));t.setTime(i),t.start()}),jQuery(".pomodoro-clock-container").each(function(){var e=this,n=jQuery(e).find(".timer-label"),t=jQuery(this).data("start-time"),o=jQuery(this).data("end-time"),t=t.split(":"),o=o.split(":"),a=new Date,r=new Date(a.getFullYear(),a.getMonth(),a.getDate(),t[0],t[1],0),t=new Date(a.getFullYear(),a.getMonth(),a.getDate(),o[0],o[1],0),i=(t<r&&t.setDate(t.getDate()+1),(t-r)/1e3),c=(a-r)/1e3,s=i-c,o=localStorage.getItem("remainingTime"),t=localStorage.getItem("lastSaved"),t,s,d=(o&&t&&(t=(a.getTime()-new Date(t).getTime())/1e3,s=Math.max(0,o-t)),86400),u=(s%=d,new ProgressBar.Circle(e,{color:"#EFBBBE",trailColor:"#BF5252",trailWidth:5,duration:1e3*s,easing:"linear",strokeWidth:5,from:{color:"#EFBBBE",width:5},to:{color:"#EFBBBE",width:5},step:function(e,t){var o=(1-t.value())*i,o=Math.max(i-o,0);n.text(formatDuration(o)),t.path.setAttribute("stroke",e.color),t.path.setAttribute("stroke-width",e.width)}}));function l(){u.set(s/i),s<=0&&clearInterval(p)}var p=setInterval(l,1100),y=setInterval(function(){a=new Date,c=(a-r)/1e3,s=Math.max(i-c,0),s%=d,n.text(formatDuration(s)),localStorage.setItem("remainingTime",s),localStorage.setItem("lastSaved",(new Date).toISOString()),s<=1&&(clearInterval(y),location.reload())},1e3);jQuery(window).on("beforeunload",function(){a=new Date,c=(a-r)/1e3,s=Math.max(i-c,0),s%=d,localStorage.setItem("remainingTime",s),localStorage.setItem("lastSaved",(new Date).toISOString())})}),jQuery("<style>").prop("type","text/css").html(" .flip-clock-wrapper .flip-clock-days { display: none; } ").appendTo("head")}),jQuery(document).on("click",".wc-donation-tabs-wrap ul.tab-nav > li",function(e){e.preventDefault(),jQuery(this).siblings().removeClass("active"),jQuery(this).addClass("active");var e=jQuery(this).data("tab");jQuery(".wc-donation-tab-content").removeClass("active"),jQuery(".wc-donation-tab-content."+e).addClass("active")}),wcOrderScript.donationToOrder.is_checkout&&!wcOrderScript.donationToOrder.is_order_pay&&jQuery(document).on("click","#place_order",function(e){wcOrderScript.donationToOrder.is_checkout&&"yes"==wcOrderScript.donationToOrder.is_roundOff&&(e.preventDefault(),add_popup_before_order())}),jQuery(document).on("focusout",".grab-donation",function(){var e=jQuery(this),t=e.data("min"),o=e.data("max"),n=e.data("campaign_id"),a=e.data("rand_id"),r=
2document.getElementById("wc-donation-price-"+n+"_"+a),i=e.val(),t,o,o,t;o<=0&&"any"!=o&&(o=i),"any"==t&&"any"==o||t<=i&&i<=o?(t=jQuery("#processing-fees-"+n+"_"+a).val(),o="percentage"==wcOrderScript.donationToOrder.fees_type?i*(t/100):t,0<(t=parseFloat(i)+parseFloat(o))&&""!=t?(jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-currency-symbol").attr("style","display: inline-block !important"),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-charge .wc-donation-amt").text(parseFloat(i).toFixed(2)),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-fee-summary .wc-donation-amt").text(parseFloat(o).toFixed(2)),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-summary-total .wc-donation-amt").text(parseFloat(t).toFixed(2))):(jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-currency-symbol").attr("style","display: inline-block !important"),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-charge .wc-donation-amt").text(parseFloat(0).toFixed(2)),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-fee-summary .wc-donation-amt").text(parseFloat(0).toFixed(2)),jQuery("#wc-donation-summary-"+n+"_"+a+" .wc-donation-summary-total .wc-donation-amt").text(parseFloat(0).toFixed(2))),r.value=i):(r.value="",e.val(""))}),jQuery(document).on("click",".wc-close",function(){jQuery(this).parents(".wc-donation-popup").removeClass("wc-popup-show"),jQuery("body").hasClass("stopScroll")&&jQuery("body").removeClass("stopScroll")}),jQuery(document).on("click",".wc-donation-f-submit-donation, #wc-donation-round-f-submit-donation, #wc-donation-round-f-submit-skip-donation",function(e){e.preventDefault();var e=jQuery(this),t=jQuery(this).parents(".wc-donation-in-action"),o=jQuery(this).data("type"),n=jQuery(this).siblings(".wc_donation_camp").val(),a=jQuery(this).siblings(".wp_rand").val(),r=!1,i="day",c="1",s="1",d=0,u=0,l=jQuery(t).data("donation-type"),p=jQuery(t).find(".wc-opened").length,y=[],w=jQuery(t).find(".wc-donation-f-donation-other-value").length,m=jQuery(t).find("select.wc-label-select"),m,m,_,m,t=(selectedLabel="",(selectedLabel=m.length&&m.find("option:selected").val()?m.find("option:selected").text().trim():selectedLabel)||(m=jQuery(t).find('input[name="wc_label_price"]:checked')).length&&(selectedLabel=m.closest("label").text().trim()),jQuery(this).data("min-value")&&(d=jQuery(this).data("min-value")),jQuery(this).data("max-value")&&(u=jQuery(this).data("max-value")),0<jQuery(t).find(".donation-is-recurring").length&&jQuery(t).find(".donation-is-recurring").is(":checked")?(r=jQuery(t).find(".donation-is-recurring").val(),i=jQuery(t).find("._subscription_period").val(),c=jQuery(t).find("#_subscription_length").val(),s=jQuery(t).find("#_subscription_period_interval").val()):r="no",m=("roundoff"==o||"roundoff-skip"==o?(jQuery(".wc-donation-popup").removeClass("wc-popup-show"),jQuery(".roundoff-donation-price")):jQuery(".donate_"+n+"_"+a)).val(),".donate_cause_"+n+"_"+a),t=jQuery(t).val(),h=".donate_fees_"+n+"_"+a,j=jQuery(h).val(),Q="",Q,h=(""!==jQuery(h).data("require")&&0==jQuery("#processing-fees-"+n+"_"+a).prop("checked")&&(Q="require"),""),f=(0<jQuery(`#wc_donation_gift_aid_checkbox_${n}_`+a).length&&jQuery(`#wc_donation_gift_aid_checkbox_${n}_`+a).is(":checked")&&(h="yes"),""),v="",a=(0<jQuery(`#_hidden_tribute_${n}_`+a).length&&jQuery("input[name='wc_donation_tribute_checkbox']:checked").length&&""!=jQuery(`#_hidden_tribute_${n}_`+a).val()&&(f=jQuery(`#_hidden_tribute_${n}_`+a).val()),0<jQuery(`#wc_donation_trubte_message_${n}_`+a).length&&jQuery("input[name='wc_donation_tribute_checkbox']:checked").length&&""!=jQuery(`#wc_donation_trubte_message_${n}_`+a).val()&&(v=jQuery(`#wc_donation_trubte_message_${n}_`+a).val()),""),g=(0<jQuery("#wc_donation_e_card_email_"+n).length&&""!=jQuery("#wc_donation_e_card_email_"+n).val()&&(a=jQuery("#wc_donation_e_card_email_"+n).val()),""),b="",k="",x="",g,b,k,x;jQuery(".wc_donation_subscription_table").length&&(g=jQuery(".wc_donation_subscription_table").find(".wps_sfw_subscription_number").val(),b=jQuery(".wc_donation_subscription_table").find(".wps_sfw_subscription_interval").val(),k=jQuery(".wc_donation_subscription_table").find(".wps_sfw_subscription_expiry_number").val(),x=jQuery(".wc_donation_subscription_table").find(".wps_sfw_subscription_expiry_interval").val()),addDonationToOrder(o,m,d,u,n,r,i,c,s,p,l,t,j,h,f,v,a,Q,e,g,b,k,x,selectedLabel)}),jQuery(document).on("click",'label.wc-label-button input[type="radio"][name="wc_label_price"], label.wc-label-button input[type="radio"][name="wc_label_cause"]',function(){jQuery(this).is(":checked")&&(jQuery(this).parent(".wc-label-button").siblings().removeClass("wc-active"),jQuery(this).parent(".wc-label-button").addClass("wc-active"))}),jQuery(document).on("click",'label.wc-label-radio input[type="radio"][name="wc_donation_tribute_checkbox"]',function(){jQuery(this).is(":checked")&&(jQuery(this).parent().siblings(".wc_donation_trubte_name").prop("type","text"),jQuery(this).parent().siblings(".wc_donation_trubte_message").prop("type","text"))}),jQuery(document).on("copy paste keyup click",".wc_donation_trubte_name",function(){var e=jQuery(this).val(),t=jQuery(this).siblings("label.wc-label-radio").find('input[name="wc_donation_tribute_checkbox"]:checked').val();""!=jQuery.trim(e)&&""!=jQuery.trim(t)?jQuery(this).siblings('input[name="tribute"]').val(t+" "+e):jQuery(this).siblings('input[name="tribute"]').val("")}
2),jQuery(document).on("change",".wc-label-radio input.donation-processing-fees",function(){var e=jQuery(this).data("id"),t=jQuery(this).data("camp"),o=jQuery(this).val(),n=jQuery("#wc-donation-price-"+t).val(),a,a,r=(a="percentage"==wcOrderScript.donationToOrder.fees_type?n*(o/100):o,parseFloat(n)+parseFloat(a));0<r&&""!=r&&(jQuery("#wc-donation-summary-"+t+" .wc-donation-currency-symbol").attr("style","display: inline-block !important"),jQuery("#wc-donation-summary-"+t+" .wc-donation-charge .wc-donation-amt").text(parseFloat(n).toFixed(2)),jQuery("#wc-donation-summary-"+t+" .wc-donation-fee-summary .wc-donation-amt").text(parseFloat(a).toFixed(2)),jQuery("#wc-donation-summary-"+t+" .wc-donation-summary-total .wc-donation-amt").text(parseFloat(r).toFixed(2))),jQuery(this).is(":checked")?(jQuery("#wc-donation-summary-"+t).show(),jQuery("#wc-donation-"+e).val(o)):(jQuery("#wc-donation-summary-"+t).hide(),jQuery("#wc-donation-"+e).val(void 0))}),jQuery(document).on("click","ul.causes-dropdown .init",function(){var e;jQuery(this).parent().children("li:not(.init)").toggle(),jQuery(this).parent().toggleClass("active"),jQuery(this).parent().hasClass("active")?jQuery(this).parents(".wc-donation-container").length&&(e=75*jQuery(this).parent().children("li:not(.init)").length,jQuery(this).parents(".wc-donation-cause").css("margin-bottom",e+"px")):jQuery(this).parents(".wc-donation-cause").css("margin-bottom","0px")}),jQuery(document).on("click","ul.causes-dropdown li:not(.init)",function(){var e=jQuery(this).parent().children("li:not(.init)"),t=jQuery(this).data("id"),o=jQuery(this).data("name");jQuery("#wc-donation-"+t).val(o),e.removeClass("selected"),jQuery(this).addClass("selected"),jQuery(this).parent().removeClass("active"),jQuery(this).parent().children(".init").html(jQuery(this).html()),e.toggle()}),jQuery(document.body).mousedown(function(e){var e=jQuery(e.target);jQuery("ul.causes-dropdown").hasClass("active")&&!e.parents().andSelf().is("ul.causes-dropdown")&&(jQuery("ul.causes-dropdown").removeClass("active"),jQuery("ul.causes-dropdown").children("li:not(.init)").toggle())}),jQuery(document).on("change copy paste click",".wc-label-button input, .wc-label-radio input, .wc-label-select",function(){var e=jQuery(this).data("id"),t=(jQuery("#wc-donation-price-"+e).val(jQuery(this).val()),"wc-donation-other-amount"==jQuery(this).val()?(jQuery("#wc-donation-f-donation-other-value-"+e).show(),jQuery("#wc-donation-f-donation-other-value-"+e).addClass("wc-opened"),jQuery(".other-price-wrapper-"+e).show(),jQuery(".other-price-wrapper-"+e).siblings(".wc-donation-tooltip").show()):(jQuery("#wc-donation-f-donation-other-value-"+e).hide(),jQuery("#wc-donation-f-donation-other-value-"+e).removeClass("wc-opened"),jQuery(".other-price-wrapper-"+e).siblings(".wc-donation-tooltip").hide(),jQuery(".other-price-wrapper-"+e).hide()),jQuery("#processing-fees-"+e).val()),o=jQuery("#wc-donation-price-"+e).val(),t,t,n=(t="percentage"==wcOrderScript.donationToOrder.fees_type?o*(t/100):t,parseFloat(o)+parseFloat(t));0<n&&""!=n&&(jQuery("#wc-donation-summary-"+e+" .wc-donation-currency-symbol").attr("style","display: inline-block !important"),jQuery("#wc-donation-summary-"+e+" .wc-donation-charge .wc-donation-amt").text(parseFloat(o).toFixed(2)),jQuery("#wc-donation-summary-"+e+" .wc-donation-fee-summary .wc-donation-amt").text(parseFloat(t).toFixed(2)),jQuery("#wc-donation-summary-"+e+" .wc-donation-summary-total .wc-donation-amt").text(parseFloat(n).toFixed(2)))}),jQuery(document).on("change","._subscription_period",function(){var e=jQuery(this),o=e.parents(".wc-donation-in-action").find('select[name="_subscription_length"]'),e=e.val();jQuery.ajax({url:wcOrderScript.donationToOrder.ajaxUrl,type:"POST",dataType:"json",data:{action:"wc_donation_get_sub_length_by_sub_peri
2od",period:e,nonce:wcOrderScript.donationToOrder.nonce},beforeSend:function(){jQuery(o).css({"pointer-events":"none",opacity:"0.5"})},success:function(e){""!=e.range&&(jQuery(o).html(""),jQuery.each(e.range,function(e,t){jQuery(o).append('<option value="'+e+'">'+t+"</option>")}),jQuery(o).removeAttr("style"))}})}),jQuery(function(t){t(".donor-lists .give-grid__item").slice(0,12).css("display","flex"),t(".anonymous-donor-lists .give-grid__item").slice(0,12).css("display","flex"),t(".global-donor-lists .give-grid__item").slice(0,12).css("display","flex"),t(".leaderboard-donor-lists .give-grid__item").slice(0,12).css("display","flex"),t(".give-donor__load_more").on("click",function(e){e.preventDefault(),t(this).siblings(".give-grid").find(".give-grid__item:hidden").slice(0,4).css("display","flex"),0==t(this).siblings(".give-grid").find(".give-grid__item:hidden").length&&t(this).fadeOut(700)}),t('input[name="wc_donation_tribute_checkbox"]').click(function(){var e=t(this);1==e.data("waschecked")?(e.prop("checked",!1),t(".wc_donation_trubte_name").prop("type","hidden"),t(".wc_donation_trubte_message").prop("type","hidden"),e.data("waschecked",!1)):e.data("waschecked",!0),e.siblings('input[name="wc_donation_tribute_checkbox"]').data("waschecked",!1)})}),document.addEventListener("DOMContentLoaded",function(){if(jQuery(".donation-is-recurring").length){let e=document.querySelector(".donation-is-recurring"),t=document.querySelector(".donation_subscription");function o(){e.checked?t.style.display="block":t.style.display="none"}o(),e.addEventListener("change",o)}}),document.addEventListener("DOMContentLoaded",function(){if(jQuery(".donation-is-recurring").length){let e=document.querySelector(".donation-is-recurring"),o=document.querySelectorAll(".subscription-options");function t(){let t=e.checked?"table-row":"none";o.forEach(e=>{e.style.display=t})}t(),e.addEventListener("change",t)}}),jQuery(document).ready(function(e){var n=!0;jQuery("#wc-donation-f-submit-donation").on("click",function(e){var t=parseInt(jQuery("#wps_sfw_subscription_number").val(),10),o=parseInt(jQuery("#wps_sfw_subscription_expiry_number").val(),10);jQuery("#wps_sfw_subscription_number").length&&(jQuery(".donation-is-recurring").is(":checked")&&(isNaN(t)||""===t)?(alert("Please enter the number of subscriptions per interval."),n=!1,e.preventDefault()):t<1||o<1?(alert("Interval cannot be negative."),n=!1,e.preventDefault()):o<t?(alert("Subscriptions Per Interval must not be greater than Subscriptions Expiry Interval."),n=!1,e.preventDefault()):n=!0)}),jQuery(document).ajaxSend(function(e,t,o){n||(t.abort(),jQuery(".wc-donation-loader-css").hide())})}),jQuery(document).ready(function(e){jQuery("#wps_sfw_subscription_interval").on("change",function(){var e=jQuery(this).val();jQuery("#wps_sfw_subscription_expiry_interval").empty(),jQuery("#wps_sfw_subscription_expiry_interval").append('<option value="'+e+'">'+e.charAt(0).toUpperCase()+e.slice(1)+"(s)</option>")}),jQuery("#wps_sfw_subscription_interval").trigger("change")}); 3!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.sbjs=e()}}(function(){return function e(t,r,n){function a(s,o){if(!r[s]){if(!t[s]){var c="function"==typeof require&&require;if(!o&&c)return c(s,!0);if(i)return i(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var p=r[s]={exports:{}};t[s][0].call(p.exports,function(e){var r=t[s][1][e];return a(r||e)},p,p.exports,e,t,r,n)}return r[s].exports}for(var i="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(e,t,r){"use strict";var n=e("./init"),a={init:function(e){this.get=n(e),e&&e.callback&&"function"==typeof e.callback&&e.callback(this.get)}};t.exports=a},{"./init":6}],2:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/utils"),i={containers:{current:"sbjs_current",current_extra:"sbjs_current_add",first:"sbjs_first",first_extra:"sbjs_first_add",session:"sbjs_session",udata:"sbjs_udata",promocode:"sbjs_promo"},service:{migrations:"sbjs_migrations"},delimiter:"|||",aliases:{main:{type:"typ",source:"src",medium:"mdm",campaign:"cmp",content:"cnt",term:"trm",id:"id",platform:"plt",format:"fmt",tactic:"tct"},extra:{fire_date:"fd",entrance_point:"ep",referer:"rf"},session:{pages_seen:"pgs",current_page:"cpg"},udata:{visits:"vst",ip:"uip",agent:"uag"},promo:"code"},pack:{main:function(e){return i.aliases.main.type+"="+e.type+i.delimiter+i.aliases.main.source+"="+e.source+i.delimiter+i.aliases.main.medium+"="+e.medium+i.delimiter+i.aliases.main.campaign+"="+e.campaign+i.delimiter+i.aliases.main.content+"="+e.content+i.delimiter+i.aliases.main.term+"="+e.term+i.delimiter+i.aliases.main.id+"="+e.id+i.delimiter+i.aliases.main.platform+"="+e.platform+i.delimiter+i.aliases.main.format+"="+e.format+i.delimiter+i.aliases.main.tactic+"="+e.tactic},extra:function(e){return i.aliases.extra.fire_date+"="+a.setDate(new Date,e)+i.delimiter+i.aliases.extra.entrance_point+"="+document.location.href+i.delimiter+i.aliases.extra.referer+"="+(document.referrer||n.none)},user:function(e,t){return i.aliases.udata.visits+"="+e+i.delimiter+i.aliases.udata.ip+"="+t+i.delimiter+i.aliases.udata.agent+"="+navigator.userAgent},session:function(e){return i.aliases.session.pages_seen+"="+e+i.delimiter+i.aliases.session.current_page+"="+document.location.href},promo:function(e){return i.aliases.promo+"="+a.setLeadingZeroToInt(a.randomInt(e.min,e.max),e.max.toString().length)}}};t.exports=i},{"./helpers/utils":5,"./terms":9}],3:[function(e,t,r){"use strict";var n=e("../data").delimiter;t.exports={useBase64:!1,setBase64Flag:function(e){this.useBase64=e},encodeData:function(e){return encodeURIComponent(e).replace(/\!/g,"%21").replace(/\~/g,"%7E").replace(/\*/g,"%2A").replace(/\'/g,"%27").replace(/\(/g,"%28").replace(/\)/g,"%29")},decodeData:function(e){try{return decodeURIComponent(e).replace(/\%21/g,"!").replace(/\%7E/g,"~").replace(/\%2A/g,"*").replace(/\%27/g,"'").replace(/\%28/g,"(").replace(/\%29/g,")")}catch(t){try{return unescape(e)}catch(r){return""}}},set:function(e,t,r,n,a){var i,s;if(r){var o=new Date;o.setTime(o.getTime()+60*r*1e3),i="; expires="+o.toGMTString()}else i="";s=n&&!a?";domain=."+n:"";var c=this.encodeData(t);this.useBase64&&(c=btoa(c).replace(/=+$/,"")),document.cookie=this.encodeData(e)+"="+c+i+s+"; path=/"},get:function(e){for(var t=this.encodeData(e)+"=",r=document.cookie.split(";"),n=0;n<r.length;n++){for(var a=r[n];" "===a.charAt(0);)a=a.substring(1,a.length);if(0===a.indexOf(t)){var i=a.substring(t.length,a.length);if(/^[A-Za-z0-9+/]+$/.test(i))try{i=atob(i.padEnd(4*Math.ceil(i.length/4),"="))}catch(s){}return this.decodeData(i)}}return null},destroy:function(e,t,r){this.set(e,"",-1,t,r)},parse:function(e){var t=[],r={};if("string"==typeof e)t.push(e);
3else for(var a in e)e.hasOwnProperty(a)&&t.push(e[a]);for(var i=0;i<t.length;i++){var s;r[this.unsbjs(t[i])]={},s=this.get(t[i])?this.get(t[i]).split(n):[];for(var o=0;o<s.length;o++){var c=s[o].split("="),u=c.splice(0,1);u.push(c.join("=")),r[this.unsbjs(t[i])][u[0]]=this.decodeData(u[1])}}return r},unsbjs:function(e){return e.replace("sbjs_","")}}},{"../data":2}],4:[function(e,t,r){"use strict";t.exports={parse:function(e){for(var t=this.parseOptions,r=t.parser[t.strictMode?"strict":"loose"].exec(e),n={},a=14;a--;)n[t.key[a]]=r[a]||"";return n[t.q.name]={},n[t.key[12]].replace(t.q.parser,function(e,r,a){r&&(n[t.q.name][r]=a)}),n},parseOptions:{strictMode:!1,key:["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],q:{name:"queryKey",parser:/(?:^|&)([^&=]*)=?([^&]*)/g},parser:{strict:/^(?:([^:\/?#]+):)?(?:\/\/((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?))?((((?:[^?#\/]*\/)*)([^?#]*))(?:\?([^#]*))?(?:#(.*))?)/,loose:/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/}},getParam:function(e){for(var t={},r=(e||window.location.search.substring(1)).split("&"),n=0;n<r.length;n++){var a=r[n].split("=");if("undefined"==typeof t[a[0]])t[a[0]]=a[1];else if("string"==typeof t[a[0]]){var i=[t[a[0]],a[1]];t[a[0]]=i}else t[a[0]].push(a[1])}return t},getHost:function(e){return this.parse(e).host.replace("www.","")}}},{}],5:[function(e,t,r){"use strict";t.exports={escapeRegexp:function(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(e,t){var r=e.getTimezoneOffset()/60,n=e.getHours(),a=t||0===t?t:-r;return e.setHours(n+r+a),e.getFullYear()+"-"+this.setLeadingZeroToInt(e.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(e.getDate(),2)+" "+this.setLeadingZeroToInt(e.getHours(),2)+":"+this.setLeadingZeroToInt(e.getMinutes(),2)+":"+this.setLeadingZeroToInt(e.getSeconds(),2)},setLeadingZeroToInt:function(e,t){for(var r=e+"";r.length<t;)r="0"+r;return r},randomInt:function(e,t){return Math.floor(Math.random()*(t-e+1))+e}}},{}],6:[function(e,t,r){"use strict";var n=e("./data"),a=e("./terms"),i=e("./helpers/cookies"),s=e("./helpers/uri"),o=e("./helpers/utils"),c=e("./params"),u=e("./migrations");t.exports=function(e){var t,r,p,f,m,d,l,g,h,y,_,v,b,x=c.fetch(e),k=s.getParam(),w=x.domain.host,q=x.domain.isolate,I=x.lifetime;function j(e){switch(e){case a.traffic.utm:t=a.traffic.utm,r="undefined"!=typeof k.utm_source?k.utm_source:"undefined"!=typeof k.gclid?"google":"undefined"!=typeof k.yclid?"yandex":a.none,p="undefined"!=typeof k.utm_medium?k.utm_medium:"undefined"!=typeof k.gclid?"cpc":"undefined"!=typeof k.yclid?"cpc":a.none,f="undefined"!=typeof k.utm_campaign?k.utm_campaign:"undefined"!=typeof k[x.campaign_param]?k[x.campaign_param]:"undefined"!=typeof k.gclid?"google_cpc":"undefined"!=typeof k.yclid?"yandex_cpc":a.none,m="undefined"!=typeof k.utm_content?k.utm_content:"undefined"!=typeof k[x.content_param]?k[x.content_param]:a.none,l=k.utm_id||a.none,g=k.utm_source_platform||a.none,h=k.utm_creative_format||a.none,y=k.utm_marketing_tactic||a.none,d="undefined"!=typeof k.utm_term?k.utm_term:"undefined"!=typeof k[x.term_param]?k[x.term_param]:function(){var e=document.referrer;if(k.utm_term)return k.utm_term;if(!(e&&s.parse(e).host&&s.parse(e).host.match(/^(?:.*\.)?yandex\..{2,9}$/i)))return!1;try{return s.getParam(s.parse(document.referrer).query).text}catch(t){return!1}}()||a.none;break;case a.traffic.organic:t=a.traffic.organic,r=r||s.getHost(document.referrer),p=a.referer.organic,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.referral:t=a.traffic.referral,r=r||s.getHost(document.referrer),p=p||a.referer.referral,f=a.none,m=s.parse(document.referrer).path,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;case a.traffic.typein:t=a.traffic.typein,r=x.typein_attributes.source,p=x.typein_attributes.medium,f=a.none,m=a.none,d=a.none,l=a.none,g=a.none,h=a.none,y=a.none;break;default:t=a.oops,r=a.oops,p=a.oops,f=a.oops,m=a.oops,d=a.oops,l=a.oops,g=
3a.oops,h=a.oops,y=a.oops}var i={type:t,source:r,medium:p,campaign:f,content:m,term:d,id:l,platform:g,format:h,tactic:y};return n.pack.main(i)}function R(e){var t=document.referrer;switch(e){case a.traffic.organic:return!!t&&H(t)&&function(e){var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp("yandex")+"\\..{2,9}$"),n=new RegExp(".*"+o.escapeRegexp("text")+"=.*"),a=new RegExp("^(?:www\\.)?"+o.escapeRegexp("google")+"\\..{2,9}$");if(s.parse(e).query&&s.parse(e).host.match(t)&&s.parse(e).query.match(n))return r="yandex",!0;if(s.parse(e).host.match(a))return r="google",!0;if(!s.parse(e).query)return!1;for(var i=0;i<x.organics.length;i++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.organics[i].host)+"$","i"))&&s.parse(e).query.match(new RegExp(".*"+o.escapeRegexp(x.organics[i].param)+"=.*","i")))return r=x.organics[i].display||x.organics[i].host,!0;if(i+1===x.organics.length)return!1}}(t);case a.traffic.referral:return!!t&&H(t)&&function(e){if(!(x.referrals.length>0))return r=s.getHost(e),!0;for(var t=0;t<x.referrals.length;t++){if(s.parse(e).host.match(new RegExp("^(?:.*\\.)?"+o.escapeRegexp(x.referrals[t].host)+"$","i")))return r=x.referrals[t].display||x.referrals[t].host,p=x.referrals[t].medium||a.referer.referral,!0;if(t+1===x.referrals.length)return r=s.getHost(e),!0}}(t);default:return!1}}function H(e){if(x.domain){if(q)return s.getHost(e)!==s.getHost(w);var t=new RegExp("^(?:.*\\.)?"+o.escapeRegexp(w)+"$","i");return!s.getHost(e).match(t)}return s.getHost(e)!==s.getHost(document.location.href)}function D(){i.set(n.containers.current_extra,n.pack.extra(x.timezone_offset),I,w,q),i.get(n.containers.first_extra)||i.set(n.containers.first_extra,n.pack.extra(x.timezone_offset),I,w,q)}return i.setBase64Flag(x.base64),u.go(I,w,q),i.set(n.containers.current,function(){var e;if("undefined"!=typeof k.utm_source||"undefined"!=typeof k.utm_medium||"undefined"!=typeof k.utm_campaign||"undefined"!=typeof k.utm_content||"undefined"!=typeof k.utm_term||"undefined"!=typeof k.utm_id||"undefined"!=typeof k.utm_source_platform||"undefined"!=typeof k.utm_creative_format||"undefined"!=typeof k.utm_marketing_tactic||"undefined"!=typeof k.gclid||"undefined"!=typeof k.yclid||"undefined"!=typeof k[x.campaign_param]||"undefined"!=typeof k[x.term_param]||"undefined"!=typeof k[x.content_param])D(),e=j(a.traffic.utm);else if(R(a.traffic.organic))D(),e=j(a.traffic.organic);else if(!i.get(n.containers.session)&&R(a.traffic.referral))D(),e=j(a.traffic.referral);else{if(i.get(n.containers.first)||i.get(n.containers.current))return i.get(n.containers.current);D(),e=j(a.traffic.typein)}return e}(),I,w,q),i.get(n.containers.first)||i.set(n.containers.first,i.get(n.containers.current),I,w,q),i.get(n.containers.udata)?(_=parseInt(i.parse(n.containers.udata)[i.unsbjs(n.containers.udata)][n.aliases.udata.visits])||1,_=i.get(n.containers.session)?_:_+1,v=n.pack.user(_,x.user_ip)):(_=1,v=n.pack.user(_,x.user_ip)),i.set(n.containers.udata,v,I,w,q),i.get(n.containers.session)?(b=parseInt(i.parse(n.containers.session)[i.unsbjs(n.containers.session)][n.aliases.session.pages_seen])||1,b+=1):b=1,i.set(n.containers.session,n.pack.session(b),x.session_length,w,q),x.promocode&&!i.get(n.containers.promocode)&&i.set(n.containers.promocode,n.pack.promo(x.promocode),I,w,q),i.parse(n.containers)}},{"./data":2,"./helpers/cookies":3,"./helpers/uri":4,"./helpers/utils":5,"./migrations":7,"./params":8,"./terms":9}],7:[function(e,t,r){"use strict";var n=e("./data"),a=e("./helpers/cookies");t.exports={go:function(e,t,r){var i,s=this.migrations,o={l:e,d:t,i:r};if(a.get(n.containers.first)||a.get(n.service.migrations)){if(!a.get(n.service.migrations))for(i=0;i<s.length;i++)s[i].go(s[i].id,o)}else{var c=[];for(i=0;i<s.length;i++)c.push(s[i].id);var u="";for(i=0;i<c.length;i++)u+=c[i]+"=1",i<c.length-1&&(u+=n.delimiter);a.set(n.service.migrations,u,o.l,o.d,o.i)}},migrations:[{id:"1418474375998",version:"1.0.0-beta",go:function(e,t){var r=e+"=1",i=e+"=0",s=function(e,t,r){return t||r?e:n.delimiter};try{var o=[];for(var c in n.containers)n.containers.hasOwnProperty(c)&&o.push(n.containers[c]);for(var u=0;u<o.length;u++)if(a.get(o[u])){var p=a.get(o[u]).replace(/(\|)?\|(\|)?/g,s);a.destroy(o[u],t.d,t.i),a.destroy(o[u],t.d,!t.i),a.set(o[u],p,t.l,t.d,t.i)}a.get(n.containers.session)&&a.set(n.containers.session,n.pack.session(0),t.l,t.d,t.i),a.set(n.service.migrations,r,t.l,t.d,t.i)}catch(f){a.set(n.service.migrations,i,t.l,t.d,t.i)}}}]}}
3,{"./data":2,"./helpers/cookies":3}],8:[function(e,t,r){"use strict";var n=e("./terms"),a=e("./helpers/uri");t.exports={fetch:function(e){var t=e||{},r={};if(r.lifetime=this.validate.checkFloat(t.lifetime)||6,r.lifetime=parseInt(30*r.lifetime*24*60),r.session_length=this.validate.checkInt(t.session_length)||30,r.timezone_offset=this.validate.checkInt(t.timezone_offset),r.base64=t.base64||!1,r.campaign_param=t.campaign_param||!1,r.term_param=t.term_param||!1,r.content_param=t.content_param||!1,r.user_ip=t.user_ip||n.none,t.promocode?(r.promocode={},r.promocode.min=parseInt(t.promocode.min)||1e5,r.promocode.max=parseInt(t.promocode.max)||999999):r.promocode=!1,t.typein_attributes&&t.typein_attributes.source&&t.typein_attributes.medium?(r.typein_attributes={},r.typein_attributes.source=t.typein_attributes.source,r.typein_attributes.medium=t.typein_attributes.medium):r.typein_attributes={source:"(direct)",medium:"(none)"},t.domain&&this.validate.isString(t.domain)?r.domain={host:t.domain,isolate:!1}:t.domain&&t.domain.host?r.domain=t.domain:r.domain={host:a.getHost(document.location.hostname),isolate:!1},r.referrals=[],t.referrals&&t.referrals.length>0)for(var i=0;i<t.referrals.length;i++)t.referrals[i].host&&r.referrals.push(t.referrals[i]);if(r.organics=[],t.organics&&t.organics.length>0)for(var s=0;s<t.organics.length;s++)t.organics[s].host&&t.organics[s].param&&r.organics.push(t.organics[s]);return r.organics.push({host:"bing.com",param:"q",display:"bing"}),r.organics.push({host:"yahoo.com",param:"p",display:"yahoo"}),r.organics.push({host:"about.com",param:"q",display:"about"}),r.organics.push({host:"aol.com",param:"q",display:"aol"}),r.organics.push({host:"ask.com",param:"q",display:"ask"}),r.organics.push({host:"globososo.com",param:"q",display:"globo"}),r.organics.push({host:"go.mail.ru",param:"q",display:"go.mail.ru"}),r.organics.push({host:"rambler.ru",param:"query",display:"rambler"}),r.organics.push({host:"tut.by",param:"query",display:"tut.by"}),r.referrals.push({host:"t.co",display:"twitter.com"}),r.referrals.push({host:"plus.url.google.com",display:"plus.google.com"}),r},validate:{checkFloat:function(e){return!(!e||!this.isNumeric(parseFloat(e)))&&parseFloat(e)},checkInt:function(e){return!(!e||!this.isNumeric(parseInt(e)))&&parseInt(e)},isNumeric:function(e){return!isNaN(e)},isString:function(e){return"[object String]"===Object.prototype.toString.call(e)}}}},{"./helpers/uri":4,"./terms":9}],9:[function(e,t,r){"use strict";t.exports={traffic:{utm:"utm",organic:"organic",referral:"referral",typein:"typein"},referer:{referral:"referral",organic:"organic",social:"social"},none:"(none)",oops:"(Houston, we have a problem)"}},{}]},{},[1])(1)}); 4!function(t){"use strict";const e=t.params,n=(document.querySelector.bind(document),(t,e)=>e.split(".").reduce((t,e)=>t&&t[e],t)),i=()=>null,s=t=>null===t||t===undefined?"":t,o="wc/store/checkout";function a(t){document.querySelectorAll("wc-order-attribution-inputs").forEach((t,e)=>{e>0&&t.remove()});for(const e of document.querySelectorAll("wc-order-attribution-inputs"))e.values=t}function r(t){window.wp&&window.wp.data&&window.wp.data.dispatch&&window.wc&&window.wc.wcBlocksData&&window.wp.data.dispatch(window.wc.wcBlocksData.CHECKOUT_STORE_KEY).setExtensionData("woocommerce/order-attribution",t,!0)}function c(){return"undefined"!=typeof sbjs}function d(){if(window.wp&&window.wp.data&&"function"==typeof window.wp.data.subscribe){const e=window.wp.data.subscribe(function(){e(),r(t.getAttributionData())},o)}}t.getAttributionData=function(){const s=e.allowTracking&&c()?n:i,o=c()?sbjs.get:{},a=Object.entries(t.fields).map(([t,e])=>[t,s(o,e)]);return Object.fromEntries(a)},t.setOrderTracking=function(n){if(e.allowTracking=n,n){if(!c())return;sbjs.init({lifetime:Number(e.lifetime),session_length:Number(e.session),base64:Boolean(e.base64),timezone_offset:"0"})}else!function(){const t=window.location.hostname;["sbjs_current","sbjs_current_add","sbjs_first","sbjs_first_add","sbjs_session","sbjs_udata","sbjs_migrations","sbjs_promo"].forEach(e=>{document.cookie=`${e}=; path=/; max-age=-999; domain=.${t};`})}();const i=t.getAttributionData();a(i),r(i)},t.setOrderTracking(e.allowTracking),"loading"===document.readyState?document.addEventListener("DOMContentLoaded",d):d(),window.customElements.define("wc-order-attribution-inputs",class extends HTMLElement{constructor(){if(super(),this._fieldNames=Object.keys(t.fields),this.hasOwnProperty("_values")){let t=this.values;delete this.values,this.values=t||{}}}connectedCallback(){this.innerHTML="";const t=new DocumentFragment;for(const n of this._fieldNames){const i=document.createElement("input");i.type="hidden",i.name=`${e.prefix}${n}`,i.value=s(this.values&&this.values[n]||""),t.appendChild(i)}this.appendChild(t)}set values(t){if(this._values=t,this.isConnected)for(const t of this._fieldNames){const n=this.querySelector(`input[name="${e.prefix}${t}"]`);n?n.value=s(this.values[t]):console.warn(`Field "${t}" not found. `+"Most likely, the '<wc-order-attribution-inputs>' element was manipulated.")}}get values(){return this._values}})}(window.wc_order_attribution);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.