(e=>{"function"==typeof define&&define.amd?define("recaptcha",e):e()})(function(){"v3"===CASE27.recaptcha_type?jQuery(document).ready(function(n){function e(){grecaptcha.ready(function(){n('form[data-recaptcha="true"]').each(function(){var a=n(this),e=a.data("recaptcha-action")||"default_token";try{grecaptcha.execute(CASE27.recaptcha_key,{action:e}).then(function(e){var t=a.find('input[name="g-recaptcha-response"]'),e=(0<t.length?t.val(e):(t=n("<input>").attr({type:"hidden",name:"g-recaptcha-response",value:e}),a.append(t)),a.data("recaptcha-ready",!0),a.find("button[data-recaptcha-submit]"));0<e.length&&(e.prop("disabled",!1),e.attr("title",""))}).catch(function(e){console.error("reCAPTCHA execution failed (promise):",e),t()})}catch(e){console.error("reCAPTCHA execution failed (sync):",e),t()}})})}function t(){var e=CASE27.l10n.recaptcha_config_error||"reCAPTCHA could not be loaded.",t=CASE27.l10n.something_went_wrong||"Error",a=n(".auth-notices");a.length&&!a.find(".recaptcha-error-message").length&&(t=n('<div class="woocommerce-error recaptcha-error-message" role="alert"><strong>'+t+"</strong> "+e+"</div>"),a.append(t))}var a=setInterval(function(){"undefined"!=typeof grecaptcha&&"function"==typeof grecaptcha.execute&&(e(),clearInterval(a),setInterval(e,11e4))},100);n("body").on("submit",'form[data-recaptcha="true"]',function(e){var t=n(this).find('input[name="g-recaptcha-response"]').val();if(!t||""===t.trim())return e.preventDefault(),console.warn("reCAPTCHA: Form submission blocked - token not ready"),!1})}):window.cts_render_captcha=function(){jQuery(".g-recaptcha").each(function(e,t){grecaptcha.render(t,{sitekey:t.dataset.sitekey}),setTimeout(function(){return t.style.opacity=1},1e3)})}});
