Current File : /home/resuelf/www/wp-content/plugins/gutenberg/build/block-library/blocks/form/view.min.js
document.querySelectorAll("form.wp-block-form").forEach((function(t){if(!t.action||!t.action.startsWith("mailto:"))return;const o=t=>{const o=new URLSearchParams(window.location.search);o.append("wp-form-result",t),window.location.search=o.toString()};t.addEventListener("submit",(async function(n){n.preventDefault();const e=Object.fromEntries(new FormData(t).entries());e.formAction=t.action,e._ajax_nonce=wpBlockFormSettings.nonce,e.action=wpBlockFormSettings.action;try{(await fetch(wpBlockFormSettings.ajaxUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams(e).toString()})).ok?o("success"):o("error")}catch(t){o("error")}}))}));
//# sourceMappingURL=view.min.js.map