OwlCyberSecurity - MANAGER
Edit File: admin.js
(()=>{var e={98103:function(e,t){!function(){var n={version:"0.4.1",settings:{currency:{symbol:"$",format:"%s%v",decimal:".",thousand:",",precision:2,grouping:3},number:{precision:0,grouping:3,thousand:",",decimal:"."}}},i=Array.prototype.map,o=Array.isArray,a=Object.prototype.toString;function r(e){return!!(""===e||e&&e.charCodeAt&&e.substr)}function s(e){return o?o(e):"[object Array]"===a.call(e)}function l(e){return e&&"[object Object]"===a.call(e)}function c(e,t){var n;for(n in e=e||{},t=t||{})t.hasOwnProperty(n)&&null==e[n]&&(e[n]=t[n]);return e}function d(e,t,n){var o,a,r=[];if(!e)return r;if(i&&e.map===i)return e.map(t,n);for(o=0,a=e.length;o<a;o++)r[o]=t.call(n,e[o],o,e);return r}function u(e,t){return e=Math.round(Math.abs(e)),isNaN(e)?t:e}function f(e){var t=n.settings.currency.format;return"function"==typeof e&&(e=e()),r(e)&&e.match("%v")?{pos:e,neg:e.replace("-","").replace("%v","-%v"),zero:e}:e&&e.pos&&e.pos.match("%v")?e:r(t)?n.settings.currency.format={pos:t,neg:t.replace("%v","-%v"),zero:t}:t}var p=n.unformat=n.parse=function(e,t){if(s(e))return d(e,(function(e){return p(e,t)}));if("number"==typeof(e=e||0))return e;t=t||n.settings.number.decimal;var i=new RegExp("[^0-9-"+t+"]",["g"]),o=parseFloat((""+e).replace(/\((.*)\)/,"-$1").replace(i,"").replace(t,"."));return isNaN(o)?0:o},h=n.toFixed=function(e,t){t=u(t,n.settings.number.precision);var i=Math.pow(10,t);return(Math.round(n.unformat(e)*i)/i).toFixed(t)},m=n.formatNumber=n.format=function(e,t,i,o){if(s(e))return d(e,(function(e){return m(e,t,i,o)}));e=p(e);var a=c(l(t)?t:{precision:t,thousand:i,decimal:o},n.settings.number),r=u(a.precision),f=e<0?"-":"",g=parseInt(h(Math.abs(e||0),r),10)+"",v=g.length>3?g.length%3:0;return f+(v?g.substr(0,v)+a.thousand:"")+g.substr(v).replace(/(\d{3})(?=\d)/g,"$1"+a.thousand)+(r?a.decimal+h(Math.abs(e),r).split(".")[1]:"")},g=n.formatMoney=function(e,t,i,o,a,r){if(s(e))return d(e,(function(e){return g(e,t,i,o,a,r)}));e=p(e);var h=c(l(t)?t:{symbol:t,precision:i,thousand:o,decimal:a,format:r},n.settings.currency),v=f(h.format);return(e>0?v.pos:e<0?v.neg:v.zero).replace("%s",h.symbol).replace("%v",m(Math.abs(e),u(h.precision),h.thousand,h.decimal))};n.formatColumn=function(e,t,i,o,a,h){if(!e)return[];var g=c(l(t)?t:{symbol:t,precision:i,thousand:o,decimal:a,format:h},n.settings.currency),v=f(g.format),_=v.pos.indexOf("%s")<v.pos.indexOf("%v"),b=0,y=d(e,(function(e,t){if(s(e))return n.formatColumn(e,g);var i=((e=p(e))>0?v.pos:e<0?v.neg:v.zero).replace("%s",g.symbol).replace("%v",m(Math.abs(e),u(g.precision),g.thousand,g.decimal));return i.length>b&&(b=i.length),i}));return d(y,(function(e,t){return r(e)&&e.length<b?_?e.replace(g.symbol,g.symbol+new Array(b-e.length+1).join(" ")):new Array(b-e.length+1).join(" ")+e:e}))},e.exports&&(t=e.exports=n),t.accounting=n}()},43514:()=>{jQuery(document).ready((function(e){function t(t){const n=void 0!==t.standard_fields&&null!==t.standard_fields?t.standard_fields:"",i=e(".give-export-donations-standard-fields ul");n.length>0&&(i.closest("tr").removeClass("give-hidden"),e(n).each((function(e,t){i.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-standard-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-standard-field-'+t+'">'+t+"</label> </li>")})));const o=void 0!==t.hidden_fields&&null!==t.hidden_fields?t.hidden_fields:"",a=e(".give-export-donations-hidden-fields ul");o&&(a.closest("tr").removeClass("give-hidden"),e(o).each((function(e,t){a.append('<li class="give-export-donation-checkbox-remove"><label for="give-give-donations-hidden-field-'+t+'"><input type="checkbox" name="give_give_donations_export_option['+t+']" id="give-give-donations-hidden-field-'+t+'">'+t+"</label> </li>")})))}e(".give-export_donations #give-export_donations-form .give_forms_categories , .give-export_donations #give-export_donations-form .give_forms_tags").change((function(){!function(){const n=e("form#give-export_donations-form"),i=e(n).find("tr.give-export-donation-form .give-select-chosen"),o=i.prev();i.find('input[type="text"]'),i.hasClass("variations"),e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),e.ajax({type:"POST",url:ajaxurl,data:{action:"give_form_search",s:"",fields:e(n).serialize()},beforeSend:function(){o.closest("ul.chosen-results").empty()},success:function(a){e("option",o).remove();const r=[];a.length?(n.find(".give-export-donation-button").prop("disabled",!1),e.each(a,(function(e,t){o.prepend('<option value="'+t.id+'">'+t.name+"</option>"),r.push(t.id)})),o.prepend('<option value="0" selected>'+o.data("placeholder")+"</option>")):(o.prepend('<option value="0">'+o.data("no-form")+"</option>"),n.find(".give-export-donation-button").prop("disabled",!0)),n.find(".form_ids").val(r.join()),i.prev("select.give-select-chosen").trigger("chosen:updated"),t("")}})}()})),e(".give-export_donations #give-export_donations-form #give_payment_form_select").change((function(){let n;if(e(".give-export-donations-hide").addClass("give-hidden"),e("li.give-export-donation-checkbox-remove").remove(),jQuery(document).trigger("give_export_donations_form_change"),!(n=e(this).val()))return!1;e.ajax({type:"POST",url:ajaxurl,data:{form_id:n,action:"give_export_donations_get_custom_fields"},success:function(e){e?t(e):alert(Give.fn.getGlobalVar("error_message")),jQuery(document).trigger("give_export_donations_form_response",e)}})}));const n=e('.give-export-option-fields input[type="checkbox"]');e(".give-toggle-checkbox-selection").click((function(){e(this).data("clicked",!e(this).data("clicked")),n.prop("checked",!e(this).data("clicked")),function(t){let n=e(t).val(),i=e(t).attr("data-value");[n,i]=[i,n],e(t).attr("value",n),e(t).attr("data-value",i)}(this)}))}))},5585:()=>{var e;(e=jQuery)((function(){e("body").on("change",".give-give_default_radio_inline",(function(){e(".give-give_default_radio_inline").prop("checked",!1),e(this).prop("checked",!0)})),function(){e("._give_price_option_field input:radio").on("change",(function(){"set"===e("._give_price_option_field input:radio:checked").val()?(e("._give_set_price_field").show(),e("#_give_donation_levels_field").hide(),e("._give_display_style_field").hide()):(e("._give_set_price_field").hide(),e("#_give_donation_levels_field").show(),e("._give_display_style_field").show())})).change(),e("._give_display_content_field input:radio").on("change",(function(){"enabled"===e("._give_display_content_field input:radio:checked").val()?(e("._give_content_placement_field").show(),e("._give_form_content_field").show()):(e("._give_content_placement_field").hide(),e("._give_form_content_field").hide())})).change(),e("._give_terms_option_field input:radio").on("change",(function(){"enabled"===e("._give_terms_option_field input:radio:checked").val()?(e("._give_agree_label_field").show(),e("._give_agree_text_field").show()):(e("._give_agree_label_field").hide(),e("._give_agree_text_field").hide())})).change(),e("._give_payment_display_field input:radio").on("change",(function(){"onpage"===e("._give_payment_display_field input:radio:checked").val()?e("._give_reveal_label_field").hide():e("._give_reveal_label_field").show()})).change(),e("._give_custom_amount_field input:radio").on("change",(function(){"disabled"===e("._give_custom_amount_field input:radio:checked").val()?(e("._give_custom_amount_range_field ").hide(),e("._give_custom_amount_text_field").hide()):(e("._give_custom_amount_range_field ").show(),e("._give_custom_amount_text_field").show())})).change();const t=e("._give_goal_option_field"),n=e("._give_goal_format_field input:radio");e("._give_close_form_when_goal_achieved_field input:radio").on("change",(function(){"disabled"===e("._give_close_form_when_goal_achieved_field input:radio:checked").val()?e("._give_form_goal_achieved_message_field").hide():e("._give_form_goal_achieved_message_field").show()})).change(),t.on("change",(function(){"disabled"===e("._give_goal_option_field input:radio:checked").val()?(e("._give_set_goal_field").hide(),e("._give_goal_format_field").hide(),e("._give_goal_color_field").hide(),e("._give_close_form_when_goal_achieved_field").hide(),e("._give_form_goal_achieved_message_field").hide(),e("._give_number_of_donation_goal_field").hide(),e("._give_number_of_donor_goal_field").hide()):(e("._give_set_goal_field").show(),e("._give_goal_format_field").show(),e("._give_goal_color_field").show(),e("._give_close_form_when_goal_achieved_field").show(),"enabled"===e("._give_close_form_when_goal_achieved_field input:radio:checked").val()&&e("._give_form_goal_achieved_message_field").show(),n.change())})).change(),n.on("change",(function(){const t=e("._give_goal_format_field input:radio:checked").val(),n=e("._give_goal_option_field input:radio:checked").val();"donation"===t?(e("._give_set_goal_field, ._give_number_of_donor_goal_field,._give_number_of_donation_goal_field").hide(),"disabled"!==n&&e("._give_number_of_donation_goal_field").show()):"donors"===t?(e("._give_set_goal_field, ._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field").hide(),"disabled"!==n&&e("._give_number_of_donor_goal_field").show()):("disabled"===n?e("._give_set_goal_field").hide():e("._give_set_goal_field").show(),e("._give_number_of_donation_goal_field, ._give_number_of_donor_goal_field").hide())})).change(),e("._give_customize_offline_donations_field input:radio").on("change",(function(){"enabled"===e("._give_customize_offline_donations_field input:radio:checked").val()?(e("._give_offline_checkout_notes_field").show(),e("._give_offline_donation_enable_billing_fields_single_field").show(),e("._give_offline_donation_subject_field").show(),e("._give_offline_donation_email_field").show()):(e("._give_offline_checkout_notes_field").hide(),e("._give_offline_donation_enable_billing_fields_single_field").hide(),e("._give_offline_donation_subject_field").hide(),e("._give_offline_donation_email_field").hide())})).change(),e("._give_email_options_field input:radio").on("change",(function(){"enabled"===e("._give_email_options_field input:radio:checked").val()?e("#email_notification_options .give-field-wrap:not(._give_email_options_field)").show():e("#email_notification_options .give-field-wrap:not(._give_email_options_field)").hide()})).change();const i=e('input[name="_give_name_title_prefix"]:checked').val();"required"!==i&&"optional"!==i||e(".give-title-prefixes-wrap").show(),e('input[name="_give_name_title_prefix"]').on("change",(function(){const t=e('input[name="_give_name_title_prefix"]:checked').val();"required"===t||"optional"===t?e(".give-title-prefixes-wrap").show():e(".give-title-prefixes-wrap").hide()}))}(),""===e(".give-level-id").text()&&e(".cmb-repeatable-grouping").each((function(t,n){const i=e(n).data("iterator")+1;e(n).find(".give-level-id").text(i),e(n).find(".give-level-id-input").val(i)})),e("body").on("cmb2_add_row",(function(t,n){!function(t){const n=function(){let t=0,n=0,i=0;return e("#_give_donation_levels_repeat > .cmb-repeatable-grouping").each((function(o,a){i=e(this).find("input.give-level-id-input").val(),i>n&&(n=i),t++})),void 0!==n&&n>=t?parseInt(n)+1:t}();e(t).find("input.give-level-id-input").val(n),e(t).find(".give-level-id").text(n)}(n)})),e("body").on("cmb2_shift_rows_complete",(function(t,n){e(".cmb-repeatable-grouping").each((function(t,n){const i=e(n).find("input.give-level-id-input").val();e(n).find(".give-level-id").text(i)}))})),e(".cmb2-text-money").each((function(t,n){parseInt(e(n).val())||e(n).removeAttr("value")})),function(){function t(){e("[data-field-visibility]").each((function(){const t=e(this).data("field-visibility");let n=!1;Object.entries(t).forEach((([t,i])=>{const o=e('[name="'+t+'"]');o&&o.each((function(){const t=e(this),o=t.attr("type");if(!o||"radio"!==o&&"checkbox"!==o){if(t.val()==i)return void(n=!0)}else if(t.is(":checked")&&t.val()==i)return void(n=!0)}))})),e(this).parents(".give-field-wrap").toggle(n)}))}t(),e(".give-visibility-handler").on("change",t)}()}))},51037:()=>{jQuery(document).ready((function(){if("undefined"!=typeof URLSearchParams&&window.history){const e=new URLSearchParams(window.location.search);if(!e.has("give-run-migration")&&!e.has("give-clear-update"))return;e.delete("give-run-migration"),e.delete("give-clear-update");const t=`${window.location.origin}${window.location.pathname}?${e}`;window.history.replaceState({},"",t)}}))},23233:()=>{jQuery(document).ready((function(e){const t=jQuery("ul.give-payment-gatways-list");t.length&&t.sortable();const n="#give-mainform #currency",i="#give-mainform #currency_position";e("body").on("change",n,(function(){const t=e(n+" option:selected").val(),o=JSON.parse(e(this).attr("data-formatting-setting"));let a=afterText={},r=o[t],s=e("#thousands_separator","#give-mainform"),l=e("#decimal_separator","#give-mainform"),c=e("#number_decimals","#give-mainform");a=e(i).data("before-template").replace("{currency_pos}",r.symbol),e(i+' option[value="before"]').text(a),afterText=e(i).data("after-template").replace("{currency_pos}",r.symbol),e(i+' option[value="after"]').text(afterText),s.val(r.setting.thousands_separator).trigger("blur"),l.val(r.setting.decimal_separator).trigger("blur"),c.val(r.setting.number_decimals).trigger("blur")})),e("a.give-repeat-setting-field").on("click",(function(t){t.preventDefault();let n=e(this).parents("td"),i=e("p:first-child",n).clone(),o=e("p",n).not(".give-field-description").length,a=e(this).data("id")+"_"+ ++o,r=e(this).prev();return e("input",r).val()&&(e(this).before(i),r=e(this).prev(),e("input",r).attr("id",a),e("input",r).val("")),!1})),e(".give-settings-page").on("click","span.give-remove-setting-field",(function(t){e(this).parents("p").remove()})),e(".give-email-notification-status","table.giveemailnotifications").on("click",(function(){const t=e(this),n=e("i",t),i=e(this).next(),o=e(this).hasClass("give-email-notification-enabled")?"disabled":"enabled",a=e(this).data("id");if(!parseInt(t.data("edit")))return function(t){e("div.give-email-notification-status-notice").remove(),e(".wp-heading-inline").after(`<div class="updated error give-email-notification-status-notice"><p>${t.data("notice")}</p></div>`);let n=e("div.give-email-notification-status-notice");n.length&&e("html, body").animate({scrollTop:n.position().top},"slow")}(t),!1;e.ajax({url:ajaxurl,method:"POST",data:{action:"give_set_notification_status",status:o,notification_id:a},beforeSend:function(){t.hide(),i.addClass("is-active")},success:function(e){e.success&&(t.removeClass("give-email-notification-"+t.data("status")),t.addClass("give-email-notification-"+o),t.data("status",o),"enabled"===o?(n.removeClass("dashicons-no-alt"),n.addClass("dashicons-yes")):(n.removeClass("dashicons-yes"),n.addClass("dashicons-no-alt")),i.removeClass("is-active"),t.show())}})})),e("#give-clear-cache").on("click",(function(){const t=document.getElementById("give_cache_flush_nonce").value;e.ajax({url:ajaxurl,type:"GET",data:{action:"give_cache_flush",_ajax_nonce:t}}).done((function(e){e.success?new Give.modal.GiveSuccessAlert({modalContent:{title:Give.fn.getGlobalVar("flush_success"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render():new Give.modal.GiveErrorAlert({modalContent:{title:Give.fn.getGlobalVar("flush_error"),desc:e.data.message,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}))}));let o=Give.fn.getGlobalVar("decimal_separator"),a=Give.fn.getGlobalVar("thousands_separator"),r=/\(([^)]+)\)/,s={position:Give.fn.getGlobalVar("currency_pos"),symbol:Give.fn.getGlobalVar("currency_sign"),precision:Give.fn.getGlobalVar("number_decimals"),decimal:Give.fn.getGlobalVar("decimal_separator"),thousand:Give.fn.getGlobalVar("thousands_separator")};e("#number_decimals, #decimal_separator, #thousands_separator, #currency_position, #currency").on("input blur change",(function(t){const n=e("#currency_preview"),i=e("#decimal_separator"),l=e("#thousands_separator"),c=t.target.name,d=t.target.value;if("number_decimals"!==c||"input"!==t.type&&"blur"!==t.type||(d&&!isNaN(d)||"blur"!==t.type||(t.target.value=Give.fn.getGlobalVar("number_decimals")),s.precision=isNaN(parseInt(d))?Give.fn.getGlobalVar("number_decimals"):parseInt(d)),"decimal_separator"!==c||"input"!==t.type&&"blur"!==t.type||(d||"blur"!==t.type||(t.target.value=o),s.decimal=d,s.hasOwnProperty("thousand")&&"input"===t.type?s.decimal===s.thousand&&(s.thousand=o,l.val(o),o=d,a=l.val()):s.decimal===Give.fn.getGlobalVar("thousands_separator")&&"input"===t.type&&(s.thousand=o,l.val(o),o=d,a=l.val())),"thousands_separator"!==c||"input"!==t.type&&"blur"!==t.type||(d||"blur"!==t.type||(t.target.value=a),s.thousand=d,s.hasOwnProperty("decimal")&&"input"===t.type?s.decimal===s.thousand&&(s.decimal=a,i.val(a),a=d,o=i.val()):s.thousand===Give.fn.getGlobalVar("decimal_separator")&&"input"===t.type&&(s.decimal=a,i.val(a),a=d,o=i.val())),"currency_position"===c&&"change"===t.type&&(s.position=d),"currency"===c&&"change"===t.type){s.currency=d;const e=r.exec(t.target[t.target.selectedIndex].text);s.symbol=e[1]}n.val(Give.fn.formatCurrency("123456.12345",s,{}))}))})),document.addEventListener("DOMContentLoaded",(()=>{const e=document.querySelector(".give-settings-section-content");if(null===e)return;const t=e.querySelector(".give-settings-section-group-menu");if(null===t)return;const n=Array.prototype.slice.call(e.querySelectorAll(".give-settings-section-group")),i=Array.from(t.querySelectorAll("ul li a")).concat(Array.from(e.querySelectorAll("ul.give-subsubsub li a")));null!==i&&i.forEach((t=>{t.addEventListener("click",(t=>{let o,a,r=t.target;if("A"===r.tagName||(r=r.closest("a"),r)){if(r.hasAttribute("data-subgroup")){const t=r.parentElement.parentElement,n=t.parentElement;o=r.getAttribute("data-subgroup"),a=e.querySelector(`#give-settings-section-subgroup-${o}`),t.querySelectorAll("a").forEach((e=>{e.classList.remove("current")})),n.querySelectorAll(".give-settings-section-subgroup ").forEach((e=>e.classList.add("give-hidden"))),r.classList.add("current")}else o=r.getAttribute("data-group"),a=e.querySelector(`#give-settings-section-group-${o}`),i.forEach((e=>{e.classList.remove("active")})),n.map((e=>e.classList.add("give-hidden"))),r.classList.add("active");return a.classList.remove("give-hidden"),history.pushState({urlPath:r.getAttribute("href")},"",r.getAttribute("href")),t.preventDefault(),!1}}))}))})),document.addEventListener("DOMContentLoaded",(()=>{const e=document.getElementById("give-payment-gateway-settings-dialog");null!==e&&(Array.from(e.querySelectorAll("#give-payment-gateway-settings-dialog__close, .give-payment-gateway-settings-dialog__content-button")).forEach((t=>{t.addEventListener("click",(t=>{t.preventDefault(),e.close()}))})),e.showModal())}))},20157:()=>{!function(e){const t=function(){const t=e('[class*="sequoia[introduction][headline]_field"], [class*="sequoia[introduction][description]_field"], [class*="sequoia[introduction][image]_field"], [class*="sequoia[introduction][donate_label]_field"]');0===e('input[name="sequoia[introduction][enabled]"]').length||e('input[name="sequoia[introduction][enabled]"]').prop("checked")?e(t).show():e(t).hide()},n=function(){const t=e('[class*="sequoia[payment_information][donation_summary_heading]_field"], [class*="sequoia[payment_information][donation_summary_location]_field"]');0===e('input[name="sequoia[payment_information][donation_summary_enabled]"]').length||e('input[name="sequoia[payment_information][donation_summary_enabled]"]').prop("checked")?e(t).show():e(t).hide()},i=function(){const t=e('[class*="sequoia[thank-you][sharing_instruction]_field"], [class*="sequoia[thank-you][twitter_message]_field"]');0===e('input[name="sequoia[thank-you][sharing]"]').length||e('input[name="sequoia[thank-you][sharing]"]').prop("checked")?e(t).show():e(t).hide()};e(document).ready((function(){e("#form_template_options").on("click",".js-template--activate",(function(t){t.preventDefault();const n=e(this).parents(".templates-list"),i=n.parent(),o=e(this).parents(".template-info").attr("data-id");e(".template-info",n).removeClass("active"),i.find(`.template-options.${o}`).addClass("active"),e(this).text(Give.fn.getGlobalVar("deactivate")),e(this).removeClass("js-template--activate"),e(this).addClass("js-template--deactivate"),e(this).parents(".template-info").addClass("active"),i.addClass("has-activated-template"),i.prev("input[name=_give_form_template]").val(o).trigger("change")})),e("#form_template_options").on("click",".js-template--deactivate",(function(t){t.preventDefault();const n=e(this).parents(".templates-list"),i=n.parent(),o=e(this).parents(".template-info").attr("data-id");e(".template-info",n).removeClass("active"),i.find(`.template-options.${o}`).removeClass("active"),e(this).text(Give.fn.getGlobalVar("activate")),e(this).removeClass("js-template--deactivate"),e(this).addClass("js-template--activate"),i.removeClass("has-activated-template"),i.prev("input[name=_give_form_template]").val("").trigger("change")})),e(".post-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #publishing-action input[type=submit]").add(".post-new-php.post-type-give_forms #save-action input[type=submit]").add(".post-php.post-type-give_forms #save-action input[type=submit]").on("click",(function(){return!!e("input[name=_give_form_template]","#form_template_options").val()||(new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:Give.fn.getGlobalVar("form_template_required").title,desc:Give.fn.getGlobalVar("form_template_required").desc}}).render(),"form_template_options"!==Give.fn.getParameterByName("give_tab")&&e('a[href="#form_template_options"]').trigger("click"),!1)})),t(),e('input[name="sequoia[introduction][enabled]"]').on("change",(function(){t()})),n(),e('input[name="sequoia[payment_information][donation_summary_enabled]"]').on("change",(function(){n()})),i(),e('input[name="sequoia[thank-you][sharing]"]').on("change",(function(){i()}))}))}(jQuery)},23878:()=>{!function(){"use strict";window.addDynamicEventListener=function(e,t,n,i,o){e.addEventListener(t,function(e,t){return function(n){n.target&&(n.target.matches(e)||n.target.closest(e))&&t.apply(this,arguments)}}(n,i),o)}}()},89673:()=>{!function(e){"use strict";e.extend({giveAjaxifyFields:function(t){let n,i;const o=e.extend({},{type:"",parentWrapper:"form",countryFieldName:"country",stateFieldName:"state",stateFieldWrapper:".give-field-wrap",chosenState:!0},t||{});if("country_state"===o.type){if(n=e('select[name="'+o.countryFieldName+'"]'),i=n.closest(o.parentWrapper),!n.length||"Country_state"===n.data("give-ajaxify-field"))return;n.data("give-ajaxify-field","country_state"),n.change((function(){let t=e(this),n=t.closest(o.parentWrapper).find('[name="'+o.stateFieldName+'"]'),a=n.closest(o.stateFieldWrapper),r=e("label",a);o.stateFieldWrapper||(r=e('label[for="'+o.stateFieldName+'"]',i),a=n.parent());const s={action:"give_get_states",country:t.val(),field_name:o.stateFieldName};e.post(ajaxurl,s,(function(t){t.show_field?(r.length&&r.text(t.states_label),o.chosenState&&n.chosen("destroy"),o.stateFieldWrapper?a.removeClass("give-hidden"):n.removeClass("give-hidden"),void 0!==typeof t.states_found&&!0===t.states_found?(n.replaceWith(t.data),n=e('[name="'+o.stateFieldName+'"]',a),o.chosenState&&n.chosen()):(n.replaceWith('<input type="text" name="'+o.stateFieldName+'" value="'+t.default_state+'" class="medium-text"/>'),n=e('[name="'+o.stateFieldName+'"]',a))):o.stateFieldWrapper?a.addClass("give-hidden"):n.addClass("give-hidden")}))}))}return this}})}(jQuery)},31203:()=>{jQuery.fn.giveHintCss=function(e,t){return this.each((function(){const n=jQuery(this);t=jQuery.extend({label:""},t);let i=n.next("span.give-hint-tooltip-js");if(!i.length){const e=t.label.length?t.label:n.data("hint-aria-label");if(!e.length)return;n.after('<span class="give-hint-tooltip-js hint--top hint--medium" aria-label="'+e+'"></span>'),i=n.next(),i.css({top:-n.outerHeight(),left:-n.outerWidth()/2})}"show"===e?i.addClass("hint--always"):"hide"===e&&i.removeClass("hint--always")}))},jQuery(document).ready((function(e){const t=e("[data-tooltip]");function n(t){if(!t.is('[class*="hint"]')){let n=t.attr("class"),i=[],o=t.data("tooltip").split(" ").length;n&&(n=n.split(" "),i=e.grep(n,(function(e){return-1!==e.indexOf("give-icon")})),i.length&&(i=i.join(" "),t.removeClass(i),t.append('<i class="'+i+'"></i>'))),t.addClass("hint--top"),15<o?t.addClass("hint--large"):7<o&&t.addClass("hint--medium"),t.attr("aria-label",t.data("tooltip"))}}t.length&&t.each((function(t,i){n(i=i instanceof jQuery?i:e(i))})),e("body").on("mouseenter mouseleave","[data-tooltip]",(function(){n(e(this))}))}))},95963:()=>{jQuery(document).ready((function(e){e("body").on("click",".notice-dismiss",(function(t){const n=e(this).parent().parent();n.hasClass("give-notice")&&(t.preventDefault(),n.fadeTo(100,0,(function(){n.slideUp(100,(function(){n.remove()}))})))}))}))},42757:()=>{const e={collection:{},get:function(e,t,n){return jQuery?(t=void 0!==t?t:void 0,n=!0===n,(void 0===this.collection[e]||n)&&(this.collection[e]=void 0!==t?jQuery(e,t):jQuery(e)),this.collection[e]):-1}};window.Give_Selector_Cache=e},19334:()=>{document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll("div[data-give-dismissible]").forEach((e=>{const t=`give-dismissed-${e.dataset.giveDismissible}`;window.localStorage.getItem(t)||(e.classList.remove("hidden"),e.addEventListener("click",(n=>{n.target.classList.contains("notice-dismiss")&&window.localStorage.setItem(t,Date.now()),n.target.classList.contains("give-donor-dashboard-upgrade-notice__dismiss-link")&&(e.classList.add("hidden"),window.localStorage.setItem(t,Date.now()))})))}))}))},18922:function(e,t,n){var i;!function(){"use strict";function o(e,t){var n=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(n>>16)<<16|65535&n}function a(e,t,n,i,a,r){return o((s=o(o(t,e),o(i,r)))<<(l=a)|s>>>32-l,n);var s,l}function r(e,t,n,i,o,r,s){return a(t&n|~t&i,e,t,o,r,s)}function s(e,t,n,i,o,r,s){return a(t&i|n&~i,e,t,o,r,s)}function l(e,t,n,i,o,r,s){return a(t^n^i,e,t,o,r,s)}function c(e,t,n,i,o,r,s){return a(n^(t|~i),e,t,o,r,s)}function d(e,t){var n,i,a,d,u;e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;var f=1732584193,p=-271733879,h=-1732584194,m=271733878;for(n=0;n<e.length;n+=16)i=f,a=p,d=h,u=m,f=r(f,p,h,m,e[n],7,-680876936),m=r(m,f,p,h,e[n+1],12,-389564586),h=r(h,m,f,p,e[n+2],17,606105819),p=r(p,h,m,f,e[n+3],22,-1044525330),f=r(f,p,h,m,e[n+4],7,-176418897),m=r(m,f,p,h,e[n+5],12,1200080426),h=r(h,m,f,p,e[n+6],17,-1473231341),p=r(p,h,m,f,e[n+7],22,-45705983),f=r(f,p,h,m,e[n+8],7,1770035416),m=r(m,f,p,h,e[n+9],12,-1958414417),h=r(h,m,f,p,e[n+10],17,-42063),p=r(p,h,m,f,e[n+11],22,-1990404162),f=r(f,p,h,m,e[n+12],7,1804603682),m=r(m,f,p,h,e[n+13],12,-40341101),h=r(h,m,f,p,e[n+14],17,-1502002290),f=s(f,p=r(p,h,m,f,e[n+15],22,1236535329),h,m,e[n+1],5,-165796510),m=s(m,f,p,h,e[n+6],9,-1069501632),h=s(h,m,f,p,e[n+11],14,643717713),p=s(p,h,m,f,e[n],20,-373897302),f=s(f,p,h,m,e[n+5],5,-701558691),m=s(m,f,p,h,e[n+10],9,38016083),h=s(h,m,f,p,e[n+15],14,-660478335),p=s(p,h,m,f,e[n+4],20,-405537848),f=s(f,p,h,m,e[n+9],5,568446438),m=s(m,f,p,h,e[n+14],9,-1019803690),h=s(h,m,f,p,e[n+3],14,-187363961),p=s(p,h,m,f,e[n+8],20,1163531501),f=s(f,p,h,m,e[n+13],5,-1444681467),m=s(m,f,p,h,e[n+2],9,-51403784),h=s(h,m,f,p,e[n+7],14,1735328473),f=l(f,p=s(p,h,m,f,e[n+12],20,-1926607734),h,m,e[n+5],4,-378558),m=l(m,f,p,h,e[n+8],11,-2022574463),h=l(h,m,f,p,e[n+11],16,1839030562),p=l(p,h,m,f,e[n+14],23,-35309556),f=l(f,p,h,m,e[n+1],4,-1530992060),m=l(m,f,p,h,e[n+4],11,1272893353),h=l(h,m,f,p,e[n+7],16,-155497632),p=l(p,h,m,f,e[n+10],23,-1094730640),f=l(f,p,h,m,e[n+13],4,681279174),m=l(m,f,p,h,e[n],11,-358537222),h=l(h,m,f,p,e[n+3],16,-722521979),p=l(p,h,m,f,e[n+6],23,76029189),f=l(f,p,h,m,e[n+9],4,-640364487),m=l(m,f,p,h,e[n+12],11,-421815835),h=l(h,m,f,p,e[n+15],16,530742520),f=c(f,p=l(p,h,m,f,e[n+2],23,-995338651),h,m,e[n],6,-198630844),m=c(m,f,p,h,e[n+7],10,1126891415),h=c(h,m,f,p,e[n+14],15,-1416354905),p=c(p,h,m,f,e[n+5],21,-57434055),f=c(f,p,h,m,e[n+12],6,1700485571),m=c(m,f,p,h,e[n+3],10,-1894986606),h=c(h,m,f,p,e[n+10],15,-1051523),p=c(p,h,m,f,e[n+1],21,-2054922799),f=c(f,p,h,m,e[n+8],6,1873313359),m=c(m,f,p,h,e[n+15],10,-30611744),h=c(h,m,f,p,e[n+6],15,-1560198380),p=c(p,h,m,f,e[n+13],21,1309151649),f=c(f,p,h,m,e[n+4],6,-145523070),m=c(m,f,p,h,e[n+11],10,-1120210379),h=c(h,m,f,p,e[n+2],15,718787259),p=c(p,h,m,f,e[n+9],21,-343485551),f=o(f,i),p=o(p,a),h=o(h,d),m=o(m,u);return[f,p,h,m]}function u(e){var t,n="",i=32*e.length;for(t=0;t<i;t+=8)n+=String.fromCharCode(e[t>>5]>>>t%32&255);return n}function f(e){var t,n=[];for(n[(e.length>>2)-1]=void 0,t=0;t<n.length;t+=1)n[t]=0;var i=8*e.length;for(t=0;t<i;t+=8)n[t>>5]|=(255&e.charCodeAt(t/8))<<t%32;return n}function p(e){var t,n,i="0123456789abcdef",o="";for(n=0;n<e.length;n+=1)t=e.charCodeAt(n),o+=i.charAt(t>>>4&15)+i.charAt(15&t);return o}function h(e){return unescape(encodeURIComponent(e))}function m(e){return function(e){return u(d(f(e),8*e.length))}(h(e))}function g(e,t){return function(e,t){var n,i,o=f(e),a=[],r=[];for(a[15]=r[15]=void 0,o.length>16&&(o=d(o,8*e.length)),n=0;n<16;n+=1)a[n]=909522486^o[n],r[n]=1549556828^o[n];return i=d(a.concat(f(t)),512+8*t.length),u(d(r.concat(i),640))}(h(e),h(t))}function v(e,t,n){return t?n?g(t,e):p(g(t,e)):n?m(e):p(m(e))}void 0===(i=function(){return v}.call(t,n,t,e))||(e.exports=i)}()},67895:function(){(function(){var e,t,n,i,o={}.hasOwnProperty;(i=function(){function e(){this.options_index=0,this.parsed=[]}return e.prototype.add_node=function(e){return"OPTGROUP"===e.nodeName.toUpperCase()?this.add_group(e):this.add_option(e)},e.prototype.add_group=function(e){var t,n,i,o,a,r;for(t=this.parsed.length,this.parsed.push({array_index:t,group:!0,label:e.label,title:e.title?e.title:void 0,children:0,disabled:e.disabled,classes:e.className}),r=[],n=0,i=(a=e.childNodes).length;n<i;n++)o=a[n],r.push(this.add_option(o,t,e.disabled));return r},e.prototype.add_option=function(e,t,n){if("OPTION"===e.nodeName.toUpperCase())return""!==e.text?(null!=t&&(this.parsed[t].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:e.value,text:e.text,html:e.innerHTML,title:e.title?e.title:void 0,selected:e.selected,disabled:!0===n?n:e.disabled,group_array_index:t,group_label:null!=t?this.parsed[t].label:null,classes:e.className,style:e.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1},e}()).select_to_array=function(e){var t,n,o,a,r;for(a=new i,n=0,o=(r=e.childNodes).length;n<o;n++)t=r[n],a.add_node(t);return a.parsed},t=function(){function e(t,n){var i,o;this.form_field=t,this.options=null!=n?n:{},this.label_click_handler=(i=this.label_click_handler,o=this,function(){return i.apply(o,arguments)}),e.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers(),this.on_ready())}return e.prototype.set_default_values=function(){var e;return this.click_test_action=(e=this,function(t){return e.test_active_click(t)}),this.activate_action=function(e){return function(t){return e.activate_field(t)}}(this),this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.is_rtl=this.options.rtl||/\bchosen-rtl\b/.test(this.form_field.className),this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text&&this.options.allow_single_deselect,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null==this.options.enable_split_word_search||this.options.enable_split_word_search,this.group_search=null==this.options.group_search||this.options.group_search,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null==this.options.single_backstroke_delete||this.options.single_backstroke_delete,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null==this.options.display_selected_options||this.options.display_selected_options,this.display_disabled_options=null==this.options.display_disabled_options||this.options.display_disabled_options,this.include_group_label_in_selected=this.options.include_group_label_in_selected||!1,this.max_shown_results=this.options.max_shown_results||Number.POSITIVE_INFINITY,this.case_sensitive_search=this.options.case_sensitive_search||!1,this.hide_results_on_select=null==this.options.hide_results_on_select||this.options.hide_results_on_select},e.prototype.set_default_text=function(){return this.form_field.getAttribute("data-placeholder")?this.default_text=this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.default_text=this.options.placeholder_text_multiple||this.options.placeholder_text||e.default_multiple_text:this.default_text=this.options.placeholder_text_single||this.options.placeholder_text||e.default_single_text,this.default_text=this.escape_html(this.default_text),this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||e.default_no_result_text},e.prototype.choice_label=function(e){return this.include_group_label_in_selected&&null!=e.group_label?"<b class='group-name'>"+this.escape_html(e.group_label)+"</b>"+e.html:e.html},e.prototype.mouse_enter=function(){return this.mouse_on_container=!0},e.prototype.mouse_leave=function(){return this.mouse_on_container=!1},e.prototype.input_focus=function(e){if(this.is_multiple){if(!this.active_field)return setTimeout((t=this,function(){return t.container_mousedown()}),50)}else if(!this.active_field)return this.activate_field();var t},e.prototype.input_blur=function(e){if(!this.mouse_on_container)return this.active_field=!1,setTimeout((t=this,function(){return t.blur_test()}),100);var t},e.prototype.label_click_handler=function(e){return this.is_multiple?this.container_mousedown(e):this.activate_field()},e.prototype.results_option_build=function(e){var t,n,i,o,a,r,s;for(t="",s=0,o=0,a=(r=this.results_data).length;o<a&&("",""!==(i=(n=r[o]).group?this.result_add_group(n):this.result_add_option(n))&&(s++,t+=i),(null!=e?e.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(this.choice_label(n))),!(s>=this.max_shown_results));o++);return t},e.prototype.result_add_option=function(e){var t,n;return e.search_match&&this.include_option_in_results(e)?(t=[],e.disabled||e.selected&&this.is_multiple||t.push("active-result"),!e.disabled||e.selected&&this.is_multiple||t.push("disabled-result"),e.selected&&t.push("result-selected"),null!=e.group_array_index&&t.push("group-option"),""!==e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),e.style&&(n.style.cssText=e.style),n.setAttribute("data-option-array-index",e.array_index),n.innerHTML=e.highlighted_html||e.html,e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.result_add_group=function(e){var t,n;return(e.search_match||e.group_match)&&e.active_options>0?((t=[]).push("group-result"),e.classes&&t.push(e.classes),(n=document.createElement("li")).className=t.join(" "),n.innerHTML=e.highlighted_html||this.escape_html(e.label),e.title&&(n.title=e.title),this.outerHTML(n)):""},e.prototype.results_update_field=function(){if(this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.results_build(),this.results_showing)return this.winnow_results()},e.prototype.reset_single_select_options=function(){var e,t,n,i,o;for(o=[],e=0,t=(n=this.results_data).length;e<t;e++)(i=n[e]).selected?o.push(i.selected=!1):o.push(void 0);return o},e.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},e.prototype.results_search=function(e){return this.results_showing?this.winnow_results():this.results_show()},e.prototype.winnow_results=function(e){var t,n,i,o,a,r,s,l,c,d,u,f,p,h,m;for(this.no_results_clear(),d=0,t=(s=this.get_search_text()).replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),c=this.get_search_regex(t),i=0,o=(l=this.results_data).length;i<o;i++)(a=l[i]).search_match=!1,u=null,f=null,a.highlighted_html="",this.include_option_in_results(a)&&(a.group&&(a.group_match=!1,a.active_options=0),null!=a.group_array_index&&this.results_data[a.group_array_index]&&(0===(u=this.results_data[a.group_array_index]).active_options&&u.search_match&&(d+=1),u.active_options+=1),m=a.group?a.label:a.text,a.group&&!this.group_search||(f=this.search_string_match(m,c),a.search_match=null!=f,a.search_match&&!a.group&&(d+=1),a.search_match?(s.length&&(p=f.index,r=m.slice(0,p),n=m.slice(p,p+s.length),h=m.slice(p+s.length),a.highlighted_html=this.escape_html(r)+"<em>"+this.escape_html(n)+"</em>"+this.escape_html(h)),null!=u&&(u.group_match=!0)):null!=a.group_array_index&&this.results_data[a.group_array_index].search_match&&(a.search_match=!0)));return this.result_clear_highlight(),d<1&&s.length?(this.update_results_content(""),this.no_results(s)):(this.update_results_content(this.results_option_build()),(null!=e?e.skip_highlight:void 0)?void 0:this.winnow_results_set_highlight())},e.prototype.get_search_regex=function(e){var t,n;return n=this.search_contains?e:"(^|\\s|\\b)"+e+"[^\\s]*",this.enable_split_word_search||this.search_contains||(n="^"+n),t=this.case_sensitive_search?"":"i",new RegExp(n,t)},e.prototype.search_string_match=function(e,t){var n;return n=t.exec(e),!this.search_contains&&(null!=n?n[1]:void 0)&&(n.index+=1),n},e.prototype.choices_count=function(){var e,t,n;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,e=0,t=(n=this.form_field.options).length;e<t;e++)n[e].selected&&(this.selected_option_count+=1);return this.selected_option_count},e.prototype.choices_click=function(e){if(e.preventDefault(),this.activate_field(),!this.results_showing&&!this.is_disabled)return this.results_show()},e.prototype.keydown_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),8!==n&&this.pending_backstroke&&this.clear_backstroke(),n){case 8:this.backstroke_length=this.get_search_field_value().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(e),this.mouse_on_container=!1;break;case 13:case 27:this.results_showing&&e.preventDefault();break;case 32:this.disable_search&&e.preventDefault();break;case 38:e.preventDefault(),this.keyup_arrow();break;case 40:e.preventDefault(),this.keydown_arrow()}},e.prototype.keyup_checker=function(e){var t,n;switch(n=null!=(t=e.which)?t:e.keyCode,this.search_field_scale(),n){case 8:this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0?this.keydown_backstroke():this.pending_backstroke||(this.result_clear_highlight(),this.results_search());break;case 13:e.preventDefault(),this.results_showing&&this.result_select(e);break;case 27:this.results_showing&&this.results_hide();break;case 9:case 16:case 17:case 18:case 38:case 40:case 91:break;default:this.results_search()}},e.prototype.clipboard_event_checker=function(e){var t;if(!this.is_disabled)return setTimeout((t=this,function(){return t.results_search()}),50)},e.prototype.container_width=function(){return null!=this.options.width?this.options.width:this.form_field.offsetWidth+"px"},e.prototype.include_option_in_results=function(e){return!(this.is_multiple&&!this.display_selected_options&&e.selected||!this.display_disabled_options&&e.disabled||e.empty)},e.prototype.search_results_touchstart=function(e){return this.touch_started=!0,this.search_results_mouseover(e)},e.prototype.search_results_touchmove=function(e){return this.touch_started=!1,this.search_results_mouseout(e)},e.prototype.search_results_touchend=function(e){if(this.touch_started)return this.search_results_mouseup(e)},e.prototype.outerHTML=function(e){var t;return e.outerHTML?e.outerHTML:((t=document.createElement("div")).appendChild(e),t.innerHTML)},e.prototype.get_single_html=function(){return'<a class="chosen-single chosen-default">\n <span>'+this.default_text+'</span>\n <div><b></b></div>\n</a>\n<div class="chosen-drop">\n <div class="chosen-search">\n <input class="chosen-search-input" type="text" autocomplete="off" />\n </div>\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_multi_html=function(){return'<ul class="chosen-choices">\n <li class="search-field">\n <input class="chosen-search-input" type="text" autocomplete="off" value="'+this.default_text+'" />\n </li>\n</ul>\n<div class="chosen-drop">\n <ul class="chosen-results"></ul>\n</div>'},e.prototype.get_no_results_html=function(e){return'<li class="no-results">\n '+this.results_none_found+" <span>"+this.escape_html(e)+"</span>\n</li>"},e.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:!(/iP(od|hone)/i.test(window.navigator.userAgent)||/IEMobile/i.test(window.navigator.userAgent)||/Windows Phone/i.test(window.navigator.userAgent)||/BlackBerry/i.test(window.navigator.userAgent)||/BB10/i.test(window.navigator.userAgent)||/Android.*Mobile/i.test(window.navigator.userAgent))},e.default_multiple_text="Select Some Options",e.default_single_text="Select an Option",e.default_no_result_text="No results match",e}(),(e=jQuery).fn.extend({chosen:function(i){return t.browser_is_supported()?this.each((function(t){var o,a;a=(o=e(this)).data("chosen"),"destroy"!==i?a instanceof n||o.data("chosen",new n(this,i)):a instanceof n&&a.destroy()})):this}}),n=function(t){function n(){return n.__super__.constructor.apply(this,arguments)}return function(e,t){for(var n in t)o.call(t,n)&&(e[n]=t[n]);function i(){this.constructor=e}i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype}(n,t),n.prototype.setup=function(){return this.form_field_jq=e(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex},n.prototype.set_up_html=function(){var t,n;return(t=["chosen-container"]).push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&t.push(this.form_field.className),this.is_rtl&&t.push("chosen-rtl"),n={class:t.join(" "),title:this.form_field.title},this.form_field.id.length&&(n.id=this.form_field.id.replace(/[^\w]/g,"_")+"_chosen"),this.container=e("<div />",n),this.container.width(this.container_width()),this.is_multiple?this.container.html(this.get_multi_html()):this.container.html(this.get_single_html()),this.form_field_jq.hide().after(this.container),this.dropdown=this.container.find("div.chosen-drop").first(),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chosen-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chosen-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chosen-search").first(),this.selected_item=this.container.find(".chosen-single").first()),this.results_build(),this.set_tab_index(),this.set_label_behavior()},n.prototype.on_ready=function(){return this.form_field_jq.trigger("chosen:ready",{chosen:this})},n.prototype.register_observers=function(){var e;return this.container.on("touchstart.chosen",(e=this,function(t){e.container_mousedown(t)})),this.container.on("touchend.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.on("mousedown.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.container.on("mouseup.chosen",function(e){return function(t){e.container_mouseup(t)}}(this)),this.container.on("mouseenter.chosen",function(e){return function(t){e.mouse_enter(t)}}(this)),this.container.on("mouseleave.chosen",function(e){return function(t){e.mouse_leave(t)}}(this)),this.search_results.on("mouseup.chosen",function(e){return function(t){e.search_results_mouseup(t)}}(this)),this.search_results.on("mouseover.chosen",function(e){return function(t){e.search_results_mouseover(t)}}(this)),this.search_results.on("mouseout.chosen",function(e){return function(t){e.search_results_mouseout(t)}}(this)),this.search_results.on("mousewheel.chosen DOMMouseScroll.chosen",function(e){return function(t){e.search_results_mousewheel(t)}}(this)),this.search_results.on("touchstart.chosen",function(e){return function(t){e.search_results_touchstart(t)}}(this)),this.search_results.on("touchmove.chosen",function(e){return function(t){e.search_results_touchmove(t)}}(this)),this.search_results.on("touchend.chosen",function(e){return function(t){e.search_results_touchend(t)}}(this)),this.form_field_jq.on("chosen:updated.chosen",function(e){return function(t){e.results_update_field(t)}}(this)),this.form_field_jq.on("chosen:activate.chosen",function(e){return function(t){e.activate_field(t)}}(this)),this.form_field_jq.on("chosen:open.chosen",function(e){return function(t){e.container_mousedown(t)}}(this)),this.form_field_jq.on("chosen:close.chosen",function(e){return function(t){e.close_field(t)}}(this)),this.search_field.on("blur.chosen",function(e){return function(t){e.input_blur(t)}}(this)),this.search_field.on("keyup.chosen",function(e){return function(t){e.keyup_checker(t)}}(this)),this.search_field.on("keydown.chosen",function(e){return function(t){e.keydown_checker(t)}}(this)),this.search_field.on("focus.chosen",function(e){return function(t){e.input_focus(t)}}(this)),this.search_field.on("cut.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.search_field.on("paste.chosen",function(e){return function(t){e.clipboard_event_checker(t)}}(this)),this.is_multiple?this.search_choices.on("click.chosen",function(e){return function(t){e.choices_click(t)}}(this)):this.container.on("click.chosen",(function(e){e.preventDefault()}))},n.prototype.destroy=function(){return e(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.form_field_label.length>0&&this.form_field_label.off("click.chosen"),this.search_field[0].tabIndex&&(this.form_field_jq[0].tabIndex=this.search_field[0].tabIndex),this.container.remove(),this.form_field_jq.removeData("chosen"),this.form_field_jq.show()},n.prototype.search_field_disabled=function(){return this.is_disabled=this.form_field.disabled||this.form_field_jq.parents("fieldset").is(":disabled"),this.container.toggleClass("chosen-disabled",this.is_disabled),this.search_field[0].disabled=this.is_disabled,this.is_multiple||this.selected_item.off("focus.chosen",this.activate_field),this.is_disabled?this.close_field():this.is_multiple?void 0:this.selected_item.on("focus.chosen",this.activate_field)},n.prototype.container_mousedown=function(t){var n;if(!this.is_disabled)return!t||"mousedown"!==(n=t.type)&&"touchstart"!==n||this.results_showing||t.preventDefault(),null!=t&&e(t.target).hasClass("search-choice-close")?void 0:(this.active_field?this.is_multiple||!t||e(t.target)[0]!==this.selected_item[0]&&!e(t.target).parents("a.chosen-single").length||(t.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),e(this.container[0].ownerDocument).on("click.chosen",this.click_test_action),this.results_show()),this.activate_field())},n.prototype.container_mouseup=function(e){if("ABBR"===e.target.nodeName&&!this.is_disabled)return this.results_reset(e)},n.prototype.search_results_mousewheel=function(e){var t;if(e.originalEvent&&(t=e.originalEvent.deltaY||-e.originalEvent.wheelDelta||e.originalEvent.detail),null!=t)return e.preventDefault(),"DOMMouseScroll"===e.type&&(t*=40),this.search_results.scrollTop(t+this.search_results.scrollTop())},n.prototype.blur_test=function(e){if(!this.active_field&&this.container.hasClass("chosen-container-active"))return this.close_field()},n.prototype.close_field=function(){return e(this.container[0].ownerDocument).off("click.chosen",this.click_test_action),this.active_field=!1,this.results_hide(),this.container.removeClass("chosen-container-active"),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale(),this.search_field.blur()},n.prototype.activate_field=function(){if(!this.is_disabled)return this.container.addClass("chosen-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},n.prototype.test_active_click=function(t){var n;return(n=e(t.target).closest(".chosen-container")).length&&this.container[0]===n[0]?this.active_field=!0:this.close_field()},n.prototype.results_build=function(){return this.parsing=!0,this.selected_option_count=null,this.results_data=i.select_to_array(this.form_field),this.is_multiple?this.search_choices.find("li.search-choice").remove():(this.single_set_selected_text(),this.disable_search||this.form_field.options.length<=this.disable_search_threshold?(this.search_field[0].readOnly=!0,this.container.addClass("chosen-container-single-nosearch")):(this.search_field[0].readOnly=!1,this.container.removeClass("chosen-container-single-nosearch"))),this.update_results_content(this.results_option_build({first:!0})),this.search_field_disabled(),this.show_search_field_default(),this.search_field_scale(),this.parsing=!1},n.prototype.result_do_highlight=function(e){var t,n,i,o,a;if(e.length){if(this.result_clear_highlight(),this.result_highlight=e,this.result_highlight.addClass("highlighted"),o=(i=parseInt(this.search_results.css("maxHeight"),10))+(a=this.search_results.scrollTop()),(t=(n=this.result_highlight.position().top+this.search_results.scrollTop())+this.result_highlight.outerHeight())>=o)return this.search_results.scrollTop(t-i>0?t-i:0);if(n<a)return this.search_results.scrollTop(n)}},n.prototype.result_clear_highlight=function(){return this.result_highlight&&this.result_highlight.removeClass("highlighted"),this.result_highlight=null},n.prototype.results_show=function(){return this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.container.addClass("chosen-with-drop"),this.results_showing=!0,this.search_field.focus(),this.search_field.val(this.get_search_field_value()),this.winnow_results(),this.form_field_jq.trigger("chosen:showing_dropdown",{chosen:this}))},n.prototype.update_results_content=function(e){return this.search_results.html(e)},n.prototype.results_hide=function(){return this.results_showing&&(this.result_clear_highlight(),this.container.removeClass("chosen-with-drop"),this.form_field_jq.trigger("chosen:hiding_dropdown",{chosen:this})),this.results_showing=!1},n.prototype.set_tab_index=function(e){var t;if(this.form_field.tabIndex)return t=this.form_field.tabIndex,this.form_field.tabIndex=-1,this.search_field[0].tabIndex=t},n.prototype.set_label_behavior=function(){if(this.form_field_label=this.form_field_jq.parents("label"),!this.form_field_label.length&&this.form_field.id.length&&(this.form_field_label=e("label[for='"+this.form_field.id+"']")),this.form_field_label.length>0)return this.form_field_label.on("click.chosen",this.label_click_handler)},n.prototype.show_search_field_default=function(){return this.is_multiple&&this.choices_count()<1&&!this.active_field?(this.search_field.val(this.default_text),this.search_field.addClass("default")):(this.search_field.val(""),this.search_field.removeClass("default"))},n.prototype.search_results_mouseup=function(t){var n;if((n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first()).length)return this.result_highlight=n,this.result_select(t),this.search_field.focus()},n.prototype.search_results_mouseover=function(t){var n;if(n=e(t.target).hasClass("active-result")?e(t.target):e(t.target).parents(".active-result").first())return this.result_do_highlight(n)},n.prototype.search_results_mouseout=function(t){if(e(t.target).hasClass("active-result")||e(t.target).parents(".active-result").first())return this.result_clear_highlight()},n.prototype.choice_build=function(t){var n,i,o;return n=e("<li />",{class:"search-choice"}).html("<span>"+this.choice_label(t)+"</span>"),t.disabled?n.addClass("search-choice-disabled"):((i=e("<a />",{class:"search-choice-close","data-option-array-index":t.array_index})).on("click.chosen",(o=this,function(e){return o.choice_destroy_link_click(e)})),n.append(i)),this.search_container.before(n)},n.prototype.choice_destroy_link_click=function(t){if(t.preventDefault(),t.stopPropagation(),!this.is_disabled)return this.choice_destroy(e(t.target))},n.prototype.choice_destroy=function(e){if(this.result_deselect(e[0].getAttribute("data-option-array-index")))return this.active_field?this.search_field.focus():this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.get_search_field_value().length<1&&this.results_hide(),e.parents("li").first().remove(),this.search_field_scale()},n.prototype.results_reset=function(){if(this.reset_single_select_options(),this.form_field.options[0].selected=!0,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.trigger_form_field_change(),this.active_field)return this.results_hide()},n.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},n.prototype.result_select=function(e){var t,n;if(this.result_highlight)return t=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?t.removeClass("active-result"):this.reset_single_select_options(),t.addClass("result-selected"),(n=this.results_data[t[0].getAttribute("data-option-array-index")]).selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(this.choice_label(n)),this.is_multiple&&(!this.hide_results_on_select||e.metaKey||e.ctrlKey)?e.metaKey||e.ctrlKey?this.winnow_results({skip_highlight:!0}):(this.search_field.val(""),this.winnow_results()):(this.results_hide(),this.show_search_field_default()),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.trigger_form_field_change({selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,e.preventDefault(),this.search_field_scale())},n.prototype.single_set_selected_text=function(e){return null==e&&(e=this.default_text),e===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").html(e)},n.prototype.result_deselect=function(e){var t;return t=this.results_data[e],!this.form_field.options[t.options_index].disabled&&(t.selected=!1,this.form_field.options[t.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.trigger_form_field_change({deselected:this.form_field.options[t.options_index].value}),this.search_field_scale(),!0)},n.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect)return this.selected_item.find("abbr").length||this.selected_item.find("span").first().after('<abbr class="search-choice-close"></abbr>'),this.selected_item.addClass("chosen-single-with-deselect")},n.prototype.get_search_field_value=function(){return this.search_field.val()},n.prototype.get_search_text=function(){return e.trim(this.get_search_field_value())},n.prototype.escape_html=function(t){return e("<div/>").text(t).html()},n.prototype.winnow_results_set_highlight=function(){var e,t;if(null!=(e=(t=this.is_multiple?[]:this.search_results.find(".result-selected.active-result")).length?t.first():this.search_results.find(".active-result").first()))return this.result_do_highlight(e)},n.prototype.no_results=function(e){var t;return t=this.get_no_results_html(e),this.search_results.append(t),this.form_field_jq.trigger("chosen:no_results",{chosen:this})},n.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},n.prototype.keydown_arrow=function(){var e;return this.results_showing&&this.result_highlight?(e=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(e):void 0:this.results_show()},n.prototype.keyup_arrow=function(){var e;return this.results_showing||this.is_multiple?this.result_highlight?(e=this.result_highlight.prevAll("li.active-result")).length?this.result_do_highlight(e.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight()):void 0:this.results_show()},n.prototype.keydown_backstroke=function(){var e;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(e=this.search_container.siblings("li.search-choice").last()).length&&!e.hasClass("search-choice-disabled")?(this.pending_backstroke=e,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0},n.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},n.prototype.search_field_scale=function(){var t,n,i,o,a,r,s;if(this.is_multiple){for(a={position:"absolute",left:"-1000px",top:"-1000px",display:"none",whiteSpace:"pre"},n=0,i=(r=["fontSize","fontStyle","fontWeight","fontFamily","lineHeight","textTransform","letterSpacing"]).length;n<i;n++)a[o=r[n]]=this.search_field.css(o);return(t=e("<div />").css(a)).text(this.get_search_field_value()),e("body").append(t),s=t.width()+25,t.remove(),this.container.is(":visible")&&(s=Math.min(this.container.outerWidth()-10,s)),this.search_field.width(s)}},n.prototype.trigger_form_field_change=function(e){return this.form_field_jq.trigger("input",e),this.form_field_jq.trigger("change",e)},n}(t)}).call(this)},57576:function(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return y}});var i=n(279),o=n.n(i),a=n(370),r=n.n(a),s=n(817),l=n.n(s);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var d=function(e){var t=l()(e);return c("cut"),t},u=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var i=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(i,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var i=l()(n);return c("copy"),n.remove(),i},f=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=u(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=u(e.value,t):(n=l()(e),c("copy")),n};function p(e){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},p(e)}function h(e){return h="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},h(e)}function m(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function g(e,t){return g=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},g(e,t)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function _(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var b=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&g(e,t)}(l,e);var t,n,i,o,a,s=(o=l,a=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}(),function(){var e,t=v(o);if(a){var n=v(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==h(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function l(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,l),(n=s.call(this)).resolveOptions(t),n.listenClick(e),n}return t=l,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===h(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=r()(e,"click",(function(e){return t.onClick(e)}))}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,i=e.container,o=e.target,a=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==o){if(!o||"object"!==p(o)||1!==o.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&o.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(o.hasAttribute("readonly")||o.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return a?f(a,{container:i}):o?"cut"===n?d(o):f(o,{container:i}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(i?"success":"error",{action:n,text:i,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return _("action",e)}},{key:"defaultTarget",value:function(e){var t=_("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return _("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],i=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return f(e,t)}},{key:"cut",value:function(e){return d(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach((function(e){n=n&&!!document.queryCommandSupported(e)})),n}}],n&&m(t.prototype,n),i&&m(t,i),l}(o()),y=b},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var i=n(828);function o(e,t,n,i,o){var r=a.apply(this,arguments);return e.addEventListener(n,r,o),{destroy:function(){e.removeEventListener(n,r,o)}}}function a(e,t,n,o){return function(n){n.delegateTarget=i(n.target,t),n.delegateTarget&&o.call(e,n)}}e.exports=function(e,t,n,i,a){return"function"==typeof e.addEventListener?o.apply(null,arguments):"function"==typeof n?o.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,(function(e){return o(e,t,n,i,a)})))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var i=n(879),o=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!i.string(t))throw new TypeError("Second argument must be a String");if(!i.fn(n))throw new TypeError("Third argument must be a Function");if(i.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(i.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,(function(e){e.addEventListener(t,n)})),{destroy:function(){Array.prototype.forEach.call(e,(function(e){e.removeEventListener(t,n)}))}}}(e,t,n);if(i.string(e))return function(e,t,n){return o(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var i=window.getSelection(),o=document.createRange();o.selectNodeContents(e),i.removeAllRanges(),i.addRange(o),t=i.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var i=this.e||(this.e={});return(i[e]||(i[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var i=this;function o(){i.off(e,o),t.apply(n,arguments)}return o._=t,this.on(e,o,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),i=0,o=n.length;i<o;i++)n[i].fn.apply(n[i].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),i=n[e],o=[];if(i&&t)for(var a=0,r=i.length;a<r;a++)i[a].fn!==t&&i[a].fn._!==t&&o.push(i[a]);return o.length?n[e]=o:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(i){if(t[i])return t[i].exports;var o=t[i]={exports:{}};return e[i](o,o.exports,n),o.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},14306:()=>{jQuery.plot.plugins.push({init:function(e){var t,n,i,o,a=1,r=!1,s={};function l(e,t){var n=e.bars.order,i=t.bars.order;return n<i?-1:n>i?1:0}function c(e,t,n){for(var i=0,a=t;a<=n;a++)i+=e[a].bars.barWidth+2*o;return i}e.hooks.processDatapoints.push((function(e,d,u){var f,p=null;if(function(e){return null!=e.bars&&e.bars.show&&null!=e.bars.order}(d)&&(function(e){e.bars.horizontal&&(r=!0)}(d),function(e){var t=r?e.getPlaceholder().innerHeight():e.getPlaceholder().innerWidth(),n=function(e,t){for(var n=new Array,i=0;i<e.length;i++)n[0]=e[i].data[0]?e[i].data[0][t]:null,n[1]=e[i].data[e[i].data.length-1]?e[i].data[e[i].data.length-1][t]:null;return n}(e.getData(),r?1:0),i=n[1]-n[0];a=i/t}(e),function(e){t=function(e){for(var t=new Array,n=[],i=0;i<e.length;i++)null!=e[i].bars.order&&e[i].bars.show&&n.indexOf(e[i].bars.order)<0&&(n.push(e[i].bars.order),t.push(e[i]));return t.sort(l)}(e.getData()),n=t.length}(e),function(e){i=void 0!==e.bars.lineWidth?e.bars.lineWidth:2,o=i*a}(d),n>=2)){var h=function(e){for(var n=0,i=0;i<t.length;++i)if(e==t[i]){n=i;break}return n+1}(d),m=(f=0,n%2!=0&&(f=t[Math.ceil(n/2)].bars.barWidth/2),f);void 0===s[d.bars.order]&&(function(e){return e<=Math.ceil(n/2)}(h)?s[d.bars.order]=-1*c(t,h-1,Math.floor(n/2)-1)-m:s[d.bars.order]=c(t,Math.ceil(n/2),h-2)+m+2*o),p=function(e,t,n){for(var i=e.pointsize,o=e.points,a=0,s=r?1:0;s<o.length;s+=i)o[s]+=n,t.data[a][3]=o[s],a++;return o}(u,d,s[d.bars.order]),u.points=p}return p}))},options:{series:{bars:{order:null}}},name:"orderBars",version:"0.2"})},16349:()=>{!function(e){e.color={},e.color.make=function(t,n,i,o){var a={};return a.r=t||0,a.g=n||0,a.b=i||0,a.a=null!=o?o:1,a.add=function(e,t){for(var n=0;n<e.length;++n)a[e.charAt(n)]+=t;return a.normalize()},a.scale=function(e,t){for(var n=0;n<e.length;++n)a[e.charAt(n)]*=t;return a.normalize()},a.toString=function(){return a.a>=1?"rgb("+[a.r,a.g,a.b].join(",")+")":"rgba("+[a.r,a.g,a.b,a.a].join(",")+")"},a.normalize=function(){function e(e,t,n){return t<e?e:t>n?n:t}return a.r=e(0,parseInt(a.r),255),a.g=e(0,parseInt(a.g),255),a.b=e(0,parseInt(a.b),255),a.a=e(0,a.a,1),a},a.clone=function(){return e.color.make(a.r,a.b,a.g,a.a)},a.normalize()},e.color.extract=function(t,n){var i;do{if(""!=(i=t.css(n).toLowerCase())&&"transparent"!=i)break;t=t.parent()}while(t.length&&!e.nodeName(t.get(0),"body"));return"rgba(0, 0, 0, 0)"==i&&(i="transparent"),e.color.parse(i)},e.color.parse=function(n){var i,o=e.color.make;if(i=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(n))return o(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10));if(i=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return o(parseInt(i[1],10),parseInt(i[2],10),parseInt(i[3],10),parseFloat(i[4]));if(i=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(n))return o(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]));if(i=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(n))return o(2.55*parseFloat(i[1]),2.55*parseFloat(i[2]),2.55*parseFloat(i[3]),parseFloat(i[4]));if(i=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(n))return o(parseInt(i[1],16),parseInt(i[2],16),parseInt(i[3],16));if(i=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(n))return o(parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16),parseInt(i[3]+i[3],16));var a=e.trim(n).toLowerCase();return"transparent"==a?o(255,255,255,0):o((i=t[a]||[0,0,0])[0],i[1],i[2])};var t={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}}(jQuery),function(e){var t=Object.prototype.hasOwnProperty;function n(t,n){var i=n.children("."+t)[0];if(null==i&&((i=document.createElement("canvas")).className=t,e(i).css({direction:"ltr",position:"absolute",left:0,top:0}).appendTo(n),!i.getContext)){if(!window.G_vmlCanvasManager)throw new Error("Canvas is not available. If you're using IE with a fall-back such as Excanvas, then there's either a mistake in your conditional include, or the page has no DOCTYPE and is rendering in Quirks Mode.");i=window.G_vmlCanvasManager.initElement(i)}this.element=i;var o=this.context=i.getContext("2d"),a=window.devicePixelRatio||1,r=o.webkitBackingStorePixelRatio||o.mozBackingStorePixelRatio||o.msBackingStorePixelRatio||o.oBackingStorePixelRatio||o.backingStorePixelRatio||1;this.pixelRatio=a/r,this.resize(n.width(),n.height()),this.textContainer=null,this.text={},this._textCache={}}function i(t,i,o,a){var r=[],s={colors:["#edc240","#afd8f8","#cb4b4b","#4da74d","#9440ed"],legend:{show:!0,noColumns:1,labelFormatter:null,labelBoxBorderColor:"#ccc",container:null,position:"ne",margin:5,backgroundColor:null,backgroundOpacity:.85,sorted:null},xaxis:{show:null,position:"bottom",mode:null,font:null,color:null,tickColor:null,transform:null,inverseTransform:null,min:null,max:null,autoscaleMargin:null,ticks:null,tickFormatter:null,labelWidth:null,labelHeight:null,reserveSpace:null,tickLength:null,alignTicksWithAxis:null,tickDecimals:null,tickSize:null,minTickSize:null},yaxis:{autoscaleMargin:.02,position:"left"},xaxes:[],yaxes:[],series:{points:{show:!1,radius:3,lineWidth:2,fill:!0,fillColor:"#ffffff",symbol:"circle"},lines:{lineWidth:2,fill:!1,fillColor:null,steps:!1},bars:{show:!1,lineWidth:2,barWidth:1,fill:!0,fillColor:null,align:"left",horizontal:!1,zero:!0},shadowSize:3,highlightColor:null},grid:{show:!0,aboveData:!1,color:"#545454",backgroundColor:null,borderColor:null,tickColor:null,margin:0,labelMargin:5,axisMargin:8,borderWidth:2,minBorderMargin:null,markings:null,markingsColor:"#f4f4f4",markingsLineWidth:2,clickable:!1,hoverable:!1,autoHighlight:!0,mouseActiveRadius:10},interaction:{redrawOverlayInterval:1e3/60},hooks:{}},l=null,c=null,d=null,u=null,f=null,p=[],h=[],m={left:0,right:0,top:0,bottom:0},g=0,v=0,_={processOptions:[],processRawData:[],processDatapoints:[],processOffset:[],drawBackground:[],drawSeries:[],draw:[],bindEvents:[],drawOverlay:[],shutdown:[]},b=this;function y(e,t){t=[b].concat(t);for(var n=0;n<e.length;++n)e[n].apply(this,t)}function w(t){r=function(t){for(var n=[],i=0;i<t.length;++i){var o=e.extend(!0,{},s.series);null!=t[i].data?(o.data=t[i].data,delete t[i].data,e.extend(!0,o,t[i]),t[i].data=o.data):o.data=t[i],n.push(o)}return n}(t),function(){var t,n=r.length,i=-1;for(t=0;t<r.length;++t){var o=r[t].color;null!=o&&(n--,"number"==typeof o&&o>i&&(i=o))}n<=i&&(n=i+1);var a,l=[],c=s.colors,d=c.length,u=0;for(t=0;t<n;t++)a=e.color.parse(c[t%d]||"#666"),t%d==0&&t&&(u=u>=0?u<.5?-u-.2:0:-u),l[t]=a.scale("rgb",1+u);var f,m=0;for(t=0;t<r.length;++t){if(null==(f=r[t]).color?(f.color=l[m].toString(),++m):"number"==typeof f.color&&(f.color=l[f.color].toString()),null==f.lines.show){var g,v=!0;for(g in f)if(f[g]&&f[g].show){v=!1;break}v&&(f.lines.show=!0)}null==f.lines.zero&&(f.lines.zero=!!f.lines.fill),f.xaxis=S(p,x(f,"x")),f.yaxis=S(h,x(f,"y"))}}(),function(){var t,n,i,o,a,s,l,c,d,u,f,p,h=Number.POSITIVE_INFINITY,m=Number.NEGATIVE_INFINITY,g=Number.MAX_VALUE;function v(e,t,n){t<e.datamin&&t!=-g&&(e.datamin=t),n>e.datamax&&n!=g&&(e.datamax=n)}for(e.each(k(),(function(e,t){t.datamin=h,t.datamax=m,t.used=!1})),t=0;t<r.length;++t)(a=r[t]).datapoints={points:[]},y(_.processRawData,[a,a.data,a.datapoints]);for(t=0;t<r.length;++t){if(f=(a=r[t]).data,!(p=a.datapoints.format)){if((p=[]).push({x:!0,number:!0,required:!0}),p.push({y:!0,number:!0,required:!0}),a.bars.show||a.lines.show&&a.lines.fill){var b=!!(a.bars.show&&a.bars.zero||a.lines.show&&a.lines.zero);p.push({y:!0,number:!0,required:!1,defaultValue:0,autoscale:b}),a.bars.horizontal&&(delete p[p.length-1].y,p[p.length-1].x=!0)}a.datapoints.format=p}if(null==a.datapoints.pointsize){a.datapoints.pointsize=p.length,l=a.datapoints.pointsize,s=a.datapoints.points;var w=a.lines.show&&a.lines.steps;for(a.xaxis.used=a.yaxis.used=!0,n=i=0;n<f.length;++n,i+=l){var x=null==(u=f[n]);if(!x)for(o=0;o<l;++o)c=u[o],(d=p[o])&&(d.number&&null!=c&&(c=+c,isNaN(c)?c=null:c==1/0?c=g:c==-1/0&&(c=-g)),null==c&&(d.required&&(x=!0),null!=d.defaultValue&&(c=d.defaultValue))),s[i+o]=c;if(x)for(o=0;o<l;++o)null!=(c=s[i+o])&&!1!==(d=p[o]).autoscale&&(d.x&&v(a.xaxis,c,c),d.y&&v(a.yaxis,c,c)),s[i+o]=null;else if(w&&i>0&&null!=s[i-l]&&s[i-l]!=s[i]&&s[i-l+1]!=s[i+1]){for(o=0;o<l;++o)s[i+l+o]=s[i+o];s[i+1]=s[i-l+1],i+=l}}}}for(t=0;t<r.length;++t)a=r[t],y(_.processDatapoints,[a,a.datapoints]);for(t=0;t<r.length;++t){s=(a=r[t]).datapoints.points,l=a.datapoints.pointsize,p=a.datapoints.format;var C=h,S=h,T=m,j=m;for(n=0;n<s.length;n+=l)if(null!=s[n])for(o=0;o<l;++o)c=s[n+o],(d=p[o])&&!1!==d.autoscale&&c!=g&&c!=-g&&(d.x&&(c<C&&(C=c),c>T&&(T=c)),d.y&&(c<S&&(S=c),c>j&&(j=c)));if(a.bars.show){var I;switch(a.bars.align){case"left":I=0;break;case"right":I=-a.bars.barWidth;break;default:I=-a.bars.barWidth/2}a.bars.horizontal?(S+=I,j+=I+a.bars.barWidth):(C+=I,T+=I+a.bars.barWidth)}v(a.xaxis,C,T),v(a.yaxis,S,j)}e.each(k(),(function(e,t){t.datamin==h&&(t.datamin=null),t.datamax==m&&(t.datamax=null)}))}()}function x(e,t){var n=e[t+"axis"];return"object"==typeof n&&(n=n.n),"number"!=typeof n&&(n=1),n}function k(){return e.grep(p.concat(h),(function(e){return e}))}function C(e){var t,n,i={};for(t=0;t<p.length;++t)(n=p[t])&&n.used&&(i["x"+n.n]=n.c2p(e.left));for(t=0;t<h.length;++t)(n=h[t])&&n.used&&(i["y"+n.n]=n.c2p(e.top));return void 0!==i.x1&&(i.x=i.x1),void 0!==i.y1&&(i.y=i.y1),i}function S(t,n){return t[n-1]||(t[n-1]={n,direction:t==p?"x":"y",options:e.extend(!0,{},t==p?s.xaxis:s.yaxis)}),t[n-1]}function T(){z&&clearTimeout(z),d.unbind("mousemove",q),d.unbind("mouseleave",N),d.unbind("click",D),y(_.shutdown,[d])}function j(t){var n=t.labelWidth,i=t.labelHeight,o=t.options.position,a="x"===t.direction,r=t.options.tickLength,c=s.grid.axisMargin,d=s.grid.labelMargin,u=!0,f=!0,g=!0,v=!1;e.each(a?p:h,(function(e,n){n&&(n.show||n.reserveSpace)&&(n===t?v=!0:n.options.position===o&&(v?f=!1:u=!1),v||(g=!1))})),f&&(c=0),null==r&&(r=g?"full":5),isNaN(+r)||(d+=+r),a?(i+=d,"bottom"==o?(m.bottom+=i+c,t.box={top:l.height-m.bottom,height:i}):(t.box={top:m.top+c,height:i},m.top+=i+c)):(n+=d,"left"==o?(t.box={left:m.left+c,width:n},m.left+=n+c):(m.right+=n+c,t.box={left:l.width-m.right,width:n})),t.position=o,t.tickLength=r,t.box.padding=d,t.innermost=u}function I(){var n,i=k(),o=s.grid.show;for(var a in m){var c=s.grid.margin||0;m[a]="number"==typeof c?c:c[a]||0}for(var a in y(_.processOffset,[m]),m)"object"==typeof s.grid.borderWidth?m[a]+=o?s.grid.borderWidth[a]:0:m[a]+=o?s.grid.borderWidth:0;if(e.each(i,(function(e,t){var n=t.options;t.show=null==n.show?t.used:n.show,t.reserveSpace=null==n.reserveSpace?t.show:n.reserveSpace,function(e){var t=e.options,n=+(null!=t.min?t.min:e.datamin),i=+(null!=t.max?t.max:e.datamax),o=i-n;if(0==o){var a=0==i?1:.01;null==t.min&&(n-=a),null!=t.max&&null==t.min||(i+=a)}else{var r=t.autoscaleMargin;null!=r&&(null==t.min&&(n-=o*r)<0&&null!=e.datamin&&e.datamin>=0&&(n=0),null==t.max&&(i+=o*r)>0&&null!=e.datamax&&e.datamax<=0&&(i=0))}e.min=n,e.max=i}(t)})),o){var d=e.grep(i,(function(e){return e.show||e.reserveSpace}));for(e.each(d,(function(t,n){!function(t){var n,i=t.options;n="number"==typeof i.ticks&&i.ticks>0?i.ticks:.3*Math.sqrt("x"==t.direction?l.width:l.height);var o=(t.max-t.min)/n,a=-Math.floor(Math.log(o)/Math.LN10),r=i.tickDecimals;null!=r&&a>r&&(a=r);var s,c=Math.pow(10,-a),d=o/c;if(d<1.5?s=1:d<3?(s=2,d>2.25&&(null==r||a+1<=r)&&(s=2.5,++a)):s=d<7.5?5:10,s*=c,null!=i.minTickSize&&s<i.minTickSize&&(s=i.minTickSize),t.delta=o,t.tickDecimals=Math.max(0,null!=r?r:a),t.tickSize=i.tickSize||s,"time"==i.mode&&!t.tickGenerator)throw new Error("Time mode requires the flot.time plugin.");if(t.tickGenerator||(t.tickGenerator=function(e){var t,n,i,o=[],a=(n=e.min,(i=e.tickSize)*Math.floor(n/i)),r=0,s=Number.NaN;do{t=s,s=a+r*e.tickSize,o.push(s),++r}while(s<e.max&&s!=t);return o},t.tickFormatter=function(e,t){var n=t.tickDecimals?Math.pow(10,t.tickDecimals):1,i=""+Math.round(e*n)/n;if(null!=t.tickDecimals){var o=i.indexOf("."),a=-1==o?0:i.length-o-1;if(a<t.tickDecimals)return(a?i:i+".")+(""+n).substr(1,t.tickDecimals-a)}return i}),e.isFunction(i.tickFormatter)&&(t.tickFormatter=function(e,t){return""+i.tickFormatter(e,t)}),null!=i.alignTicksWithAxis){var u=("x"==t.direction?p:h)[i.alignTicksWithAxis-1];if(u&&u.used&&u!=t){var f=t.tickGenerator(t);if(f.length>0&&(null==i.min&&(t.min=Math.min(t.min,f[0])),null==i.max&&f.length>1&&(t.max=Math.max(t.max,f[f.length-1]))),t.tickGenerator=function(e){var t,n,i=[];for(n=0;n<u.ticks.length;++n)t=(u.ticks[n].v-u.min)/(u.max-u.min),t=e.min+t*(e.max-e.min),i.push(t);return i},!t.mode&&null==i.tickDecimals){var m=Math.max(0,1-Math.floor(Math.log(t.delta)/Math.LN10)),g=t.tickGenerator(t);g.length>1&&/\..*0$/.test((g[1]-g[0]).toFixed(m))||(t.tickDecimals=m)}}}}(n),function(t){var n,i,o=t.options.ticks,a=[];for(null==o||"number"==typeof o&&o>0?a=t.tickGenerator(t):o&&(a=e.isFunction(o)?o(t):o),t.ticks=[],n=0;n<a.length;++n){var r=null,s=a[n];"object"==typeof s?(i=+s[0],s.length>1&&(r=s[1])):i=+s,null==r&&(r=t.tickFormatter(i,t)),isNaN(i)||t.ticks.push({v:i,label:r})}}(n),function(e,t){e.options.autoscaleMargin&&t.length>0&&(null==e.options.min&&(e.min=Math.min(e.min,t[0].v)),null==e.options.max&&t.length>1&&(e.max=Math.max(e.max,t[t.length-1].v)))}(n,n.ticks),function(e){for(var t=e.options,n=e.ticks||[],i=t.labelWidth||0,o=t.labelHeight||0,a=i||("x"==e.direction?Math.floor(l.width/(n.length||1)):null),r=e.direction+"Axis "+e.direction+e.n+"Axis",s="flot-"+e.direction+"-axis flot-"+e.direction+e.n+"-axis "+r,c=t.font||"flot-tick-label tickLabel",d=0;d<n.length;++d){var u=n[d];if(u.label){var f=l.getTextInfo(s,u.label,c,null,a);i=Math.max(i,f.width),o=Math.max(o,f.height)}}e.labelWidth=t.labelWidth||i,e.labelHeight=t.labelHeight||o}(n)})),n=d.length-1;n>=0;--n)j(d[n]);!function(){var t,n=s.grid.minBorderMargin;if(null==n)for(n=0,t=0;t<r.length;++t)n=Math.max(n,2*(r[t].points.radius+r[t].points.lineWidth/2));var i={left:n,right:n,top:n,bottom:n};e.each(k(),(function(e,t){t.reserveSpace&&t.ticks&&t.ticks.length&&("x"===t.direction?(i.left=Math.max(i.left,t.labelWidth/2),i.right=Math.max(i.right,t.labelWidth/2)):(i.bottom=Math.max(i.bottom,t.labelHeight/2),i.top=Math.max(i.top,t.labelHeight/2)))})),m.left=Math.ceil(Math.max(i.left,m.left)),m.right=Math.ceil(Math.max(i.right,m.right)),m.top=Math.ceil(Math.max(i.top,m.top)),m.bottom=Math.ceil(Math.max(i.bottom,m.bottom))}(),e.each(d,(function(e,t){!function(e){"x"==e.direction?(e.box.left=m.left-e.labelWidth/2,e.box.width=l.width-m.left-m.right+e.labelWidth):(e.box.top=m.top-e.labelHeight/2,e.box.height=l.height-m.bottom-m.top+e.labelHeight)}(t)}))}g=l.width-m.left-m.right,v=l.height-m.bottom-m.top,e.each(i,(function(e,t){!function(e){function t(e){return e}var n,i,o=e.options.transform||t,a=e.options.inverseTransform;"x"==e.direction?(n=e.scale=g/Math.abs(o(e.max)-o(e.min)),i=Math.min(o(e.max),o(e.min))):(n=-(n=e.scale=v/Math.abs(o(e.max)-o(e.min))),i=Math.max(o(e.max),o(e.min))),e.p2c=o==t?function(e){return(e-i)*n}:function(e){return(o(e)-i)*n},e.c2p=a?function(e){return a(i+e/n)}:function(e){return i+e/n}}(t)})),o&&e.each(k(),(function(e,t){var n,i,o,a,r,s=t.box,c=t.direction+"Axis "+t.direction+t.n+"Axis",d="flot-"+t.direction+"-axis flot-"+t.direction+t.n+"-axis "+c,u=t.options.font||"flot-tick-label tickLabel";if(l.removeText(d),t.show&&0!=t.ticks.length)for(var f=0;f<t.ticks.length;++f)!(n=t.ticks[f]).label||n.v<t.min||n.v>t.max||("x"==t.direction?(a="center",i=m.left+t.p2c(n.v),"bottom"==t.position?o=s.top+s.padding:(o=s.top+s.height-s.padding,r="bottom")):(r="middle",o=m.top+t.p2c(n.v),"left"==t.position?(i=s.left+s.width-s.padding,a="right"):i=s.left+s.padding),l.addText(d,i,o,n.label,u,null,null,a,r))})),function(){if(null!=s.legend.container?e(s.legend.container).html(""):t.find(".legend").remove(),s.legend.show){for(var n,i,o=[],a=[],l=!1,c=s.legend.labelFormatter,d=0;d<r.length;++d)(n=r[d]).label&&(i=c?c(n.label,n):n.label)&&a.push({label:i,color:n.color});if(s.legend.sorted)if(e.isFunction(s.legend.sorted))a.sort(s.legend.sorted);else if("reverse"==s.legend.sorted)a.reverse();else{var u="descending"!=s.legend.sorted;a.sort((function(e,t){return e.label==t.label?0:e.label<t.label!=u?1:-1}))}for(d=0;d<a.length;++d){var f=a[d];d%s.legend.noColumns==0&&(l&&o.push("</tr>"),o.push("<tr>"),l=!0),o.push('<td class="legendColorBox"><div style="border:1px solid '+s.legend.labelBoxBorderColor+';padding:1px"><div style="width:4px;height:0;border:5px solid '+f.color+';overflow:hidden"></div></div></td><td class="legendLabel">'+f.label+"</td>")}if(l&&o.push("</tr>"),0!=o.length){var p='<table style="font-size:smaller;color:'+s.grid.color+'">'+o.join("")+"</table>";if(null!=s.legend.container)e(s.legend.container).html(p);else{var h="",g=s.legend.position,v=s.legend.margin;null==v[0]&&(v=[v,v]),"n"==g.charAt(0)?h+="top:"+(v[1]+m.top)+"px;":"s"==g.charAt(0)&&(h+="bottom:"+(v[1]+m.bottom)+"px;"),"e"==g.charAt(1)?h+="right:"+(v[0]+m.right)+"px;":"w"==g.charAt(1)&&(h+="left:"+(v[0]+m.left)+"px;");var _=e('<div class="legend">'+p.replace('style="','style="position:absolute;'+h+";")+"</div>").appendTo(t);if(0!=s.legend.backgroundOpacity){var b=s.legend.backgroundColor;null==b&&((b=(b=s.grid.backgroundColor)&&"string"==typeof b?e.color.parse(b):e.color.extract(_,"background-color")).a=1,b=b.toString());var y=_.children();e('<div style="position:absolute;width:'+y.width()+"px;height:"+y.height()+"px;"+h+"background-color:"+b+';"> </div>').prependTo(_).css("opacity",s.legend.backgroundOpacity)}}}}}()}function E(){l.clear(),y(_.drawBackground,[u]);var e=s.grid;e.show&&e.backgroundColor&&(u.save(),u.translate(m.left,m.top),u.fillStyle=U(s.grid.backgroundColor,v,0,"rgba(255, 255, 255, 0)"),u.fillRect(0,0,g,v),u.restore()),e.show&&!e.aboveData&&M();for(var t=0;t<r.length;++t)y(_.drawSeries,[u,r[t]]),A(r[t]);y(_.draw,[u]),e.show&&e.aboveData&&M(),l.render(),F()}function G(e,t){for(var n,i,o,a,r=k(),s=0;s<r.length;++s)if((n=r[s]).direction==t&&(e[a=t+n.n+"axis"]||1!=n.n||(a=t+"axis"),e[a])){i=e[a].from,o=e[a].to;break}if(e[a]||(n="x"==t?p[0]:h[0],i=e[t+"1"],o=e[t+"2"]),null!=i&&null!=o&&i>o){var l=i;i=o,o=l}return{from:i,to:o,axis:n}}function M(){var t,n,i,o;u.save(),u.translate(m.left,m.top);var a=s.grid.markings;if(a)for(e.isFunction(a)&&((n=b.getAxes()).xmin=n.xaxis.min,n.xmax=n.xaxis.max,n.ymin=n.yaxis.min,n.ymax=n.yaxis.max,a=a(n)),t=0;t<a.length;++t){var r=a[t],l=G(r,"x"),c=G(r,"y");if(null==l.from&&(l.from=l.axis.min),null==l.to&&(l.to=l.axis.max),null==c.from&&(c.from=c.axis.min),null==c.to&&(c.to=c.axis.max),!(l.to<l.axis.min||l.from>l.axis.max||c.to<c.axis.min||c.from>c.axis.max)){l.from=Math.max(l.from,l.axis.min),l.to=Math.min(l.to,l.axis.max),c.from=Math.max(c.from,c.axis.min),c.to=Math.min(c.to,c.axis.max);var d=l.from===l.to,f=c.from===c.to;if(!d||!f)if(l.from=Math.floor(l.axis.p2c(l.from)),l.to=Math.floor(l.axis.p2c(l.to)),c.from=Math.floor(c.axis.p2c(c.from)),c.to=Math.floor(c.axis.p2c(c.to)),d||f){var p=r.lineWidth||s.grid.markingsLineWidth,h=p%2?.5:0;u.beginPath(),u.strokeStyle=r.color||s.grid.markingsColor,u.lineWidth=p,d?(u.moveTo(l.to+h,c.from),u.lineTo(l.to+h,c.to)):(u.moveTo(l.from,c.to+h),u.lineTo(l.to,c.to+h)),u.stroke()}else u.fillStyle=r.color||s.grid.markingsColor,u.fillRect(l.from,c.to,l.to-l.from,c.from-c.to)}}n=k(),i=s.grid.borderWidth;for(var _=0;_<n.length;++_){var y,w,x,C,S=n[_],T=S.box,j=S.tickLength;if(S.show&&0!=S.ticks.length){for(u.lineWidth=1,"x"==S.direction?(y=0,w="full"==j?"top"==S.position?0:v:T.top-m.top+("top"==S.position?T.height:0)):(w=0,y="full"==j?"left"==S.position?0:g:T.left-m.left+("left"==S.position?T.width:0)),S.innermost||(u.strokeStyle=S.options.color,u.beginPath(),x=C=0,"x"==S.direction?x=g+1:C=v+1,1==u.lineWidth&&("x"==S.direction?w=Math.floor(w)+.5:y=Math.floor(y)+.5),u.moveTo(y,w),u.lineTo(y+x,w+C),u.stroke()),u.strokeStyle=S.options.tickColor,u.beginPath(),t=0;t<S.ticks.length;++t){var I=S.ticks[t].v;x=C=0,isNaN(I)||I<S.min||I>S.max||"full"==j&&("object"==typeof i&&i[S.position]>0||i>0)&&(I==S.min||I==S.max)||("x"==S.direction?(y=S.p2c(I),C="full"==j?-v:j,"top"==S.position&&(C=-C)):(w=S.p2c(I),x="full"==j?-g:j,"left"==S.position&&(x=-x)),1==u.lineWidth&&("x"==S.direction?y=Math.floor(y)+.5:w=Math.floor(w)+.5),u.moveTo(y,w),u.lineTo(y+x,w+C))}u.stroke()}}i&&(o=s.grid.borderColor,"object"==typeof i||"object"==typeof o?("object"!=typeof i&&(i={top:i,right:i,bottom:i,left:i}),"object"!=typeof o&&(o={top:o,right:o,bottom:o,left:o}),i.top>0&&(u.strokeStyle=o.top,u.lineWidth=i.top,u.beginPath(),u.moveTo(0-i.left,0-i.top/2),u.lineTo(g,0-i.top/2),u.stroke()),i.right>0&&(u.strokeStyle=o.right,u.lineWidth=i.right,u.beginPath(),u.moveTo(g+i.right/2,0-i.top),u.lineTo(g+i.right/2,v),u.stroke()),i.bottom>0&&(u.strokeStyle=o.bottom,u.lineWidth=i.bottom,u.beginPath(),u.moveTo(g+i.right,v+i.bottom/2),u.lineTo(0,v+i.bottom/2),u.stroke()),i.left>0&&(u.strokeStyle=o.left,u.lineWidth=i.left,u.beginPath(),u.moveTo(0-i.left/2,v+i.bottom),u.lineTo(0-i.left/2,0),u.stroke())):(u.lineWidth=i,u.strokeStyle=s.grid.borderColor,u.strokeRect(-i/2,-i/2,g+i,v+i))),u.restore()}function A(e){e.lines.show&&function(e){function t(e,t,n,i,o){var a=e.points,r=e.pointsize,s=null,l=null;u.beginPath();for(var c=r;c<a.length;c+=r){var d=a[c-r],f=a[c-r+1],p=a[c],h=a[c+1];if(null!=d&&null!=p){if(f<=h&&f<o.min){if(h<o.min)continue;d=(o.min-f)/(h-f)*(p-d)+d,f=o.min}else if(h<=f&&h<o.min){if(f<o.min)continue;p=(o.min-f)/(h-f)*(p-d)+d,h=o.min}if(f>=h&&f>o.max){if(h>o.max)continue;d=(o.max-f)/(h-f)*(p-d)+d,f=o.max}else if(h>=f&&h>o.max){if(f>o.max)continue;p=(o.max-f)/(h-f)*(p-d)+d,h=o.max}if(d<=p&&d<i.min){if(p<i.min)continue;f=(i.min-d)/(p-d)*(h-f)+f,d=i.min}else if(p<=d&&p<i.min){if(d<i.min)continue;h=(i.min-d)/(p-d)*(h-f)+f,p=i.min}if(d>=p&&d>i.max){if(p>i.max)continue;f=(i.max-d)/(p-d)*(h-f)+f,d=i.max}else if(p>=d&&p>i.max){if(d>i.max)continue;h=(i.max-d)/(p-d)*(h-f)+f,p=i.max}d==s&&f==l||u.moveTo(i.p2c(d)+t,o.p2c(f)+n),s=p,l=h,u.lineTo(i.p2c(p)+t,o.p2c(h)+n)}}u.stroke()}u.save(),u.translate(m.left,m.top),u.lineJoin="round";var n=e.lines.lineWidth,i=e.shadowSize;if(n>0&&i>0){u.lineWidth=i,u.strokeStyle="rgba(0,0,0,0.1)";var o=Math.PI/18;t(e.datapoints,Math.sin(o)*(n/2+i/2),Math.cos(o)*(n/2+i/2),e.xaxis,e.yaxis),u.lineWidth=i/2,t(e.datapoints,Math.sin(o)*(n/2+i/4),Math.cos(o)*(n/2+i/4),e.xaxis,e.yaxis)}u.lineWidth=n,u.strokeStyle=e.color;var a=P(e.lines,e.color,0,v);a&&(u.fillStyle=a,function(e,t,n){for(var i=e.points,o=e.pointsize,a=Math.min(Math.max(0,n.min),n.max),r=0,s=!1,l=1,c=0,d=0;!(o>0&&r>i.length+o);){var f=i[(r+=o)-o],p=i[r-o+l],h=i[r],m=i[r+l];if(s){if(o>0&&null!=f&&null==h){d=r,o=-o,l=2;continue}if(o<0&&r==c+o){u.fill(),s=!1,l=1,r=c=d+(o=-o);continue}}if(null!=f&&null!=h){if(f<=h&&f<t.min){if(h<t.min)continue;p=(t.min-f)/(h-f)*(m-p)+p,f=t.min}else if(h<=f&&h<t.min){if(f<t.min)continue;m=(t.min-f)/(h-f)*(m-p)+p,h=t.min}if(f>=h&&f>t.max){if(h>t.max)continue;p=(t.max-f)/(h-f)*(m-p)+p,f=t.max}else if(h>=f&&h>t.max){if(f>t.max)continue;m=(t.max-f)/(h-f)*(m-p)+p,h=t.max}if(s||(u.beginPath(),u.moveTo(t.p2c(f),n.p2c(a)),s=!0),p>=n.max&&m>=n.max)u.lineTo(t.p2c(f),n.p2c(n.max)),u.lineTo(t.p2c(h),n.p2c(n.max));else if(p<=n.min&&m<=n.min)u.lineTo(t.p2c(f),n.p2c(n.min)),u.lineTo(t.p2c(h),n.p2c(n.min));else{var g=f,v=h;p<=m&&p<n.min&&m>=n.min?(f=(n.min-p)/(m-p)*(h-f)+f,p=n.min):m<=p&&m<n.min&&p>=n.min&&(h=(n.min-p)/(m-p)*(h-f)+f,m=n.min),p>=m&&p>n.max&&m<=n.max?(f=(n.max-p)/(m-p)*(h-f)+f,p=n.max):m>=p&&m>n.max&&p<=n.max&&(h=(n.max-p)/(m-p)*(h-f)+f,m=n.max),f!=g&&u.lineTo(t.p2c(g),n.p2c(p)),u.lineTo(t.p2c(f),n.p2c(p)),u.lineTo(t.p2c(h),n.p2c(m)),h!=v&&(u.lineTo(t.p2c(h),n.p2c(m)),u.lineTo(t.p2c(v),n.p2c(m)))}}}}(e.datapoints,e.xaxis,e.yaxis)),n>0&&t(e.datapoints,0,0,e.xaxis,e.yaxis),u.restore()}(e),e.bars.show&&function(e){var t;switch(u.save(),u.translate(m.left,m.top),u.lineWidth=e.bars.lineWidth,u.strokeStyle=e.color,e.bars.align){case"left":t=0;break;case"right":t=-e.bars.barWidth;break;default:t=-e.bars.barWidth/2}var n=e.bars.fill?function(t,n){return P(e.bars,e.color,t,n)}:null;(function(t,n,i,o,a,r){for(var s=t.points,l=t.pointsize,c=0;c<s.length;c+=l)null!=s[c]&&O(s[c],s[c+1],s[c+2],n,i,o,a,r,u,e.bars.horizontal,e.bars.lineWidth)})(e.datapoints,t,t+e.bars.barWidth,n,e.xaxis,e.yaxis),u.restore()}(e),e.points.show&&function(e){function t(e,t,n,i,o,a,r,s){for(var l=e.points,c=e.pointsize,d=0;d<l.length;d+=c){var f=l[d],p=l[d+1];null==f||f<a.min||f>a.max||p<r.min||p>r.max||(u.beginPath(),f=a.p2c(f),p=r.p2c(p)+i,"circle"==s?u.arc(f,p,t,0,o?Math.PI:2*Math.PI,!1):s(u,f,p,t,o),u.closePath(),n&&(u.fillStyle=n,u.fill()),u.stroke())}}u.save(),u.translate(m.left,m.top);var n=e.points.lineWidth,i=e.shadowSize,o=e.points.radius,a=e.points.symbol;if(0==n&&(n=1e-4),n>0&&i>0){var r=i/2;u.lineWidth=r,u.strokeStyle="rgba(0,0,0,0.1)",t(e.datapoints,o,null,r+r/2,!0,e.xaxis,e.yaxis,a),u.strokeStyle="rgba(0,0,0,0.2)",t(e.datapoints,o,null,r/2,!0,e.xaxis,e.yaxis,a)}u.lineWidth=n,u.strokeStyle=e.color,t(e.datapoints,o,P(e.points,e.color),0,!1,e.xaxis,e.yaxis,a),u.restore()}(e)}function O(e,t,n,i,o,a,r,s,l,c,d){var u,f,p,h,m,g,v,_,b;c?(_=g=v=!0,m=!1,h=t+i,p=t+o,(f=e)<(u=n)&&(b=f,f=u,u=b,m=!0,g=!1)):(m=g=v=!0,_=!1,u=e+i,f=e+o,(h=t)<(p=n)&&(b=h,h=p,p=b,_=!0,v=!1)),f<r.min||u>r.max||h<s.min||p>s.max||(u<r.min&&(u=r.min,m=!1),f>r.max&&(f=r.max,g=!1),p<s.min&&(p=s.min,_=!1),h>s.max&&(h=s.max,v=!1),u=r.p2c(u),p=s.p2c(p),f=r.p2c(f),h=s.p2c(h),a&&(l.fillStyle=a(p,h),l.fillRect(u,h,f-u,p-h)),d>0&&(m||g||v||_)&&(l.beginPath(),l.moveTo(u,p),m?l.lineTo(u,h):l.moveTo(u,h),v?l.lineTo(f,h):l.moveTo(f,h),g?l.lineTo(f,p):l.moveTo(f,p),_?l.lineTo(u,p):l.moveTo(u,p),l.stroke()))}function P(t,n,i,o){var a=t.fill;if(!a)return null;if(t.fillColor)return U(t.fillColor,i,o,n);var r=e.color.parse(n);return r.a="number"==typeof a?a:.4,r.normalize(),r.toString()}b.setData=w,b.setupGrid=I,b.draw=E,b.getPlaceholder=function(){return t},b.getCanvas=function(){return l.element},b.getPlotOffset=function(){return m},b.width=function(){return g},b.height=function(){return v},b.offset=function(){var e=d.offset();return e.left+=m.left,e.top+=m.top,e},b.getData=function(){return r},b.getAxes=function(){var t={};return e.each(p.concat(h),(function(e,n){n&&(t[n.direction+(1!=n.n?n.n:"")+"axis"]=n)})),t},b.getXAxes=function(){return p},b.getYAxes=function(){return h},b.c2p=C,b.p2c=function(e){var t,n,i,o={};for(t=0;t<p.length;++t)if((n=p[t])&&n.used&&(null==e[i="x"+n.n]&&1==n.n&&(i="x"),null!=e[i])){o.left=n.p2c(e[i]);break}for(t=0;t<h.length;++t)if((n=h[t])&&n.used&&(null==e[i="y"+n.n]&&1==n.n&&(i="y"),null!=e[i])){o.top=n.p2c(e[i]);break}return o},b.getOptions=function(){return s},b.highlight=B,b.unhighlight=V,b.triggerRedrawOverlay=F,b.pointOffset=function(e){return{left:parseInt(p[x(e,"x")-1].p2c(+e.x)+m.left,10),top:parseInt(h[x(e,"y")-1].p2c(+e.y)+m.top,10)}},b.shutdown=T,b.destroy=function(){T(),t.removeData("plot").empty(),r=[],s=null,l=null,c=null,d=null,u=null,f=null,p=[],h=[],_=null,L=[],b=null},b.resize=function(){var e=t.width(),n=t.height();l.resize(e,n),c.resize(e,n)},b.hooks=_,function(){for(var t={Canvas:n},i=0;i<a.length;++i){var o=a[i];o.init(b,t),o.options&&e.extend(!0,s,o.options)}}(),function(n){e.extend(!0,s,n),n&&n.colors&&(s.colors=n.colors),null==s.xaxis.color&&(s.xaxis.color=e.color.parse(s.grid.color).scale("a",.22).toString()),null==s.yaxis.color&&(s.yaxis.color=e.color.parse(s.grid.color).scale("a",.22).toString()),null==s.xaxis.tickColor&&(s.xaxis.tickColor=s.grid.tickColor||s.xaxis.color),null==s.yaxis.tickColor&&(s.yaxis.tickColor=s.grid.tickColor||s.yaxis.color),null==s.grid.borderColor&&(s.grid.borderColor=s.grid.color),null==s.grid.tickColor&&(s.grid.tickColor=e.color.parse(s.grid.color).scale("a",.22).toString());var i,o,a,r=t.css("font-size"),l=r?+r.replace("px",""):13,c={style:t.css("font-style"),size:Math.round(.8*l),variant:t.css("font-variant"),weight:t.css("font-weight"),family:t.css("font-family")};for(a=s.xaxes.length||1,i=0;i<a;++i)(o=s.xaxes[i])&&!o.tickColor&&(o.tickColor=o.color),o=e.extend(!0,{},s.xaxis,o),s.xaxes[i]=o,o.font&&(o.font=e.extend({},c,o.font),o.font.color||(o.font.color=o.color),o.font.lineHeight||(o.font.lineHeight=Math.round(1.15*o.font.size)));for(a=s.yaxes.length||1,i=0;i<a;++i)(o=s.yaxes[i])&&!o.tickColor&&(o.tickColor=o.color),o=e.extend(!0,{},s.yaxis,o),s.yaxes[i]=o,o.font&&(o.font=e.extend({},c,o.font),o.font.color||(o.font.color=o.color),o.font.lineHeight||(o.font.lineHeight=Math.round(1.15*o.font.size)));for(s.xaxis.noTicks&&null==s.xaxis.ticks&&(s.xaxis.ticks=s.xaxis.noTicks),s.yaxis.noTicks&&null==s.yaxis.ticks&&(s.yaxis.ticks=s.yaxis.noTicks),s.x2axis&&(s.xaxes[1]=e.extend(!0,{},s.xaxis,s.x2axis),s.xaxes[1].position="top",null==s.x2axis.min&&(s.xaxes[1].min=null),null==s.x2axis.max&&(s.xaxes[1].max=null)),s.y2axis&&(s.yaxes[1]=e.extend(!0,{},s.yaxis,s.y2axis),s.yaxes[1].position="right",null==s.y2axis.min&&(s.yaxes[1].min=null),null==s.y2axis.max&&(s.yaxes[1].max=null)),s.grid.coloredAreas&&(s.grid.markings=s.grid.coloredAreas),s.grid.coloredAreasColor&&(s.grid.markingsColor=s.grid.coloredAreasColor),s.lines&&e.extend(!0,s.series.lines,s.lines),s.points&&e.extend(!0,s.series.points,s.points),s.bars&&e.extend(!0,s.series.bars,s.bars),null!=s.shadowSize&&(s.series.shadowSize=s.shadowSize),null!=s.highlightColor&&(s.series.highlightColor=s.highlightColor),i=0;i<s.xaxes.length;++i)S(p,i+1).options=s.xaxes[i];for(i=0;i<s.yaxes.length;++i)S(h,i+1).options=s.yaxes[i];for(var d in _)s.hooks[d]&&s.hooks[d].length&&(_[d]=_[d].concat(s.hooks[d]));y(_.processOptions,[s])}(o),function(){t.css("padding",0).children().filter((function(){return!e(this).hasClass("flot-overlay")&&!e(this).hasClass("flot-base")})).remove(),"static"==t.css("position")&&t.css("position","relative"),l=new n("flot-base",t),c=new n("flot-overlay",t),u=l.context,f=c.context,d=e(c.element).unbind();var i=t.data("plot");i&&(i.shutdown(),c.clear()),t.data("plot",b)}(),w(i),I(),E(),s.grid.hoverable&&(d.mousemove(q),d.bind("mouseleave",N)),s.grid.clickable&&d.click(D),y(_.bindEvents,[d]);var L=[],z=null;function q(e){s.grid.hoverable&&W("plothover",e,(function(e){return 0!=e.hoverable}))}function N(e){s.grid.hoverable&&W("plothover",e,(function(e){return!1}))}function D(e){W("plotclick",e,(function(e){return 0!=e.clickable}))}function W(e,n,i){var o=d.offset(),a=n.pageX-o.left-m.left,l=n.pageY-o.top-m.top,c=C({left:a,top:l});c.pageX=n.pageX,c.pageY=n.pageY;var u=function(e,t,n){var i,o,a,l=s.grid.mouseActiveRadius,c=l*l+1,d=null;for(i=r.length-1;i>=0;--i)if(n(r[i])){var u=r[i],f=u.xaxis,p=u.yaxis,h=u.datapoints.points,m=f.c2p(e),g=p.c2p(t),v=l/f.scale,_=l/p.scale;if(a=u.datapoints.pointsize,f.options.inverseTransform&&(v=Number.MAX_VALUE),p.options.inverseTransform&&(_=Number.MAX_VALUE),u.lines.show||u.points.show)for(o=0;o<h.length;o+=a){var b=h[o],y=h[o+1];if(null!=b&&!(b-m>v||b-m<-v||y-g>_||y-g<-_)){var w=Math.abs(f.p2c(b)-e),x=Math.abs(p.p2c(y)-t),k=w*w+x*x;k<c&&(c=k,d=[i,o/a])}}if(u.bars.show&&!d){var C,S;switch(u.bars.align){case"left":C=0;break;case"right":C=-u.bars.barWidth;break;default:C=-u.bars.barWidth/2}for(S=C+u.bars.barWidth,o=0;o<h.length;o+=a){b=h[o],y=h[o+1];var T=h[o+2];null!=b&&(r[i].bars.horizontal?m<=Math.max(T,b)&&m>=Math.min(T,b)&&g>=y+C&&g<=y+S:m>=b+C&&m<=b+S&&g>=Math.min(T,y)&&g<=Math.max(T,y))&&(d=[i,o/a])}}}return d?(i=d[0],o=d[1],a=r[i].datapoints.pointsize,{datapoint:r[i].datapoints.points.slice(o*a,(o+1)*a),dataIndex:o,series:r[i],seriesIndex:i}):null}(a,l,i);if(u&&(u.pageX=parseInt(u.series.xaxis.p2c(u.datapoint[0])+o.left+m.left,10),u.pageY=parseInt(u.series.yaxis.p2c(u.datapoint[1])+o.top+m.top,10)),s.grid.autoHighlight){for(var f=0;f<L.length;++f){var p=L[f];p.auto!=e||u&&p.series==u.series&&p.point[0]==u.datapoint[0]&&p.point[1]==u.datapoint[1]||V(p.series,p.point)}u&&B(u.series,u.datapoint,e)}t.trigger(e,[c,u])}function F(){var e=s.interaction.redrawOverlayInterval;-1!=e?z||(z=setTimeout(Q,e)):Q()}function Q(){var e,t;for(z=null,f.save(),c.clear(),f.translate(m.left,m.top),e=0;e<L.length;++e)(t=L[e]).series.bars.show?$(t.series,t.point):H(t.series,t.point);f.restore(),y(_.drawOverlay,[f])}function B(e,t,n){if("number"==typeof e&&(e=r[e]),"number"==typeof t){var i=e.datapoints.pointsize;t=e.datapoints.points.slice(i*t,i*(t+1))}var o=R(e,t);-1==o?(L.push({series:e,point:t,auto:n}),F()):n||(L[o].auto=!1)}function V(e,t){if(null==e&&null==t)return L=[],void F();if("number"==typeof e&&(e=r[e]),"number"==typeof t){var n=e.datapoints.pointsize;t=e.datapoints.points.slice(n*t,n*(t+1))}var i=R(e,t);-1!=i&&(L.splice(i,1),F())}function R(e,t){for(var n=0;n<L.length;++n){var i=L[n];if(i.series==e&&i.point[0]==t[0]&&i.point[1]==t[1])return n}return-1}function H(t,n){var i=n[0],o=n[1],a=t.xaxis,r=t.yaxis,s="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString();if(!(i<a.min||i>a.max||o<r.min||o>r.max)){var l=t.points.radius+t.points.lineWidth/2;f.lineWidth=l,f.strokeStyle=s;var c=1.5*l;i=a.p2c(i),o=r.p2c(o),f.beginPath(),"circle"==t.points.symbol?f.arc(i,o,c,0,2*Math.PI,!1):t.points.symbol(f,i,o,c,!1),f.closePath(),f.stroke()}}function $(t,n){var i,o="string"==typeof t.highlightColor?t.highlightColor:e.color.parse(t.color).scale("a",.5).toString(),a=o;switch(t.bars.align){case"left":i=0;break;case"right":i=-t.bars.barWidth;break;default:i=-t.bars.barWidth/2}f.lineWidth=t.bars.lineWidth,f.strokeStyle=o,O(n[0],n[1],n[2]||0,i,i+t.bars.barWidth,(function(){return a}),t.xaxis,t.yaxis,f,t.bars.horizontal,t.bars.lineWidth)}function U(t,n,i,o){if("string"==typeof t)return t;for(var a=u.createLinearGradient(0,i,0,n),r=0,s=t.colors.length;r<s;++r){var l=t.colors[r];if("string"!=typeof l){var c=e.color.parse(o);null!=l.brightness&&(c=c.scale("rgb",l.brightness)),null!=l.opacity&&(c.a*=l.opacity),l=c.toString()}a.addColorStop(r/(s-1),l)}return a}}e.fn.detach||(e.fn.detach=function(){return this.each((function(){this.parentNode&&this.parentNode.removeChild(this)}))}),n.prototype.resize=function(e,t){if(e<=0||t<=0)throw new Error("Invalid dimensions for plot, width = "+e+", height = "+t);var n=this.element,i=this.context,o=this.pixelRatio;this.width!=e&&(n.width=e*o,n.style.width=e+"px",this.width=e),this.height!=t&&(n.height=t*o,n.style.height=t+"px",this.height=t),i.restore(),i.save(),i.scale(o,o)},n.prototype.clear=function(){this.context.clearRect(0,0,this.width,this.height)},n.prototype.render=function(){var e=this._textCache;for(var n in e)if(t.call(e,n)){var i=this.getTextLayer(n),o=e[n];for(var a in i.hide(),o)if(t.call(o,a)){var r=o[a];for(var s in r)if(t.call(r,s)){for(var l,c=r[s].positions,d=0;l=c[d];d++)l.active?l.rendered||(i.append(l.element),l.rendered=!0):(c.splice(d--,1),l.rendered&&l.element.detach());0==c.length&&delete r[s]}}i.show()}},n.prototype.getTextLayer=function(t){var n=this.text[t];return null==n&&(null==this.textContainer&&(this.textContainer=e("<div class='flot-text'></div>").css({position:"absolute",top:0,left:0,bottom:0,right:0,"font-size":"smaller",color:"#545454"}).insertAfter(this.element)),n=this.text[t]=e("<div></div>").addClass(t).css({position:"absolute",top:0,left:0,bottom:0,right:0}).appendTo(this.textContainer)),n},n.prototype.getTextInfo=function(t,n,i,o,a){var r,s,l,c;if(n=""+n,r="object"==typeof i?i.style+" "+i.variant+" "+i.weight+" "+i.size+"px/"+i.lineHeight+"px "+i.family:i,null==(s=this._textCache[t])&&(s=this._textCache[t]={}),null==(l=s[r])&&(l=s[r]={}),null==(c=l[n])){var d=e("<div></div>").html(n).css({position:"absolute","max-width":a,top:-9999}).appendTo(this.getTextLayer(t));"object"==typeof i?d.css({font:r,color:i.color}):"string"==typeof i&&d.addClass(i),c=l[n]={width:d.outerWidth(!0),height:d.outerHeight(!0),element:d,positions:[]},d.detach()}return c},n.prototype.addText=function(e,t,n,i,o,a,r,s,l){var c=this.getTextInfo(e,i,o,a,r),d=c.positions;"center"==s?t-=c.width/2:"right"==s&&(t-=c.width),"middle"==l?n-=c.height/2:"bottom"==l&&(n-=c.height);for(var u,f=0;u=d[f];f++)if(u.x==t&&u.y==n)return void(u.active=!0);u={active:!0,rendered:!1,element:d.length?c.element.clone():c.element,x:t,y:n},d.push(u),u.element.css({top:Math.round(n),left:Math.round(t),"text-align":s})},n.prototype.removeText=function(e,n,i,o,a,r){if(null==o){var s=this._textCache[e];if(null!=s)for(var l in s)if(t.call(s,l)){var c=s[l];for(var d in c)if(t.call(c,d))for(var u=c[d].positions,f=0;p=u[f];f++)p.active=!1}}else{var p;for(u=this.getTextInfo(e,o,a,r).positions,f=0;p=u[f];f++)p.x==n&&p.y==i&&(p.active=!1)}},e.plot=function(t,n,o){return new i(e(t),n,o,e.plot.plugins)},e.plot.version="0.8.3",e.plot.plugins=[],e.fn.plot=function(t,n){return this.each((function(){e.plot(this,t,n)}))}}(jQuery)},25206:()=>{!function(e){function t(e,t){return t*Math.floor(e/t)}function n(e,t,n,i){if("function"==typeof e.strftime)return e.strftime(t);var o,a=function(e,t){return t=""+(null==t?"0":t),1==(e=""+e).length?t+e:e},r=[],s=!1,l=e.getHours(),c=l<12;null==n&&(n=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]),null==i&&(i=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"]),o=l>12?l-12:0==l?12:l;for(var d=0;d<t.length;++d){var u=t.charAt(d);if(s){switch(u){case"a":u=""+i[e.getDay()];break;case"b":u=""+n[e.getMonth()];break;case"d":u=a(e.getDate());break;case"e":u=a(e.getDate()," ");break;case"h":case"H":u=a(l);break;case"I":u=a(o);break;case"l":u=a(o," ");break;case"m":u=a(e.getMonth()+1);break;case"M":u=a(e.getMinutes());break;case"q":u=""+(Math.floor(e.getMonth()/3)+1);break;case"S":u=a(e.getSeconds());break;case"y":u=a(e.getFullYear()%100);break;case"Y":u=""+e.getFullYear();break;case"p":u=c?"am":"pm";break;case"P":u=c?"AM":"PM";break;case"w":u=""+e.getDay()}r.push(u),s=!1}else"%"==u?s=!0:r.push(u)}return r.join("")}function i(e){function t(e,t,n,i){e[t]=function(){return n[i].apply(n,arguments)}}var n={date:e};null!=e.strftime&&t(n,"strftime",e,"strftime"),t(n,"getTime",e,"getTime"),t(n,"setTime",e,"setTime");for(var i=["Date","Day","FullYear","Hours","Milliseconds","Minutes","Month","Seconds"],o=0;o<i.length;o++)t(n,"get"+i[o],e,"getUTC"+i[o]),t(n,"set"+i[o],e,"setUTC"+i[o]);return n}function o(e,t){if("browser"==t.timezone)return new Date(e);if(t.timezone&&"utc"!=t.timezone){if("undefined"!=typeof timezoneJS&&void 0!==timezoneJS.Date){var n=new timezoneJS.Date;return n.setTimezone(t.timezone),n.setTime(e),n}return i(new Date(e))}return i(new Date(e))}var a={second:1e3,minute:6e4,hour:36e5,day:864e5,month:2592e6,quarter:7776e6,year:525949.2*60*1e3},r=[[1,"second"],[2,"second"],[5,"second"],[10,"second"],[30,"second"],[1,"minute"],[2,"minute"],[5,"minute"],[10,"minute"],[30,"minute"],[1,"hour"],[2,"hour"],[4,"hour"],[8,"hour"],[12,"hour"],[1,"day"],[2,"day"],[3,"day"],[.25,"month"],[.5,"month"],[1,"month"],[2,"month"]],s=r.concat([[3,"month"],[6,"month"],[1,"year"]]),l=r.concat([[1,"quarter"],[2,"quarter"],[1,"year"]]);e.plot.plugins.push({init:function(i){i.hooks.processOptions.push((function(i,r){e.each(i.getAxes(),(function(e,i){var r=i.options;"time"==r.mode&&(i.tickGenerator=function(e){var n=[],i=o(e.min,r),c=0,d=r.tickSize&&"quarter"===r.tickSize[1]||r.minTickSize&&"quarter"===r.minTickSize[1]?l:s;null!=r.minTickSize&&(c="number"==typeof r.tickSize?r.tickSize:r.minTickSize[0]*a[r.minTickSize[1]]);for(var u=0;u<d.length-1&&!(e.delta<(d[u][0]*a[d[u][1]]+d[u+1][0]*a[d[u+1][1]])/2&&d[u][0]*a[d[u][1]]>=c);++u);var f=d[u][0],p=d[u][1];if("year"==p){if(null!=r.minTickSize&&"year"==r.minTickSize[1])f=Math.floor(r.minTickSize[0]);else{var h=Math.pow(10,Math.floor(Math.log(e.delta/a.year)/Math.LN10)),m=e.delta/a.year/h;f=m<1.5?1:m<3?2:m<7.5?5:10,f*=h}f<1&&(f=1)}e.tickSize=r.tickSize||[f,p];var g=e.tickSize[0];p=e.tickSize[1];var v=g*a[p];"second"==p?i.setSeconds(t(i.getSeconds(),g)):"minute"==p?i.setMinutes(t(i.getMinutes(),g)):"hour"==p?i.setHours(t(i.getHours(),g)):"month"==p?i.setMonth(t(i.getMonth(),g)):"quarter"==p?i.setMonth(3*t(i.getMonth()/3,g)):"year"==p&&i.setFullYear(t(i.getFullYear(),g)),i.setMilliseconds(0),v>=a.minute&&i.setSeconds(0),v>=a.hour&&i.setMinutes(0),v>=a.day&&i.setHours(0),v>=4*a.day&&i.setDate(1),v>=2*a.month&&i.setMonth(t(i.getMonth(),3)),v>=2*a.quarter&&i.setMonth(t(i.getMonth(),6)),v>=a.year&&i.setMonth(0);var _,b=0,y=Number.NaN;do{if(_=y,y=i.getTime(),n.push(y),"month"==p||"quarter"==p)if(g<1){i.setDate(1);var w=i.getTime();i.setMonth(i.getMonth()+("quarter"==p?3:1));var x=i.getTime();i.setTime(y+b*a.hour+(x-w)*g),b=i.getHours(),i.setHours(0)}else i.setMonth(i.getMonth()+g*("quarter"==p?3:1));else"year"==p?i.setFullYear(i.getFullYear()+g):i.setTime(y+v)}while(y<e.max&&y!=_);return n},i.tickFormatter=function(e,t){var i=o(e,t.options);if(null!=r.timeformat)return n(i,r.timeformat,r.monthNames,r.dayNames);var s=t.options.tickSize&&"quarter"==t.options.tickSize[1]||t.options.minTickSize&&"quarter"==t.options.minTickSize[1],l=t.tickSize[0]*a[t.tickSize[1]],c=t.max-t.min,d=r.twelveHourClock?" %p":"",u=r.twelveHourClock?"%I":"%H";return n(i,l<a.minute?u+":%M:%S"+d:l<a.day?c<2*a.day?u+":%M"+d:"%b %d "+u+":%M"+d:l<a.month?"%b %d":s&&l<a.quarter||!s&&l<a.year?c<a.year?"%b":"%b %Y":s&&l<a.year?c<a.year?"Q%q":"Q%q %Y":"%Y",r.monthNames,r.dayNames)})}))}))},options:{xaxis:{timezone:null,timeformat:null,twelveHourClock:!1,monthNames:null}},name:"time",version:"1.0"}),e.plot.formatDate=n,e.plot.dateGenerator=o}(jQuery)},93365:(e,t,n)=>{e.exports=n(68149)},68149:(e,t,n)=>{var i=n(18922),o=n(47186),a=/^[0-9a-f]{32}$/;function r(e,t){if(e)return"boolean"==typeof e.protocol?e.protocol:"http"!==e.protocol&&("https"===e.protocol||void 0)}function s(e){return(e="string"==typeof e?e.trim().toLowerCase():"unspecified").match(a)?e:i(e)}function l(e){var t=o.stringify(function(e){var t={},n={protocol:1,format:1};for(var i in e)n[i]||(t[i]=e[i]);return t}(e));return t&&"?"+t||""}e.exports={url:function(e,t,n){var i="//www.gravatar.com/avatar/";t&&t.cdn?(i=t.cdn+"/avatar/",delete t.cdn):(t&&t.protocol&&(n=r(t)),void 0!==n&&(i=n?"https://s.gravatar.com/avatar/":"http://www.gravatar.com/avatar/"));var o=l(t);return i+s(e)+o},profile_url:function(e,t,n){var i=null!=t&&null!=t.format?String(t.format):"json";if(t&&t.cdn)o=t.cdn+"/",delete t.cdn;else{t&&t.protocol&&(n=r(t));var o=n?"https://secure.gravatar.com/":"http://www.gravatar.com/"}var a=l(t);return o+s(e)+"."+i+a}}},44126:(e,t,n)=>{e.exports=n(29036)},80481:e=>{!function(t){if("undefined"!=typeof window){var n=!0,i="",o=0,a="",r=null,s="",l=!1,c={resize:1,click:1},d=128,u=!0,f=1,p="bodyOffset",h=p,m=!0,g="",v={},_=32,b=null,y=!1,w=!1,x="[iFrameSizer]",k="",C={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",T=window.parent,j="*",I=0,E=!1,G=null,M=16,A=1,O="scroll",P=O,L=window,z=function(){oe("onMessage function not defined")},q=function(){},N=function(){},D={height:function(){return oe("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return oe("Custom width calculation function not defined"),document.body.scrollWidth}},W={},F=!1;try{var Q=Object.create({},{passive:{get:function(){F=!0}}});window.addEventListener("test",Z,Q),window.removeEventListener("test",Z,Q)}catch(e){}var B,V,R,H,$,U,Y,X={bodyOffset:function(){return document.body.offsetHeight+he("marginTop")+he("marginBottom")},offset:function(){return X.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return D.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ge(X))},min:function(){return Math.min.apply(null,ge(X))},grow:function(){return X.max()},lowestElement:function(){return Math.max(X.bodyOffset()||X.documentElementOffset(),me("bottom",_e()))},taggedElement:function(){return ve("bottom","data-iframe-height")}},J={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return D.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(J.bodyScroll(),J.documentElementScroll())},max:function(){return Math.max.apply(null,ge(J))},min:function(){return Math.min.apply(null,ge(J))},rightMostElement:function(){return me("right",_e())},taggedElement:function(){return ve("right","data-iframe-width")}},K=(B=be,$=null,U=0,Y=function(){U=Date.now(),$=null,H=B.apply(V,R),$||(V=R=null)},function(){var e=Date.now();U||(U=e);var t=M-(e-U);return V=this,R=arguments,t<=0||t>M?($&&(clearTimeout($),$=null),U=e,H=B.apply(V,R),$||(V=R=null)):$||($=setTimeout(Y,t)),H});ee(window,"message",(function(c){var f,p={init:function(){var e,f,p;g=c.data,T=c.source,function(){function e(e){return"true"===e}var r=g.substr(13).split(":");k=r[0],o=t!==r[1]?Number(r[1]):o,l=t!==r[2]?e(r[2]):l,y=t!==r[3]?e(r[3]):y,_=t!==r[4]?Number(r[4]):_,n=t!==r[6]?e(r[6]):n,a=r[7],h=t!==r[8]?r[8]:h,i=r[9],s=r[10],I=t!==r[11]?Number(r[11]):I,v.enable=t!==r[12]&&e(r[12]),S=t!==r[13]?r[13]:S,P=t!==r[14]?r[14]:P,w=t!==r[15]?Boolean(r[15]):w}(),ie("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(ae,e),z="onMessage"in e?e.onMessage:z,q="onReady"in e?e.onReady:q,j="targetOrigin"in e?e.targetOrigin:j,h="heightCalculationMethod"in e?e.heightCalculationMethod:h,P="widthCalculationMethod"in e?e.widthCalculationMethod:P}function t(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),D[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),h=t(h,"height"),P=t(P,"width")),ie("TargetOrigin for parent set to: "+j)}(),t===a&&(a=o+"px"),re("margin",(f="margin",-1!==(p=a).indexOf("-")&&(oe("Negative CSS value ignored for "+f),p=""),p)),re("background",i),re("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),de(),ue(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),L.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,fe()):!1===e&&!0===n&&(n=!1,le("remove"),null!==r&&r.disconnect(),clearInterval(b)),Ce(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Ce(0,0,"close")},getId:function(){return k},getPageInfo:function(e){"function"==typeof e?(N=e,Ce(0,0,"pageInfo")):(N=function(){},Ce(0,0,"pageInfoStop"))},moveToAnchor:function(e){v.findTarget(e)},reset:function(){ke("parentIFrame.reset")},scrollTo:function(e,t){Ce(t,e,"scrollTo")},scrollToOffset:function(e,t){Ce(t,e,"scrollToOffset")},sendMessage:function(e,t){Ce(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){h=e,de()},setWidthCalculationMethod:function(e){P=e,ue()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),j=e},size:function(e,t){ye("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){function e(e){Ce(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){ie("Add event listener: "+n),ee(window.document,t,e)}!0===w&&(t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave"))}(),fe(),v=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),i=e();return{x:parseInt(n.left,10)+parseInt(i.x,10),y:parseInt(n.top,10)+parseInt(i.y,10)}}function i(e){function i(e){var t=n(e);ie("Moving to in page link (#"+o+") at x: "+t.x+" y: "+t.y),Ce(t.y,t.x,"scrollToOffset")}var o=e.split("#")[1]||e,a=decodeURIComponent(o),r=document.getElementById(a)||document.getElementsByName(a)[0];t!==r?i(r):(ie("In page link (#"+o+") not found in iFrame, so sending to parent"),Ce(0,0,"inPageLink","#"+o))}function o(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&i(t)}function a(){function e(e){function t(e){e.preventDefault(),i(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&ee(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function r(){ee(window,"hashchange",o)}function s(){setTimeout(o,d)}function l(){Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),a(),r(),s()):oe("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}return v.enable?l():ie("In page linking not enabled"),{findTarget:i}}(),ye("init","Init message from host page"),q(),u=!1,setTimeout((function(){m=!1}),d)},reset:function(){m?ie("Page reset ignored by init"):(ie("Page size reset by host page"),xe("resetPage"))},resize:function(){ye("resizeParent","Parent window requested size check")},moveToAnchor:function(){v.findTarget(E())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=E();ie("PageInfoFromParent called from parent: "+e),N(JSON.parse(e)),ie(" --")},message:function(){var e=E();ie("onMessage called from parent: "+e),z(JSON.parse(e)),ie(" --")}};function C(){return c.data.split("]")[1].split(":")[0]}function E(){return c.data.substr(c.data.indexOf(":")+1)}function G(){return c.data.split(":")[2]in{true:1,false:1}}x===(""+c.data).substr(0,13)&&(!1===u?(f=C())in p?p[f]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||G()||oe("Unexpected message ("+c.data+")"):G()?p.init():ie('Ignored message of type "'+C()+'". Received before initialization.'))})),ee(window,"readystatechange",Se),Se()}function Z(){}function ee(e,t,n,i){e.addEventListener(t,n,!!F&&(i||{}))}function te(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ne(e){return x+"["+k+"] "+e}function ie(e){y&&"object"==typeof window.console&&console.log(ne(e))}function oe(e){"object"==typeof window.console&&console.warn(ne(e))}function ae(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],oe("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function re(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,ie("Body "+e+' set to "'+n+'"'))}function se(e){var t={add:function(t){function n(){ye(e.eventName,e.eventType)}W[t]=n,ee(window,t,n,{passive:!0})},remove:function(e){var t,n,i=W[e];delete W[e],t=e,n=i,window.removeEventListener(t,n,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),ie(te(e.method)+" event listener: "+e.eventType)}function le(e){se({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),se({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),se({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),se({method:e,eventType:"Input",eventName:"input"}),se({method:e,eventType:"Mouse Up",eventName:"mouseup"}),se({method:e,eventType:"Mouse Down",eventName:"mousedown"}),se({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),se({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),se({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),se({method:e,eventType:"Touch Start",eventName:"touchstart"}),se({method:e,eventType:"Touch End",eventName:"touchend"}),se({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),se({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),se({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),se({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&se({method:e,eventType:"IFrame Resized",eventName:"resize"})}function ce(e,t,n,i){return t!==e&&(e in n||(oe(e+" is not a valid option for "+i+"CalculationMethod."),e=t),ie(i+' calculation method set to "'+e+'"')),e}function de(){h=ce(h,p,X,"height")}function ue(){P=ce(P,O,J,"width")}function fe(){var e;!0===n?(le("add"),e=0>_,window.MutationObserver||window.WebKitMutationObserver?e?pe():r=function(){function e(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",o,!1),r.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",o,!1),function(e){r.splice(r.indexOf(e),1)}(e)}function n(e,n,i){t(e.target),ye(n,i+": "+e.target.src)}function i(e){n(e,"imageLoad","Image loaded")}function o(e){n(e,"imageLoadFailed","Image load failed")}function a(t){ye("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}var r=[],s=window.MutationObserver||window.WebKitMutationObserver,l=function(){var e=document.querySelector("body");return l=new s(a),ie("Create body MutationObserver"),l.observe(e,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}),l}();return{disconnect:function(){"disconnect"in l&&(ie("Disconnect body MutationObserver"),l.disconnect(),r.forEach(t))}}}():(ie("MutationObserver not supported in this browser!"),pe())):ie("Auto Resize disabled")}function pe(){0!==_&&(ie("setInterval: "+_+"ms"),b=setInterval((function(){ye("interval","setInterval: "+_)}),Math.abs(_)))}function he(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function me(e,t){for(var n=t.length,i=0,o=0,a=te(e),r=Date.now(),s=0;s<n;s++)(i=t[s].getBoundingClientRect()[e]+he("margin"+a,t[s]))>o&&(o=i);return r=Date.now()-r,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+r+"ms"),function(e){e>M/2&&ie("Event throttle increased to "+(M=2*e)+"ms")}(r),o}function ge(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function ve(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(oe("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),me(e,n)}function _e(){return document.querySelectorAll("body *")}function be(e,n,i,o){var a,r;!function(){function e(e,t){return!(Math.abs(e-t)<=I)}return a=t!==i?i:X[h](),r=t!==o?o:J[P](),e(f,a)||l&&e(A,r)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(h in C||l&&P in C)?ke(n):e in{interval:1}||ie("No change in size detected"):(we(),Ce(f=a,A=r,e))}function ye(e,t,n,i){E&&e in c?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?be(e,t,n,i):K(e,t,n,i))}function we(){E||(E=!0,ie("Trigger event lock on")),clearTimeout(G),G=setTimeout((function(){E=!1,ie("Trigger event lock off"),ie("--")}),d)}function xe(e){f=X[h](),A=J[P](),Ce(f,A,e)}function ke(e){var t=h;h=p,ie("Reset trigger event: "+e),we(),xe("reset"),h=t}function Ce(e,n,i,o,a){var r;t===a?a=j:ie("Message targetOrigin: "+a),ie("Sending message to host page ("+(r=k+":"+e+":"+n+":"+i+(t!==o?":"+o:""))+")"),T.postMessage(x+r,a)}function Se(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()},10570:(e,t)=>{var n,i,o;!function(a){if("undefined"!=typeof window){var r,s=0,l=!1,c=!1,d="[iFrameSizer]",u=null,f=window.requestAnimationFrame,p={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},h={},m=null,g={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){C("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},v={};window.jQuery&&((r=window.jQuery).fn?r.fn.iFrameResize||(r.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){N(n,e)})).end()}):k("","Unable to bind to jQuery, it is not fully loaded.")),i=[],(o="function"==typeof(n=Q)?n.apply(t,i):n)===a||(e.exports=o),window.iFrameResize=window.iFrameResize||Q()}function _(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function b(e,t,n){e.addEventListener(t,n,!1)}function y(e,t,n){e.removeEventListener(t,n,!1)}function w(e){return h[e]?h[e].log:l}function x(e,t){S("log",e,t,w(e))}function k(e,t){S("info",e,t,w(e))}function C(e,t){S("warn",e,t,!0)}function S(e,t,n,i){!0===i&&"object"==typeof window.console&&console[e](function(e){return d+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}(t),n)}function T(e){function t(){o("Height"),o("Width"),L((function(){P(w),M(S),p("onResized",w)}),w,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function o(e){var t=Number(h[S]["max"+e]),n=Number(h[S]["min"+e]),i=e.toLowerCase(),o=Number(w[i]);x(S,"Checking "+i+" is in range "+n+"-"+t),o<n&&(o=n,x(S,"Set "+i+" to min value")),o>t&&(o=t,x(S,"Set "+i+" to max value")),w[i]=""+o}function a(e){return _.substr(_.indexOf(":")+7+e)}function r(e,t){var n,i;n=function(){var n,i;z("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),i=w.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-n.top,10),offsetLeft:parseInt(i.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},v[i=t]||(v[i]=setTimeout((function(){v[i]=null,n()}),32))}function s(e){var t=e.getBoundingClientRect();return G(S),{x:Math.floor(Number(t.left)+Number(u.x)),y:Math.floor(Number(t.top)+Number(u.y))}}function l(e){var t=e?s(w.iframe):{x:0,y:0},n={x:Number(w.width)+t.x,y:Number(w.height)+t.y};x(S,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):C(S,"Unable to scroll to requested position, window.parentIFrame not found"):(u=n,c(),x(S,"--"))}function c(){!1!==p("onScroll",u)?M(S):A()}function f(e){var t={};if(0===Number(w.width)&&0===Number(w.height)){var n=a(9).split(":");t={x:n[1],y:n[0]}}else t={x:w.width,y:w.height};p(e,{iframe:w.iframe,screenX:Number(t.x),screenY:Number(t.y),type:w.type})}function p(e,t){return j(S,e,t)}var m,g,_=e.data,w={},S=null;"[iFrameResizerChild]Ready"===_?function(){for(var e in h)z("iFrame requested init",q(e),h[e].iframe,e)}():d===(""+_).substr(0,13)&&_.substr(13).split(":")[0]in h?(w=function(){var e=_.substr(13).split(":"),t=e[1]?parseInt(e[1],10):0,o=h[e[0]]&&h[e[0]].iframe,a=getComputedStyle(o);return{iframe:o,id:e[0],height:t+n(a)+i(a),width:e[2],type:e[3]}}(),S=w.id,h[S]&&(h[S].loaded=!0),(g=w.type in{true:1,false:1,undefined:1})&&x(S,"Ignoring init message from meta parent page"),!g&&function(e){var t=!0;return h[e]||(t=!1,C(w.type+" No settings for "+e+". Message was: "+_)),t}(S)&&(x(S,"Received: "+_),m=!0,null===w.iframe&&(C(S,"IFrame ("+w.id+") not found"),m=!1),m&&function(){var t,n=e.origin,i=h[S]&&h[S].checkOrigin;if(i&&""+n!="null"&&!(i.constructor===Array?function(){var e=0,t=!1;for(x(S,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===n){t=!0;break}return t}():(t=h[S]&&h[S].remoteHost,x(S,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+w.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(h[S]&&h[S].firstRun&&h[S]&&(h[S].firstRun=!1),w.type){case"close":E(w.iframe);break;case"message":d=a(6),x(S,"onMessage passed: {iframe: "+w.iframe.id+", message: "+d+"}"),p("onMessage",{iframe:w.iframe,message:JSON.parse(d)}),x(S,"--");break;case"mouseenter":f("onMouseEnter");break;case"mouseleave":f("onMouseLeave");break;case"autoResize":h[S].autoResize=JSON.parse(a(9));break;case"scrollTo":l(!1);break;case"scrollToOffset":l(!0);break;case"pageInfo":r(h[S]&&h[S].iframe,S),function(){function e(e,i){function o(){h[n]?r(h[n].iframe,n):t()}["scroll","resize"].forEach((function(t){x(n,e+t+" listener for sendPageInfo"),i(window,t,o)}))}function t(){e("Remove ",y)}var n=S;e("Add ",b),h[n]&&(h[n].stopPageInfo=t)}();break;case"pageInfoStop":h[S]&&h[S].stopPageInfo&&(h[S].stopPageInfo(),delete h[S].stopPageInfo);break;case"inPageLink":n=a(9).split("#")[1]||"",i=decodeURIComponent(n),(o=document.getElementById(i)||document.getElementsByName(i)[0])?(e=s(o),x(S,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),u={x:e.x,y:e.y},c(),x(S,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):x(S,"In page link #"+n+" not found and window.parentIFrame not found"):x(S,"In page link #"+n+" not found");break;case"reset":O(w);break;case"init":t(),p("onInit",w.iframe);break;default:0===Number(w.width)&&0===Number(w.height)?C("Unsupported message received ("+w.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,i,o,d}())):k(S,"Ignored: "+_)}function j(e,t,n){var i=null,o=null;if(h[e]){if("function"!=typeof(i=h[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");o=i(n)}return o}function I(e){var t=e.id;delete h[t]}function E(e){var t=e.id;if(!1!==j(t,"onClose",t)){x(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(e){C(e)}j(t,"onClosed",t),x(t,"--"),I(e)}else x(t,"Close iframe cancelled by onClose event")}function G(e){null===u&&x(e,"Get page position: "+(u={x:window.pageXOffset!==a?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==a?window.pageYOffset:document.documentElement.scrollTop}).x+","+u.y)}function M(e){null!==u&&(window.scrollTo(u.x,u.y),x(e,"Set page position: "+u.x+","+u.y),A())}function A(){u=null}function O(e){x(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),G(e.id),L((function(){P(e),z("reset","reset",e.iframe,e.id)}),e,"reset")}function P(e){function t(t){c||"0"!==e[t]||(c=!0,x(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){Object.keys(h).forEach((function(e){!function(e){function t(t){return"0px"===(h[e]&&h[e].iframe.style[t])}h[e]&&null!==h[e].iframe.offsetParent&&(t("height")||t("width"))&&z("Visibility change","resize",h[e].iframe,e)}(e)}))}function t(t){x("window","Mutation observed: "+t[0].target+" "+t[0].type),D(e,16)}var n,i=_();i&&(n=document.querySelector("body"),new i(t).observe(n,{attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0}))}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",x(e.id,"IFrame ("+i+") "+t+" set to "+e[t]+"px")):x("undefined","messageData id not set")}(n),t(n)}var i=e.iframe.id;h[i]&&(h[i].sizeHeight&&n("height"),h[i].sizeWidth&&n("width"))}function L(e,t,n){n!==t.type&&f&&!window.jasmine?(x(t.id,"Requesting animation frame"),f(e)):e()}function z(e,t,n,i,o){var a,r=!1;i=i||n.id,h[i]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(a=h[i]&&h[i].targetOrigin,x(i,"["+e+"] Sending msg to iframe["+i+"] ("+t+") targetOrigin: "+a),n.contentWindow.postMessage(d+t,a)):C(i,"["+e+"] IFrame("+i+") not found"),o&&h[i]&&h[i].warningTimeout&&(h[i].msgTimeout=setTimeout((function(){!h[i]||h[i].loaded||r||(r=!0,C(i,"IFrame has not responded within "+h[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),h[i].warningTimeout)))}function q(e){return e+":"+h[e].bodyMarginV1+":"+h[e].sizeWidth+":"+h[e].log+":"+h[e].interval+":"+h[e].enablePublicMethods+":"+h[e].autoResize+":"+h[e].bodyMargin+":"+h[e].heightCalculationMethod+":"+h[e].bodyBackground+":"+h[e].bodyPadding+":"+h[e].tolerance+":"+h[e].inPageLinks+":"+h[e].resizeFrom+":"+h[e].widthCalculationMethod+":"+h[e].mouseEvents}function N(e,t){function n(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],C(i,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var i=function(n){var i;return""===n&&(e.id=(i=t&&t.id||g.id+s++,null!==document.getElementById(i)&&(i+=s++),n=i),l=(t||{}).log,x(n,"Added missing iframe ID: "+n+" ("+e.src+")")),n}(e.id);i in h&&"iFrameResizer"in e?C(i,"Ignored iFrame, already setup."):(function(t){var o;t=t||{},h[i]={firstRun:!0,iframe:e,remoteHost:e.src&&e.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(t),Object.keys(t).forEach(n,t),function(e){for(var t in g)Object.prototype.hasOwnProperty.call(g,t)&&(h[i][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:g[t])}(t),h[i]&&(h[i].targetOrigin=!0===h[i].checkOrigin?""===(o=h[i].remoteHost)||null!==o.match(/^(about:blank|javascript:|file:\/\/)/)?"*":o:"*")}(t),function(){switch(x(i,"IFrame scrolling "+(h[i]&&h[i].scrolling?"enabled":"disabled")+" for "+i),e.style.overflow=!1===(h[i]&&h[i].scrolling)?"hidden":"auto",h[i]&&h[i].scrolling){case"omit":break;case!0:e.scrolling="yes";break;case!1:e.scrolling="no";break;default:e.scrolling=h[i]?h[i].scrolling:"no"}}(),function(){function t(t){var n=h[i][t];1/0!==n&&0!==n&&(e.style[t]="number"==typeof n?n+"px":n,x(i,"Set "+t+" = "+e.style[t]))}function n(e){if(h[i]["min"+e]>h[i]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),t("maxHeight"),t("minHeight"),t("maxWidth"),t("minWidth")}(),"number"!=typeof(h[i]&&h[i].bodyMargin)&&"0"!==(h[i]&&h[i].bodyMargin)||(h[i].bodyMarginV1=h[i].bodyMargin,h[i].bodyMargin=h[i].bodyMargin+"px"),function(t){var n=_();n&&function(t){e.parentNode&&new t((function(t){t.forEach((function(t){Array.prototype.slice.call(t.removedNodes).forEach((function(t){t===e&&E(e)}))}))})).observe(e.parentNode,{childList:!0})}(n),b(e,"load",(function(){var n,o;z("iFrame.onload",t,e,a,!0),n=h[i]&&h[i].firstRun,o=h[i]&&h[i].heightCalculationMethod in p,!n&&o&&O({iframe:e,height:0,width:0,type:"init"})})),z("init",t,e,a,!0)}(q(i)),h[i]&&(h[i].iframe.iFrameResizer={close:E.bind(null,h[i].iframe),removeListeners:I.bind(null,h[i].iframe),resize:z.bind(null,"Window resize","resize",h[i].iframe),moveToAnchor:function(e){z("Move to anchor","moveToAnchor:"+e,h[i].iframe,i)},sendMessage:function(e){z("Send Message","message:"+(e=JSON.stringify(e)),h[i].iframe,i)}}))}function D(e,t){null===m&&(m=setTimeout((function(){m=null,e()}),t))}function W(){"hidden"!==document.visibilityState&&(x("document","Trigger event: Visiblity change"),D((function(){F("Tab Visable","resize")}),16))}function F(e,t){Object.keys(h).forEach((function(n){(function(e){return h[e]&&"parent"===h[e].resizeFrom&&h[e].autoResize&&!h[e].firstRun})(n)&&z(e,t,h[n].iframe,n)}))}function Q(){function e(e,n){n&&(function(){if(!n.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==n.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+n.tagName+">")}(),N(n,e),t.push(n))}var t;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!f;e+=1)f=window[t[e]+"RequestAnimationFrame"];f?f=f.bind(window):x("setup","RequestAnimationFrame not supported")}(),b(window,"message",T),b(window,"resize",(function(){x("window","Trigger event: resize"),D((function(){F("Window resize","resize")}),16)})),b(document,"visibilitychange",W),b(document,"-webkit-visibilitychange",W),function(n,i){switch(t=[],function(e){e&&e.enablePublicMethods&&C("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(n),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),e.bind(a,n));break;case"object":e(n,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return t}}}()},29036:(e,t,n)=>{var i=n(10570);t.iframeResize=i,n(80481)},66732:(e,t,n)=>{var i,o,a;o=[n(20428)],i=function(e){var t,n,i,o,a,r,s="Close",l="BeforeClose",c="MarkupParse",d="Open",u="Change",f="mfp",p="."+f,h="mfp-ready",m="mfp-removing",g="mfp-prevent-close",v=function(){},_=!!window.jQuery,b=e(window),y=function(e,n){t.ev.on(f+e+p,n)},w=function(t,n,i,o){var a=document.createElement("div");return a.className="mfp-"+t,i&&(a.innerHTML=i),o?n&&n.appendChild(a):(a=e(a),n&&a.appendTo(n)),a},x=function(n,i){t.ev.triggerHandler(f+n,i),t.st.callbacks&&(n=n.charAt(0).toLowerCase()+n.slice(1),t.st.callbacks[n]&&t.st.callbacks[n].apply(t,e.isArray(i)?i:[i]))},k=function(n){return n===r&&t.currTemplate.closeBtn||(t.currTemplate.closeBtn=e(t.st.closeMarkup.replace("%title%",t.st.tClose)),r=n),t.currTemplate.closeBtn},C=function(){e.magnificPopup.instance||((t=new v).init(),e.magnificPopup.instance=t)};v.prototype={constructor:v,init:function(){var n=navigator.appVersion;t.isLowIE=t.isIE8=document.all&&!document.addEventListener,t.isAndroid=/android/gi.test(n),t.isIOS=/iphone|ipad|ipod/gi.test(n),t.supportsTransition=function(){var e=document.createElement("p").style,t=["ms","O","Moz","Webkit"];if(void 0!==e.transition)return!0;for(;t.length;)if(t.pop()+"Transition"in e)return!0;return!1}(),t.probablyMobile=t.isAndroid||t.isIOS||/(Opera Mini)|Kindle|webOS|BlackBerry|(Opera Mobi)|(Windows Phone)|IEMobile/i.test(navigator.userAgent),i=e(document),t.popupsCache={}},open:function(n){var o;if(!1===n.isObj){t.items=n.items.toArray(),t.index=0;var r,s=n.items;for(o=0;o<s.length;o++)if((r=s[o]).parsed&&(r=r.el[0]),r===n.el[0]){t.index=o;break}}else t.items=e.isArray(n.items)?n.items:[n.items],t.index=n.index||0;if(!t.isOpen){t.types=[],a="",n.mainEl&&n.mainEl.length?t.ev=n.mainEl.eq(0):t.ev=i,n.key?(t.popupsCache[n.key]||(t.popupsCache[n.key]={}),t.currTemplate=t.popupsCache[n.key]):t.currTemplate={},t.st=e.extend(!0,{},e.magnificPopup.defaults,n),t.fixedContentPos="auto"===t.st.fixedContentPos?!t.probablyMobile:t.st.fixedContentPos,t.st.modal&&(t.st.closeOnContentClick=!1,t.st.closeOnBgClick=!1,t.st.showCloseBtn=!1,t.st.enableEscapeKey=!1),t.bgOverlay||(t.bgOverlay=w("bg").on("click"+p,(function(){t.close()})),t.wrap=w("wrap").attr("tabindex",-1).on("click"+p,(function(e){t._checkIfClose(e.target)&&t.close()})),t.container=w("container",t.wrap)),t.contentContainer=w("content"),t.st.preloader&&(t.preloader=w("preloader",t.container,t.st.tLoading));var l=e.magnificPopup.modules;for(o=0;o<l.length;o++){var u=l[o];u=u.charAt(0).toUpperCase()+u.slice(1),t["init"+u].call(t)}x("BeforeOpen"),t.st.showCloseBtn&&(t.st.closeBtnInside?(y(c,(function(e,t,n,i){n.close_replaceWith=k(i.type)})),a+=" mfp-close-btn-in"):t.wrap.append(k())),t.st.alignTop&&(a+=" mfp-align-top"),t.fixedContentPos?t.wrap.css({overflow:t.st.overflowY,overflowX:"hidden",overflowY:t.st.overflowY}):t.wrap.css({top:b.scrollTop(),position:"absolute"}),(!1===t.st.fixedBgPos||"auto"===t.st.fixedBgPos&&!t.fixedContentPos)&&t.bgOverlay.css({height:i.height(),position:"absolute"}),t.st.enableEscapeKey&&i.on("keyup"+p,(function(e){27===e.keyCode&&t.close()})),b.on("resize"+p,(function(){t.updateSize()})),t.st.closeOnContentClick||(a+=" mfp-auto-cursor"),a&&t.wrap.addClass(a);var f=t.wH=b.height(),m={};if(t.fixedContentPos&&t._hasScrollBar(f)){var g=t._getScrollbarSize();g&&(m.marginRight=g)}t.fixedContentPos&&(t.isIE7?e("body, html").css("overflow","hidden"):m.overflow="hidden");var v=t.st.mainClass;return t.isIE7&&(v+=" mfp-ie7"),v&&t._addClassToMFP(v),t.updateItemHTML(),x("BuildControls"),e("html").css(m),t.bgOverlay.add(t.wrap).prependTo(t.st.prependTo||e(document.body)),t._lastFocusedEl=document.activeElement,setTimeout((function(){t.content?(t._addClassToMFP(h),t._setFocus()):t.bgOverlay.addClass(h),i.on("focusin"+p,t._onFocusIn)}),16),t.isOpen=!0,t.updateSize(f),x(d),n}t.updateItemHTML()},close:function(){t.isOpen&&(x(l),t.isOpen=!1,t.st.removalDelay&&!t.isLowIE&&t.supportsTransition?(t._addClassToMFP(m),setTimeout((function(){t._close()}),t.st.removalDelay)):t._close())},_close:function(){x(s);var n=m+" "+h+" ";if(t.bgOverlay.detach(),t.wrap.detach(),t.container.empty(),t.st.mainClass&&(n+=t.st.mainClass+" "),t._removeClassFromMFP(n),t.fixedContentPos){var o={marginRight:""};t.isIE7?e("body, html").css("overflow",""):o.overflow="",e("html").css(o)}i.off("keyup.mfp focusin"+p),t.ev.off(p),t.wrap.attr("class","mfp-wrap").removeAttr("style"),t.bgOverlay.attr("class","mfp-bg"),t.container.attr("class","mfp-container"),!t.st.showCloseBtn||t.st.closeBtnInside&&!0!==t.currTemplate[t.currItem.type]||t.currTemplate.closeBtn&&t.currTemplate.closeBtn.detach(),t.st.autoFocusLast&&t._lastFocusedEl&&e(t._lastFocusedEl).focus(),t.currItem=null,t.content=null,t.currTemplate=null,t.prevHeight=0,x("AfterClose")},updateSize:function(e){if(t.isIOS){var n=document.documentElement.clientWidth/window.innerWidth,i=window.innerHeight*n;t.wrap.css("height",i),t.wH=i}else t.wH=e||b.height();t.fixedContentPos||t.wrap.css("height",t.wH),x("Resize")},updateItemHTML:function(){var n=t.items[t.index];t.contentContainer.detach(),t.content&&t.content.detach(),n.parsed||(n=t.parseEl(t.index));var i=n.type;if(x("BeforeChange",[t.currItem?t.currItem.type:"",i]),t.currItem=n,!t.currTemplate[i]){var a=!!t.st[i]&&t.st[i].markup;x("FirstMarkupParse",a),t.currTemplate[i]=!a||e(a)}o&&o!==n.type&&t.container.removeClass("mfp-"+o+"-holder");var r=t["get"+i.charAt(0).toUpperCase()+i.slice(1)](n,t.currTemplate[i]);t.appendContent(r,i),n.preloaded=!0,x(u,n),o=n.type,t.container.prepend(t.contentContainer),x("AfterChange")},appendContent:function(e,n){t.content=e,e?t.st.showCloseBtn&&t.st.closeBtnInside&&!0===t.currTemplate[n]?t.content.find(".mfp-close").length||t.content.append(k()):t.content=e:t.content="",x("BeforeAppend"),t.container.addClass("mfp-"+n+"-holder"),t.contentContainer.append(t.content)},parseEl:function(n){var i,o=t.items[n];if(o.tagName?o={el:e(o)}:(i=o.type,o={data:o,src:o.src}),o.el){for(var a=t.types,r=0;r<a.length;r++)if(o.el.hasClass("mfp-"+a[r])){i=a[r];break}o.src=o.el.attr("data-mfp-src"),o.src||(o.src=o.el.attr("href"))}return o.type=i||t.st.type||"inline",o.index=n,o.parsed=!0,t.items[n]=o,x("ElementParse",o),t.items[n]},addGroup:function(e,n){var i=function(i){i.mfpEl=this,t._openClick(i,e,n)};n||(n={});var o="click.magnificPopup";n.mainEl=e,n.items?(n.isObj=!0,e.off(o).on(o,i)):(n.isObj=!1,n.delegate?e.off(o).on(o,n.delegate,i):(n.items=e,e.off(o).on(o,i)))},_openClick:function(n,i,o){if((void 0!==o.midClick?o.midClick:e.magnificPopup.defaults.midClick)||!(2===n.which||n.ctrlKey||n.metaKey||n.altKey||n.shiftKey)){var a=void 0!==o.disableOn?o.disableOn:e.magnificPopup.defaults.disableOn;if(a)if(e.isFunction(a)){if(!a.call(t))return!0}else if(b.width()<a)return!0;n.type&&(n.preventDefault(),t.isOpen&&n.stopPropagation()),o.el=e(n.mfpEl),o.delegate&&(o.items=i.find(o.delegate)),t.open(o)}},updateStatus:function(e,i){if(t.preloader){n!==e&&t.container.removeClass("mfp-s-"+n),i||"loading"!==e||(i=t.st.tLoading);var o={status:e,text:i};x("UpdateStatus",o),e=o.status,i=o.text,t.preloader.html(i),t.preloader.find("a").on("click",(function(e){e.stopImmediatePropagation()})),t.container.addClass("mfp-s-"+e),n=e}},_checkIfClose:function(n){if(!e(n).hasClass(g)){var i=t.st.closeOnContentClick,o=t.st.closeOnBgClick;if(i&&o)return!0;if(!t.content||e(n).hasClass("mfp-close")||t.preloader&&n===t.preloader[0])return!0;if(n===t.content[0]||e.contains(t.content[0],n)){if(i)return!0}else if(o&&e.contains(document,n))return!0;return!1}},_addClassToMFP:function(e){t.bgOverlay.addClass(e),t.wrap.addClass(e)},_removeClassFromMFP:function(e){this.bgOverlay.removeClass(e),t.wrap.removeClass(e)},_hasScrollBar:function(e){return(t.isIE7?i.height():document.body.scrollHeight)>(e||b.height())},_setFocus:function(){(t.st.focus?t.content.find(t.st.focus).eq(0):t.wrap).focus()},_onFocusIn:function(n){if(n.target!==t.wrap[0]&&!e.contains(t.wrap[0],n.target))return t._setFocus(),!1},_parseMarkup:function(t,n,i){var o;i.data&&(n=e.extend(i.data,n)),x(c,[t,n,i]),e.each(n,(function(n,i){if(void 0===i||!1===i)return!0;if((o=n.split("_")).length>1){var a=t.find(p+"-"+o[0]);if(a.length>0){var r=o[1];"replaceWith"===r?a[0]!==i[0]&&a.replaceWith(i):"img"===r?a.is("img")?a.attr("src",i):a.replaceWith(e("<img>").attr("src",i).attr("class",a.attr("class"))):a.attr(o[1],i)}}else t.find(p+"-"+n).html(i)}))},_getScrollbarSize:function(){if(void 0===t.scrollbarSize){var e=document.createElement("div");e.style.cssText="width: 99px; height: 99px; overflow: scroll; position: absolute; top: -9999px;",document.body.appendChild(e),t.scrollbarSize=e.offsetWidth-e.clientWidth,document.body.removeChild(e)}return t.scrollbarSize}},e.magnificPopup={instance:null,proto:v.prototype,modules:[],open:function(t,n){return C(),(t=t?e.extend(!0,{},t):{}).isObj=!0,t.index=n||0,this.instance.open(t)},close:function(){return e.magnificPopup.instance&&e.magnificPopup.instance.close()},registerModule:function(t,n){n.options&&(e.magnificPopup.defaults[t]=n.options),e.extend(this.proto,n.proto),this.modules.push(t)},defaults:{disableOn:0,key:null,midClick:!1,mainClass:"",preloader:!0,focus:"",closeOnContentClick:!1,closeOnBgClick:!0,closeBtnInside:!0,showCloseBtn:!0,enableEscapeKey:!0,modal:!1,alignTop:!1,removalDelay:0,prependTo:null,fixedContentPos:"auto",fixedBgPos:"auto",overflowY:"auto",closeMarkup:'<button title="%title%" type="button" class="mfp-close">×</button>',tClose:"Close (Esc)",tLoading:"Loading...",autoFocusLast:!0}},e.fn.magnificPopup=function(n){C();var i=e(this);if("string"==typeof n)if("open"===n){var o,a=_?i.data("magnificPopup"):i[0].magnificPopup,r=parseInt(arguments[1],10)||0;a.items?o=a.items[r]:(o=i,a.delegate&&(o=o.find(a.delegate)),o=o.eq(r)),t._openClick({mfpEl:o},i,a)}else t.isOpen&&t[n].apply(t,Array.prototype.slice.call(arguments,1));else n=e.extend(!0,{},n),_?i.data("magnificPopup",n):i[0].magnificPopup=n,t.addGroup(i,n);return i};var S,T,j,I="inline",E=function(){j&&(T.after(j.addClass(S)).detach(),j=null)};e.magnificPopup.registerModule(I,{options:{hiddenClass:"hide",markup:"",tNotFound:"Content not found"},proto:{initInline:function(){t.types.push(I),y(s+"."+I,(function(){E()}))},getInline:function(n,i){if(E(),n.src){var o=t.st.inline,a=e(n.src);if(a.length){var r=a[0].parentNode;r&&r.tagName&&(T||(S=o.hiddenClass,T=w(S),S="mfp-"+S),j=a.after(T).detach().removeClass(S)),t.updateStatus("ready")}else t.updateStatus("error",o.tNotFound),a=e("<div>");return n.inlineElement=a,a}return t.updateStatus("ready"),t._parseMarkup(i,{},n),i}}});var G,M="ajax",A=function(){G&&e(document.body).removeClass(G)},O=function(){A(),t.req&&t.req.abort()};e.magnificPopup.registerModule(M,{options:{settings:null,cursor:"mfp-ajax-cur",tError:'<a href="%url%">The content</a> could not be loaded.'},proto:{initAjax:function(){t.types.push(M),G=t.st.ajax.cursor,y(s+"."+M,O),y("BeforeChange."+M,O)},getAjax:function(n){G&&e(document.body).addClass(G),t.updateStatus("loading");var i=e.extend({url:n.src,success:function(i,o,a){var r={data:i,xhr:a};x("ParseAjax",r),t.appendContent(e(r.data),M),n.finished=!0,A(),t._setFocus(),setTimeout((function(){t.wrap.addClass(h)}),16),t.updateStatus("ready"),x("AjaxContentAdded")},error:function(){A(),n.finished=n.loadError=!0,t.updateStatus("error",t.st.ajax.tError.replace("%url%",n.src))}},t.st.ajax.settings);return t.req=e.ajax(i),""}}});var P,L=function(n){if(n.data&&void 0!==n.data.title)return n.data.title;var i=t.st.image.titleSrc;if(i){if(e.isFunction(i))return i.call(t,n);if(n.el)return n.el.attr(i)||""}return""};e.magnificPopup.registerModule("image",{options:{markup:'<div class="mfp-figure"><div class="mfp-close"></div><figure><div class="mfp-img"></div><figcaption><div class="mfp-bottom-bar"><div class="mfp-title"></div><div class="mfp-counter"></div></div></figcaption></figure></div>',cursor:"mfp-zoom-out-cur",titleSrc:"title",verticalFit:!0,tError:'<a href="%url%">The image</a> could not be loaded.'},proto:{initImage:function(){var n=t.st.image,i=".image";t.types.push("image"),y(d+i,(function(){"image"===t.currItem.type&&n.cursor&&e(document.body).addClass(n.cursor)})),y(s+i,(function(){n.cursor&&e(document.body).removeClass(n.cursor),b.off("resize"+p)})),y("Resize"+i,t.resizeImage),t.isLowIE&&y("AfterChange",t.resizeImage)},resizeImage:function(){var e=t.currItem;if(e&&e.img&&t.st.image.verticalFit){var n=0;t.isLowIE&&(n=parseInt(e.img.css("padding-top"),10)+parseInt(e.img.css("padding-bottom"),10)),e.img.css("max-height",t.wH-n)}},_onImageHasSize:function(e){e.img&&(e.hasSize=!0,P&&clearInterval(P),e.isCheckingImgSize=!1,x("ImageHasSize",e),e.imgHidden&&(t.content&&t.content.removeClass("mfp-loading"),e.imgHidden=!1))},findImageSize:function(e){var n=0,i=e.img[0],o=function(a){P&&clearInterval(P),P=setInterval((function(){i.naturalWidth>0?t._onImageHasSize(e):(n>200&&clearInterval(P),3==++n?o(10):40===n?o(50):100===n&&o(500))}),a)};o(1)},getImage:function(n,i){var o=0,a=function(){n&&(n.img[0].complete?(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("ready")),n.hasSize=!0,n.loaded=!0,x("ImageLoadComplete")):++o<200?setTimeout(a,100):r())},r=function(){n&&(n.img.off(".mfploader"),n===t.currItem&&(t._onImageHasSize(n),t.updateStatus("error",s.tError.replace("%url%",n.src))),n.hasSize=!0,n.loaded=!0,n.loadError=!0)},s=t.st.image,l=i.find(".mfp-img");if(l.length){var c=document.createElement("img");c.className="mfp-img",n.el&&n.el.find("img").length&&(c.alt=n.el.find("img").attr("alt")),n.img=e(c).on("load.mfploader",a).on("error.mfploader",r),c.src=n.src,l.is("img")&&(n.img=n.img.clone()),(c=n.img[0]).naturalWidth>0?n.hasSize=!0:c.width||(n.hasSize=!1)}return t._parseMarkup(i,{title:L(n),img_replaceWith:n.img},n),t.resizeImage(),n.hasSize?(P&&clearInterval(P),n.loadError?(i.addClass("mfp-loading"),t.updateStatus("error",s.tError.replace("%url%",n.src))):(i.removeClass("mfp-loading"),t.updateStatus("ready")),i):(t.updateStatus("loading"),n.loading=!0,n.hasSize||(n.imgHidden=!0,i.addClass("mfp-loading"),t.findImageSize(n)),i)}}});var z;e.magnificPopup.registerModule("zoom",{options:{enabled:!1,easing:"ease-in-out",duration:300,opener:function(e){return e.is("img")?e:e.find("img")}},proto:{initZoom:function(){var e,n=t.st.zoom,i=".zoom";if(n.enabled&&t.supportsTransition){var o,a,r=n.duration,c=function(e){var t=e.clone().removeAttr("style").removeAttr("class").addClass("mfp-animated-image"),i="all "+n.duration/1e3+"s "+n.easing,o={position:"fixed",zIndex:9999,left:0,top:0,"-webkit-backface-visibility":"hidden"},a="transition";return o["-webkit-"+a]=o["-moz-"+a]=o["-o-"+a]=o[a]=i,t.css(o),t},d=function(){t.content.css("visibility","visible")};y("BuildControls"+i,(function(){if(t._allowZoom()){if(clearTimeout(o),t.content.css("visibility","hidden"),!(e=t._getItemToZoom()))return void d();(a=c(e)).css(t._getOffset()),t.wrap.append(a),o=setTimeout((function(){a.css(t._getOffset(!0)),o=setTimeout((function(){d(),setTimeout((function(){a.remove(),e=a=null,x("ZoomAnimationEnded")}),16)}),r)}),16)}})),y(l+i,(function(){if(t._allowZoom()){if(clearTimeout(o),t.st.removalDelay=r,!e){if(!(e=t._getItemToZoom()))return;a=c(e)}a.css(t._getOffset(!0)),t.wrap.append(a),t.content.css("visibility","hidden"),setTimeout((function(){a.css(t._getOffset())}),16)}})),y(s+i,(function(){t._allowZoom()&&(d(),a&&a.remove(),e=null)}))}},_allowZoom:function(){return"image"===t.currItem.type},_getItemToZoom:function(){return!!t.currItem.hasSize&&t.currItem.img},_getOffset:function(n){var i,o=(i=n?t.currItem.img:t.st.zoom.opener(t.currItem.el||t.currItem)).offset(),a=parseInt(i.css("padding-top"),10),r=parseInt(i.css("padding-bottom"),10);o.top-=e(window).scrollTop()-a;var s={width:i.width(),height:(_?i.innerHeight():i[0].offsetHeight)-r-a};return void 0===z&&(z=void 0!==document.createElement("p").style.MozTransform),z?s["-moz-transform"]=s.transform="translate("+o.left+"px,"+o.top+"px)":(s.left=o.left,s.top=o.top),s}}});var q="iframe",N=function(e){if(t.currTemplate[q]){var n=t.currTemplate[q].find("iframe");n.length&&(e||(n[0].src="//about:blank"),t.isIE8&&n.css("display",e?"block":"none"))}};e.magnificPopup.registerModule(q,{options:{markup:'<div class="mfp-iframe-scaler"><div class="mfp-close"></div><iframe class="mfp-iframe" src="//about:blank" frameborder="0" allowfullscreen></iframe></div>',srcAction:"iframe_src",patterns:{youtube:{index:"youtube.com",id:"v=",src:"//www.youtube.com/embed/%id%?autoplay=1"},vimeo:{index:"vimeo.com/",id:"/",src:"//player.vimeo.com/video/%id%?autoplay=1"},gmaps:{index:"//maps.google.",src:"%id%&output=embed"}}},proto:{initIframe:function(){t.types.push(q),y("BeforeChange",(function(e,t,n){t!==n&&(t===q?N():n===q&&N(!0))})),y(s+"."+q,(function(){N()}))},getIframe:function(n,i){var o=n.src,a=t.st.iframe;e.each(a.patterns,(function(){if(o.indexOf(this.index)>-1)return this.id&&(o="string"==typeof this.id?o.substr(o.lastIndexOf(this.id)+this.id.length,o.length):this.id.call(this,o)),o=this.src.replace("%id%",o),!1}));var r={};return a.srcAction&&(r[a.srcAction]=o),t._parseMarkup(i,r,n),t.updateStatus("ready"),i}}});var D=function(e){var n=t.items.length;return e>n-1?e-n:e<0?n+e:e},W=function(e,t,n){return e.replace(/%curr%/gi,t+1).replace(/%total%/gi,n)};e.magnificPopup.registerModule("gallery",{options:{enabled:!1,arrowMarkup:'<button title="%title%" type="button" class="mfp-arrow mfp-arrow-%dir%"></button>',preload:[0,2],navigateByImgClick:!0,arrows:!0,tPrev:"Previous (Left arrow key)",tNext:"Next (Right arrow key)",tCounter:"%curr% of %total%"},proto:{initGallery:function(){var n=t.st.gallery,o=".mfp-gallery";if(t.direction=!0,!n||!n.enabled)return!1;a+=" mfp-gallery",y(d+o,(function(){n.navigateByImgClick&&t.wrap.on("click"+o,".mfp-img",(function(){if(t.items.length>1)return t.next(),!1})),i.on("keydown"+o,(function(e){37===e.keyCode?t.prev():39===e.keyCode&&t.next()}))})),y("UpdateStatus"+o,(function(e,n){n.text&&(n.text=W(n.text,t.currItem.index,t.items.length))})),y(c+o,(function(e,i,o,a){var r=t.items.length;o.counter=r>1?W(n.tCounter,a.index,r):""})),y("BuildControls"+o,(function(){if(t.items.length>1&&n.arrows&&!t.arrowLeft){var i=n.arrowMarkup,o=t.arrowLeft=e(i.replace(/%title%/gi,n.tPrev).replace(/%dir%/gi,"left")).addClass(g),a=t.arrowRight=e(i.replace(/%title%/gi,n.tNext).replace(/%dir%/gi,"right")).addClass(g);o.click((function(){t.prev()})),a.click((function(){t.next()})),t.container.append(o.add(a))}})),y(u+o,(function(){t._preloadTimeout&&clearTimeout(t._preloadTimeout),t._preloadTimeout=setTimeout((function(){t.preloadNearbyImages(),t._preloadTimeout=null}),16)})),y(s+o,(function(){i.off(o),t.wrap.off("click"+o),t.arrowRight=t.arrowLeft=null}))},next:function(){t.direction=!0,t.index=D(t.index+1),t.updateItemHTML()},prev:function(){t.direction=!1,t.index=D(t.index-1),t.updateItemHTML()},goTo:function(e){t.direction=e>=t.index,t.index=e,t.updateItemHTML()},preloadNearbyImages:function(){var e,n=t.st.gallery.preload,i=Math.min(n[0],t.items.length),o=Math.min(n[1],t.items.length);for(e=1;e<=(t.direction?o:i);e++)t._preloadItem(t.index+e);for(e=1;e<=(t.direction?i:o);e++)t._preloadItem(t.index-e)},_preloadItem:function(n){if(n=D(n),!t.items[n].preloaded){var i=t.items[n];i.parsed||(i=t.parseEl(n)),x("LazyLoad",i),"image"===i.type&&(i.img=e('<img class="mfp-img" />').on("load.mfploader",(function(){i.hasSize=!0})).on("error.mfploader",(function(){i.hasSize=!0,i.loadError=!0,x("LazyLoadError",i)})).attr("src",i.src)),i.preloaded=!0}}}});var F="retina";e.magnificPopup.registerModule(F,{options:{replaceSrc:function(e){return e.src.replace(/\.\w+$/,(function(e){return"@2x"+e}))},ratio:1},proto:{initRetina:function(){if(window.devicePixelRatio>1){var e=t.st.retina,n=e.ratio;(n=isNaN(n)?n():n)>1&&(y("ImageHasSize."+F,(function(e,t){t.img.css({"max-width":t.img[0].naturalWidth/n,width:"100%"})})),y("ElementParse."+F,(function(t,i){i.src=e.replaceSrc(i,n)})))}}}}),C()},void 0===(a=i.apply(t,o))||(e.exports=a)},11630:e=>{"use strict";function t(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e,n,i,o){n=n||"&",i=i||"=";var a={};if("string"!=typeof e||0===e.length)return a;var r=/\+/g;e=e.split(n);var s=1e3;o&&"number"==typeof o.maxKeys&&(s=o.maxKeys);var l=e.length;s>0&&l>s&&(l=s);for(var c=0;c<l;++c){var d,u,f,p,h=e[c].replace(r,"%20"),m=h.indexOf(i);m>=0?(d=h.substr(0,m),u=h.substr(m+1)):(d=h,u=""),f=decodeURIComponent(d),p=decodeURIComponent(u),t(a,f)?Array.isArray(a[f])?a[f].push(p):a[f]=[a[f],p]:a[f]=p}return a}},59106:e=>{"use strict";var t=function(e){switch(typeof e){case"string":return e;case"boolean":return e?"true":"false";case"number":return isFinite(e)?e:"";default:return""}};e.exports=function(e,n,i,o){return n=n||"&",i=i||"=",null===e&&(e=void 0),"object"==typeof e?Object.keys(e).map((function(o){var a=encodeURIComponent(t(o))+i;return Array.isArray(e[o])?e[o].map((function(e){return a+encodeURIComponent(t(e))})).join(n):a+encodeURIComponent(t(e[o]))})).join(n):o?encodeURIComponent(t(o))+i+encodeURIComponent(t(e)):""}},47186:(e,t,n)=>{"use strict";t.decode=t.parse=n(11630),t.encode=t.stringify=n(59106)},20428:e=>{"use strict";e.exports=window.jQuery}},t={};function n(i){var o=t[i];if(void 0!==o)return o.exports;var a=t[i]={exports:{}};return e[i].call(a.exports,a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";var e,t={};n.r(t),n.d(t,{GiveConfirmModal:()=>l,GiveErrorAlert:()=>o,GiveFormModal:()=>c,GiveModal:()=>i,GiveNoticeAlert:()=>r,GiveSuccessAlert:()=>s,GiveWarningAlert:()=>a}),n(67895),n(16349),n(14306),n(25206),n(89673),n(42757),n(66732),n(23878);class i{constructor(e){if(i===this.constructor)throw new Error("Abstract classes can't be instantiated.");this.config=Object.assign({type:"",triggerSelector:"",externalPlugin:"magnificPopup",classes:{modalWrapper:"",cancelBtn:""},modalContent:{}},e),this.config.mainClass=`${this.config.mainClass?this.config.mainClass:""} modal-fade-slide`.trim()}init(){this.setupTemplate(),this.popupConfig(),this.__setupClickEvent()}getTemplate(){let e='<div class="give-hidden"></div>';return this.config.type.length&&(e=`<div class="give-modal give-modal--zoom ${this.config.classes.modalWrapper?`${this.config.classes.modalWrapper}`.trim():""}">\n\n\t\t\t\t<div class="give-modal__body">\n\t\t\t\t\t${this.config.modalContent.title?`<h2 class="give-modal__title">${this.config.modalContent.title}</h2>`:""}\n\t\t\t\t\t${this.config.modalContent.desc?`<p class="give-modal__description">${this.config.modalContent.desc}</p>`:""}\n\t\t\t\t\t${this.config.modalContent.body?this.config.modalContent.body:""}\n\t\t\t\t</div>\n\n\t\t\t\t<div class="give-modal__controls">\n\n\t\t\t\t\t${"form"===this.config.type?'<div class="spinner"></div>':""}\n\t\t\t\t\t${"form"===this.config.type&&"undefined"!==this.config.modalContent.link?`<a class="give-modal--additional-link" href="${this.config.modalContent.link}" target="${"undefined"!==this.config.modalContent.link_self&&this.config.modalContent.link_self?"_self":"_blank"}">${this.config.modalContent.link_text}</a>`:""}\n\n\t\t\t\t\t<button class="give-button give-popup-close-button${this.config.classes.cancelBtn?` ${this.config.classes.cancelBtn}`:" give-button--secondary"}">\n\t\t\t\t\t\t${this.config.modalContent.cancelBtnTitle?this.config.modalContent.cancelBtnTitle:"confirm"===this.config.type?Give.fn.getGlobalVar("cancel"):Give.fn.getGlobalVar("close")}\n\t\t\t\t\t</button>\n\n\t\t\t\t\t${"confirm"!==this.config.type&&"form"!==this.config.type?"":`<button class="give-button give-button--primary give-popup-${this.config.type}-button">\n\n\t\t\t\t\t\t${this.config.modalContent.confirmBtnTitle?this.config.modalContent.confirmBtnTitle:Give.fn.getGlobalVar("confirm")}\n\t\t\t\t\t</button>`}\n\t\t\t\t</div>\n\n\t\t\t</div>`),e}setupTemplate(){this.config.template=this.getTemplate()}__setupClickEvent(){this.config.triggerSelector.length&&jQuery(this.config.triggerSelector).magnificPopup(this.config)}popupConfig(){"magnificPopup"===this.config.externalPlugin&&(this.config.items=this.config.items||{src:this.config.template,type:"inline"},this.config=Object.assign({removalDelay:300,fixedContentPos:!0,fixedBgPos:!0,alignTop:!0,showCloseBtn:!1,closeOnBgClick:!1,enableEscapeKey:!0,focus:".give-popup-close-button"},this.config))}static __closePopup(e){e.preventDefault(),e.target.classList.contains("js-has-event-handler")||jQuery.magnificPopup.instance.close()}render(){return"magnificPopup"===this.config.externalPlugin&&(this.config.triggerSelector||jQuery.magnificPopup.open(this.config)),this}static __ajaxModalHandle(e){let t=jQuery(e.target),n=t.attr("data-cache");if(e.preventDefault(),void 0!==n)return n=decodeURI(n),void new Give.modal.GiveSuccessAlert({modalContent:{title:t.attr("title"),desc:n},closeOnBgClick:!0}).render();jQuery.ajax({url:t.attr("href"),method:"GET",beforeSend:function(){new Give.modal.GiveSuccessAlert({modalContent:{desc:Give.fn.loader({},{show:null,loadingText:Give.fn.getGlobalVar("loader_translation").loading})},closeOnBgClick:!0}).render()},success:function(e){e.length&&t.attr("data-cache",encodeURI(e)),jQuery(".mfp-wrap").length&&new Give.modal.GiveSuccessAlert({modalContent:{title:t.attr("title"),desc:e},closeOnBgClick:!0}).render()}})}}class o extends i{constructor(e){e.type="alert",super(e),this.config.classes.modalWrapper="give-modal--error",this.init()}}class a extends i{constructor(e){e.type="alert",super(e),this.config.classes.modalWrapper="give-modal--warning",this.init()}}class r extends i{constructor(e){e.type="alert",super(e),this.config.classes.modalWrapper="give-modal--notice",this.init()}}class s extends i{constructor(e){e.type="alert",super(e),this.config.classes.modalWrapper+=" give-modal--success",this.init()}}class l extends i{constructor(e){e.type="confirm",super(e),void 0!==e.modalWrapper&&""!==e.modalWrapper&&(this.config.classes.modalWrapper=e.modalWrapper),this.config.classes.modalWrapper+=" give-modal--confirm",this.init()}static __confirmPopup(){"function"==typeof jQuery.magnificPopup.instance.st.successConfirm&&(jQuery.magnificPopup.instance.st.successConfirm({el:jQuery.magnificPopup.instance.st.el}),jQuery.magnificPopup.close())}}class c extends i{constructor(e){e.type="form",super(e),void 0!==e.modalWrapper&&""!==e.modalWrapper&&(this.config.classes.modalWrapper=e.modalWrapper),this.init()}static __submitPopup(){"function"==typeof jQuery.magnificPopup.instance.st.successConfirm&&jQuery.magnificPopup.instance.st.successConfirm({el:jQuery.magnificPopup.instance.st.el})}}window.addDynamicEventListener(document,"click",".give-popup-close-button",i.__closePopup,{}),window.addDynamicEventListener(document,"click",".give-popup-confirm-button",l.__confirmPopup,{}),window.addDynamicEventListener(document,"click",".give-popup-form-button",c.__submitPopup,{}),window.addDynamicEventListener(document,"click",".give-ajax-modal",i.__ajaxModalHandle,{}),(e=jQuery).fn.repeatable_fields=function(t){const n={wrapper:".wrapper",container:".container",row:".row",add:".add",remove:".remove",confirm_before_remove_row:!1,confirm_before_remove_row_text:"",move:".move",template:".template",is_sortable:!0,before_add:null,after_add:a,before_remove:null,after_remove:null,sortable_options:null,row_count_placeholder:"{{row-count-placeholder}}"},i=e.extend({},n,t);function o(e,t){const n=e.parents(i.row).first();"function"==typeof i.before_remove&&i.before_remove(t,n),n.remove(),"function"==typeof i.after_remove&&i.after_remove(t)}function a(t,n){let o=e(t).attr("data-rf-row-count");o++,e("*",n).each((function(){e.each(this.attributes,(function(e,t){this.value=this.value.replace(i.row_count_placeholder,o-1)}))})),e(t).attr("data-rf-row-count",o)}!function t(n){e(i.wrapper,n).each((function(n,r){const s=this,c=e(s).children(i.container);e(c).children(i.template).hide().find(":input").each((function(){e(this).prop("disabled",!0)}));const d=e(c).children(i.row).filter((function(){return!e(this).hasClass(i.template.replace(".",""))})).length;if(e(c).attr("data-rf-row-count",d),e(s).on("click",i.add,(function(n){n.stopImmediatePropagation();const o=e(e(c).children(i.template).clone().removeClass(i.template.replace(".",""))[0].outerHTML);e(o).find(":input").each((function(){e(this).prop("disabled",!1)})),"function"==typeof i.before_add&&i.before_add(c);const r=e(o).show().appendTo(c);"function"==typeof i.after_add&&i.after_add(c,r,a),t(r)})),e(s).on("click",i.remove,(function(t){t.stopImmediatePropagation();const n=e(this);return i.confirm_before_remove_row&&i.confirm_before_remove_row_text||o(n,c),new l({modalWrapper:"give-modal--warning",modalContent:{desc:i.confirm_before_remove_row_text},successConfirm:function(){o(n,c)}}).render(),!1})),!0===i.is_sortable&&void 0!==e.ui&&void 0!==e.ui.sortable){const t=null!==i.sortable_options?i.sortable_options:{};t.handle=i.move,e(s).find(i.container).sortable(t)}}))}(this)},n(31203),n(95963);const d=window.wp.i18n,u={fn:{renderNotice:function(e,t){let n;switch(t=void 0!==t?t:{},e){case"bad_minimum":n=jQuery('<div class="give_error give-invalid-minimum give-hidden">'+this.getNotice(e,t)+"</div>");break;case"bad_maximum":n=jQuery('<div class="give_error give-invalid-maximum give-hidden">'+this.getNotice(e,t)+"</div>")}if(!t.length)return"";n.insertBefore(t.find(".give-total-wrap")).show()},getNotice:function(e,t){if(!e.length)return null;let n,i,o;if(n=i=o="",t.length)switch(e){case"bad_minimum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMinimumAmount(t);break;case"bad_maximum":i=Give.fn.getGlobalVar(e),o=Give.form.fn.getMaximumAmount(t)}return t.length&&""!==i&&(n=i+" "+Give.fn.formatCurrency(o,{symbol:Give.form.fn.getInfo("currency_symbol",t),position:Give.form.fn.getInfo("currency_position",t)},t)),n},getAdminNoticeHTML:function(e,t="info",n={dismissible:!0}){const i="undefined"!=typeof commonL10n?commonL10n.dismiss:(0,d.__)("Dismiss this notice.","give");return`<div class="give-notice notice notice-${t}${n.dismissible?" is-dismissible":""}"><p>${e}${n.dismissible?` <button type="button" class="notice-dismiss"><span class="screen-reader-text">${i}</span></button>`:""}</p</div>`}}},f={fn:{showOverlay:function(e){const t=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div");i.innerHTML=e||Give.fn.getGlobalVar("textForOverlayScreen"),n.setAttribute("class","loader spinning"),t.setAttribute("id","give-processing-state-template"),t.append(n),t.append(i),t.classList.add("active"),document.body.appendChild(t)},hideOverlay:function(){document.getElementById("give-processing-state-template").remove()}}},p={init:function(){this.fn.field.formatCreditCard(jQuery("form.give-form")),this.fn.__initialize_cache(),window.Give.WINDOW_IS_LOADED?Give.form.fn.__sendBackToForm():window.addEventListener("load",(function(){Give.form.fn.__sendBackToForm()}))},fn:{isFormExist:function(){return!!document.getElementsByName("give-form-hash").length},hasDonationForm:function(e){const t=e.querySelector('form input[name="give_action"]');return t&&"purchase"===t.value},disable:function(e,t){if(!e.length)return!1;e.find(".give-submit").prop("disabled",t)},showProcessingState:function(e){f.fn.showOverlay(e)},hideProcessingState:function(){f.fn.hideOverlay()},formatAmount:function(e,t,n){return t.length?Give.fn.formatCurrency(e,n,t):e},getInfo:function(e,t){let n="";if(t=void 0!==t?jQuery(t):{},!e.length||!t.length)return n;switch(e){case"gateways":n=[],jQuery.each(t.find('input[name="payment-mode"]'),(function(e,t){t=t instanceof jQuery?t:jQuery(t),n.push(t.val().trim())}));break;case"form-type":t.hasClass("give-form-type-set")?n="set":t.hasClass("give-form-type-multi")&&(n="multi");break;case"form-id":n=t.find('input[name="give-form-id"]').val();break;default:n=t.get(0).hasAttribute("data-"+e)?t.attr("data-"+e):t.attr(e),void 0!==n&&n.trim()}return n},setInfo:function(e,t,n,i){return!!n.length&&("nonce"===(e=void 0===e?"data":e)&&n.find('input[name="give-form-hash"]').val(t),!(void 0!==i&&!i.length)&&("attr"===e?n.attr(i,t):n.data(i,t),!0))},getGateway:function(e){let t="";return e.length?(t=e.find('input[name="payment-mode"]:checked').val().trim(),void 0!==t?t:""):t},getVariablePrices:function(e){let t,n=[];return e.length&&e.hasClass("give-form-type-multi")&&(t=e.find(".give-donation-levels-wrap [data-price-id] "))?(jQuery.each(t,(function(t,i){i=i instanceof jQuery?i:jQuery(i);const o=Give.form.fn.getInfo("decimal_separator",e);n.push({price_id:i.data("price-id"),amount:Give.fn.unFormatCurrency(i.val(),o)})})),n):n},getPriceID:function(e,t){const n=this.getVariablePrices(e),i=Give.fn.unFormatCurrency(e.find('input[name="give-amount"]').val(),this.getInfo("decimal_separator",e));let o=Give.fn.getCache("amount_"+i,e)?Give.fn.getCache("amount_"+i,e):-1;return t=void 0===t||t,n.length&&-1===o&&(t?(jQuery.each(n,(function(e,t){if(t.amount===i)return o=t.price_id,!1})),-1===o&&this.getMinimumAmount(e)<=i&&this.getMaximumAmount(e)>=i&&this.getMinimumAmount(e)<=i&&(o="custom")):o=jQuery('input[name="give-price-id"]',e).val()),o},getMinimumAmount:function(e){return e.find('input[name="give-form-minimum"]').val()},getMaximumAmount:function(e){return e.find('input[name="give-form-maximum"]').val()},getAmount:function(e){if(!e.length)return null;let t=e.find('input[name="give-amount"]').val();return void 0!==t&&t||(t=0),Give.fn.unFormatCurrency(t,this.getInfo("decimal_separator",e))},getNonce:function(e){if(!e.length)return"";let t=e.find('input[name="give-form-hash"]').val();return void 0!==t&&t||(t=""),t},getNonceInfo:function(e){let t={};return e.length?(t.el=e.find('input[name="give-form-hash"]'),t.el.length?(t.value=e.find('input[name="give-form-hash"]').val(),t.value=void 0!==t.value&&t.value?t.value:"",t.createdInDonorSession="1"===t.el.attr("data-donor-session"),t):t):t},resetNonce:function(e){if(!e.length||!jQuery('input[name="give-form-hash"]',e).length)return!1;Give.form.fn.disable(e,!0),jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(t){Give.form.fn.setInfo("nonce",t.data,e,""),Give.form.fn.disable(e,!1)}))},resetAllNonce:function(e){return!!e.length&&(Give.form.fn.disable(e,!0),new Promise(((t,n)=>{jQuery.post(Give.fn.getGlobalVar("ajaxurl"),{action:"give_donation_form_reset_all_nonce",give_form_id:Give.form.fn.getInfo("form-id",e)},(function(i){if(!i.success)return n(i);const o=e.find('input[name="give-form-user-register-hash"]');return Give.form.fn.setInfo("nonce",i.data.give_form_hash,e,""),o.length&&o.val(i.data.give_form_user_register_hash),Give.form.fn.disable(e,!1),jQuery(document).trigger("give_reset_all_nonce",[i.data]),t(i)})).done((function(){Give.form.fn.disable(e,!1)}))})))},autoSelectDonationLevel:function(e,t){if(!e.length||"multi"!==this.getInfo("form-type",e))return!1;switch(t=void 0===t?this.getPriceID(e,!1):t,!0){case!!e.find(".give-radio-input").length:e.find(".give-radio-input").prop("checked",!1),e.find('.give-radio-input[data-price-id="'+t+'"]').prop("checked",!0).addClass("give-default-level");break;case!!e.find("button.give-donation-level-btn").length:e.find("button.give-donation-level-btn").blur(),e.find('button.give-donation-level-btn[data-price-id="'+t+'"]').addClass("give-default-level");break;case!!e.find("select.give-select-level").length:e.find("select.give-select-level option").prop("selected",!1),e.find('select.give-select-level option[data-price-id="'+t+'"]').prop("selected",!0).addClass("give-default-level")}},autoSetMultiLevel:function(e){let t=e.parents("form"),n=e.val(),i=e.data("price-id");void 0===i&&(i=e.find("option:selected").data("price-id")),"custom"===i&&(n=Give.fn.getParameterByName("custom-amount")),t.find(".give-amount-top").val(n),t.find("span.give-amount-top").text(n);const o=Give.form.fn.getInfo("decimal_separator",t);jQuery(".give-donation-amount .give-text-input",t).attr("data-amount",Give.fn.unFormatCurrency(t.find(".give-final-total-amount").attr("data-total"),o)),"custom"!==i||n?t.find(".give-donation-amount .give-text-input").trigger("blur",[t,n,i]):t.find(".give-donation-amount .give-text-input").focus()},__sendBackToForm:function(){const e=Give.fn.getParameterByName("form-id"),t=Give.fn.getParameterByName("payment-mode");if(!e||!t)return!1;const n=jQuery("body").find("#give-form-"+e+"-wrap"),i=n.find("form.give-form"),o=n.hasClass("give-display-modal"),a=n.hasClass("give-display-button"),r=n.hasClass("give-display-reveal");i.find("#give-gateway-radio-list label").removeClass("give-gateway-option-selected"),i.find("input[name=payment-mode][value="+t+"]").prop("checked",!0).parent().addClass("give-gateway-option-selected");const s=Give.fn.getParameterByName("level-id"),l=i.find('*[data-price-id="'+s+'"]');l.length>0&&this.autoSetMultiLevel(l),jQuery(".give-form-wrap").hasClass("give-form-grid-wrap")&&1===jQuery("#give-modal-form-"+e).length?jQuery.magnificPopup.open({items:{type:"inline",src:"#give-modal-form-"+e},fixedContentPos:!0,fixedBgPos:!0,closeBtnInside:!0,midClick:!0,removalDelay:300,mainClass:"modal-fade-slide"}):o||a?give_open_form_modal(n,i):r&&(i.find(".give-btn-reveal").hide(),i.find("#give-payment-mode-select, #give_purchase_form_wrap").slideDown())},isValidDonationAmount:function(e){if(e.find('input[name="give-form-minimum"]').length<=0)return!0;const t=this.getMinimumAmount(e),n=this.getMaximumAmount(e),i=this.getAmount(e),o=this.getPriceID(e,!0);return 0!==i&&(-1<i&&i>=t&&i<=n||-1!==o)},__initialize_cache:function(){jQuery.each(jQuery(".give-form"),(function(e,t){t=t instanceof jQuery?t:jQuery(t),Give.cache["form_"+Give.form.fn.getInfo("form-id",t)]=[]}))},isDonationFormHtml5Valid:function(e,t=!1){return"function"!=typeof e.checkValidity||!1!==e.checkValidity()||0!=(-1!=navigator.userAgent.indexOf("Safari")&&-1==navigator.userAgent.indexOf("Chrome"))||(t&&e.reportValidity(),!1)},isDonorFilledValidData:async function(e,t={}){(t=t instanceof FormData?t:new FormData(e)).append("action","give_process_donation"),t.append("give_ajax",!0);const n=await fetch(`${Give.fn.getGlobalVar("ajaxurl")}`,{method:"POST",body:t});return(await n.text()).trim()},addErrors:function(e,t){e.find("#give-purchase-button").before(t)},removeErrors:function(e){e.find(".give_errors").remove()},getErrorHTML:function(e){const t=document.createElement("div");return t.classList.add("give_errors"),e.forEach((e=>{const n=document.createElement("p");n.classList.add("give_error"),n.innerHTML=e.message,t.append(n)})),t},addErrorsAndResetDonationButton:function(e,t=null){this.resetDonationButton(e),t&&this.addErrors(e,t)},resetDonationButton:function(e){const t=e.find("#give-purchase-button"),n=t.closest("div");t.val(t.data("before-validation-label")),n.find(".give-loading-animation").fadeOut(),e.find(".give_errors").remove(),Give.form.fn.disable(e,!1)},field:{formatCreditCard:function(e){e.each((function(e,t){const n=(t=jQuery(t)).find(".card-number"),i=t.find(".card-cvc"),o=t.find(".card-expiry");n.length&&(n.payment("formatCardNumber"),i.payment("formatCardCVC"),o.payment("formatCardExpiry"))}))}}}},h={fn:{hasSession:function(e){return!!e.length&&!!Give.fn.__getCookie(Give.fn.getGlobalVar("session_cookie_name"))},isLoggedIn:function(){return jQuery("body").hasClass("logged-in")}}},m={fn:{twitter:function(e,t){const n=parent.window?parent.window:window,i=n.innerHeight/2-126,o=n.innerWidth/2-280;n.open(`https://twitter.com/intent/tweet?url=${encodeURIComponent(e)}&text=${encodeURIComponent(t)}`,"newwindow",`width=560,height=253,top=${i},left=${o}`)},facebook:function(e){const t=parent.window?parent.window:window,n=t.innerHeight/2-365,i=t.innerWidth/2-280;window.open(`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(e)}`,"newwindow",`width=560,height=730,top=${n},left=${i}`)}}};var g=n(98103),v=n.n(g);const _={init:function(){let e=["form"],t=0;for(jQuery(document).trigger("give:preInit");t<e.length;)_[e[t]].init&&_[e[t]].init(),t++;jQuery(document).trigger("give:postInit")},fn:{formatCurrency:function(e,t,n){let i={symbol:"",decimal:this.getGlobalVar("decimal_separator"),thousand:this.getGlobalVar("thousands_separator"),precision:parseInt(this.getGlobalVar("number_decimals")),currency:this.getGlobalVar("currency")};if(e=e.toString().trim(),(n=void 0===n?{}:n).length&&(i={symbol:"",decimal:_.form.fn.getInfo("decimal_separator",n),thousand:_.form.fn.getInfo("thousands_separator",n),precision:_.form.fn.getInfo("number_decimals",n),currency:_.form.fn.getInfo("currency_code",n)}),(t=jQuery.extend(i,t)).precision=parseInt(t.precision),"INR"===t.currency){let n=v().formatNumber(e,{precision:i.precision,decimal:"."}),o=t.precision?".0":"",a="",r="",s="",l="";n=v().unformat(n,".").toString(),n=n.toString(),n.indexOf(".")>0&&(o=n.substring(n.indexOf("."),n.length)),n=Math.floor(n).toString(),a=n.substring(n.length-3),r=n.substring(0,n.length-3),""!==r&&(a=i.thousand+a),s=r.replace(/\B(?=(\d{2})+(?!\d))/g,i.thousand)+a+o,l=s.lastIndexOf("."),s=s.slice(0,l)+(s.slice(l)+"000000000000").substr(0,t.precision+1),e=s,void 0!==t.symbol&&t.symbol.length&&("after"===t.position?e+=t.symbol:e=t.symbol+e)}else"after"===t.position&&(t.format="%v%s"),e=v().formatMoney(e,t);return e},unFormatCurrency:function(e,t){if("string"==typeof e){const n=","===t.trim()?/[^0-9\,-]+/g:/[^0-9\.-]+/g;0===(e=e.replace(n,"")).indexOf(t)?e=e.substr(1):e.length-1===e.indexOf(t)&&(e=e.slice(0,-1))}return Math.abs(parseFloat(v().unformat(e,t)))},getParameterByName:function(e,t){t||(t=window.location.href),t=decodeURIComponent(t),e=e.replace(/[\[\]]/g,"\\$&");const n=new RegExp("[?&]"+e+"(=([^&#]*)|&|#|$)").exec(t);return n?n[2]?decodeURIComponent(n[2].replace(/\+/g," ")):"":null},getGlobalVar:function(e){const t=this.getGlobal();return void 0===t[e]?"":t[e]},getGlobal:function(){return"undefined"==typeof give_global_vars?window.give_vars||{}:window.give_global_vars||{}},setCache:function(e,t,n){n.length?_.cache["form_"+_.form.fn.getInfo("form-id",n)][e]=t:_.cache[e]=t},getCache:function(e,t){let n,i=_.cache["form_"+_.form.fn.getInfo("form-id",t)];return n=t.length?void 0!==i?i[e]:"":_.cache[e],n=void 0===n?"":n,n},__getCookie:function(e){const t=("; "+document.cookie).split("; "+e+"=");let n="";return 2===t.length&&(n=t.pop().split(";").shift()),n},loader:function(e,t={}){const n=(t=Object.assign({show:!0,loadingAnimation:!0,loadingText:null},t)).loadingAnimation?'<span class="is-active spinner"></span>':"",i=null!==t.loadingText?t.loadingText:_.fn.getGlobalVar("loader_translation").updating;let o,a;return!1===t.show?(jQuery(".give-spinner-wrap",e).remove(),!1):(o=n.length?"give-has-spinner":"",o+=i.length?" give-has-text":"",o=o.length?" "+o.trim():"",a=`<div class="give-spinner-wrap${o}"><div class="give-spinner-inner">${(i+n).trim()}</div></div>`,null===t.show?a:(e.prepend(a),!0))},removeURLParameter:function(e,t){const n=e.split("?");if(n.length>=2){const e=encodeURIComponent(t)+"=",i=n[1].split(/[&;]/g);for(let t=i.length;t-- >0;)-1!==i[t].lastIndexOf(e,0)&&i.splice(t,1);return n[0]+(i.length>0?"?"+i.join("&"):"")}return e},numberHasDecimal:function(e){return Math.floor(e)!==Number(e)}},cache:{}};_.notice=u,_.form=p,_.donor=h,_.util=f,_.share=m;const b=_;var y=n(44126);n(51037),n(5585),n(23233),n(43514);const w=class{constructor(e){this.root=e,this.buttonText=this.root.textContent.trim(),this.iconPosition="before",this._buttonTextWithWrapper=this.root.querySelector(".give-button-text")?`<span class="give-button-text">${this.buttonText}</span>`:this.buttonText;const t=this.root.querySelector(".dashicons");t&&(this.iconClassName=t.className)}enable(){this.root.disabled=!1}disable(){this.root.disabled=!0}setBusyState(){this.root.innerHTML=`<span class="dashicons dashicons-marker"></span> ${this._buttonTextWithWrapper}`,this.disable()}removeBusyState(){this.enable(),this.iconClassName&&this.updateIcon(this.iconClassName)}updateIcon(e,t="before"){const n=`<span class="${e}"></span>`;this.root.innerHTML="after"===t?`${this._buttonTextWithWrapper} ${n}`:`${n} ${this._buttonTextWithWrapper}`,this.iconClassName=e,this.iconPosition=t}updateButtonText(e){this.buttonText=e,this.iconClassName?this.updateIcon(this.iconClassName,this.iconPosition):this.root.textContent=e}};var x=n(57576),k=n.n(x);class C extends w{constructor(e){super(e),this.shortcode=this.root.dataset.giveShortcode,this.clipboard=new(k())(this.root,{text:function(e){return e.dataset.giveShortcode}}),this.reset=this.reset.bind(this)}init(){this.registerEventHandlers()}registerEventHandlers(){this.clipboard.on("success",(()=>this.handleSuccessClick())),this.clipboard.on("error",(()=>this.handleErrorClick()))}handleSuccessClick(e){this.updateIcon("dashicons dashicons-yes"),this.root.setAttribute("aria-label",give_vars.copied),this.root.addEventListener("mouseout",this.reset)}handleErrorClick(e){this.updateIcon("dashicons dashicons-warning"),this.root.setAttribute("aria-label","Shortcode could not be copied.")}reset(e){this.updateIcon("dashicons dashicons-admin-page"),this.root.setAttribute("aria-label",this.shortcode),this.root.removeEventListener("mouseout",this.reset)}}let S=!1;const T=n(93365);function j(){let e=jQuery(".give-settings-page"),t=jQuery(".give-nav-tab-wrapper"),n=e.width(),i=jQuery(".give-sub-nav-tab-wrapper"),o=jQuery("nav",i),a=jQuery(".give-nav-tab-wrapper > a:not(give-not-tab)"),r=[],s=[],l=0;if(600<jQuery(window).outerWidth()&&(l=200),!e.length)return!1;t.css({height:"auto",overflow:"visible"}),a.removeClass("give-hidden"),new Promise((function(e,t){jQuery.each(a,(function(e,t){t=jQuery(t),l+=parseInt(t.outerWidth()),l<n?r.push(t):s.push(t)})),e(!0)})).then((function(e){if(s.length&&-1!==window.location.search.indexOf("&tab=")){let e={},t=function(){let e,t=[];const n=window.location.href.slice(window.location.href.indexOf("?")+1).split("&");for(let i=0;i<n.length;i++)e=n[i].split("="),t[e[0]]=e[1];return t}();s=s.filter((function(n){const i=-1!==parseInt(n.attr("href").indexOf("&tab="+t.tab));return i&&(e=n),!i})),e.length&&(s.unshift(r.pop()),r.push(e))}new Promise((function(e,t){r.length&&jQuery.each(r,(function(e,t){(t=jQuery(t)).hasClass("give-hidden")&&t.removeClass("give-hidden")})),e(!0)})).then((function(e){s.length?(o.html(""),jQuery.each(s,(function(e,t){(t=jQuery(t)).hasClass("nav-tab-active")||t.addClass("give-hidden"),t.clone().removeClass().appendTo(o)})),jQuery(".give-sub-nav-tab-wrapper",t).length||t.append(i),i.show()):i.hide()}))}))}!function(e){const t=function(t,n){const i=(n=jQuery.extend({wrapper:!0,show:!1},n)).wrapper?e(".give-spinner-wrapper",t):{},o=e(".give-spinner",t);if(n.show)return i.length&&i.addClass("is-active"),void o.addClass("is-active");i.length&&i.removeClass("is-active"),o.removeClass("is-active")};function n(e,t){return e=v().unformat(e,Give.fn.getGlobalVar("decimal_separator")).toString(),!1!==(t="undefined"!==t&&t)?parseFloat(e).toFixed(t):parseFloat(e).toFixed(Give.fn.getGlobalVar("currency_decimals"))}const i={init:function(){this.deleteSingleDonation(),this.resendSingleDonationReceipt()},deleteSingleDonation:function(){new l({triggerSelector:".delete-single-donation",modalWrapper:"give-modal--warning",modalContent:{title:Give.fn.getGlobalVar("confirm_delete_donation"),desc:Give.fn.getGlobalVar("delete_payment")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})},resendSingleDonationReceipt:function(){new l({triggerSelector:".resend-single-donation-receipt",modalContent:{title:Give.fn.getGlobalVar("confirm_resend"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(e){window.location.assign(e.el.attr("href"))}})}},r={init:function(){this.edit_address(),this.add_note(),this.remove_note(),this.new_donor(),this.resend_receipt(),this.variable_price_list()},edit_address:function(){e('select[name="give-payment-address[0][country]"]').change((function(){const t=e(this),n={action:"give_get_states",country:t.val(),field_name:"give-payment-address[0][state]"};return e.post(ajaxurl,n,(function(n){t.closest(".column-container").find("#give-order-address-state-wrap").removeClass("give-hidden"),t.closest(".column-container").find(".give-column").removeClass("column-full"),t.closest(".column-container").find(".give-column").addClass("column");const i=e("#give-order-address-state-wrap");i.find("*").not(".order-data-address-line").remove(),void 0!==typeof n.states_found&&!0===n.states_found?(i.append(n.data),i.find("select").chosen()):(i.append('<input type="text" name="give-payment-address[0][state]" value="'+n.default_state+'" class="give-edit-toggles medium-text"/>'),void 0!==typeof n.show_field&&!1===n.show_field&&(t.closest(".column-container").find("#give-order-address-state-wrap").addClass("give-hidden"),t.closest(".column-container").find(".give-column").addClass("column-full"),t.closest(".column-container").find(".give-column").removeClass("column")))})),!1}))},add_note:function(){e("#give-add-payment-note").on("click",(function(t){function n(){e.ajax({type:"POST",data:r,url:ajaxurl,beforeSend:function(){o.prop("disabled",!0),i.prop("disabled",!0)},success:function(t){e("#give-payment-notes-inner").append(t),e(".give-no-payment-notes").hide(),e("#give-payment-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).always((function(){o.prop("disabled",!1),i.prop("disabled",!1)}))}t.preventDefault();const i=e(this),o=e("#give-payment-note"),a=e("#donation_note_type"),r={action:"give_insert_payment_note",payment_id:e(this).data("payment-id"),note:o.val(),type:a.val(),_wpnonce:Give.fn.getGlobalVar("give_insert_payment_note_nonce")};if(r.note)"donor"===r.type&&give_vars.email_notification.donor_note.status?new Give.modal.GiveConfirmModal({successConfirm:function(){n()},modalContent:{desc:give_vars.donor_note_confirm_msg}}).render():n();else{const e=o.css("border-color");o.css("border-color","red"),setTimeout((function(){o.css("border-color",e)}),500)}}))},remove_note:function(){e("body").on("click",".give-delete-payment-note",(function(t){t.preventDefault();const n=this;new l({modalContent:{title:Give.fn.getGlobalVar("confirm_deletion"),desc:Give.fn.getGlobalVar("delete_payment_note")},successConfirm:function(t){const i={action:"give_delete_payment_note",payment_id:e(n).data("payment-id"),note_id:e(n).data("note-id"),_wpnonce:Give.fn.getGlobalVar("give_delete_payment_note_nonce")};e.ajax({type:"POST",data:i,url:ajaxurl,success:function(t){return e("#give-payment-note-"+i.note_id).remove(),e(".give-payment-note").length||e(".give-no-payment-notes").show(),!1}}).fail((function(e){window.console&&window.console.log&&console.log(e)}))}}).render()}))},new_donor:function(){e("#give-donor-details").on("click",".give-payment-new-donor, .give-payment-new-donor-cancel",(function(t){t.preventDefault(),e(".donor-info").toggle(),e(".new-donor").toggle(),e(".new-donor").is(":visible")?e("#give-new-donor").val(1):e("#give-new-donor").val(0)}))},resend_receipt:function(){e("body").on("click","#give-resend-receipt",(function(t){const n=this;t.preventDefault(),new l({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("resend_receipt")},successConfirm:function(){window.location.assign(e(n).attr("href"))}}).render()}))},variable_price_list:function(){e("#give_payment_form_select").chosen().change((function(){let t,n=e(".give-donation-level");return!!(t=e(this).val())&&!!n.length&&void e.ajax({type:"POST",url:ajaxurl,data:{form_id:t,payment_id:e('input[name="give_payment_id"]').val(),action:"give_check_for_form_price_variations_html"},success:function(t){(t=t.trim())?(n.html(t),e('select[name="give-variable-price"]').chosen().change()):n.html("")}})})),e("#give-donation-overview").on("change",'select[name="give-variable-price"]',(function(){const t=jQuery(this).data("prices"),n=e("#give-payment-total");""!==t&&e(this).val()in t&&(n.val(t[e(this).val()]).css("background-color","yellow"),window.setTimeout((function(){n.css("background-color","white")}),1e3))}))}},s={init:function(){this.toggle_gateways(),this.setting_change_country(),this.toggle_options(),this.main_setting_update_notice(),this.verify_settings(),this.saveButtonTriggered(),this.changeAlert(),this.detectSettingsChange(),this.sequentialDonationIDPreview()},toggle_gateways:function(){e(".gateways-checkbox").on("click",(function(){const t=e(this).prev(".gateways-radio"),n=(this.checked,e(".gateways-checkbox:checked"));1===n.length?(n.prev(".gateways-radio").attr("checked","checked"),this.checked?t.removeAttr("disabled"):t.attr("disabled","disabled")):this.checked?(t.removeAttr("disabled"),t.removeAttr("checked")):t.attr("disabled","disabled")}))},setting_change_country:function(){e('select[name="base_country"]').change((function(){const t=e(this),n={action:"give_get_states",country:t.val(),field_name:"base_state"};return e.post(ajaxurl,n,(function(i){t.closest("tr").next().show(),e("#base_state_chosen").remove(),void 0!==typeof i.states_found&&1==i.states_found?(e(':input[name="base_state"]').replaceWith(i.data).addClass("give-select-chosen"),e(':input[name="base_state"]').chosen()):(void 0!==typeof i.show_field&&0==i.show_field&&t.closest("tr").next().hide(),e(':input[name="base_state"]').replaceWith('<input type="text" name="'+n.field_name+'" value="'+i.default_state+'" class="give-edit-toggles medium-text"/>'))})),!1}))},toggle_options:function(){e('input[name="email_access"]',".give-setting-tab-body-general").on("change",(function(){const t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t?(e('input[name="enable_recaptcha"]').parents("tr").show(),"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide(),e('input[name="enable_recaptcha"]').parents("tr").hide())})).change(),e('input[name="enable_recaptcha"]',".give-setting-tab-body-general").on("change",(function(){const t=e('input[name="email_access"]:checked',".give-setting-tab-body-general").val(),n=e('input[name="enable_recaptcha"]:checked',".give-setting-tab-body-general").val();"enabled"===t&&"enabled"===n?(e("#recaptcha_key").parents("tr").show(),e("#recaptcha_secret").parents("tr").show()):(e("#recaptcha_key").parents("tr").hide(),e("#recaptcha_secret").parents("tr").hide())})).change(),e('input[name="form_featured_img"]',".give-setting-tab-body-display").on("change",(function(){"enabled"===e('input[name="form_featured_img"]:checked',".give-setting-tab-body-display").val()?e("#featured_image_size").parents("tr").show():e("#featured_image_size").parents("tr").hide()})).change(),e('input[name="admin_notices"]',".give-setting-tab-body-emails").on("change",(function(){"enabled"===e('input[name="admin_notices"]:checked',".give-setting-tab-body-emails").val()?(e("#donation_notification_subject").parents("tr").show(),e("#wp-donation_notification-wrap").parents("tr").show(),e("#admin_notice_emails").parents("tr").show()):(e("#donation_notification_subject").parents("tr").hide(),e("#wp-donation_notification-wrap").parents("tr").hide(),e("#admin_notice_emails").parents("tr").hide())})).change(),e('input[name="sequential-ordering_status"]',".give-setting-tab-body-general").on("change",(function(){const t=e('input[name="sequential-ordering_status"]:checked',".give-setting-tab-body-general").val(),n=e(this).closest("table");"enabled"===t?e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").show():e("input",n).not('input[name="sequential-ordering_status"]').parents("tr").hide()})).change()},main_setting_update_notice:function(){const t=e("#setting-error-give-setting-updated");t.length&&window.setTimeout((function(){t.slideUp()}),5e3)},verify_settings:function(){const t=e("#success_page"),n=e("#failure_page");t.add(n).change((function(){if(t.val()===n.val()){let t='<div id="setting-error-give-matched-success-failure-page" class="updated settings-error notice is-dismissible"> <p><strong>'+Give.fn.getGlobalVar("matched_success_failure_page")+'</strong></p> <button type="button" class="notice-dismiss"><span class="screen-reader-text">'+Give.fn.getGlobalVar("dismiss_notice_text")+"</span></button> </div>",n=e("#setting-error-give-matched-success-failure-page");if(e(this).val(""),n.length)return!1;e("h1","#give-mainform").after(t),n=e("#setting-error-give-matched-success-failure-page"),e(".notice-dismiss",n).click((function(){n.remove()}))}})).change()},saveButtonTriggered:function(){e(".give-settings-setting-page").on("click",".give-save-button",(function(){e(window).unbind("beforeunload")}))},changeAlert:function(){e(window).bind("beforeunload",(function(e){const t=Give.fn.getGlobalVar("setting_not_save_message");if(S)return(e||window.event).returnValue=t,t}))},detectSettingsChange:function(){const t=e(".give-settings-setting-page");if(t.length>0){const n=e("#give-mainform").serialize();t.on("change keyup blur","form",(function(t){if(e(t.target).closest(".js-fields-has-custom-saving-logic").length)return;const i=e("#give-mainform").serialize();S=n!==i}))}},sequentialDonationIDPreview:function(){const t=jQuery("#sequential-ordering_preview");t.length&&(jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number, #sequential-ordering_number_padding, #sequential-ordering_number_suffix").on("keyup change",(function(){const e=jQuery("#sequential-ordering_number_prefix").val(),n=jQuery("#sequential-ordering_number").val().trim()||"1",i=jQuery("#sequential-ordering_number_padding").val().trim(),o=jQuery("#sequential-ordering_number_suffix").val(),a=`${e}${n.padStart(i,"0")}${o}`;t.val(a)})),jQuery("#sequential-ordering_number_prefix").trigger("keyup"),jQuery("#sequential-ordering_number_prefix, #sequential-ordering_number_suffix").on("blur",(function(){e(this).val(e(this).val().replace(new RegExp(" ","g"),"-"))})))}},c={init:function(){this.date_options(),this.donors_export(),this.recount_stats()},date_options:function(){e("#give-graphs-date-options").change((function(){"other"===e(this).val()?e("#give-date-range-options").show():e("#give-date-range-options").hide()}))},donors_export:function(){e("#give_donor_export_form").change((function(){const t=e(this),n=e("option:selected",t).val(),i=e("#give_customer_export_option");"0"===t.val()?i.show():i.hide();const o=e(".give_price_options_select");if(0!=parseInt(n)){const t={action:"give_check_for_form_price_variations",form_id:n,all_prices:!0};e.post(ajaxurl,t,(function(t){o.remove(),e("#give_donor_export_form_chosen").after(t)}))}else o.remove()}))},recount_stats:function(){e("body").on("change","#recount-stats-type",(function(){const t=e("#give-tools-recount-form"),n=e("option:selected",this).data("type"),i=e("#recount-stats-submit"),o=e(".tools-form-dropdown"),a=e(".tools-date-dropdown-delete-donations");t.find(".notice-wrap").remove(),i.removeClass("button-disabled").attr("disabled",!1),o.hide(),a.hide(),e(".give-recount-stats-descriptions span").hide(),"reset-stats"===n?(t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("reset_stats_warn")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")):"delete-test-donors"===n?(t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_test_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")):"delete-import-donors"===n?(t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_import_donor")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")):"delete-donations"===n?(a.show(),t.append('<div class="notice-wrap"></div>'),t.find(".notice-wrap").html('<div class="notice notice-warning"><p><input type="checkbox" id="confirm-reset" name="confirm_reset_store" value="1" /> <label for="confirm-reset">'+Give.fn.getGlobalVar("delete_donations_only")+"</label></p></div>"),i.addClass("button-disabled").attr("disabled","disabled")):(o.hide(),o.val(0));const r=e(".tools-form-dropdown-"+n);r.show(),r.find(".give-select-chosen").css({width:"auto","min-width":"250px"}),e("#"+n).show()})),e("body").on("change","#confirm-reset",(function(){e(this).is(":checked")?e("#recount-stats-submit").removeClass("button-disabled").removeAttr("disabled"):e("#recount-stats-submit").addClass("button-disabled").attr("disabled","disabled")})),e("#give-tools-recount-form").submit((function(t){const n=e("#recount-stats-type").val(),i=e(this),o=e("option:selected",this).data("type");if("reset-stats"===o){if(e("#confirm-reset").is(":checked"))return!0;r=!0}i.find(".notice-wrap").remove(),i.append('<div class="notice-wrap"></div>');const a=i.find(".notice-wrap");var r=!1;if(null!==n&&0!==n||(a.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_class")+"</p></div>"),r=!0),"recount-form"===o&&0==e('select[name="form_id"]').val()&&(a.html('<div class="updated error"><p>'+Give.fn.getGlobalVar("batch_export_no_reqs")+"</p></div>"),r=!0),r)return i.find(".button-disabled").removeClass("button-disabled"),!1}))}},d={init:function(){this.submit(),this.dismiss_message()},submit:function(){const t=this;e(document.body).on("submit",".give-export-form",(function(n){n.preventDefault();const i=e(this).find('input[type="submit"]');if(!i.hasClass("button-disabled")){const n=e(this).serialize();i.addClass("button-disabled"),e("form.give-export-form select").attr("disabled",!0).trigger("chosen:updated");let o=e(this);e(this).find(".add-notices").length>0&&(o=e(this).find(".add-notices")),o.find(".notice-wrap").remove(),o.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.process_step(1,n,t,this)}}))},process_step:function(t,n,i,o,a){S=!0;let r=!1;e.ajax({type:"POST",url:ajaxurl,data:{form:n,action:"give_do_ajax_export",step:t,file_name:a},dataType:"json",success:function(t){if("done"==t.step||t.error||t.success){S=!1,r=!0;const n=e(o).parent().find(".notice-wrap");if(n.find(".give-progress"),e(o).find(".button-disabled").removeClass("button-disabled"),e(o).find("select").attr("disabled",!1).trigger("chosen:updated"),t.error){const e=t.message;n.html('<div class="updated error"><p>'+e+"</p></div>")}else if(t.success){const e=t.message;n.html('<div id="give-batch-success" class="updated notice is-dismissible"><p>'+e+'<span class="notice-dismiss"></span></p></div>')}else n.remove(),window.location=t.url}else e(".give-progress div").animate({width:t.percentage+"%"},50,(function(){})),i.process_step(parseInt(t.step),n,i,o,t.file_name);!0===r&&e("#give-tools-recount-form").length>0&&(e("#give-tools-recount-form")[0].reset(),e("#give-tools-recount-form .tools-form-dropdown").hide(),e("#give-tools-recount-form .tools-date-dropdown").hide(),e("#give-tools-recount-form .tools-form-dropdown-recount-form-select").val("0").trigger("chosen:updated"))}}).fail((function(t){S=!1,window.console&&window.console.log&&console.log(t),e(".notice-wrap").append(t.responseText)}))},dismiss_message:function(){e("body").on("click","#give-batch-success .notice-dismiss",(function(){e("#give-batch-success").parent().slideUp("fast")}))}};var u={el:{},init:function(){this.submit(),this.dismiss_message()},submit:function(){const t=this;t.el.main_container=Give_Selector_Cache.get("#give-db-updates"),t.el.update_link=Give_Selector_Cache.get(".give-update-now",t.el.main_container),t.el.run_upload_container=Give_Selector_Cache.get(".give-run-database-update",t.el.progress_main_container),t.el.progress_main_container=Give_Selector_Cache.get(".progress-container",t.el.main_container),t.el.heading=Give_Selector_Cache.get(".update-message",t.el.progress_main_container),t.el.progress_container=Give_Selector_Cache.get(".progress-content",t.el.progress_main_container),t.el.update_progress_counter=Give_Selector_Cache.get(e(".give-update-progress-count")),t.el.main_container.data("resume-update")&&(t.el.update_link.addClass("active").hide().removeClass("give-hidden"),e("#give-restart-upgrades").length||(Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3),window.setTimeout(u.get_db_updates_info,1e3,t))),t.el.update_link.hasClass("active")||(t.el.update_link.on("click","",(function(e){e.preventDefault(),t.el.run_upload_container.find(".notice").remove(),t.el.run_upload_container.append('<div class="notice notice-error non-dismissible give-run-update-containt"><p> <a href="#" class="give-run-update-button button">'+Give.fn.getGlobalVar("db_update_confirmation_msg_button")+"</a> "+Give.fn.getGlobalVar("db_update_confirmation_msg")+"</p></div>")})),e("#give-db-updates").on("click","a.give-run-update-button",(function(n){return n.preventDefault(),e(this).hasClass("active")||(e(this).addClass("active").fadeOut(),t.el.update_link.addClass("active").fadeOut(),e("#give-db-updates .give-run-update-containt").slideUp(),t.el.progress_container.find(".notice-wrap").remove(),t.el.progress_container.append('<div class="notice-wrap give-clearfix"><span class="spinner is-active"></span><div class="give-progress"><div></div></div></div>'),t.el.progress_main_container.removeClass("give-hidden"),u.start_db_update(),window.setTimeout(u.get_db_updates_info,500,t)),!1})))},start_db_update:function(){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_run_db_updates",run_db_update:1,nonce:Give.fn.getGlobalVar("db_update_nonce")},dataType:"json",success:function(e){}}).always((function(){Give.fn.getGlobalVar("ajax").length||window.setTimeout(u.start_db_update,1e3)}))},get_db_updates_info:function(t){e.ajax({type:"POST",url:ajaxurl,data:{action:"give_db_updates_info"},dataType:"json",success:function(n){const i=Give_Selector_Cache.get(".notice-wrap",t.el.progress_container,!0);-1!==e.inArray("success",Object.keys(n))?n.success?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text("100%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-success is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),n.data.message?(t.el.update_link.closest("p").remove(),i.html('<div class="notice notice-error is-dismissible"><p>'+n.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3)):n&&-1!==e.inArray("percentage",Object.keys(n.data))?(t.el.update_progress_counter.length&&t.el.update_progress_counter.text(n.data.total_percentage+"%"),-1!==e.inArray("heading",Object.keys(n.data))&&t.el.heading.html("<strong>"+n.data.heading+"</strong>"),e(".give-progress div","#give-db-updates").animate({width:n.data.percentage+"%"},50,(function(){})),window.setTimeout(u.get_db_updates_info,1e3,t)):(i.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){t.el.update_link.removeClass("active").show(),t.el.progress_main_container.addClass("give-hidden")}),1e3))}})},process_step:function(t,n,i){S=!0,e.ajax({type:"POST",url:ajaxurl,data:{action:"give_do_ajax_updates",step:parseInt(t),update:parseInt(n)},dataType:"json",success:function(t){S=!1;const n=Give_Selector_Cache.get(".notice-wrap",i.el.progress_container,!0);-1!==e.inArray("success",Object.keys(t))?t.success?(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),i.el.update_link.closest("p").remove(),n.html('<div class="notice notice-success is-dismissible"><p>'+t.data.message+'</p><button type="button" class="notice-dismiss"></button></div>')):(-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading+"</strong>"),n.html('<div class="notice notice-error"><p>'+t.data.message+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3)):t&&-1!==e.inArray("percentage",Object.keys(t.data))?(e(".give-progress div","#give-db-updates").animate({width:t.data.percentage+"%"},50,(function(){})),-1!==e.inArray("heading",Object.keys(t.data))&&i.el.heading.html("<strong>"+t.data.heading.replace("{update_count}",i.el.heading.data("update-count"))+"</strong>"),i.process_step(parseInt(t.data.step),t.data.update,i)):(n.html('<div class="notice notice-error"><p>'+Give.fn.getGlobal().updates.ajax_error+"</p></div>"),setTimeout((function(){i.el.update_link.removeClass("active").show(),i.el.progress_main_container.addClass("give-hidden")}),5e3))}}).fail((function(e){S=!1,window.console&&window.console.log&&console.log(e),Give_Selector_Cache.get(".notice-wrap",self.el.progress_container).append(e.responseText)})).always((function(){}))},dismiss_message:function(){e("body").on("click","#poststuff .notice-dismiss",(function(){e(this).parent().slideUp("fast")}))}};const f={init:function(){this.restartUpgrade(),this.stopUpgrade(),this.restartUpdater()},restartUpgrade:function(){jQuery("#give-restart-upgrades").click("click",(function(e){const t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").show(),jQuery(".give-update-paused-text-p").hide(),new l({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},stopUpgrade:function(){jQuery("#give-pause-upgrades").click("click",(function(e){const t=this;e.preventDefault(),jQuery(".give-doing-update-text-p").hide(),jQuery(".give-update-paused-text-p").show(),new l({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("stop_upgrade")},successConfirm:function(){window.location.assign(jQuery(t).data("redirect-url"))}}).render()}))},restartUpdater:function(){jQuery(".give-restart-updater-btn,.give-run-update-now").click("click",(function(e){const t=this;e.preventDefault(),new l({modalContent:{title:Give.fn.getGlobalVar("confirm_action"),desc:Give.fn.getGlobalVar("restart_update")},successConfirm:function(){window.location.assign(jQuery(t).attr("href"))}}).render()}))}};var p={onLoadPageNumber:"",init:function(){this.loadGravatar(),this.unlockDonorFields(),this.editDonor(),this.add_email(),this.removeUser(),this.cancelEdit(),this.add_note(),this.delete_checked(),this.addressesAction(),this.bulkDeleteDonor(),p.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-donors-filter .bulkactions input[type="submit"]',this.handleBulkActions)},loadGravatar:function(){let t,n,i="";e(".give-donor-name").each((function(){if(t=e(this).find(".give-donor__image"),!t.hasClass("gravatar-loaded")){if(n=t.attr("data-donor_email"),i="1"===t.attr("data-has-valid-gravatar"),i){const t=e("<img>");t.attr("src",T.url(n)),t.attr("width","60"),t.attr("height","60"),e(this).find(".give-donor__image").html(t)}t.addClass("gravatar-loaded")}}))},unlockDonorFields:function(t){e("body").on("click",".give-lock-block",(function(e){new o({modalContent:{title:Give.fn.getGlobalVar("unlock_donor_fields_title"),desc:Give.fn.getGlobalVar("unlock_donor_fields_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),e.preventDefault()}))},editDonor:function(){e("body").on("click","#edit-donor",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .editable").hide(),e("#give-donor-card-wrapper .edit-item").fadeIn().css("display","block")}))},removeUser:function(){e("body").on("click","#disconnect-donor",(function(t){return t.preventDefault(),new l({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("disconnect_user")},successConfirm:function(){const t={give_action:"disconnect-userid",customer_id:e('input[name="donor_info[id]"]').val(),_wpnonce:e("#edit-donor-info #_wpnonce").val()};e.post(ajaxurl,t,(function(e){window.location.href=e.redirect}),"json")}}).render(),!1}))},cancelEdit:function(){e("body").on("click","#give-edit-donor-cancel",(function(t){t.preventDefault(),e("#give-donor-card-wrapper .edit-item").hide(),e("#give-donor-card-wrapper .editable").show(),e(".give_user_search_results").html("")}))},add_note:function(){e("body").on("click","#add-donor-note",(function(t){t.preventDefault();const n={give_action:"add-donor-note",customer_id:e("#donor-id").val(),donor_note:e("#donor-note").val(),add_donor_note_nonce:e("#add_donor_note_nonce").val()};if(n.donor_note)e.ajax({type:"POST",data:n,url:ajaxurl,success:function(t){e("#give-donor-notes").prepend(t),e(".give-no-donor-notes").hide(),e("#donor-note").val("")}}).fail((function(e){window.console&&window.console.log&&console.log(e)}));else{const t=e("#donor-note").css("border-color");e("#donor-note").css("border-color","red"),setTimeout((function(){e("#donor-note").css("border-color",t)}),500)}}))},delete_checked:function(){e("#give-donor-delete-confirm").change((function(){const t=e("#give-donor-delete-records"),n=e("#give-delete-donor");e(this).prop("checked")?(t.attr("disabled",!1),n.attr("disabled",!1)):(t.attr("disabled",!0),t.prop("checked",!1),n.attr("disabled",!0))}))},add_email:function(){e("#add-donor-email").length&&e(document.body).on("click","#add-donor-email",(function(t){t.preventDefault();const n=e(this),i=n.parent();i.parent().find(".notice-wrap").remove(),i.find(".spinner").css("visibility","visible"),n.attr("disabled",!0);const o={give_action:"add_donor_email",customer_id:i.find('input[name="donor-id"]').val(),email:i.find('input[name="additional-email"]').val(),primary:i.find('input[name="make-additional-primary"]').is(":checked"),_wpnonce:i.find('input[name="add_email_nonce"]').val()};e.post(ajaxurl,o,(function(e){!0===e.success?window.location.href=e.redirect:(n.attr("disabled",!1),i.after('<div class="notice-wrap"><div class="notice notice-error inline"><p>'+e.message+"</p></div></div>"),i.find(".spinner").css("visibility","hidden"))}),"json")}))},addressesAction:function(){const n=this,i=e("#donor-address-wrapper"),o=e(".all-address",i),a=e(".give-no-address-message",i),r=e(o).parent(),s=e(".address-form",i),l=e(".js-cancel",s),c=e('select[name="country"]',s),d=e(".add-new-address",i),u=parseInt(e('input[name="donor-id"]').val());c.on("change",(function(){e(this).trigger("chosen:updated")})),o.on("click",".js-edit",(function(t){const i=e(this).closest(".address");t.preventDefault(),e(".notice",r).remove(),n.__set_address_form_val(i),n.__set_address_form_action("update",i.data("address-id")),d.hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),s.data("process","update")})),o.on("click",".js-remove",(function(t){t.preventDefault();const i=e(this).closest(".address");e(".notice",r).remove(),s.data("changed",!0),n.__set_address_form_val(i),n.__set_address_form_action("remove",i.data("address-id")),s.trigger("submit")})),d.on("click",(function(t){t.preventDefault(),e(".notice",r).remove(),e(this).hide(),o.addClass("give-hidden"),s.removeClass("add-new-address-form-hidden"),n.__set_address_form_action("add"),n.__set_address_form_action()})),l.on("click",(function(e){e.preventDefault(),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),s.on("change",(function(){e(this).data("changed",!0)})).on("submit",(function(n){n.preventDefault();const l=e(this);return e(".notice",r).remove(),e(this).data("changed")?(e.ajax({type:"POST",url:ajaxurl,data:{action:"donor_manage_addresses",donorID:u,form:e("form",s).serialize()},beforeSend:function(){t(i,{show:!0})},success:function(n){if(t(i),n.success){let t;switch(n.data.action){case"add":e(".give-grid-row",o).append(n.data.address_html),!a.hasClass("give-hidden")&&e("div.give-grid-col-4",o).length&&a.addClass("give-hidden");break;case"remove":t=o.find('div[data-address-id*="'+n.data.id+'"]').parent(),t.length&&t.animate({"margin-left":"-999"},1e3,(function(){t.remove(),a.hasClass("give-hidden")&&!e("div.give-grid-col-4",o).length&&a.removeClass("give-hidden")}));break;case"update":t=o.find('div[data-address-id*="'+n.data.id+'"]').parent();var s=t.prev(),l={},c=!1;parseInt(e(".give-grid-row>div",o).length)<2?e(".give-grid-row",o).append(n.data.address_html):(s.length&&(s.after(n.data.address_html),c=!0),c||(l=t.next()).length&&l.before(n.data.address_html)),t.remove()}r.prepend(n.data.success_msg)}else r.prepend(n.data.error_msg)},dataType:"json"}).always((function(){l.data("changed",!1),s.find('input[type="text"]').val(""),d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden")})),!1):(d.show(),o.removeClass("give-hidden"),s.addClass("add-new-address-form-hidden"),!1)}))},__set_address_form_action:function(t,n){const i=e("#donor-address-wrapper"),o=e(".address-form",i),a=e('input[name="address-action"]',o),r=e('input[name="address-id"]',o);t=t||"add",n=n||"billing",a.val(t),r.val(n)},__set_address_form_val:function(t){const n=e("#donor-address-wrapper"),i=e(".address-form",n),o=e('[data-address-type="state"]',t).text().substr(2).trim();e('select[name="country"]',i).val().trim()!==e('[data-address-type="country"]',t).text().trim()?(e('select[name="country"]',i).val(e('[data-address-type="country"]',t).text().trim()).trigger("chosen:updated").change(),window.setTimeout((function(){e('[name="state"]',i).val(o).trigger("chosen:updated")}),500)):e('[name="state"]',i).val(o).trigger("chosen:updated"),e('input[name="line1"]',i).val(e('[data-address-type="line1"]',t).text().trim()),e('input[name="line2"]',i).val(e('[data-address-type="line2"]',t).text().trim()),e('input[name="city"]',i).val(e('[data-address-type="city"]',t).text().trim()),e('input[name="zip"]',i).val(e('[data-address-type="zip"]',t).text().trim())},bulkDeleteDonor:function(){const t=e("body");t.on("click","#give-bulk-delete-cancel",(function(t){e(this).closest("tr").hide(),e(".give-skip-donor").trigger("click"),t.preventDefault()})),t.on("click","#cb-select-all-1, #cb-select-all-2",(function(){const t=e(this);e.each(e(".donor-selector"),(function(){const n=e(this).val(),i=e(this).data("name"),o='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+i+"</div>";t.is(":checked")&&!e(this).is(":checked")?e("#give-bulk-donors").append(o):t.is(":checked")||e("#give-bulk-donors").find("#give-donor-"+n).remove()}))})),t.on("click",".donor-selector",(function(){const t=e(this).val(),n=e(this).data("name"),i='<div id="give-donor-'+t+'" data-id="'+t+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+n+"</div>";e(this).is(":checked")?e("#give-bulk-donors").prepend(i):e("#give-bulk-donors").find("#give-donor-"+t).remove()})),t.on("click","#give-bulk-delete .give-donor-delete-confirm",(function(){e(this).is(":checked")?e("#give-bulk-delete-button").removeAttr("disabled"):(e("#give-bulk-delete-button").attr("disabled",!0),e("#give-bulk-delete .give-donor-delete-records").removeAttr("checked"))})),t.on("click","#give-bulk-delete .give-donor-delete-records",(function(){e(this).is(":checked")&&(e("#give-bulk-delete .give-donor-delete-confirm").attr("checked","checked"),e("#give-bulk-delete-button").removeAttr("disabled"))})),t.on("click",".give-skip-donor",(function(){const t=e(this).closest("div").data("id");e("#give-donor-"+t).remove(),e("#donor-"+t).find('input[type="checkbox"]').removeAttr("checked")})),t.on("click",".give-single-donor-delete",(function(t){const n=e(this).data("id"),i=e("tr#donor-"+n).find(".donor-selector"),o=e('[id^="cb-select-all-"]'),a=e("#give-bulk-donors"),r=i.data("name"),s='<div id="give-donor-'+n+'" data-id="'+n+'"><a class="give-skip-donor" title="'+Give.fn.getGlobalVar("remove_from_bulk_delete")+'">X</a>'+r;a.html(""),o.is(":checked")&&o.removeAttr("checked"),e(".donor-selector").removeAttr("checked"),i.prop("checked",!0),0===e("#give-donor-"+n).length&&(a.prepend(s),e("#give-bulk-delete").slideDown()),t.preventDefault()}))},handleBulkActions:function(t){const n=e(this).closest(".tablenav").find("select").val(),i=[],o=e("#current-page-selector").val(),r=p.onLoadPageNumber!==o,s=Give.fn.getGlobalVar("donors_bulk_action.no_action_selected"),l=Give.fn.getGlobalVar("donors_bulk_action.no_donor_selected");return!!r||(e.each(e(".donor-selector:checked"),(function(){i.push(e(this).val())})),"-1"===n?(new a({modalContent:{title:s.title,desc:s.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1):parseInt(i)?("delete"===n&&e("#give-bulk-delete").slideDown(),void t.preventDefault()):(new a({modalContent:{title:l.title,desc:l.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1))}};const h={init:function(){this.revoke_api_key(),this.regenerate_api_key()},revoke_api_key:function(){e("body").on("click",".give-revoke-api-key",(function(t){t.preventDefault();const n=e(this).attr("href");return new l({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("revoke_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))},regenerate_api_key:function(){e("body").on("click",".give-regenerate-api-key",(function(t){const n=e(this).attr("href");return new l({modalWrapper:"give-modal--warning",modalContent:{desc:Give.fn.getGlobalVar("regenerate_api_key")},successConfirm:function(){window.location.assign(n)}}).render(),!1}))}},m={init:function(){const t=e.query.get("give_tab").length?e.query.get("give_tab"):"form_template_options";this.handle_metabox_tab_click(),this.setup_colorpicker_fields(),this.setup_media_fields(),this.setup_repeatable_fields(),this.handle_repeater_group_events(),this.handle_multi_levels_repeater_group_events(),this.activate_tab(e('a[href="#'+t+'"]'))},handle_metabox_tab_click:function(){const t=this;e(".give-metabox-tabs a").on("click",(function(n){n.preventDefault();const i=e(this);t.activate_tab(i),t.update_query(i)}))},activate_tab:function(t){const n=t.data("tab-id"),i=t.parent(),o=e("ul.give-metabox-sub-tabs",i),a=o.length,r=e(".give-metabox-tabs a").parents("li"),s=e("ul.give-metabox-sub-tabs"),l=t.parents("ul.give-metabox-sub-tabs").length;if(e("#give_form_active_tab").val(n),a){i.toggleClass("active"),o.removeClass("give-hidden");const t=e("li.active","ul.give-metabox-sub-tabs");s.not(o).addClass("give-hidden"),r.not(i).removeClass("active"),t.addClass("active")}else l?l&&(e("ul.give-metabox-sub-tabs").addClass("give-hidden"),r.removeClass("active"),t.parents("ul.give-metabox-sub-tabs").removeClass("give-hidden").children("li").removeClass("active"),t.parents("li.has-sub-fields").addClass("active")):r.each((function(t,n){(n=e(n)).removeClass("active"),n.hasClass("has-sub-fields")&&e("ul.give-metabox-sub-tabs",n).addClass("give-hidden")}));t.parent().addClass("active"),e(".give_options_panel").removeClass("active"),e(t.attr("href")).addClass("active")},update_query:function(t){const n=t.data("tab-id"),i=e.query.set("give_tab",n).remove("message").toString();history.replaceState&&history.replaceState(null,null,i)},setup_colorpicker_fields:function(){e(document).ready((function(){const t=e(".give-colorpicker");t.length&&t.each((function(t,n){const i=e(n);i.parents(".give-template").length||i.wpColorPicker()}))}))},setup_media_fields:function(){let t,n,i=e("body");i.on("click",".give-upload-button",(function(o){o.preventDefault();let a={};n=e(this),a="media"===e(this).data("field-type")?{title:Give.fn.getGlobal().metabox_fields.media.button_title,button:{text:Give.fn.getGlobal().metabox_fields.media.button_title},multiple:!1,library:{type:"image"}}:{title:Give.fn.getGlobal().metabox_fields.file.button_title,button:{text:Give.fn.getGlobal().metabox_fields.file.button_title},multiple:!1},void 0!==jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("editing")&&(wp.media.controller.Library.prototype.defaults.contentUserSetting=!1);const r=jQuery(this).closest(".give-field-wrap").find(".give-input-field").attr("library");void 0!==r&&""!==r&&(a.library={type:r}),t=wp.media(a),t.on("select",(function(){const e=t.state().get("selection").first().toJSON(),o=n.prev(),a="id"===n.data("fvalue")?e.id:e.url;if(i.trigger("give_media_inserted",[e,o]),o.val(a),"id"!==n.data("fvalue")){const t='input[name="'+o.attr("name")+'_id"]';o.closest("tr").next("tr").find(t).length&&o.closest("tr").next("tr").find(t).val(e.id)}})),t.open()})),i.on("give_media_inserted",(function(t,i){const o=n.parents(".give-field-wrap"),a=e(".give-image-thumb",o);return!!a.length&&("image"!==i.type?(a.addClass("give-hidden"),e("img",a).attr("src",""),!1):(a.find("img").attr("src",i.url),void a.removeClass("give-hidden")))})),e("span.give-delete-image-thumb",".give-image-thumb").on("click",(function(t){t.preventDefault();const n=e(this).parents(".give-field-wrap"),i=e(this).parent(),o=e('input[type="text"]',n);i.addClass("give-hidden"),o.val(""),e("img",i).attr("src","")}))},setup_repeatable_fields:function(){jQuery((function(){jQuery(".give-repeatable-field-section").each((function(){const t=e(this),n={wrapper:".give-repeatable-fields-section-wrapper",container:".container",row:".give-row",add:".give-add-repeater-field-section-row",remove:".give-remove",move:".give-move",template:".give-template",confirm_before_remove_row:!0,confirm_before_remove_row_text:Give.fn.getGlobalVar("confirm_before_remove_row_text"),is_sortable:!0,before_add:null,after_add:g,before_remove:null,after_remove:_,sortable_options:{placeholder:"give-ui-placeholder-state-highlight",start:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);const o=e(".give-row",t).not(".give-template");o.length&&o.each((function(t,n){const i=e('input[type="radio"].give-field',e(n));i.length&&i.each((function(){e(this).attr("data-give-checked",e(this).is(":checked"))}))})),e("body").trigger("repeater_field_sorting_start",[i.item])},stop:function(t,n){n.item.next().hasClass("give-template")&&n.item.next().after(n.item),e("body").trigger("repeater_field_sorting_stop",[n.item])},update:function(n,i){i.item.next().hasClass("give-template")&&i.item.next().after(i.item);const o=e(".give-row",t).not(".give-template"),a=e(this).closest(".give-repeatable-fields-section-wrapper");if(o.length){let n=1;o.each((function(t,i){const o=e(".give-field, label",e(i));o.length&&o.each((function(){const t=e(this).parents(".give-field-wrap"),i=e(this);e.each(this.attributes,(function(e,o){let a=this.value.replace(/\[/g,"_").replace(/]/g,""),r=a+"_field",s="",l="";this.value&&(this.value=this.value.replace(/\[\d+\]/g,"["+(n-1)+"]"),l=this.value.replace(/\[/g,"_").replace(/]/g,""),t.hasClass(r)&&(s=l+"_field",t.removeClass(r).addClass(s)),a==i.attr("id")&&i.attr("id",l))}))})),n++})),window.setTimeout((function(){e("input[data-give-checked]",a).each((function(t,n){(n=e(n)).prop("checked","true"===n.attr("data-give-checked"))}))}),100),t.trigger("repeater_field_row_reordered",[i.item])}}}};jQuery(this).repeatable_fields(n)}))}))},handle_repeater_group_events:function(){const t=e(".give-repeatable-field-section"),n=e("body");n.on("click",".give-row-head .give-handlediv",(function(){const t=e(this).closest(".give-row");t.toggleClass("closed"),e(".give-row-body",t).toggle()})),t.on("repeater_field_new_row_added repeater_field_row_deleted repeater_field_row_reordered",(function(){b(e(this))})),n.on("repeater_field_sorting_start",(function(t,n){const i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){tinyMCE.execCommand("mceRemoveEditor",!0,e(n).attr("id"))}),300)}))})),n.on("repeater_field_sorting_stop",(function(t,n){const i=e(".wp-editor-area",n);i.length&&i.each((function(t,n){window.setTimeout((function(){const t=e(n).attr("id");tinyMCE.execCommand("mceAddEditor",!0,t),window.setTimeout((function(){switchEditors.go(t,"html"),e("#"+t+"-tmce").trigger("click")}),100)}),300)}))})),t.each((function(t,n){const i=e(n);b(i),parseInt(i.data("close-tabs"))&&(e(".give-row-head button",i).trigger("click"),e(".give-template",i).removeClass("closed"),e(".give-template .give-row-body",i).show())})),t.on("repeater_field_new_row_added",(function(t,n,i){e(".give-colorpicker",e(this)).each((function(t,n){const i=e(n);i.parents(".wp-picker-container").length||i.parents(".give-template").length||i.wpColorPicker()}));const o=e("div[data-wp-editor]",i);o.length&&o.each((function(t,n){const i=e(n),o=e(".wp-editor-wrap",i),a=e("textarea",i),r="give_wysiwyg_unique_"+Math.random().toString().replace(".","_"),s=o.prev();a.attr("id",r),e.post(ajaxurl,{action:"give_load_wp_editor",wp_editor:i.data("wp-editor"),wp_editor_id:r,textarea_name:e("textarea",i).attr("name")},(function(t){o.remove(),s.after(t),tinyMCEPreInit.qtInit[a.attr("id")]=e.extend(!0,tinyMCEPreInit.qtInit._give_agree_text,{id:r}),tinyMCEPreInit.mceInit[r]=e.extend(!0,tinyMCEPreInit.mceInit._give_agree_text,{body_class:r+" post-type-give_forms post-status-publish locale-"+tinyMCEPreInit.mceInit._give_agree_text.wp_lang_attr.toLowerCase(),selector:"#"+r}),tinymce.init(tinyMCEPreInit.mceInit[r]),quicktags(tinyMCEPreInit.qtInit[r]),QTags._buttonsInit(),window.setTimeout((function(){switchEditors.go(r,"html"),e("#"+r+"-tmce").trigger("click")}),100),window.wpActiveEditor||(window.wpActiveEditor=r)}))}))}))},handle_multi_levels_repeater_group_events:function(){const t=e("#_give_donation_levels_field");e("body").on("keyup",".give-multilevel-text-field",(function(){const t=e(this).closest("tr"),n=e(".give-row-head h2 span",t),i=n.data("header-title");if(e(this).val()&&e(this).val()===n.html())return!1;e(this).val()?n.html(i+": "+e(this).val()):n.html(i)})),e(".give-multilevel-text-field").each((function(t,n){if(!t)return;const i=e(n),o=i.closest("tr"),a=e(".give-row-head h2 span",o),r=a.data("header-title");if(i.val()&&i.val()===a.html())return!1;i.val()?a.html(r+": "+i.val()):a.html(r)})),t.on("repeater_field_row_deleted",(function(){const t=e(this);window.setTimeout((function(){const n=e(".give-row",t).not(".give-template"),i=e(".give-give_default_radio_inline",n);1===n.length&&i.prop("checked",!0)}),200)})),t.on("repeater_field_new_row_added",(function(t,n,i){let o=e(this),a=0;window.setTimeout((function(){!1===e(".give-give_default_radio_inline",o).is(":checked")&&e(".give-row",o).not(".give-template").first().find(".give-give_default_radio_inline").prop("checked",!0)}),200),e('input[type="hidden"].give-levels_id',o).each((function(t,n){const i=e(n),o=parseInt(i.val());a<o&&(a=o)})),e('input[type="hidden"].give-levels_id',i).val(++a)}))}};var g=function(t,n){let i=e(t).attr("data-rf-row-count"),o=e(t).parents(".give-repeatable-field-section");i++,e("*",n).each((function(){e.each(this.attributes,(function(e,t){this.value=this.value.replace("{{row-count-placeholder}}",i-1)}))})),e(t).attr("data-rf-row-count",i),o.trigger("repeater_field_new_row_added",[t,n])},_=function(t){let n=e(t),i=n.parents(".give-repeatable-field-section"),o=e(t).prop("data-rf-row-count");n.prop("data-rf-row-count",--o),i.trigger("repeater_field_row_deleted")},b=function(t){if(!parseInt(t.data("group-numbering")))return;const n=e(".give-row-head h2 span",t),i=n.data("header-title");n.each((function(t,n){const o=e(n);o.parents(".give-template").length||o.html(i+": "+t)}))},y={onLoadPageNumber:"",init:function(){y.onLoadPageNumber=e("#current-page-selector").val(),e("body").on("click",'#give-payments-filter input[type="submit"]',this.handleBulkActions)},handleBulkActions:function(t){let n=e(this).closest(".tablenav").find("select").val(),i=e(this).closest(".tablenav").find('option[value="'+n+'"]').text(),o=e('input[name="payment[]"]:checked').length,r=-1!==n.indexOf("set-status-"),s="",c="",d=e("#current-page-selector").val();if(y.onLoadPageNumber!==d)return!0;if(n=r?"set-to-status":n,"-1"===n)return new a({modalContent:{title:Give.fn.getGlobal().donors_bulk_action.no_action_selected.title,desc:Give.fn.getGlobal().donors_bulk_action.no_action_selected.desc,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;if(Object.keys(Give.fn.getGlobalVar("donations_bulk_action")).length)for(c in Give.fn.getGlobalVar("donations_bulk_action"))if(c===n){if(s=r?Give.fn.getGlobal().donations_bulk_action[n].zero.replace("{status}",i.replace("Set To ","")):Give.fn.getGlobal().donations_bulk_action[n].zero,!parseInt(o))return new a({modalContent:{title:Give.fn.getGlobal().donations_bulk_action.titles.zero,desc:s,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render(),!1;s=1<o?Give.fn.getGlobal().donations_bulk_action[n].multiple:Give.fn.getGlobal().donations_bulk_action[n].single,t.preventDefault(),new l({modalContent:{title:Give.fn.getGlobalVar("confirm_bulk_action"),desc:s.replace("{payment_count}",o).replace("{status}",i.replace("Set To ",""))},successConfirm:function(t){e("#give-payments-filter").submit()}}).render()}return!0}};const w={init:function(){var t;const n=null!==(t=document.querySelectorAll(".give-select-chosen[multiple]"))&&void 0!==t?t:[];Array.from(n).forEach((t=>{const n=t.dataset.order?t.dataset.order.split("|"):[];n.length>0&&w.reorderItems(t,n),e(t).chosen().change((function(t,n){var i;const o=t.target,a=[];n.deselected&&e(this).trigger("chosen:updated"),(null!==(i=document.querySelectorAll(`#${o.id}_chosen li.search-choice`))&&void 0!==i?i:[]).forEach((e=>{const t=e.querySelector("span").textContent,n=Object.values(o.options).find((e=>e.textContent===t));n&&a.push({text:n.textContent,value:n.value,selected:!0})})),Object.values(o.options).map((e=>{a.filter((t=>t.text===e.textContent)).length||a.push({text:e.textContent,value:e.value,selected:e.selected})})),w.rebuildDropDown(o,a)}))}))},reorderItems:function(t,n){const i=t.options,o=[];n.forEach(((e,n)=>{var a;(null!==(a=document.querySelectorAll(`#${t.id}_chosen li.search-choice`))&&void 0!==a?a:[]).forEach(((t,a)=>{if(n===a){const n=Object.values(i).find((t=>t.value===e));t.querySelector("span").textContent=n.text,o.push({value:n.value,text:n.text,selected:!0})}}))})),Object.values(i).map((e=>{o.filter((t=>t.value===e.value)).length||o.push({value:e.value,text:e.textContent,selected:e.selected})})),w.rebuildDropDown(t,o),e(this).trigger("chosen:updated")},rebuildDropDown:function(e,t){e.innerHTML="",t.map((t=>{const n=document.createElement("option");n.value=t.value,n.textContent=t.text,t.selected&&n.setAttribute("selected","true"),e.add(n)}))}};e((function(){e("body").on("click","button.notice-dismiss",(function(){"give-invalid-license"!==jQuery(this).closest("div.give-notice").data("notice-id")&&function(e){var t=document.location.href,n=t.split("?");if(e=void 0===e?"":e.replace("give-",""),n.length>=2){const i=n.shift(),o=n.join("?"),a=encodeURIComponent("give-message")+"=",r=o.split(/[&;]/g);for(let t=r.length;t-- >0;)(-1!==r[t].lastIndexOf(a,0)||""!==e&&-1!==r[t].lastIndexOf("give-messages",0)&&r[t].match(e+"$"))&&r.splice(t,1);t=i+"?"+r.join("&"),window.history.pushState("",document.title,t)}}(jQuery(this).closest("div.give-notice").attr("id"))})),function(){let t,n=e(".give_datepicker");if(n.length){let i={},o={altFormat:"yy-mm-dd",onClose:function(e,t){e.length||t.input.next().val("")}};e.each(n,(function(o,a){a=e(a),t=void 0!==a.attr("data-standard-date")?a.attr("data-standard-date"):a.attr("value"),a.attr("name").length&&(i=a.clone(),n[o]=i,i.attr("name",""),a.before(i),a.hide(),a.attr("class",""),a.attr("id",""),a.val(t),a.prop("readonly",!0))})),n.length>0&&e.each(n,(function(t,n){n=e(n),o.altField=n.next(),n.datepicker(o)}))}}(),e('select[name="give-payment-status"]').on("change",(function(){const t=e(this).val();e(".give-donation-status").removeClass((function(e,t){return(t.match(/\bstatus-\S+/g)||[]).join(" ")})).addClass("status-"+t)})),function(){const t=e(".give-select-chosen");var n;t.hasClass("give-chosen-settings")?t.chosen({no_results_text:Give.fn.getGlobalVar("chosen_add_title_prefix")+" ",width:"30%"}).on("chosen:no_results",(function(t,n){e(n.chosen.container).on("keydown",(function(i){const o=n.chosen.get_search_text(),a=jQuery(n.chosen.form_field);13!==i.keyCode||a.find('option[value="'+o+'"]').length||"true"!==a.attr("data-allows-new-values")||(e(n.chosen.form_field).append('<option value="'+o+'" selected>'+o+"</option>").trigger("chosen:updated"),n.chosen.result_highlight=n.chosen.search_results.find("li.active-result").lasteturn,n.chosen.result_select(t))}))})):((n=t).on("chosen:ready",(function(){jQuery(this).next(".chosen-container").find("input.chosen-search-input").after('<span class="spinner"></span>')})),n.chosen({inherit_select_classes:!0,placeholder_text_single:Give.fn.getGlobalVar("one_option"),placeholder_text_multiple:Give.fn.getGlobalVar("one_or_more_option")}),n.on("chosen:no_results",(function(){let e=jQuery(this).next(".chosen-container"),t=e.find("li.no-results"),n="";const i=Give.fn.getGlobalVar("chosen");n=e.hasClass("give-select-chosen-ajax")&&t.length?i.ajax_search_msg.replace("{search_term}",'"'+jQuery("input",e).val()+'"'):i.no_results_msg.replace("{search_term}",'"'+jQuery("input",e).val()+'"'),t.html(n),jQuery(document.body).on("keyup",".give-select.chosen-container .chosen-search input, .give-select.chosen-container .search-field input",(function(e){let t=jQuery(this).val(),n=jQuery(this).closest(".give-select-chosen"),i=n.prev(),o=n.find('input[type="text"]'),a=(n.hasClass("variations"),e.which),r="give_form_search",s=this;if(n.prev().data("search-type")){if("no_ajax"===i.data("search-type"))return;r="give_"+i.data("search-type")+"_search"}t.length>0&&t.length<=3||!r.length||9===a||13===a||16===a||17===a||18===a||19===a||20===a||27===a||33===a||34===a||35===a||36===a||37===a||38===a||39===a||40===a||44===a||45===a||144===a||145===a||91===a||93===a||224===a||112<=a&&123>=a||(clearTimeout(Give.cache.chosenSearchTypingTimer),n.addClass("give-select-chosen-ajax"),Give.cache.chosenSearchTypingTimer=setTimeout((function(){jQuery.ajax({type:"POST",url:ajaxurl,data:{action:r,s:t,fields:jQuery(s).closest("form").serialize()},dataType:"json",beforeSend:function(){i.closest("ul.chosen-results").empty(),o.prop("disabled",!0)},success:function(e){n.removeClass("give-select-chosen-ajax"),jQuery("option:not(:selected)",i).remove(),e.length?(jQuery.each(e,(function(e,n){jQuery('option[value="'+n.id+'"]',i).length||(0===t.length?i.append(`<option value="${n.id}">${n.name}</option>`):i.prepend(`<option value="${n.id}">${n.name}</option>`))})),n.prev("select.give-select-chosen").trigger("chosen:updated")):n.prev("select.give-select-chosen").trigger("chosen:no_results"),o.prop("disabled",!1),o.val(t).focus()}}).fail((function(e){window.console&&window.console.log&&console.log(e)})).done((function(e){o.prop("disabled",!1)}))}),342))})),jQuery(".give-select-chosen .chosen-search input").each((function(){let e=jQuery(this).parent().parent().parent().prev("select.give-select-chosen").data("search-type"),t="";"form"===e?t=Give.fn.getGlobalVar("search_placeholder"):(e="search_placeholder_"+e,Give.fn.getGlobalVar(e)&&(t=Give.fn.getGlobalVar(e))),jQuery(this).attr("placeholder",t)}))}))),e(".chosen-container").each((function(){0===e(this).width()&&e(this).css("width","100%")})),e("#post").on("click",".give-thickbox",(function(){e(".give-select-chosen","#choose-give-form").css("width","100%")}));const i=e("#give_payment_campaign_select"),o=e("#give_payment_form_select");i.length&&o.length&&function(){let t=!1;const n=i.data("campaigns"),a=Array.from(o.find("option")).filter((e=>e.value>0)).map((e=>({id:parseInt(e.value),title:e.text.trim()})));i.on("change",(function(){const i=e(this).val(),r=n.find((e=>Number(e.id)===Number(i)));if(r){const e=r.form_ids.split(",").map(Number);e.length>0&&(o.empty(),a.filter((t=>e.includes(t.id))).forEach((e=>{o.append(new Option(e.title,e.id))})),t&&((s=o[0]).classList.add("flash"),setTimeout((()=>{s.classList.remove("flash")}),200))),r.default_form&&o.val(r.default_form)}var s;o.trigger("chosen:updated"),t=!0})).change()}()}(),e.giveAjaxifyFields({type:"country_state",debug:!0}),i.init(),r.init(),s.init(),c.init(),p.init(),h.init(),d.init(),u.init(),f.init(),m.init(),y.init(),function(){const e=document.querySelectorAll(".js-give-shortcode-button");if(e)for(const t of e)new C(t).init()}(),w.init(),e("a.give-rating-link").click((function(){jQuery(this).parent().text(jQuery(this).data("rated"))})),e(".give-ajax-user-search").on("keyup",(function(){const t=e(this).val();let n="";e(this).data("exclude")&&(n=e(this).data("exclude")),e(".give-ajax").show(),data={action:"give_search_users",user_name:t,exclude:n},document.body.style.cursor="wait",e.ajax({type:"POST",data,dataType:"json",url:ajaxurl,success:function(t){e(".give-ajax").hide(),e(".give_user_search_results").removeClass("hidden"),e(".give_user_search_results span").html(""),e(t.results).appendTo(".give_user_search_results span"),document.body.style.cursor="default"}})})),e("body").on("click.giveSelectUser",".give_user_search_results span a",(function(t){t.preventDefault();const n=e(this).data("login");e(".give-ajax-user-search").val(n),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")})),e("body").on("click.giveCancelUserSearch",".give_user_search_results a.give-ajax-user-cancel",(function(t){t.preventDefault(),e(".give-ajax-user-search").val(""),e(".give_user_search_results").addClass("hidden"),e(".give_user_search_results span").html("")}));let t=e("#poststuff"),o=Give.fn.getGlobalVar("thousands_separator"),a=Give.fn.getGlobalVar("decimal_separator"),l="",g="",v="",_=a===o?1:0;t.on("keyup","input.give-money-field, input.give-price-field",(function(){const t={label:Give.fn.getGlobalVar("price_format_guide").trim()};l=(e(this).val().match(new RegExp(o,"g"))||[]).length,g=(e(this).val().match(new RegExp("[a-z]","g"))||[]).length,-1!==e(this).val().indexOf(o)&&_<l||g?e(this).giveHintCss("show",t):e(this).giveHintCss("hide",t),l=g=""})),t.on("focusout","input.give-money-field, input.give-price-field",(function(){if(v=n(e(this).val(),!1),e(this).giveHintCss("hide",{label:Give.fn.getGlobalVar("price_format_guide").trim()}),n("0",!1)===n(e(this).val(),!1)){let t=e(this).attr("placeholder");return t=t||"0",e(this).val(t),!1}v=v.replace(".",a),-1!==v.indexOf("-")&&(v=v.replace("-","")),e(this).val(v)})),t.on("focusout","#_give_number_of_donation_goal",(function(){1>e(this).val()&&e(this).val(1)})),e(".give-settings-page").on("click","#give-show-sub-nav",(function(t){t.preventDefault();const n=e(this).next();return n.is(":hover")||n.toggleClass("give-hidden"),!1})).on("blur","#give-show-sub-nav",(function(){const t=e(this).next();t.is(":hover")||t.addClass("give-hidden")})),e(".give_email_api_notification_status_setting input").change((function(){let t=e(this).val(),n="enabled"===t,i={};return e(this).closest(".give_options_panel").length?i=e(this).closest(".give_options_panel").children(".give-field-wrap:not(.give_email_api_notification_status_setting), .give-repeatable-field-section"):e(this).closest("table").length&&(i=e(this).closest("table").find("tr:not(.give_email_api_notification_status_setting)")),-1!==jQuery.inArray(t,["enabled","disabled","global"])&&!!i.length&&void(n?i.show():i.hide())})),e(".give_email_api_notification_status_setting input:checked").change(),j()}))}(jQuery),jQuery(window).resize((function(){j()}));let I=!0;function E(){const e=jQuery("form.tools-setting-page-import");I=!0;const t=e.find(".give-progress"),n=jQuery(t).data("total_ajax"),i=jQuery(t).data("current"),a=jQuery(t).data("start"),r=jQuery(t).data("end"),s=jQuery(t).data("next"),l=jQuery(t).data("total"),c=jQuery(t).data("per_page");jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("give_donation_import"),_wpnonce:Give.fn.getGlobalVar("give_donation_import_nonce"),total_ajax:n,current:i,start:a,end:r,next:s,total:l,per_page:c,fields:e.serialize()},dataType:"json",success:function(e){jQuery(t).data("current",e.current),jQuery(t).find("div").width(e.percentage+"%"),1==e.next?(jQuery(t).data("start",e.start),jQuery(t).data("end",e.end),1==e.last&&jQuery(t).data("next",!1),E()):(I=!1,window.location=e.url)},error:function(e,t,n){I=!1;let i=Give.fn.getGlobalVar("error_message");e&&e.responseText?i+="\n\n"+e.responseText:i+="\n\n"+t+": "+n,new o({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:i,cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}function G(){const e=document.querySelector(".give-tools-setting-page-import table.step-2 .give-import-donation-required-fields");if("undefined"!==e&&null!==e){let e=!0,t=!1,n=!1,i=!1,o=!1;document.querySelectorAll(".give-import-donation-required-fields li").forEach((function(e){e.querySelector(".dashicons").classList.remove("dashicons-yes"),e.querySelector(".dashicons").classList.add("dashicons-no-alt")}));const a=Array.from(document.querySelectorAll("table.step-2 tbody select")).map((function(e){return e.value}));a.includes("email")&&(t=!0,document.querySelector(".give-import-donation-required-email .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-email .dashicons").classList.add("dashicons-yes")),a.includes("first_name")&&(n=!0,document.querySelector(".give-import-donation-required-first .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-first .dashicons").classList.add("dashicons-yes")),a.includes("amount")&&(i=!0,document.querySelector(".give-import-donation-required-amount .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-amount .dashicons").classList.add("dashicons-yes")),(a.includes("form_id")||a.includes("form_title"))&&(o=!0,document.querySelector(".give-import-donation-required-form .dashicons").classList.remove("dashicons-no-alt"),document.querySelector(".give-import-donation-required-form .dashicons").classList.add("dashicons-yes")),t&&n&&i&&o&&(e=!1),document.getElementById("recount-stats-submit").disabled=e}}function M(e,t){let n="";const i=document.querySelector(".give-save-button");try{n=JSON.parse(t),e.value=JSON.stringify(n,void 0,2),e.style.border="none",i.removeAttribute("disabled")}catch(t){e.style.border="1px solid red",i.setAttribute("disabled","disabled")}}function A(e){null!==e&&(M(e,e.value),e.addEventListener("blur",(t=>{M(e,t.target.value)})))}document.addEventListener("DOMContentLoaded",(function(e){window.onload=function(){G(),function(){const e=document.querySelector(".give-tools-setting-page-import table.step-2 tbody select");"undefined"!==e&&null!==e&&jQuery(".give-tools-setting-page-import table.step-2 tbody").on("change","select",(function(){G()}))}(),jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-3").length>0&&E(),function(){const e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-1 .is_csv_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}(),function(){const e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-donations-form table.step-2 .csv_not_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}(),function(){if(jQuery("body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-2").length>0){const e=jQuery("form.tools-setting-page-import"),t=e.find(".give-progress");I=!0,jQuery.ajax({type:"POST",url:ajaxurl,data:{action:Give.fn.getGlobalVar("core_settings_import"),fields:e.serialize()},dataType:"json",success:function(e){I=!1,!0===e.success?(jQuery(t).find("div").width(e.percentage+"%"),window.location=e.url):new o({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()},error:function(){I=!1,new o({modalContent:{title:Give.fn.getGlobalVar("import_failed"),desc:Give.fn.getGlobalVar("error_message"),cancelBtnTitle:Give.fn.getGlobalVar("ok")}}).render()}})}}(),function(){const e="body.give_forms_page_give-tools .give-tools-import-tab #give-import-core-settings-form table.step-1 .is_json_valid";jQuery(e).length>0&&(window.location=jQuery(e).val())}()}})),n(20157),window.addEventListener("DOMContentLoaded",(function(){const e=Array.from(document.querySelectorAll(".give-stripe-account-set-default"));e.length&&e.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.target.parentElement.parentElement.parentElement.parentElement,n=t.querySelector(".give-stripe-account-email .give-stripe-connect-data-field"),i=t.querySelector('input[name="setting-page"]').value;let o="",a="";const r=sprintf("<p><strong>%1$s</strong><br>%2$s</p>",(0,d.__)("Account Name","give"),e.target.parentElement.parentElement.querySelector(".give-stripe-account-name .give-stripe-connect-data-field").textContent);n&&(o=sprintf("<p><strong>%1$s</strong><br>%2$s</p>",(0,d.__)("Account Email","give"),n.textContent));const s=sprintf('<a href="%1$s" target="_blank">%2$s</a>',"https://givewp.com/documentation/core/payment-gateways/stripe-free/using-multiple-stripe-accounts-on-a-single-givewp-site/",(0,d.__)("View Documentation >","give"));a="global"===i?sprintf((0,d.__)("Please confirm you’d like to set the account below as the new default Stripe account. All donation forms set to inherit the Global Settings will use this new default account. %1$s<br>%2$s%3$s","give"),s,r,o):sprintf((0,d.__)("Please confirm you’d like to set the account below as the new default Stripe account for this donation form. All donations will process through this Stripe account rather than the Global default Stripe account. %1$s<br>%2$s%3$s","give"),s,r,o),new Give.modal.GiveConfirmModal({classes:{modalWrapper:"give-modal--warning give-stripe-modal-new-default"},modalContent:{title:sprintf('<span class="give-stripe-icon stripe-logo-with-circle"></span>%s',(0,d.__)("Confirm New Default Account","give")),desc:a},successConfirm:function(t){const n=new XMLHttpRequest,i=new FormData,o=Give.fn.getGlobalVar("post_id");i.append("action","give_stripe_set_account_default"),i.append("account_slug",e.target.getAttribute("data-account")),i.append("form_id",o),n.open("POST",ajaxurl),n.onload=function(){const e=JSON.parse(n.response);200===n.status&&e.success&&window.location.reload()},n.send(i)}}).render()}))}))})),window.addEventListener("DOMContentLoaded",(function(){const e=Array.from(document.querySelectorAll(".give-stripe-disconnect-account-btn"));e.length&&e.forEach((e=>{e.addEventListener("click",(e=>{e.preventDefault();const t=e.target;let n=(0,d.__)("Disconnect Stripe Account","give"),i=(0,d.__)("Are you sure you want to disconnect this Stripe account?","give");new Give.modal.GiveConfirmModal({type:"alert",classes:{modalWrapper:"give-modal--warning"},modalContent:{title:n,desc:i},successConfirm:()=>{fetch(t.getAttribute("href")).then((e=>e.json())).then((e=>{e.success&&window.location.reload()}))}}).render()}))}))})),window.addEventListener("DOMContentLoaded",(function(){const e=document.body.classList.contains("post-php")?".post-php":".post-new-php",t=document.querySelector(`${e}.post-type-give_forms form[name="post"]`);t&&t.addEventListener("submit",(e=>{const t=document.querySelector('#stripe_form_account_options [name="give_stripe_per_form_accounts"]:checked');t&&"enabled"===t.value&&(document.querySelector("#stripe_form_account_options .give-stripe-account-manager-list-item.give-stripe-boxshadow-option-wrap__selected")||(e.preventDefault(),new Give.modal.GiveNoticeAlert({type:"warning",modalContent:{title:(0,d.__)("Select a Stripe Account","give"),desc:(0,d.__)("You've selected to customize the Stripe account for this form, but not selected a different account. Please set an account as default for this form on the Stripe settings tab.","give")}}).render(),"stripe_form_account_options"!==Give.fn.getParameterByName("give_tab")&&document.querySelector('a[href="#stripe_form_account_options"]').click()))}))})),window.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll('input[name="stripe_fonts"]'),t=document.getElementById("stripe_styles_base"),n=document.getElementById("stripe_styles_empty"),i=document.getElementById("stripe_styles_invalid"),o=document.getElementById("stripe_styles_complete"),a=document.getElementById("stripe_custom_fonts"),r=document.getElementById("give-payment-status"),s=document.querySelectorAll('input[name="stripe_checkout_type"]'),l=Array.from(document.querySelectorAll(".stripe-checkout-field")),c=document.getElementById("give-stripe-connected"),u=Array.from(document.querySelectorAll('input[name="stripe_hide_icon"]')),f=document.querySelector(".stripe-icon-style"),p=Array.from(document.querySelectorAll(' input[name="stripe_mandate_acceptance_option"]')),h=document.querySelector(".stripe-mandate-acceptance-text"),m=Array.from(document.querySelectorAll('input[name="stripe_becs_hide_icon"]')),g=document.querySelector(".stripe-becs-icon-style"),v=Array.from(document.querySelectorAll(' input[name="stripe_becs_mandate_acceptance_option"]')),_=document.querySelector(".stripe-becs-mandate-acceptance-text"),b=Array.from(document.querySelectorAll('input[name="give_stripe_per_form_accounts"]')),y=document.querySelector(".give-stripe-manage-account-options"),w=document.querySelectorAll("#give-settings-section-group-credit-card .give-stripe-cc-option-field"),x=document.querySelectorAll("#give-settings-section-group-accounts .give-stripe-edit-statement-descriptor-btn");if(A(t),A(n),A(i),A(o),A(a),null!==b){let e=document.querySelectorAll("#stripe_form_account_options .give-stripe-per-form-option-field");b.forEach((t=>{t.addEventListener("change",(t=>{e.forEach((e=>{e.classList.remove("give-stripe-boxshadow-option-wrap__selected"),e.querySelector('input[name="give_stripe_per_form_accounts"]').setAttribute("checked","")})),t.target.parentElement.parentElement.classList.add("give-stripe-boxshadow-option-wrap__selected"),t.target.setAttribute("checked","checked"),"enabled"===t.target.value?y.classList.remove("give-hidden"):y.classList.add("give-hidden")}))}))}if(null!==u&&u.forEach((e=>{e.addEventListener("change",(e=>{"enabled"===e.target.value?f.classList.remove("give-hidden"):f.classList.add("give-hidden")}))})),null!==p&&p.forEach((e=>{e.addEventListener("change",(e=>{"enabled"===e.target.value?h.classList.remove("give-hidden"):h.classList.add("give-hidden")}))})),null!==m&&m.forEach((e=>{e.addEventListener("change",(e=>{"enabled"===e.target.value?g.classList.remove("give-hidden"):g.classList.add("give-hidden")}))})),null!==v&&v.forEach((e=>{e.addEventListener("change",(e=>{"enabled"===e.target.value?_.classList.remove("give-hidden"):_.classList.add("give-hidden")}))})),null!==c){const e=c.getAttribute("data-status"),t=c.getAttribute("data-redirect-url"),n=c.getAttribute("data-display"),i=c.getAttribute("data-title"),o=c.getAttribute("data-first-detail"),a=c.getAttribute("data-second-detail");"connected"===e&&"0"===n&&(new Give.modal.GiveConfirmModal({modalWrapper:"give-stripe-connected-modal give-modal--success",type:"confirm",modalContent:{title:i,desc:`<span>${o}</span><span class="give-field-description">${a}</span>`},successConfirm:function(e){window.location.href=t}}).render(),c.setAttribute("data-display","1"),history.pushState({urlPath:t},"",t))}if(null!==s&&s.forEach((e=>{e.addEventListener("change",(e=>{"modal"===e.target.value?l.map((e=>e.classList.remove("give-hidden"))):l.map((e=>e.classList.add("give-hidden")))}))})),null!==r&&r.addEventListener("change",(e=>{const t=document.getElementById("give-stripe-opt-refund");null!==t&&(t.checked=!1,"refunded"===e.target.value?document.getElementById("give-stripe-opt-refund-wrap").style.display="block":document.getElementById("give-stripe-opt-refund-wrap").style.display="none")})),null!==e&&e.forEach((e=>{const t=document.querySelector(".give-stripe-google-fonts-wrap"),n=document.querySelector(".give-stripe-custom-fonts-wrap");e.addEventListener("change",(e=>{"custom_fonts"===e.target.value?(t.style.display="none",n.style.display="table-row"):"google_fonts"===e.target.value&&(t.style.display="table-row",n.style.display="none")}))})),w.length&&w.forEach((function(e){e.addEventListener("click",(function(){w.forEach((function(e){e.classList.remove("give-stripe-boxshadow-option-wrap__selected"),e.querySelector('input[name="stripe_cc_fields_format"]').setAttribute("checked","")})),e.querySelector('input[name="stripe_cc_fields_format"]').setAttribute("checked","checked"),e.classList.add("give-stripe-boxshadow-option-wrap__selected")}))})),x.length){let e=`\n <input type="text" minlength="5" maxlength="22">\n <button class="button-primary" disabled>${(0,d.__)("Save","give")}</button>\n <button class="button-secondary">${(0,d.__)("Cancel","give")}</button>`,t=e=>!(22<e.length||e.length<5||!isNaN(e))&&0===e.split("").filter((e=>["*","'",'"',"\\","<",">"].includes(e))).length;x.forEach((n=>{n.addEventListener("click",(i=>{i.preventDefault();let o=n.closest(".give-stripe-connect-data-field"),a=o.style.display;o.insertAdjacentHTML("afterend",e),o.style.display="none";let r=o.nextElementSibling,s=r.nextElementSibling,l=s.nextElementSibling;r.value=o.childNodes[0].nodeValue.trim(),r.style.display="block",r.style.marginBottom="10px",s.style.marginRight="5px",r.addEventListener("keyup",(e=>{let t=r.value.trim(),n=o.childNodes[0].nodeValue.trim();s.disabled=!t||t===n})),l.addEventListener("click",(e=>{e.preventDefault(),r.remove(),s.remove(),l.remove(),o.style.display=a})),s.addEventListener("click",(e=>{e.preventDefault();let n=r.value.trim(),i=`${o.getAttribute("data-action-url")}&statement-descriptor=${encodeURIComponent(n)}`;t(n)?fetch(i).then((e=>e.json())).then((e=>{e.success?(o.childNodes[0].nodeValue=n,l.click()):new Give.modal.GiveErrorAlert({modalContent:{title:(0,d.__)("Invalid Stripe Statement Descriptor Text","give"),desc:(0,d.sprintf)('%s %s<br><br><a href="%s" target="_blank">%s</a>',(0,d.__)("We are unable to update Stripe statement descriptor.","give"),e.data.errorMessage,"https://stripe.com/docs/statement-descriptors#requirements",(0,d.__)("Read more about stripe statement descriptor text requirements.","give"))}}).render()})):new Give.modal.GiveErrorAlert({modalContent:{title:(0,d.__)("Invalid Statement Descriptor Text","give"),desc:(0,d.sprintf)('%s <br>%s <br>- %s<br>- %s<br>- %s<br>- %s<br><br><a href="%s" target="_blank">%s</a>',(0,d.__)("Please enter a valid Stripe statement descriptor.","give"),(0,d.__)("List of important Stripe statement descriptor text requirements:","give"),(0,d.__)("Contains only Latin characters.","give"),(0,d.__)("Contains between 5 and 22 characters, inclusive.","give"),(0,d.__)("Contains at least one letter.","give"),(0,d.__)("Does not contain any of the special characters < > \\ ' \" *.","give"),"https://stripe.com/docs/statement-descriptors#requirements",(0,d.__)("Read more about stripe statement descriptor text requirements.","give"))}}).render()}))}))}))}})),window.addEventListener("DOMContentLoaded",(function(){const e=document.getElementById("give-payment-status"),t=document.querySelectorAll("button.js-give-paypal-on-boarding-handler"),n=document.querySelectorAll(".js-give-paypal-disconnect-paypal-account"),i=document.getElementById("paypal_commerce_account_country");if(new MutationObserver((function(e){e.forEach((function(e){e.removedNodes.forEach((function(e){if("PPMiniWin"===e.getAttribute("id")){const e=document.getElementById("give-paypal-onboarding-trouble-notice");e&&e.classList.remove("give-hidden")}}))}))})).observe(document.querySelector("body"),{attributes:!0,childList:!0}),e&&e.addEventListener("change",(e=>{const t=document.getElementById("give-paypal-commerce-opt-refund");null!==t&&(t.checked=!1,"refunded"===e.target.value?document.getElementById("give-paypal-commerce-opt-refund-wrap").style.display="block":document.getElementById("give-paypal-commerce-opt-refund-wrap").style.display="none")})),window.location.search.match(/paypal-commerce-account-connected=1/i)){const e=window.givePayPalCommerce.translations.pciComplianceInstructions.map((e=>`<li>${e}</li>`)).join("");new Give.modal.GiveSuccessAlert({classes:{modalWrapper:"paypal-commerce-connect",cancelBtn:"give-button--primary"},modalContent:{title:window.givePayPalCommerce.translations.connectSuccessTitle,body:`\n\t\t\t\t\t<div class="give-modal__description">\n\t\t\t\t\t\t<p>${window.givePayPalCommerce.translations.pciWarning}</p>\n\t\t\t\t\t\t<ul>${e}</ul>\n\t\t\t\t\t</div>\n\t\t\t\t`.trim(),cancelBtnTitle:Give.fn.getGlobalVar("confirm")},closeOnBgClick:!0}).render();let t=Give.fn.removeURLParameter(window.location.href,"paypal-commerce-account-connected");history.pushState({},"",t)}t.length&&t.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault();let n=!1,a=null;const r=e.getAttribute("data-mode"),s=i.value,l={$el_container:e.closest("td.give-forminp"),removeErrors:()=>{const e=l.$el_container.querySelector(".paypal-message-template");e&&e.parentElement.remove()}},c={intialLabelWithIcon:null,enable:()=>{e.disabled=!1,t.target.innerHTML=c.intialLabelWithIcon},disable:()=>{null===c.intialLabelWithIcon&&(c.intialLabelWithIcon=t.target.innerHTML),e.disabled=!0,t.target.innerText=Give.fn.getGlobalVar("loader_translation").processing}},u=document.getElementById("give-paypal-onboarding-trouble-notice"),f=async()=>{const e=await fetch(ajaxurl+`?action=give_paypal_commerce_get_partner_url&countryCode=${s}&mode=${r}&accountType=${null!=a?a:"EXPRESS_CHECKOUT"}`),t=await e.json();if(!0===t.success){const e=document.querySelector("[data-paypal-button]");e.setAttribute("data-paypal-onboard-complete","live"===r?"giveLivePayPalOnBoardedCallback":"giveSandboxPayPalOnBoardedCallback"),e.href=`${t.data.partnerLink}&displayMode=minibrowser`,e.click()}else new o({modalContent:{title:(0,d.__)("Connect With PayPal","give"),desc:(0,d.__)("There was an issue retrieving a link to connect to PayPal. Please try again. If the issue continues please contact an administrator.","give")}}).render();c.enable()},p=`\n <div class="give-modal__description">\n <p class="welcome-text">Select account type for connection</p>\n <p>\n <label for="paypal_donations_connection_account_type_express_checkout">\n <input type="radio"\n name="paypal_donations_connection_account_type"\n id="paypal_donations_connection_account_type_express_checkout"\n value="EXPRESS_CHECKOUT"> ${(0,d.__)("Standard Card Processing","give")}\n </label>\n </p>\n <ul>\n <li><span class="icon"></span>${(0,d.__)("Accept Credit & Debit Cards","give")}</li>\n <li><span class="icon"></span>${(0,d.__)("Seller Protection","give")}</li>\n </ul>\n <p>\n <label for="paypal_donations_connection_account_type_ppcp">\n <input type="radio"\n name="paypal_donations_connection_account_type"\n id="paypal_donations_connection_account_type_ppcp"\n value="PPCP"> ${(0,d.__)("Advanced Card Processing","give")}\n </label>\n <span>${(0,d.__)("Requires Application Approval","give")}</span>\n </p>\n <ul class="flex2x2">\n <li><span class="icon"></span>${(0,d.__)("Accept Credit & Debit Cards","give")}</li>\n <li><span class="icon"></span>${(0,d.__)("Fraud Protection","give")}</li>\n <li><span class="icon"></span>${(0,d.__)("Seller Protection","give")}</li>\n <li><span class="icon"></span>${(0,d.__)("Chargeback Protection","give")}</li>\n </ul>\n <div class="give-field-description">\n <a href="https://docs.givewp.com/connection-comparison" target="_blank">\n ${(0,d.__)("Read more about the connection types","give")}\n </a>\n </div>\n </div>\n `.trim(),h=new Give.modal.GiveConfirmModal({classes:{modalWrapper:"givewp-paypal-commerce-connection-account-type-selection-modal"},modalContent:{title:(0,d.__)("PayPal Connection","give"),body:p},closeOnBgClick:!0,callbacks:{open:()=>{document.querySelector(".give-popup-confirm-button").disabled=!0,document.querySelectorAll('input[name="paypal_donations_connection_account_type"]').forEach((e=>{e.addEventListener("click",(function(){document.querySelector(".give-popup-confirm-button").disabled=!1}))}))},close:()=>{l.removeErrors(),n||(u&&u.remove(),c.enable())},afterClose:()=>{n&&f(),a=null,n=!1}},successConfirm:()=>{const e=document.querySelector('input[name="paypal_donations_connection_account_type"]:checked');e&&(a=e.value),n=givePayPalCommerce.accountTypes.includes(a)}});return l.removeErrors(),c.disable(),u&&u.remove(),givePayPalCommerce.countriesAvailableForAdvanceConnection.includes(s)?h.render():f(),(async()=>{const e=await fetch(ajaxurl+"?action=give_paypal_commerce_onboarding_trouble_notice"),t=await e.json();if(!0===t.success){function n(e){const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild}l.$el_container.querySelector(".connect-button-wrap").append(n(t.data))}})(),!1}))})),n.length&&n.forEach((function(e){e.addEventListener("click",(function(e){e.preventDefault();const t=e.target,n=t.closest("div.connect-button-wrap"),i=n.querySelector("div.connection-setting"),a=n.querySelector("div.disconnection-setting");let r=!1,s=!0,c='<div style="margin-bottom: 8px;"><input type="checkbox" id="keep_webhooks" name="keep_webhooks" checked /><label style="font-size: 14px;" for="keep_webhooks">'+givePayPalCommerce.translations.keepWebhooksAfterDisconnect+'</label></div><a style="font-size: 13px;margin-top: 200px" href="https://docs.givewp.com/pp-donations-webhooks" target="_blank">'+givePayPalCommerce.translations.keepWebhooksAfterDisconnectLearnMore+"</a>";return new l({modalContent:{title:givePayPalCommerce.translations.confirmPaypalAccountDisconnection,desc:givePayPalCommerce.translations.disconnectPayPalAccount,body:c},successConfirm:()=>r=!0,callbacks:{open:function(){document.querySelector("#keep_webhooks").addEventListener("change",(function(e){s=e.target.checked}))},afterClose:()=>(()=>{const e=new FormData,n={};r&&(e.append("action","give_paypal_commerce_disconnect_account"),e.append("mode",t.getAttribute("data-mode")),e.append("keep-webhooks",Boolean(s)),e.append("_ajax_nonce",t.getAttribute("data-nonce")),n.method="POST",n.body=e,fetch(ajaxurl,n).then((e=>e.json())).then((function(e){e.success?(i.classList.remove("give-hidden"),a.classList.add("give-hidden")):new o({modalContent:{desc:e.data.error}}).render()})))})()}}).render(),!1}))}))})),n(19334),b.modal=t;const{init:O,fn:P,cache:L,modal:z,notice:q}=b;window.Give={init:O,fn:P,cache:L,modal:z,notice:q,initializeIframeResize:function(e){return new y.iframeResize({log:!1,sizeWidth:!0,checkOrigin:[window.location.origin],heightCalculationMethod:"documentElementOffset",widthCalculationMethod:"documentElementOffset",onMessage:function(t){let n=e.parentElement;switch(e.parentElement.classList.contains("modal-content")&&(n=n.parentElement.parentElement),t.message.action){case"giveEmbedFormContentLoaded":const t=setTimeout((function(){clearTimeout(t),n.querySelector(".iframe-loader").style.opacity=0,n.querySelector(".iframe-loader").style.transition="opacity 0.2s ease",e.style.visibility="visible",e.style.minHeight="",n.style.height=null}),400);e.setAttribute("data-contentLoaded","1");break;case"giveScrollIframeInToView":e.scrollIntoView({behavior:"smooth",inline:"nearest"})}},onInit:function(){const t=e.parentElement;window.top.addEventListener("resize",(function(){e.style.width=window.top.innerWidth+"px"}));let n=!1;window.addEventListener("beforeunload",(function(){n=!0})),e.contentWindow.addEventListener("beforeunload",(function(){!1===n&&(e.scrollIntoView({behavior:"smooth",inline:"nearest"}),e.parentElement.querySelector(".iframe-loader").style.opacity=1,e.parentElement.querySelector(".iframe-loader").style.transition="",e.style.visibility="hidden",t.style.height="700px")})),e.iFrameResizer.sendMessage({currentPage:Give.fn.removeURLParameter(window.location.href,"giveDonationAction")})}},e)}}})()})();