Your IP : 216.73.216.95


Current Path : /var/www/ooareogundevinitiative/wp-content/plugins/give/assets/dist/js/
Upload File :
Current File : /var/www/ooareogundevinitiative/wp-content/plugins/give/assets/dist/js/give-sequoia-template.js

!function(e){var t={};function i(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}i.m=e,i.c=t,i.d=function(e,t,n){i.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,t){if(1&t&&(e=i(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)i.d(n,a,function(t){return e[t]}.bind(null,a));return n},i.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(t,"a",t),t},i.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},i.p="",i(i.s=719)}({11:function(e,t){function i(t){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?e.exports=i=function(e){return typeof e}:e.exports=i=function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(t)}e.exports=i},719:function(e,t,i){i(720),e.exports=i(721)},720:function(e,t,i){},721:function(e,t,i){"use strict";i.r(t);var n=i(11),a=i.n(n);!function(e){var t=window.sequoiaTemplateL10n,i=window.sequoiaTemplateOptions,n=e(".give-embed-form"),o=e(".advance-btn",n),r=e(".back-btn"),c=e(".give-form-navigator .title"),s=e("#give-payment-mode-select"),l=!1,d=window.parent.wp;d&&d.data&&n.on("click",(function(){var e=window.frameElement.closest(".wp-block").getAttribute("data-block");d.data.dispatch("core/block-editor").selectBlock(e)}));var p={currentStep:"enabled"===i.introduction.enabled?0:1,animating:!1,firstFocus:!1,goToStep:function(t){var a=u[t].title?e(u[t].selector).height()+50:e(u[t].selector).height(),o=u[p.currentStep].title?e(u[p.currentStep].selector).height()+50:e(u[p.currentStep].selector).height();a>o?e(".give-form-templates").css("min-height","".concat(a+123,"px")):setTimeout((function(){e(".give-form-templates").css("min-height","".concat(a+123,"px"))}),200),e(".step-tracker").removeClass("current"),e('.step-tracker[data-step="'+t+'"]').addClass("current"),"disabled"===i.introduction.enabled?(3===e(".step-tracker").length&&e(".step-tracker").remove(),1===(t=t>0?t:1)?e(".back-btn",n).hide():e(".back-btn",n).show(),e(".give-form-navigator",n).addClass("nav-visible"),e(u[t].selector).css("padding-top","50px")):0===t?(e(".give-form-navigator",n).removeClass("nav-visible"),e(u[t].selector).css("padding-top","")):(e(".give-form-navigator",n).addClass("nav-visible"),e(u[t].selector).css("padding-top","50px")),u[t].title&&c.text(u[t].title);var r=u.map((function(e,i){return i===t||i===p.currentStep?null:e.selector})).filter(Boolean).join(", ");if(e(r).hide(),p.currentStep!==t){var s="slide-in-right slide-in-left slide-out-right slide-out-left",l=p.currentStep<t?"left":"right",d=p.currentStep<t?"right":"left";e(u[p.currentStep].selector).removeClass(s).addClass("slide-out-".concat(l)),e(u[t].selector).show().removeClass(s).addClass("slide-in-".concat(d))}p.currentStep=t,setTimeout((function(){if(b(),!p.firstFocus&&"disabled"===i.introduction.enabled)return p.firstFocus=!0;u[p.currentStep].firstFocus&&e(u[p.currentStep].firstFocus).focus()}),200)},init:function(){var t,i;u.forEach((function(t){void 0!==t.setup&&t.setup(),e(t.selector).css("position","absolute")})),o.on("click",(function(e){e.preventDefault(),p.forward()})),r.on("click",(function(e){e.preventDefault(),p.back()})),e(".step-tracker").on("click",(function(t){t.preventDefault(),p.goToStep(parseInt(e(t.target).attr("data-step")))})),t=function(t){!1===l?e(".form-footer").css("transition","margin-top 0.2s ease"):e(".form-footer").css("transition",""),e(".form-footer").css("margin-top","".concat(t,"px"))},i=0,window.requestAnimationFrame((function n(){var a=e(u[p.currentStep].selector);i!==e(a).outerHeight()&&(t(e(a).outerHeight()),i=e(a).outerHeight()),window.requestAnimationFrame(n)})),e(".give-fee-recovery-donors-choice").parent().hasClass("give-form")&&e("#give_checkout_user_info").after(e(".give-fee-recovery-donors-choice")),p.goToStep(Give.fn.getParameterByName("showDonationProcessingError")||Give.fn.getParameterByName("showFailedDonationError")?2:0)},back:function(){var e=0!==p.currentStep?p.currentStep-1:0;p.goToStep(e),p.currentStep=e},forward:function(){var e=null!==p.currentStep?p.currentStep+1:1;p.goToStep(e),p.currentStep=e}},u=[{id:"introduction",title:null,selector:".give-section.introduction",label:i.introduction.donate_label,showErrors:!1,tabOrder:[".introduction .advance-btn",".step-tracker"]},{id:"choose-amount",title:i.payment_amount.header_label,selector:".give-section.choose-amount",label:i.payment_amount.next_label,showErrors:!1,tabOrder:["select.give-cs-select-currency","input.give-amount-top",".give-donation-levels-wrap button",".give-recurring-period",".give-recurring-donors-choice-period",".give_fee_mode_checkbox",".choose-amount .advance-btn",".step-tracker",".back-btn"],firstFocus:".give-default-level",setup:function(){var t=e(".give-donation-level-btn").length;1===t?e(".give-donation-levels-wrap").attr("style","display: none!important;"):t%2==0&&t<6&&e(".give-donation-levels-wrap").css("grid-template-columns","repeat(2, minmax(0, 1fr))"),e("#give-amount").on("blur",(function(){Give.form.fn.isValidDonationAmount(e("form"))?e(".advance-btn").attr("disabled",!1):e(".advance-btn").attr("disabled",!0)})),e(".give-donation-level-btn").each((function(){if(!e(this).attr("has-tooltip")){var t=e(this).attr("value"),i=e(this).text(),n=window.give_global_vars.currency_sign,a=window.give_global_vars.currency_pos;if("custom"!==t){var o="before"===a?'<div class="currency currency--before">'.concat(n,"</div>").concat(t):"".concat(t,'<div class="currency currency--after">').concat(n,"</div>");e(this).html(o)}if("custom"!==t&&i!==("before"===a?n+t:t+n)){var r='<span class="give-tooltip hint--top hint--bounce '.concat(i.length<50?"narrow":"",'" style="width: 100%" aria-label="').concat(i.length<50?i:i.substr(0,50)+"...",'" rel="tooltip"></span>');e(this).wrap(r),e(this).attr("has-tooltip",!0)}}}))}},{id:"payment",title:i.payment_information.header_label,label:i.payment_information.checkout_label,selector:".give-section.payment",showErrors:!0,tabOrder:[".payment input, .payment a, .payment button, .payment select, .payment multiselect, .payment textarea, .payment .button",".give-submit",".step-tracker",".back-btn"],firstFocus:"#give-first",setup:function(){e(".give-section.payment").on("click",".give-cancel-login, .give-checkout-register-cancel",w),e(".give-section.payment").on("click touchend",'input[name="give_login_submit"]',(function(){e('input[name="give_login_submit"] + .give-loading-animation').removeClass("give-loading-animation").addClass("sequoia-loader spinning")})),window.give_global_vars.purchase_loading="",e(".give_error").each((function(){g(e(this))})),_({container:"#give-anonymous-donation-wrap label",label:"#give-anonymous-donation-wrap label",input:"#give-anonymous-donation"}),_({container:".give-recurring-donors-choice",label:".give-recurring-donors-choice label",input:'input[name="give-recurring-period"]'}),_({container:".give-fee-recovery-donors-choice",label:".give-fee-message-label-text",input:'input[name="give_fee_mode_checkbox"]'}),_({container:".give-activecampaign-fieldset",label:".give-activecampaign-optin-label",input:".give-activecampaign-optin-input"}),_({container:".give-mailchimp-fieldset",label:".give-mc-message-text",input:'input[name="give_mailchimp_signup"]'}),_({container:".give-constant-contact-fieldset",label:".give-constant-contact-fieldset span",input:'input[name="give_constant_contact_signup"]'}),_({container:"#give_terms_agreement",label:"#give_terms_agreement label",input:'input[name="give_agree_to_terms"]'}),e("body.give-form-templates").on("click touchend",'form.give-form input[name="give-purchase"].give-submit',(function(){e("#give-purchase-button + .give-loading-animation").removeClass("give-loading-animation").addClass("sequoia-loader"),e("form").get(0).checkValidity()&&e(".sequoia-loader").addClass("spinning")})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_maximum",(function(){p.goToStep(1)})),e("body.give-form-templates").on("click touchend","#give_error_invalid_donation_amount",(function(){p.goToStep(1)})),e("#give-gateway-radio-list li").each((function(){var t;switch(e("input",this).val()){case"manual":t="fas fa-tools";break;case"offline":t="fas fa-wallet";break;case"paypal":t="fab fa-paypal";break;case"stripe":case"stripe_checkout":t="far fa-credit-card";break;case"stripe_sepa":case"stripe_ach":case"stripe_ideal":case"stripe_becs":t="fas fa-university";break;case"paypalpro_payflow":case"paypal-commerce":t="far fa-credit-card";break;case"stripe_google_pay":t="fab fa-google";break;case"stripe_apple_pay":t="fab fa-apple";break;default:t="fas fa-hand-holding-heart"}e(this).append('<i class="'.concat(t,'"></i>'))})),f(),h(),new window.MutationObserver((function(t){t.forEach((function(t){if(t.addedNodes)for(var i=0;i<t.addedNodes.length;i++){var n=t.addedNodes[i];if(e(n).find(".give_error").length>0&&(g(e(n).find(".give_error")),S()),e(n).children().hasClass("give_errors")&&(e(n).parent().hasClass("donation-errors")||e(n).children(".give_errors").each((function(){g(e(this))})),S()),e(n).hasClass("give_errors")&&!e(n).parent().hasClass("donation-errors")&&(g(e(n)),e(".sequoia-loader").removeClass("spinning"),S()),"give_tributes_address_state"===e(n).attr("id")){var a=e(n).attr("placeholder");e(n).prepend("<option selected disabled>".concat(a,"</option>"))}if("give_tributes_address_state"===e(n).attr("name")&&e(n).attr("class").includes("give-input")&&e(n).attr("placeholder",e(n).siblings("label").text().trim()),e(n).attr("id")&&e(n).attr("id").includes("give-checkout-login-register")&&e('[id*="give-register-account-fields"]').on("click",y),e(n).prop("tagName")&&"select"===e(n).prop("tagName").toLowerCase()){var o=e(n).attr("placeholder");o&&e(n).prepend('<option value="" disabled selected>'.concat(o,"</option>"))}}}))})).observe(document.body,{childList:!0,subtree:!0,attributes:!1,characterData:!1})}}];function g(t){e(t).parent().hasClass("give-stripe-payment-request-button")||(0===e(".donation-errors").length&&e(".payment").prepend('<div class="donation-errors"></div>'),void 0===a()(e(".donation-errors").html())||e(".donation-errors").html().includes(e(t).html())?e(t).remove():e(t).appendTo(".donation-errors"))}function f(){e("#give-ffm-section").off("click",y),e('[id*="give-register-account-fields"]').off("click",y),e("#give-ffm-section").on("click",y),e('[id*="give-register-account-fields"]').on("click",y),e("#give-ffm-section input").each((function(){switch(e(this).prop("type")){case"checkbox":e(this).prop("checked")?e(this).parent().addClass("checked"):e(this).parent().removeClass("checked");break;case"radio":e(this).prop("checked")?e(this).parent().addClass("selected"):e(this).parent().removeClass("selected")}}))}function v(){0===e("#donate-fieldset").length&&e(".give-section.payment").append('<fieldset id="donate-fieldset"></fieldset>');[".give-constant-contact-fieldset",".give-activecampaign-fieldset",".give-mailchimp-fieldset","#give_terms_agreement",".give-donation-submit"].forEach((function(t){0===e("#donate-fieldset  ".concat(t)).length||e("#donate-fieldset  ".concat(t)).html()!==e("#give_purchase_form_wrap  ".concat(t)).html()&&void 0!==e("#give_purchase_form_wrap  ".concat(t)).html()?(e("#donate-fieldset  ".concat(t)).remove(),e("#donate-fieldset").append(e("#give_purchase_form_wrap ".concat(t)))):e("#give_purchase_form_wrap ".concat(t)).remove()})),e("li.give-gateway-option-selected").after(e("#give_purchase_form_wrap"));var t="gateway-"+e(".give-gateway-option-selected input").attr("value").replace("_","-");e("#give_purchase_form_wrap").attr("class",t),f(),h()}function m(t,i){e(t).each((function(){if(""!==e(this).html()&&!1===e(this).html().includes('<i class="fas fa-'.concat(i,'"></i>'))){var t="rtl"===e("html").attr("dir")?"padding-right":"padding-left";e(this).prepend('<i class="fas fa-'.concat(i,'"></i>')),e(this).children("input, selector").each((function(){e(this).attr("style",t+": 33px!important;")}))}}))}function h(){m("#give-first-name-wrap","user"),m("#give-email-wrap","envelope"),m("#give-company-wrap","building"),m("#date_field-wrap","calendar-alt"),m("#url_field-wrap","globe"),m("#phone_field-wrap","phone"),m("#give-phone-wrap","phone"),m("#email_field-wrap","envelope")}function b(){e("select, button, input, textarea, multiselect, a").attr("tabindex",-1),u[p.currentStep].tabOrder.forEach((function(t,i){e(t).attr("tabindex",i+1)}))}function _(t){var i=t.container,n=t.label,a=t.input;!0===e(a).prop("checked")&&e(i).addClass("active"),e(document).on("click touchend",n,(function(t){i===n&&(t.stopPropagation(),t.preventDefault(),e(a).prop("checked",!e(a).prop("checked"))),e(i).toggleClass("active")}))}function y(t){if(e(t.target).is("input"))switch(e(t.target).prop("type")){case"checkbox":e(t.target).parent().toggleClass("checked");break;case"radio":e(t.target).parent().addClass("selected"),e(t.target).parent().siblings().removeClass("selected")}}function w(){e("#give_error_must_log_in").remove()}function k(){e('select option[selected="selected"][value=""]').length>0&&e('select option[selected="selected"][value=""]').each((function(){e(this).parent().siblings("label").length&&(e(this).text(e(this).parent().siblings("label").text().replace("*","").trim()),e(this).attr("disabled",!0))}))}function S(){"parentIFrame"in window&&window.parentIFrame.sendMessage({action:"giveScrollIframeInToView"})}p.init(),s.length&&"none"!==s.css("display")?(v(),e(document).on("give_gateway_loaded",(function(){setTimeout(b,200),v(),k(),e("#give_purchase_form_wrap").slideDown(200,(function(){l=!1}))})),e(document).on("Give:onPreGatewayLoad",(function(){l=!0,e("#give_purchase_form_wrap").slideUp(200)})),e(document).on("Give:onPreGatewayLoad",(function(){var t=["give_error_test_mode"];e(".give_errors, .give_notices, .give_error").each((function(){t.includes(e(this).attr("id"))||e(this).slideUp(200,(function(){e(this).remove()}))}))})),e(document).on("give_gateway_loaded",(function(t,i,n){2===p.currentStep&&e(".give-form-templates").css("min-height","");var a=e("#".concat(n));if(a.parent().hasClass("give-embed-form")){var o={action:"give_cancel_login",form_id:a.find('[name="give-form-id"]').val()};e.post(Give.fn.getGlobalVar("ajaxurl"),o,(function(t){a.find("[id^=give-checkout-login-register]").replaceWith(e.parseJSON(t.fields)),a.find("[id^=give-checkout-login-register]").css({display:"block"}),a.find(".give-submit-button-wrap").show()})).done((function(){window.give_fl_trigger()}))}}))):(e("#give_purchase_form_wrap").addClass("give-single-gateway-wrap"),k()),Array.from(document.querySelectorAll('#give_checkout_user_info input[type="text"]')).filter((function(e){return!e.required})).map((function(e){e.placeholder+=t.optionalLabel}))}(jQuery)}});