sneakerboy.top
Open in
urlscan Pro
45.76.135.166
Public Scan
Submitted URL: http://sneakerboy.top/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js?ver=1.8.8.3
Effective URL: https://sneakerboy.top/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js?ver=1.8.8.3
Submission: On August 21 via api from US — Scanned from GB
Effective URL: https://sneakerboy.top/wp-content/plugins/wpforms-lite/assets/js/frontend/wpforms.min.js?ver=1.8.8.3
Submission: On August 21 via api from US — Scanned from GB
Form analysis
0 forms found in the DOMText Content
"use strict";var wpforms=window.wpforms||function(n,s,l){var p={cache:{},isUpdatingToken:!1,init:function(){l(p.ready),l(s).on("load",function(){"function"==typeof l.ready.then?l.ready.then(p.load):p.load()}),p.bindUIActions(),p.bindOptinMonster()},ready:function(){p.clearUrlQuery(),p.setUserIndentifier(),p.loadValidation(),p.loadDatePicker(),p.loadTimePicker(),p.loadInputMask(),p.loadSmartPhoneField(),p.loadPayments(),p.loadMailcheck(),p.loadChoicesJS(),p.initTokenUpdater(),l(".wpforms-randomize").each(function(){for(var e=l(this),t=e.children();t.length;)e.append(t.splice(Math.floor(Math.random()*t.length),1)[0])}),l(".wpforms-page-button").prop("disabled",!1),l(n).trigger("wpformsReady"),l(".wpforms-smart-phone-field").each(function(){var e=l(this);p.fixPhoneFieldSnippets(e)})},load:function(){},clearUrlQuery:function(){var e=s.location,t=e.search;-1!==t.indexOf("wpforms_form_id=")&&(t=t.replace(/([&?]wpforms_form_id=[0-9]*$|wpforms_form_id=[0-9]*&|[?&]wpforms_form_id=[0-9]*(?=#))/,""),history.replaceState({},null,e.origin+e.pathname+t))},loadValidation:function(){void 0!==l.fn.validate&&(l(".wpforms-input-temp-name").each(function(e,t){var r=Math.floor(9999*Math.random())+1;l(this).attr("name","wpf-temp-"+r)}),l(n).on("change",".wpforms-validate input[type=url]",function(){var e=l(this).val();if(!e)return!1;"http://"!==e.substr(0,7)&&"https://"!==e.substr(0,8)&&l(this).val("https://"+e)}),l.validator.messages.required=wpforms_settings.val_required,l.validator.messages.url=wpforms_settings.val_url,l.validator.messages.email=wpforms_settings.val_email,l.validator.messages.number=wpforms_settings.val_number,void 0!==l.fn.payment&&l.validator.addMethod("creditcard",function(e,t){e=l.payment.validateCardNumber(e);return this.optional(t)||e},wpforms_settings.val_creditcard),l.validator.addMethod("extension",function(e,t,r){return r="string"==typeof r?r.replace(/,/g,"|"):"png|jpe?g|gif",this.optional(t)||e.match(new RegExp("\\.("+r+")$","i"))},wpforms_settings.val_fileextension),l.validator.addMethod("maxsize",function(e,t,r){var a,o,i=r,r=this.optional(t);if(r)return r;if(t.files&&t.files.length)for(a=0,o=t.files.length;a<o;a++)if(t.files[a].size>i)return!1;return!0},wpforms_settings.val_filesize),l.validator.addMethod("step",function(e,t,r){i=r;const a=Math.floor(i)!==i&&i.toString().split(".")[1].length||0;function o(e){return Math.round(e*Math.pow(10,a))}var i=o(l(t).attr("min"));return e=o(e)-i,this.optional(t)||o(e)%o(r)==0}),l.validator.methods.email=function(e,t){return this.optional(t)||function(e){if("string"!=typeof e)return!1;var t=e.indexOf("@",1);if(e.length<6||254<e.length||-1===t)return!1;if(-1!==e.indexOf("@",t+1))return!1;var[t,e]=e.split("@");if(!t||!e)return!1;if(!/^[a-zA-Z0-9!#$%&'*+/=?^_`{|}~.-]+$/.test(t)||63<t.length)return!1;if(/\.{2,}/.test(e)||e.trim(" \t\n\r\0\v.")!==e)return!1;t=e.split(".");if(t.length<2)return!1;var r=/^[a-z0-9-]+$/i;for(const a of t)if(63<a.length||a.trim(" \t\n\r\0\v-")!==a||!r.test(a))return!1;return!0}(e)},l.validator.addMethod("restricted-email",function(e,t){var r=l(t);return!r.val().length||(r=r.closest(".wpforms-form").data("formid"),Object.prototype.hasOwnProperty.call(p.cache,r)&&Object.prototype.hasOwnProperty.call(p.cache[r],"restrictedEmailValidation")&&Object.prototype.hasOwnProperty.call(p.cache[r].restrictedEmailValidation,e)?p.cache[r].restrictedEmailValidation[e]:(p.restrictedEmailRequest(t,e),"pending"))},wpforms_settings.val_email_restricted),l.validator.addMethod("confirm",function(e,t,r){t=l(t).closest(".wpforms-field");return l(t.find("input")[0]).val()===l(t.find("input")[1]).val()},wpforms_settings.val_confirm),l.validator.addMethod("required-payment",function(e,t){return 0<p.amountSanitize(e)},wpforms_settings.val_requiredpayment),l.validator.addMethod("time12h",function(e,t){return this.optional(t)||/^((0?[1-9]|1[012])(:[0-5]\d){1,2}(\ ?[AP]M))$/i.test(e)},wpforms_settings.val_time12h),l.validator.addMethod("time24h",function(e,t){return this.optional(t)||/^(([0-1]?[0-9])|([2][0-3])):([0-5]?[0-9])(\ ?[AP]M)?$/i.test(e)},wpforms_settings.val_time24h),l.validator.addMethod("turnstile",function(e){return e},wpforms_settings.val_turnstile_fail_msg),l.validator.addMethod("time-limit",function(e,t){var t=l(t),r=t.data("min-time"),a=t.data("max-time"),t=t.prop("required");return void 0===r||!(t||!p.empty(e))||(p.compareTimesGreaterThan(a,r)?p.compareTimesGreaterThan(e,r)&&p.compareTimesGreaterThan(a,e):p.compareTimesGreaterThan(e,r)&&p.compareTimesGreaterThan(e,a)||p.compareTimesGreaterThan(r,e)&&p.compareTimesGreaterThan(a,e))},function(e,t){var t=l(t),r=t.data("min-time"),t=t.data("max-time"),r=r.replace(/^00:([0-9]{2})pm$/,"12:$1pm"),t=t.replace(/^00:([0-9]{2})pm$/,"12:$1pm");return r=r.replace(/(am|pm)/g," $1").toUpperCase(),t=t.replace(/(am|pm)/g," $1").toUpperCase(),wpforms_settings.val_time_limit.replace("{minTime}",r).replace("{maxTime}",t)}),l.validator.addMethod("check-limit",function(e,t){var t=l(t).closest("ul"),r=t.find('input[type="checkbox"]:checked'),t=parseInt(t.attr("data-choice-limit")||0,10);return 0===t||r.length<=t},function(e,t){t=parseInt(l(t).closest("ul").attr("data-choice-limit")||0,10);return wpforms_settings.val_checklimit.replace("{#}",t)}),void 0!==l.fn.intlTelInput&&l.validator.addMethod("smart-phone-field",function(e,t){return!e.match(/[^\d()\-+\s]/)&&(this.optional(t)||l(t).intlTelInput("isValidNumber"))},wpforms_settings.val_phone),l.validator.addMethod("inputmask-incomplete",function(e,t){return 0===e.length||void 0===l.fn.inputmask||l(t).inputmask("isComplete")},wpforms_settings.val_inputmask_incomplete),l.validator.addMethod("required-positive-number",function(e,t){return 0<p.amountSanitize(e)},wpforms_settings.val_number_positive),l.validator.addMethod("required-minimum-price",function(e,t,r){t=l(t);return""===e&&!t.hasClass("wpforms-field-required")||Number(p.amountSanitize(r))<=Number(p.amountSanitize(e))},wpforms_settings.val_minimum_price),l.validator.addMethod("us-phone-field",function(e,t){return!e.match(/[^\d()\-+\s]/)&&(this.optional(t)||10===e.replace(/[^\d]/g,"").length)},wpforms_settings.val_phone),l.validator.addMethod("int-phone-field",function(e,t){return!e.match(/[^\d()\-+\s]/)&&(this.optional(t)||0<e.replace(/[^\d]/g,"").length)},wpforms_settings.val_phone),l.validator.addMethod("password-strength",function(e,t){var r=l(t);return WPFormsPasswordField.passwordStrength(e,t)>=Number(r.data("password-strength-level"))},wpforms_settings.val_password_strength),l(".wpforms-validate").each(function(){var e=l(this),t=e.data("formid"),t=void 0!==s["wpforms_"+t]&&s["wpforms_"+t].hasOwnProperty("validate")?s["wpforms_"+t].validate:"undefined"!=typeof wpforms_validate?wpforms_validate:{errorElement:p.isModernMarkupEnabled()?"em":"label",errorClass:"wpforms-error",validClass:"wpforms-valid",ignore:":hidden:not(textarea.wp-editor-area), .wpforms-conditional-hide textarea.wp-editor-area",ignoreTitle:!0,errorPlacement(e,t){p.isLikertScaleField(t)?(t.closest("table").hasClass("single-row")?t.closest(".wpforms-field"):t.closest("tr").find("th")).append(e):p.isWrappedField(t)?t.closest(".wpforms-field").append(e):p.isDateTimeField(t)?p.dateTimeErrorPlacement(t,e):p.isFieldInColumn(t)||p.isFieldHasHint(t)?t.parent().append(e):p.isLeadFormsSelect(t)?t.parent().parent().append(e):t.hasClass("wp-editor-area")?t.parent().parent().parent().append(e):e.insertAfter(t),p.isModernMarkupEnabled()&&e.attr({role:"alert","aria-label":wpforms_settings.errorMessagePrefix,for:""})},highlight:function(e,t,r){var a=l(e),o=a.closest(".wpforms-field"),i=a.attr("name");("radio"===a.attr("type")||"checkbox"===a.attr("type")?o.find('input[name="'+i+'"]'):a).addClass(t).removeClass(r),"password"===a.attr("type")&&""===a.val().trim()&&s.WPFormsPasswordField&&a.data("rule-password-strength")&&a.hasClass("wpforms-field-required")&&WPFormsPasswordField.passwordStrength("",e),o.addClass("wpforms-has-error")},unhighlight:function(e,t,r){var e=l(e),a=e.closest(".wpforms-field"),o=e.attr("name");("radio"===e.attr("type")||"checkbox"===e.attr("type")?a.find('input[name="'+o+'"]'):e).addClass(r).removeClass(t),a.find(":input.wpforms-error,[data-dz-errormessage]:not(:empty)").length||a.removeClass("wpforms-has-error"),p.isModernMarkupEnabled()&&e.parent().find("em.wpforms-error").remove()},submitHandler:function(n){function s(e,t){let r="label",a="";p.isModernMarkupEnabled()&&(r="em",a='role="alert"');var o=`<${r} id="wpforms-field_recaptcha-error" class="wpforms-error" ${a}> ${wpforms_settings.val_recaptcha_fail_msg}</${r}>`;e.find(".wpforms-recaptcha-container").append(o),p.restoreSubmitButton(e,t)}function e(){const e=l(n),t=e.closest(".wpforms-container"),r=e.find(".wpforms-submit"),a=r.data("captchaInvalid"),o=r.data("alt-text"),i=r.get(0).recaptchaID;return e.data("token")&&0===l(".wpforms-token",e).length&&l('<input type="hidden" class="wpforms-token" name="wpforms[token]" />').val(e.data("token")).appendTo(e),e.find("#wpforms-field_recaptcha-error").remove(),r.prop("disabled",!0),WPFormsUtils.triggerEvent(e,"wpformsFormSubmitButtonDisable",[e,r]),o&&r.text(o),a?s(e,t):p.empty(i)&&0!==i?(l(".wpforms-input-temp-name").removeAttr("name"),void p.formSubmit(e)):(grecaptcha.execute(i).then(null,function(){grecaptcha.getResponse()||s(e,t)}),!1)}return"function"==typeof wpformsRecaptchaV3Execute?wpformsRecaptchaV3Execute(e):e()},invalidHandler:function(e,t){void 0!==t.errorList[0]&&p.scrollToError(l(t.errorList[0].element))},onkeyup:WPFormsUtils.debounce(function(e,t){l(e).hasClass("wpforms-novalidate-onkeyup")||9===t.which&&""===this.elementValue(e)||-1!==l.inArray(t.keyCode,[16,17,18,20,35,36,37,38,39,40,45,144,225])||(e.name in this.submitted||e.name in this.invalid)&&this.element(e)},1e3),onfocusout:function(e){var t=!1;l(e).hasClass("wpforms-novalidate-onkeyup")&&!e.value&&(t=!0),(t=this.checkable(e)||!(e.name in this.submitted)&&this.optional(e)?t:!0)&&this.element(e)},onclick:function(e){var t=!1,r=(e||{}).type,a=l(e);-1<["checkbox","radio"].indexOf(r)&&((a=a.hasClass("wpforms-likert-scale-option")?a.closest("tr"):a.closest(".wpforms-field")).find("label.wpforms-error, em.wpforms-error").remove(),t=!0),t&&this.element(e)}};e.validate(t)}))},restrictedEmailRequest(r,a){var e=l(r),t=e.closest("form");const o=t.data("validator"),i=t.data("formid");t=e.closest(".wpforms-field").data("field-id");p.cache[i]=p.cache[i]||{},o.startRequest(r),l.post({url:wpforms_settings.ajaxurl,type:"post",data:{action:"wpforms_restricted_email",form_id:i,field_id:t,email:a},dataType:"json",success(e){var t={},e=e.success&&e.data;e||(t[r.name]=wpforms_settings.val_email_restricted,o.showErrors(t)),p.cache[i].restrictedEmailValidation=p.cache[i].restrictedEmailValidation||[],Object.prototype.hasOwnProperty.call(p.cache[i].restrictedEmailValidation,a)||(p.cache[i].restrictedEmailValidation[a]=e),o.stopRequest(r,e)}})},isFieldInColumn(e){return e.parent().hasClass("wpforms-one-half")||e.parent().hasClass("wpforms-two-fifths")||e.parent().hasClass("wpforms-one-fifth")},isFieldHasHint:function(e){return 0<e.nextAll(".wpforms-field-sublabel, .wpforms-field-description, .wpforms-field-limit-text, .wpforms-pass-strength-result").length},isDateTimeField:function(e){return e.hasClass("wpforms-timepicker")||e.hasClass("wpforms-datepicker")||e.is("select")&&e.attr("class").match(/date-month|date-day|date-year/)},isWrappedField:function(e){return"checkbox"===e.attr("type")||"radio"===e.attr("type")||"range"===e.attr("type")||"select"===e.is("select")||1===e.data("is-wrapped-field")||e.parent().hasClass("iti")||e.hasClass("wpforms-validation-group-member")||e.hasClass("choicesjs-select")||e.hasClass("wpforms-net-promoter-score-option")||e.hasClass("wpforms-field-payment-coupon-input")},isLikertScaleField(e){return e.hasClass("wpforms-likert-scale-option")},isLeadFormsSelect:function(e){return e.parent().hasClass("wpforms-lead-forms-select")},isCoupon(e){return console.warn('WARNING! Function "wpforms.isCoupon( element )" has been deprecated'),e.closest(".wpforms-field").hasClass("wpforms-field-payment-coupon")},dateTimeErrorPlacement:function(e,t){var r=e.closest(".wpforms-field-row-block, .wpforms-field-date-time");r.length?r.find("label.wpforms-error, em.wpforms-error").length||r.append(t):e.closest(".wpforms-field").append(t)},loadDatePicker:function(){void 0!==l.fn.flatpickr&&l(".wpforms-datepicker-wrap").each(function(){var a=l(this),e=a.find("input"),t=a.closest(".wpforms-form").data("formid"),r=a.closest(".wpforms-field").data("field-id"),r=void 0!==s["wpforms_"+t+"_"+r]&&s["wpforms_"+t+"_"+r].hasOwnProperty("datepicker")?s["wpforms_"+t+"_"+r].datepicker:void 0!==s["wpforms_"+t]&&s["wpforms_"+t].hasOwnProperty("datepicker")?s["wpforms_"+t].datepicker:"undefined"!=typeof wpforms_datepicker?wpforms_datepicker:{disableMobile:!0},o=(!r.hasOwnProperty("locale")&&"undefined"!=typeof wpforms_settings&&wpforms_settings.hasOwnProperty("locale")&&(r.locale=wpforms_settings.locale),r.wrap=!0,r.dateFormat=e.data("date-format"),1===e.data("disable-past-dates")&&(r.minDate="today"),e.data("limit-days")),i=["sun","mon","tue","wed","thu","fri","sat"];o&&""!==o&&(o=o.split(","),r.disable=[function(e){for(var t in o)if(i.indexOf(o[t])===e.getDay())return!1;return!0}]),r.onChange=function(e,t,r){t=""===t?"none":"block";a.find(".wpforms-datepicker-clear").css("display",t)},a.flatpickr(r)})},loadTimePicker:function(){void 0!==l.fn.timepicker&&l(".wpforms-timepicker").each(function(){var e=l(this),t=e.closest(".wpforms-form").data("formid"),r=e.closest(".wpforms-field").data("field-id"),r=void 0!==s["wpforms_"+t+"_"+r]&&s["wpforms_"+t+"_"+r].hasOwnProperty("timepicker")?s["wpforms_"+t+"_"+r].timepicker:void 0!==s["wpforms_"+t]&&s["wpforms_"+t].hasOwnProperty("timepicker")?s["wpforms_"+t].timepicker:"undefined"!=typeof wpforms_timepicker?wpforms_timepicker:{scrollDefault:"now",forceRoundTime:!0},t=e.val();e.timepicker(r),t&&(e.val(t),e.trigger("changeTime"))})},loadInputMask:function(){void 0!==l.fn.inputmask&&l(".wpforms-masked-input").inputmask({rightAlign:!1})},fixPhoneFieldSnippets(t){t.siblings('input[type="hidden"]').each(function(){var e;l(this).attr("name").includes("function")&&(e=(e=t.data("plugin_intlTelInput")).d||e.options)&&(t.intlTelInput("destroy"),e.initialCountry=e.initialCountry.toLowerCase(),e.onlyCountries=e.onlyCountries.map(e=>e.toLowerCase()),e.preferredCountries=e.preferredCountries.map(e=>e.toLowerCase()),t.intlTelInput(e),t.siblings('input[type="hidden"]').each(function(){var e=l(this);e.attr("name",e.attr("name").replace("wpf-temp-",""))}))})},loadSmartPhoneField:function(){if(void 0!==l.fn.intlTelInput){const a={countrySearch:!1,fixDropdownWidth:!1,preferredCountries:["us","gb"]};var e,t;wpforms_settings.gdpr||(a.geoIpLookup=p.currentIpToCountry),wpforms_settings.gdpr&&(e=this.getFirstBrowserLanguage(),t=-1<e.indexOf("-")?e.split("-").pop():""),t=t&&(s.intlTelInputGlobals.getCountryData().filter(function(e){return e.iso2===t.toLowerCase()}).length?t:""),a.initialCountry=wpforms_settings.gdpr&&t?t.toLowerCase():"auto",l(".wpforms-smart-phone-field").each(function(e,t){const r=l(t);if(r.parents(".elementor-location-popup").is(":hidden"))return!1;a.hiddenInput=function(e){return{phone:e}},a.utilsScript=wpforms_settings.wpforms_plugin_url+"assets/pro/lib/intl-tel-input/jquery.intl-tel-input-utils.min.js",r.intlTelInput(a),r.attr("name","wpf-temp-"+r.attr("name")),r.addClass("wpforms-input-temp-name"),r.on("blur input",function(){!r.intlTelInput("isValidNumber")&&p.empty(s.WPFormsEditEntry)||r.siblings('input[type="hidden"]').val(r.intlTelInput("getNumber"))})}),l(".wpforms-form").on("wpformsBeforeFormSubmit",function(){l(this).find(".wpforms-smart-phone-field").trigger("input")})}},loadPayments:function(){l(".wpforms-payment-total").each(function(e,t){p.amountTotal(this)}),void 0!==l.fn.payment&&(l(".wpforms-field-credit-card-cardnumber").payment("formatCardNumber"),l(".wpforms-field-credit-card-cardcvc").payment("formatCardCVC"))},loadMailcheck(){wpforms_settings.mailcheck_enabled&&void 0!==l.fn.mailcheck&&(0<wpforms_settings.mailcheck_domains.length&&(Mailcheck.defaultDomains=Mailcheck.defaultDomains.concat(wpforms_settings.mailcheck_domains)),0<wpforms_settings.mailcheck_toplevel_domains.length&&(Mailcheck.defaultTopLevelDomains=Mailcheck.defaultTopLevelDomains.concat(wpforms_settings.mailcheck_toplevel_domains)),l(n).on("blur",".wpforms-field-email input",function(){const e=l(this),o=e.attr("id");e.mailcheck({suggested(e,t){t.full=t.full.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.address=t.address.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.domain=t.domain.replace(/%(?![0-9][0-9a-fA-F]+)/g,"%25"),t.address.match(/^xn--/)&&(t.full=punycode.toUnicode(decodeURI(t.full)),r=t.full.split("@"),t.address=r[0],t.domain=r[1]),t.domain.match(/^xn--/)&&(t.domain=punycode.toUnicode(decodeURI(t.domain)));var r=decodeURI(t.address).replaceAll(/[<>'"()/\\|:;=@%&\s]/gi,"").substr(0,64),a=decodeURI(t.domain).replaceAll(/[<>'"()/\\|:;=@%&+_\s]/gi,"");t='<a href="#" class="mailcheck-suggestion" data-id="'+o+'" title="'+wpforms_settings.val_email_suggestion_title+'">'+r+"@"+a+"</a>",t=wpforms_settings.val_email_suggestion.replace("{suggestion}",t),e.closest(".wpforms-field").find("#"+o+"_suggestion").remove(),e.parent().append('<label class="wpforms-error mailcheck-error" id="'+o+'_suggestion">'+t+"</label>")},empty(){l("#"+o+"_suggestion").remove()}})}),l(n).on("click",".wpforms-field-email .mailcheck-suggestion",function(e){var t=l(this),r=t.closest(".wpforms-field"),a=t.data("id");e.preventDefault(),r.find("#"+a).val(t.text()),t.parent().remove()}))},loadChoicesJS:function(){"function"==typeof s.Choices&&(l(".wpforms-field-select-style-modern .choicesjs-select, .wpforms-field-payment-select .choicesjs-select").each(function(e,t){var r,a,o;l(t).data("choicesjs")||(r=s.wpforms_choicesjs_config||{},a=l(t).data("search-enabled"),o=l(t).data("remove-items-enabled"),r.searchEnabled=void 0===a||a,r.removeItems=void 0===o||o,r.removeItemButton=r.removeItems,r.callbackOnInit=function(){const t=this,r=l(t.passedElement.element),a=l(t.input.element),e=r.data("size-class");r.removeAttr("hidden").addClass(t.config.classNames.input+"--hidden"),e&&l(t.containerOuter.element).addClass(e),r.prop("multiple")&&(a.data("placeholder",a.attr("placeholder")),t.getValue(!0).length)&&a.removeAttr("placeholder"),r.on("change",function(){var e;r.prop("multiple")&&(t.getValue(!0).length?a.removeAttr("placeholder"):a.attr("placeholder",a.data("placeholder"))),(e=r.closest("form").data("validator"))&&e.element(r)})},r.callbackOnCreateTemplates=function(){var r=l(this.passedElement.element);return{option:function(e){var t=Choices.defaults.templates.option.call(this,e);return void 0!==e.placeholder&&!0===e.placeholder&&t.classList.add("placeholder"),r.hasClass("wpforms-payment-price")&&void 0!==e.customProperties&&null!==e.customProperties&&(t.dataset.amount=e.customProperties),t}}},l(t).data("choicesjs",new Choices(t,r)))}),l(n).on("click",".choices",function(e){var t=l(this),r=t.find("select").data("choicesjs");r&&t.hasClass("is-open")&&(e.target.classList.contains("choices__inner")||e.target.classList.contains("choices__arrow"))&&r.hideDropdown()}))},bindUIActions:function(){var e=l(n);e.on("click",".wpforms-page-button",function(e){e.preventDefault(),p.pagebreakNav(this)}),e.on("change input",".wpforms-payment-price",function(){p.amountTotal(this,!0)}),e.on("change input","select.wpforms-payment-quantity",function(){p.amountTotal(this,!0),p.updateOrderSummaryItemQuantity(l(this))}),e.on("input",".wpforms-payment-user-input",function(){var e=l(this),t=e.val();e.val(t.replace(/[^0-9.,]/g,""))}),e.on("focusout",".wpforms-payment-user-input",function(){var e=l(this),t=e.val();if(!t)return t;t=p.amountSanitize(t),t=p.amountFormat(t);e.val(t)}),e.on("wpformsProcessConditionals",function(e,t){p.amountTotal(t,!0)}),e.on("wpformsProcessConditionalsField",function(e,t,r){p.updateOrderSummaryItems(l("#wpforms-form-"+t),l(`#wpforms-${t}-field_`+r),"")}),e.on("mouseenter",".wpforms-field-rating-item",function(){l(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),l(this).prevAll().addBack().addClass("hover")}).on("mouseleave",".wpforms-field-rating-item",function(){l(this).parent().find(".wpforms-field-rating-item").removeClass("selected hover"),l(this).parent().find("input:checked").parent().prevAll().addBack().addClass("selected")}),l(n).on("change",".wpforms-field-rating-item input",function(){var e=l(this),t=e.closest(".wpforms-field-rating-items").find(".wpforms-field-rating-item");e.focus(),t.removeClass("hover selected"),e.parent().prevAll().addBack().addClass("selected")}),l(function(){l(".wpforms-field-rating-item input:checked").trigger("change")}),e.on("keydown",".wpforms-image-choices-item label",function(e){var t=l(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;32===e.keyCode&&(t.find("input").trigger("click"),e.preventDefault())}),s.document.documentMode&&e.on("click",".wpforms-image-choices-item img",function(){l(this).closest("label").find("input").trigger("click")}),e.on("change",".wpforms-field-checkbox input, .wpforms-field-radio input, .wpforms-field-payment-multiple input, .wpforms-field-payment-checkbox input, .wpforms-field-gdpr-checkbox input",function(e){var t=l(this);if(t.closest(".wpforms-field").hasClass("wpforms-conditional-hide"))return e.preventDefault(),!1;switch(t.attr("type")){case"radio":t.closest("ul").find("li").removeClass("wpforms-selected").find("input[type=radio]").removeProp("checked"),t.prop("checked",!0).closest("li").addClass("wpforms-selected");break;case"checkbox":t.is(":checked")?(t.closest("li").addClass("wpforms-selected"),t.prop("checked",!0)):(t.closest("li").removeClass("wpforms-selected"),t.prop("checked",!1))}}),e.on("input",".wpforms-field-file-upload",function(){var e=l(this),t=e.closest("form.wpforms-form").find('.wpforms-field-file-upload input:not(".dropzone-input")'),a=0,r=Number(wpforms_settings.post_max_size),o='<div class="wpforms-error-container-post_max_size">'+wpforms_settings.val_post_max_size+"</div>",e=e.closest("form.wpforms-form").find(".wpforms-submit-container"),i=e.find("button.wpforms-submit"),n=e.prev(),s=i.closest("form"),p=s.find(".wpforms-page-next:visible");0!==s.find(".wpforms-page-indicator").length&&0!==p.length&&(i=p),t.each(function(){for(var e=l(this),t=0,r=e[0].files.length;t<r;t++)a+=e[0].files[t].size}),a<r?(n.find(".wpforms-error-container-post_max_size").remove(),i.prop("disabled",!1),WPFormsUtils.triggerEvent(s,"wpformsFormSubmitButtonRestore",[s,i]),WPFormsUtils.triggerEvent(s,"wpformsCombinedUploadsSizeOk",[s,n])):(a=Number((a/1048576).toFixed(3)),r=Number((r/1048576).toFixed(3)),o=o.replace(/{totalSize}/,a).replace(/{maxSize}/,r),n.hasClass("wpforms-error-container")?(n.find(".wpforms-error-container-post_max_size").remove(),n.append(o)):(e.before('<div class="wpforms-error-container">{errorMsg}</div>'.replace(/{errorMsg}/,o)),n=e.prev()),i.prop("disabled",!0),WPFormsUtils.triggerEvent(s,"wpformsFormSubmitButtonDisable",[s,i]),WPFormsUtils.triggerEvent(s,"wpformsCombinedUploadsSizeError",[s,n]))}),e.on("change input",".wpforms-field-number-slider input[type=range]",function(e){var t=l(e.target).siblings(".wpforms-field-number-slider-hint");t.html(t.data("hint").replaceAll("{value}","<b>"+e.target.value+"</b>"))}),e.on("keydown",".wpforms-form input",function(e){var t,r;13!==e.keyCode||0===(r=(t=l(this)).closest(".wpforms-page")).length||["text","tel","number","email","url","radio","checkbox"].indexOf(t.attr("type"))<0||(t.hasClass("wpforms-datepicker")&&t.flatpickr("close"),e.preventDefault(),(r.hasClass("last")?r.closest(".wpforms-form").find(".wpforms-submit"):r.find(".wpforms-page-next")).trigger("click"))}),e.on("keypress",".wpforms-field-number input",function(e){return/^[-0-9.]+$/.test(String.fromCharCode(e.keyCode||e.which))}),e.one("input",".wpforms-field input, .wpforms-field textarea, .wpforms-field select",p.formChanged).one("change",".wpforms-field-select-style-modern, .wpforms-timepicker",p.formChanged).one("focus",".dropzone-input",p.formChanged).one("click touchstart",".wpforms-signature-canvas",p.formChanged).one("wpformsRichTextContentChange",p.richTextContentChanged),l("form.wpforms-form").on("wpformsBeforePageChange",p.skipEmptyPages)},skipEmptyPages(e,t,r,a){var o=p.findNonEmptyPage(t,r,a);o!==t&&(e.preventDefault(),1===o&&"prev"===a?(e=r.find(".wpforms-page-2"),a=r.find(".wpforms-page-"+t),t=(e.find(".wpforms-page-prev").length?e:a).find(".wpforms-page-prev"),wpforms.navigateToPage(t,"prev",2,r,e)):(t=r.find(".wpforms-page-"+(a=o-1)),wpforms.navigateToPage(t.find(".wpforms-page-next"),"next",a,r,t)))},findNonEmptyPage(e,t,r){let a=e;for(;p.isEmptyPage(t,a);)"prev"===r?a--:a++;return a},isEmptyPage(e,t){return 1!==t&&!(e=e.find(".wpforms-page-"+t)).hasClass("last")&&(t=e.find(".wpforms-field:not(.wpforms-field-pagebreak):not(.wpforms-field-hidden)"),e.find(".wpforms-conditional-hide").length===t.length)},formChanged:function(e){var t=l(this).closest(".wpforms-form");p.maybeSetStartTime(t)},richTextContentChanged:function(e,t,r){r=r.getContainer(),r=l(r).closest(".wpforms-form");p.maybeSetStartTime(r)},maybeSetStartTime:function(e){e.data("timestamp")||(e.hasClass("wpforms-ajax-form")&&"undefined"!=typeof FormData?e.data("timestamp",Date.now()):e.append('<input type="hidden" name="start_timestamp" value="'+Date.now()+'">'))},entryPreviewFieldPageChange:function(e,t,r){console.warn("WARNING! Obsolete function called. Function wpforms.entryPreviewFieldPageChange has been deprecated, please use the WPFormsEntryPreview.pageChange function instead!"),WPFormsEntryPreview.pageChange(e,t,r)},entryPreviewFieldUpdate:function(e,t){console.warn("WARNING! Obsolete function called. Function wpforms.entryPreviewFieldUpdate has been deprecated, please use the WPFormsEntryPreview.update function instead!"),WPFormsEntryPreview.update(e,t)},scrollToError:function(e){var t,r;0!==e.length&&0!==(t=0===(t=e.find(".wpforms-field.wpforms-has-error")).length?e.closest(".wpforms-field"):t).length&&void 0!==(r=t.offset())&&p.animateScrollTop(r.top-75,750).done(function(){var e=t.find(".wpforms-error").first();"function"==typeof e.focus&&e.trigger("focus")})},pagebreakNav:function(e){const t=l(e),r=t.data("action"),a=t.data("page"),o=t.closest(".wpforms-form"),i=o.find(".wpforms-page-"+a);p.saveTinyMCE(),"next"===r&&void 0!==l.fn.validate?p.checkForInvalidFields(o,i,function(){p.navigateToPage(t,r,a,o,i)}):"prev"!==r&&"next"!==r||p.navigateToPage(t,r,a,o,i)},checkForInvalidFields:function(e,t,r){var a=e.data("validator");if(a)if(0<a.pendingRequest)setTimeout(function(){p.checkForInvalidFields(e,t,r)},800);else{let a=!0;t.find(":input").each(function(e,t){var r=l(t);!r.attr("name")||r.hasClass("wpforms-field-skip-validation")||l(t).valid()||(a=!1)}),a?r():p.scrollToError(t)}},navigateToPage:function(t,r,a,o,e){if(!t.hasClass("wpforms-disabled")){let e=a;"next"===r?e+=1:"prev"===r&&--e,WPFormsUtils.triggerEvent(t,"wpformsBeforePageChange",[e,o,r]).isDefaultPrevented()||(o.find(".wpforms-page").hide(),(a=o.find(".wpforms-page-"+e)).show(),p.toggleReCaptchaAndSubmitDisplay(o,r,a),(a=p.getPageScroll(o))&&p.animateScrollTop(o.offset().top-a,750,null),t.trigger("wpformsPageChange",[e,o,r]),p.manipulateIndicator(e,o))}},toggleReCaptchaAndSubmitDisplay:function(e,t,r){var a=e.find(".wpforms-submit-container"),e=e.find(".wpforms-recaptcha-container");"next"===t&&r.hasClass("last")?(e.show(),a.show()):"prev"===t&&(e.hide(),a.hide())},getPageScroll:function(e){return!1!==s.wpforms_pageScroll&&(p.empty(s.wpform_pageScroll)?0!==e.find(".wpforms-page-indicator").data("scroll")&&75:s.wpform_pageScroll)},manipulateIndicator:function(e,t){var r,a=t.find(".wpforms-page-indicator");a&&("connector"===(r=a.data("indicator"))||"circles"===r?p.manipulateConnectorAndCirclesIndicator(a,r,e):"progress"===r&&p.manipulateProgressIndicator(a,t,e))},manipulateConnectorAndCirclesIndicator:function(e,t,r){var a=e.data("indicator-color");e.find(".wpforms-page-indicator-page").removeClass("active"),e.find(".wpforms-page-indicator-page-"+r).addClass("active"),e.find(".wpforms-page-indicator-page-number").removeAttr("style"),e.find(".active .wpforms-page-indicator-page-number").css("background-color",a),"connector"===t&&(e.find(".wpforms-page-indicator-page-triangle").removeAttr("style"),e.find(".active .wpforms-page-indicator-page-triangle").css("border-top-color",a))},manipulateProgressIndicator:function(e,t,r){var a=e.find(".wpforms-page-indicator-page-title"),o=e.find(".wpforms-page-indicator-page-title-sep"),t=r/t.find(".wpforms-page").length*100;e.find(".wpforms-page-indicator-page-progress").css("width",t+"%"),e.find(".wpforms-page-indicator-steps-current").text(r),a.data("page-"+r+"-title")?(a.css("display","inline").text(a.data("page-"+r+"-title")),o.css("display","inline")):(a.css("display","none"),o.css("display","none"))},bindOptinMonster:function(){n.addEventListener("om.Campaign.load",function(e){p.ready(),p.optinMonsterRecaptchaReset(e.detail.Campaign.data.id)}),l(n).on("OptinMonsterOnShow",function(e,t,r){p.ready(),p.optinMonsterRecaptchaReset(t.optin)})},optinMonsterRecaptchaReset:function(e){var t,r,e=l("#om-"+e).find(".wpforms-form"),a=e.find(".wpforms-recaptcha-container"),o=e.find(".g-recaptcha");e.length&&o.length&&(e=o.attr("data-sitekey"),t="recaptcha-"+Date.now(),r=a.hasClass("wpforms-is-hcaptcha")?hcaptcha:grecaptcha,o.remove(),a.prepend('<div class="g-recaptcha" id="'+t+'" data-sitekey="'+e+'"></div>'),r.render(t,{sitekey:e,callback:function(){wpformsRecaptchaCallback(l("#"+t))}}))},amountTotal(e,t){t=t||!1;const r=l(e).closest(".wpforms-form"),a=p.amountTotalCalc(r),o=p.amountFormatSymbol(a);r.find(".wpforms-payment-total").each(function(){"hidden"===l(this).attr("type")||"text"===l(this).attr("type")?(l(this).val(o),"text"===l(this).attr("type")&&t&&r.data("validator")&&l(this).valid()):l(this).text(o)}),p.updateOrderSummaryItems(r,l(e),o)},updateOrderSummaryItems(t,r,a){t.find(".wpforms-order-summary-preview").each(function(){const e=l(this);""!==a&&e.find(".wpforms-order-summary-preview-total .wpforms-order-summary-item-price").text(a),r.hasClass("wpforms-payment-total")?t.find(".wpforms-payment-price").each(function(){p.updateOrderSummaryItem(l(this),e)}):p.updateOrderSummaryItem(r,e)})},updateOrderSummaryItem(e,t){if(e.hasClass("wpforms-payment-price")){const o=e.closest(".wpforms-field"),i=o.data("field-id"),n=e.prop("type");var r,a;"checkbox"===n?t.find(`tr[data-field="${i}"][data-choice="${e.val()}"]`).toggle(e.is(":checked")):"radio"===n||"select-one"===n?t.find(`tr[data-field="${i}"]`).each(function(){var e=l(this).data("choice");"radio"===n?l(this).toggle(o.find(`input[value="${e}"]`).is(":checked")):l(this).toggle(e===parseInt(o.find("select").val(),10))}):(r=t.find(`tr[data-field="${i}"]`),a=e.val(),r.find(".wpforms-order-summary-item-price").text(p.amountFormatSymbol(a)),r.toggle("block"===o.css("display"))),o.hasClass("wpforms-payment-quantities-enabled")?p.updateOrderSummaryItemQuantity(e):(p.updateSummaryPriceWidth(t),p.toggleSummaryPlaceholder(t))}},updateOrderSummaryItemQuantity(e){const t=e.closest(".wpforms-field"),a=t.find("input.wpforms-payment-price, select.wpforms-payment-price"),r=e.closest(".wpforms-form"),o=t.data("field-id"),i=p.getPaymentFieldQuantity(a),n=p.getPaymentFieldAmount(a),s=a.prop("type");r.find(".wpforms-order-summary-preview").each(function(){var e,t=l(this);let r;(r="checkbox"===s||"radio"===s||"select-one"===s?(e=a.val(),t.find(`tr[data-field="${o}"][data-choice="${e}"]`)):t.find(`tr[data-field="${o}"]`)).toggle(0<i),r.find(".wpforms-order-summary-item-quantity").text(i),r.find(".wpforms-order-summary-item-price").text(p.amountFormatSymbol(n*i)),p.updateSummaryPriceWidth(t),p.toggleSummaryPlaceholder(t)})},updateSummaryPriceWidth(e){var t=Math.max(e.find(".wpforms-order-summary-preview-coupon-total .wpforms-order-summary-item-price").text().length,e.find(".wpforms-order-summary-preview-total .wpforms-order-summary-item-price").text().length+3);e.find(".wpforms-order-summary-item-price").css("width",t+"ch")},toggleSummaryPlaceholder(e){var t=e.find(".wpforms-order-summary-placeholder");let r=!0;e.find(".wpforms-order-summary-field").each(function(){if("none"!==l(this).css("display"))return r=!1}),t.toggle(r)},amountTotalCalc(e){let r=0;l(".wpforms-payment-price",e).each(function(){var e,t=l(this);t.closest(".wpforms-field-payment-single").hasClass("wpforms-conditional-hide")||(e=p.getPaymentFieldAmount(t))&&(r=Number(r)+e*p.getPaymentFieldQuantity(t))});var t=l(n),a=WPFormsUtils.triggerEvent(t,"wpformsAmountTotalCalculate",[e,r]);return r=void 0!==a.result&&0<=a.result?a.result:r,WPFormsUtils.triggerEvent(t,"wpformsAmountTotalCalculated",[e,r]),r},getPaymentFieldAmount(e){var t=e.attr("type");return"text"===t||"hidden"===t?Number(p.amountSanitize(e.val())):"radio"!==t&&"checkbox"!==t||!e.is(":checked")?e.is("select")&&0<e.find("option:selected").length&&e.find("option:selected").data("amount")?Number(p.amountSanitize(e.find("option:selected").data("amount"))):0:Number(p.amountSanitize(e.data("amount")))},getPaymentFieldQuantity(e){e=e.attr("id"),e=l(`#${e}-quantity`);return e.length?Number(e.val()):1},amountSanitize(e){var t=p.getCurrency();return e=e.toString().replace(/[^0-9.,]/g,""),","===t.decimal_sep?("."===t.thousands_sep&&-1!==e.indexOf(t.thousands_sep)?e=e.replace(new RegExp("\\"+t.thousands_sep,"g"),""):""===t.thousands_sep&&-1!==e.indexOf(".")&&(e=e.replace(/\./g,"")),e=e.replace(t.decimal_sep,".")):","===t.thousands_sep&&-1!==e.indexOf(t.thousands_sep)&&(e=e.replace(new RegExp("\\"+t.thousands_sep,"g"),"")),p.numberFormat(e,t.decimals,".","")},amountFormat(e){var t,r=p.getCurrency();return e=String(e),","===r.decimal_sep&&-1!==e.indexOf(r.decimal_sep)&&(t=e.indexOf(r.decimal_sep),e=e.substr(0,t)+"."+e.substr(t+1,e.length-1)),","===r.thousands_sep&&-1!==e.indexOf(r.thousands_sep)&&(e=e.replace(/,/g,"")),p.empty(e)&&(e=0),p.numberFormat(e,r.decimals,r.decimal_sep,r.thousands_sep)},amountFormatSymbol(e){var t=p.getCurrency(),e=p.amountFormat(e);return"left"===t.symbol_pos?t.symbol+e:e+" "+t.symbol},getCurrency(){var e={code:"USD",thousands_sep:",",decimals:2,decimal_sep:".",symbol:"$",symbol_pos:"left"};return void 0!==wpforms_settings.currency_code&&(e.code=wpforms_settings.currency_code),void 0!==wpforms_settings.currency_thousands&&(e.thousands_sep=wpforms_settings.currency_thousands),void 0!==wpforms_settings.currency_decimals&&(e.decimals=wpforms_settings.currency_decimals),void 0!==wpforms_settings.currency_decimal&&(e.decimal_sep=wpforms_settings.currency_decimal),void 0!==wpforms_settings.currency_symbol&&(e.symbol=wpforms_settings.currency_symbol),void 0!==wpforms_settings.currency_symbol_pos&&(e.symbol_pos=wpforms_settings.currency_symbol_pos),e},numberFormat:function(e,t,r,a){e=(e+"").replace(/[^0-9+\-Ee.]/g,"");var o,i,e=isFinite(+e)?+e:0,t=isFinite(+t)?Math.abs(t):0,a=void 0===a?",":a,r=void 0===r?".":r,n=(t?(n=e,o=t,i=Math.pow(10,o),""+(Math.round(n*i)/i).toFixed(o)):""+Math.round(e)).split(".");return 3<n[0].length&&(n[0]=n[0].replace(/\B(?=(?:\d{3})+(?!\d))/g,a)),(n[1]||"").length<t&&(n[1]=n[1]||"",n[1]+=new Array(t-n[1].length+1).join("0")),n.join(r)},empty:function(e){for(var t,r=[void 0,null,!1,0,"","0"],a=0,o=r.length;a<o;a++)if(e===r[a])return!0;if("object"!=typeof e)return!1;for(t in e)if(e.hasOwnProperty(t))return!1;return!0},setUserIndentifier:function(){if((!s.hasRequiredConsent&&"undefined"!=typeof wpforms_settings&&wpforms_settings.uuid_cookie||s.hasRequiredConsent&&s.hasRequiredConsent())&&!p.getCookie("_wpfuuid")){for(var e,t=new Array(36),r="0123456789abcdef",a=0;a<36;a++)t[a]=r.substr(Math.floor(16*Math.random()),1);t[14]="4",t[19]=r.substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",e=t.join(""),p.createCookie("_wpfuuid",e,3999)}},createCookie:function(e,t,r){var a,o="",i="";wpforms_settings.is_ssl&&(i=";secure"),o=r?"-1"===r?"":((a=new Date).setTime(a.getTime()+24*r*60*60*1e3),";expires="+a.toGMTString()):";expires=Thu, 01 Jan 1970 00:00:01 GMT",n.cookie=e+"="+t+o+";path=/;samesite=strict"+i},getCookie:function(e){for(var t=e+"=",r=n.cookie.split(";"),a=0;a<r.length;a++){for(var o=r[a];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},removeCookie:function(e){p.createCookie(e,"",-1)},getFirstBrowserLanguage:function(){var e,t,r=s.navigator,a=["language","browserLanguage","systemLanguage","userLanguage"];if(Array.isArray(r.languages))for(e=0;e<r.languages.length;e++)if((t=r.languages[e])&&t.length)return t;for(e=0;e<a.length;e++)if((t=r[a[e]])&&t.length)return t;return""},currentIpToCountry:function(r){function t(){l.get("https://ipapi.co/jsonp",function(){},"jsonp").always(function(e){var t,e=e&&e.country?e.country:"";e||(e=-1<(t=p.getFirstBrowserLanguage()).indexOf("-")?t.split("-").pop():""),r(e)})}l.get("https://geo.wpforms.com/v3/geolocate/json").done(function(e){e&&e.country_iso?r(e.country_iso):t()}).fail(function(e){t()})},formSubmit:function(e){e instanceof jQuery||(e=l(e)),p.saveTinyMCE(),WPFormsUtils.triggerEvent(e,"wpformsBeforeFormSubmit",[e]).isDefaultPrevented()?p.restoreSubmitButton(e,e.closest(".wpforms-container")):e.hasClass("wpforms-ajax-form")&&"undefined"!=typeof FormData?p.formSubmitAjax(e):p.formSubmitNormal(e)},restoreSubmitButton:function(e,t){var r=e.find(".wpforms-submit"),a=r.data("submit-text");a&&r.text(a),r.prop("disabled",!1),WPFormsUtils.triggerEvent(e,"wpformsFormSubmitButtonRestore",[e,r]),t.css("opacity",""),e.find(".wpforms-submit-spinner").hide()},formSubmitNormal:function(e){var t,r;e.length&&(r=(t=e.find(".wpforms-submit")).get(0).recaptchaID,p.empty(r)&&0!==r||(t.get(0).recaptchaID=!1),e.append('<input type="hidden" name="end_timestamp" value="'+Date.now()+'">'),e.get(0).submit())},formHasCaptcha:function(e){return!(!e||!e.length||"undefined"==typeof hcaptcha&&"undefined"==typeof grecaptcha&&"undefined"==typeof turnstile)&&(e=e.find(".wpforms-recaptcha-container"),Boolean(e.length))},resetFormRecaptcha:function(e){var t,r;p.formHasCaptcha(e)&&(t=(t=e.find(".wpforms-recaptcha-container")).hasClass("wpforms-is-hcaptcha")?hcaptcha:t.hasClass("wpforms-is-turnstile")?turnstile:grecaptcha,r=e.find(".wpforms-submit").get(0).recaptchaID,p.empty(r)&&0!==r&&(r=e.find(".g-recaptcha").data("recaptcha-id")),p.empty(r)&&0!==r||t.reset(r))},consoleLogAjaxError:function(e){e?console.error("WPForms AJAX submit error:\n%s",e):console.error("WPForms AJAX submit error")},displayFormAjaxErrors:function(e,t){"string"==typeof t?p.displayFormAjaxGeneralErrors(e,t):(t=t&&"errors"in t?t.errors:null,p.empty(t)||p.empty(t.general)&&p.empty(t.field)?p.consoleLogAjaxError():(p.empty(t.general)||p.displayFormAjaxGeneralErrors(e,t.general),p.empty(t.field)||p.displayFormAjaxFieldErrors(e,t.field)))},displayFormAjaxGeneralErrors:function(e,t){var r,a,o;e&&e.length&&(p.empty(t)||(r=e.data("formid"),p.isModernMarkupEnabled()&&e.attr({"aria-invalid":"true","aria-errormessage":""}),"string"==typeof t?(a=p.isModernMarkupEnabled()?' role="alert"':"",o=p.isModernMarkupEnabled()?`<span class="wpforms-hidden">${wpforms_settings.formErrorMessagePrefix}</span>`:"",e.find(".wpforms-submit-container").before(`<div class="wpforms-error-container"${a}>${o}${t}</div>`),p.setCurrentPage(e,{})):p.printGeneralErrors(e,t,r)))},printGeneralErrors(o,e,i){l.each(e,function(e,t){switch(e){case"header":o.prepend(t);break;case"footer":r=t,0===o.find(".wpforms-page-indicator").length?o.find(".wpforms-submit-container").before(r):o.find(".wpforms-page-1").append(r);break;case"recaptcha":r=t,o.find(".wpforms-recaptcha-container").append(r)}var r,a;p.isModernMarkupEnabled()&&(a=o.attr("aria-errormessage")||"",o.attr("aria-errormessage",a+` wpforms-${i}-${e}-error`))}),o.find(".wpforms-error-container").length&&p.animateScrollTop(o.find(".wpforms-error-container").first().offset().top-100)},clearFormAjaxGeneralErrors:function(e){e.find(".wpforms-error-container").remove(),e.find("#wpforms-field_recaptcha-error").remove(),p.isModernMarkupEnabled()&&e.attr({"aria-invalid":"false","aria-errormessage":""})},displayFormAjaxFieldErrors:function(e,t){var r;e&&e.length&&(p.empty(t)||(r=e.data("validator"))&&(r.showErrors(t),p.formHasCaptcha(e)||r.focusInvalid()))},formSubmitAjax:function(a){var r,t,e;return a.length?(r=a.closest(".wpforms-container"),e=a.find(".wpforms-submit-spinner"),r.css("opacity",.6),e.show(),p.clearFormAjaxGeneralErrors(a),(e=new FormData(a.get(0))).append("action","wpforms_submit"),e.append("start_timestamp",a.data("timestamp")),e.append("end_timestamp",Date.now()),e={type:"post",dataType:"json",url:wpforms_settings.ajaxurl,data:e,cache:!1,contentType:!1,processData:!1,success:function(e){e?e.data&&e.data.action_required?a.trigger("wpformsAjaxSubmitActionRequired",e):e.success?(a.trigger("wpformsAjaxSubmitSuccess",e),e.data&&(e.data.redirect_url?(a.trigger("wpformsAjaxSubmitBeforeRedirect",e),s.location=e.data.redirect_url):e.data.confirmation&&(r.html(e.data.confirmation),t=r.find("div.wpforms-confirmation-scroll"),r.trigger("wpformsAjaxSubmitSuccessConfirmation",e),t.length)&&p.animateScrollTop(t.offset().top-100))):(p.resetFormRecaptcha(a),p.displayFormAjaxErrors(a,e.data),a.trigger("wpformsAjaxSubmitFailed",e),p.setCurrentPage(a,e.data)):p.consoleLogAjaxError()},error:function(e,t,r){p.consoleLogAjaxError(r),a.trigger("wpformsAjaxSubmitError",[e,t,r])},complete:function(e,t){e.responseJSON&&e.responseJSON.data&&(e.responseJSON.data.action_required||"success"===t&&e.responseJSON.data.redirect_url)||(p.restoreSubmitButton(a,r),a.trigger("wpformsAjaxSubmitCompleted",[e,t]))}},WPFormsUtils.triggerEvent(a,"wpformsAjaxBeforeSubmit",[a]).isDefaultPrevented()?(p.restoreSubmitButton(a,r),l.Deferred().reject()):l.ajax(e)):l.Deferred().reject()},setCurrentPage:function(r,a){if(0!==r.find(".wpforms-page-indicator").length){const i=[];if(r.find(".wpforms-page").each(function(e,t){if(1<=l(t).find(".wpforms-has-error").length)return i.push(l(t))}),0!==i.length||void 0===a.errors||void 0===a.errors.general||void 0!==a.errors.general.footer||void 0===a.errors.general.recaptcha){var o=0<i.length?i[0]:r.find(".wpforms-page-1");let e,t="prev";1===o.data("page")||void 0!==a.errors&&void 0!==a.errors.general.footer?e=r.find(".wpforms-page-1").next():(e=0!==o.next().length?o.next():o.prev(),t=0!==o.next().length?"prev":"next");a=e.find(".wpforms-page-next"),o=e.data("page");p.navigateToPage(a,t,o,r,l(".wpforms-page-"+o))}}},animateScrollTop:function(e,t,r){return t=t||1e3,r="function"==typeof r?r:function(){},l("html, body").animate({scrollTop:parseInt(e,10)},{duration:t,complete:r}).promise()},saveTinyMCE:function(){"undefined"!=typeof tinyMCE&&tinyMCE.triggerSave()},isFunction:function(e){return!!(e&&e.constructor&&e.call&&e.apply)},compareTimesGreaterThan:function(e,t){e=e.replace(/(am|pm)/g," $1").toUpperCase(),t=t.replace(/(am|pm)/g," $1").toUpperCase();e=Date.parse("01 Jan 2021 "+e);return Date.parse("01 Jan 2021 "+t)<=e},isModernMarkupEnabled:function(){return!!wpforms_settings.isModernMarkupEnabled},initTokenUpdater(){l(".wpforms-form").on("focusin",function(t){const r=l(this),a=Date.now(),e=r.attr("data-token-time")??0,o=a-1e3*e;if(!(o<1e3*wpforms_settings.token_cache_lifetime||p.isUpdatingToken)){const i=r.data("formid"),n=r.find(".wpforms-submit");p.isUpdatingToken=!0,n.prop("disabled",!0),l.post(wpforms_settings.ajaxurl,{action:"wpforms_get_token",formId:i}).done(e=>{e.success&&(r.attr("data-token-time",a),r.attr("data-token",e.data.token),n.prop("disabled",!1),t.target===n[0])&&n.trigger("click")}).always(()=>{p.isUpdatingToken=!1})}})}};return p}(document,window,jQuery);wpforms.init();