!function(){var t;(t=jQuery)(window).on("et_pb_init_modules",(function(){window.et_pb_init_form_conditions=function(){t((()=>{function e(e){e.find("[data-conditional-logic]").each((function(){const i=t(this),n=i.data("conditional-logic"),a=i.data("conditional-relation"),o=[];for(let i=0;i<n.length;i++){const a=n[i],d=a[0];let l=a[1];var c=a[2];const p=e.find(`.et_pb_contact_field[data-id="${d}"]`),f=(p.data("id"),p.data("type"));var r;if(!p.is(":visible"))continue;switch(f){case"input":case"email":r=p.find("input").val();break;case"text":r=p.find("textarea").val();break;case"radio":r=p.find("input:checked").val()||"";break;case"checkbox":var s=p.find(":checkbox:checked");r=!1,s.each((function(){if(c===t(this).val())return r=!0,!1})),c=!0;break;case"select":r=p.find("select").val()}if("is empty"!==l&&"is not empty"!==l||(l="is empty"===l?"is":"is not",c="","checkbox"===f&&!1===r&&(r="")),r&&"string"==typeof r&&(r=r.replace(/\\(.)/g,"$1")),"is"===l&&r!==c)continue;if("is not"===l&&r===c)continue;let u=new RegExp(c,"i");if("string"==typeof c&&(u=new RegExp(c.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&"),"i")),"contains"===l&&!r.match(u))continue;if("does not contain"===l&&r.match(u))continue;const _=parseInt(r),h=parseInt(c);("is greater"!==l&&"is less"!==l||!isNaN(_)&&!isNaN(h))&&("is greater"===l&&_<=h||"is less"===l&&_>=h||o.push(!0))}i.hide();const d=i.find('input[type="text"]'),l=d.attr("pattern");d.attr("novalidate","novalidate"),d.attr("data-pattern",l),d.removeAttr("pattern"),"all"===a&&n.length===o.length&&(i.show(),d.removeAttr("novalidate"),d.attr("pattern",d.data("pattern"))),"any"===a&&0<o.length&&(i.show(),d.removeAttr("novalidate"),d.attr("pattern",d.data("pattern")))}))}t(".et_pb_contact_form_container, .et_pb_newsletter_custom_fields").each((function(){const i=t(this),n="input, textarea, select",a=function(){e(i)},o=et_pb_debounce(a,250);i.on("change",n,a),i.on("keydown",n,o),e(i)}))}))},window.et_pb_init_form_conditions()})),((window.divi=window.divi||{}).scriptLibrary=window.divi.scriptLibrary||{}).scriptLibraryFormConditions={}}();