// source --> https://www.rodan-interieur.be/wp-content/plugins/piotnetforms-pro/assets/js/minify/frontend.min.js?ver=2.1.40 
!function(t,e){var i,s=t.jQuery||t.Cowboy||(t.Cowboy={});s.throttle=i=function(t,i,o,a){var n,r=0;function l(){var s=this,l=+new Date-r,d=arguments;function m(){r=+new Date,o.apply(s,d)}function f(){n=e}a&&!n&&m(),n&&clearTimeout(n),a===e&&l>t?m():!0!==i&&(n=setTimeout(a?f:m,a===e?t-l:t))}return"boolean"!=typeof i&&(a=o,o=i,i=e),s.guid&&(l.guid=o.guid=o.guid||s.guid++),l},s.debounce=function(t,s,o){return o===e?i(t,s,!1):i(t,o,!1!==s)}}(window),(()=>{var t={135:()=>{!function(t){function e(i,s){var o=js_data.plugin_dir;if(window.File&&window.FileList&&window.FileReader){var a=i.allFiles||Array.from(i.files),n=t(i).closest(".piotnetforms-field-container").find(".piotnetforms-upload-preview"),r="",l=[];a.forEach((function(e,i){var s=function(e){var i=e.split("."),s=t(window).width();s<=375&&e.length>12?e=i[0].slice(0,5)+"***."+i[1]:s<=425&&e.length>14?e=i[0].slice(0,7)+"***."+i[1]:s<768&&e.length>29?e=i[0].slice(0,22)+"***."+i[1]:e.length>47&&(e=i[0].slice(0,39)+"***."+i[1]);return e}(e.name),a=function(t){switch(t.toLowerCase()){case"pdf":return"pdf.svg";case"xlsx":case"xls":case"xlsm":return"excel.svg";case"doc":case"docx":return"word.svg";case"psd":return"photoshop.svg";case"ppt":case"pps":case"pptx":case"ppsx":return"powerpoint.svg";case"txt":return"txt.svg";case"jpg":case"jpeg":case"png":case"gif":return"image.svg";case"csv":return"csv.svg";default:return"file.svg"}}(e.name.split(".").pop());l.push(new Promise((function(t){var n=new FileReader;n.addEventListener("load",(function(){r+='\n                            <label class="piotnetforms-file-upload-item">\n                                <span class="piotnetforms-name-file-upload">\n                                    <img class="piotnetforms-file-upload-icon-format" width="32" height="32"\n                                        src="'.concat(o,"assets/images/").concat(a,'">\n                                    <span title="Remove this file" class="piotnetforms-remove-file" data-index="').concat(i,'">✕</span>\n                                </span>\n                                <span class="piotnetforms-preview-name">').concat(s,"</span>\n                            </label>"),t()})),n.readAsDataURL(e)})))})),Promise.all(l).then((function(){n.html(r),function(i,s){s.find(".piotnetforms-remove-file").on("click",(function(){var s=parseInt(t(this).data("index"));i.allFiles.splice(s,1);var o=new DataTransfer;i.allFiles.forEach((function(t){return o.items.add(t)})),i.files=o.files,e(i,{ajaxUrl:!1,maxSize:1,multiple:!0,maxFile:50,minimumFile:-1,allowType:!1}),t(i).valid()}))}(i,n)}))}}t.fn.PafeFileUpload=function(i){i=i||{},t(this).on("change",(function(){var t,s,o,a,n,r,l=this;l.allFiles||(l.allFiles=[]);var d=Array.from(l.files);l.allFiles=l.allFiles.concat(d);var m=new DataTransfer;l.allFiles.forEach((function(t){return m.items.add(t)})),l.files=m.files,e(l,{ajaxUrl:null!==(t=i.ajaxUrl)&&void 0!==t&&t,maxSize:null!==(s=i.maxSize)&&void 0!==s?s:1,multiple:null!==(o=i.multiple)&&void 0!==o&&o,maxFile:null!==(a=i.maxFile)&&void 0!==a?a:50,minimumFile:null!==(n=i.minimumFile)&&void 0!==n?n:-1,allowType:null!==(r=i.allowType)&&void 0!==r&&r})}))}}(jQuery)}},e={};function i(s){var o=e[s];if(void 0!==o)return o.exports;var a=e[s]={exports:{}};return t[s](a,a.exports,i),a.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var s in e)i.o(e,s)&&!i.o(t,s)&&Object.defineProperty(t,s,{enumerable:!0,get:e[s]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";i(135);jQuery(document).ready((function(t){var e=t('[name="upload_field"][data-show-preview="true"]');function i(e){var i=e;if(null==i.attr("data-piotnetforms-stripe-submit")){var s=i.data("piotnetforms-submit-form-id"),o=i.data("piotnetforms-required-text"),l=[],d=0,f=new FormData,p=!1,c=i.closest(".piotnetforms-submit"),u=i.closest(".piotnetforms__form"),h=u.find('[data-piotnetforms-id="'+s+'"]'),g=localStorage.getItem("piotnetforms_razor_payment");g=null!==g?JSON.parse(g).ready_payment:"yes",f.append("razo_payment",g);var v=localStorage.getItem("piotnetforms_razor_subcriptions");if(v=null!==v?JSON.parse(v).ready_sub:"yes",f.append("razo_sub",v),0==u.length&&(u=i.closest("[data-piotnetforms-shortcode-id]")),h.each((function(){if(null==t(this).data("piotnetforms-stripe")&&null==t(this).data("piotnetforms-html")){var e=t(this).closest(".piotnetforms-field-type-checkbox.piotnetforms-field-required"),i=0;if(e.length>0&&(i=e.find("input[type=checkbox]:checked").length),null!=t(this).attr("oninvalid")&&(o=t(this).attr("oninvalid").replace("this.setCustomValidity('","").replace("')","")),null!=t(this).attr("data-piotnetforms-is-repassword")&&""!=t(this).attr("data-piotnetforms-is-repassword")){var a=t(this).attr("data-piotnetforms-is-repassword"),n=t(this).closest("#piotnetforms").find('[name="form_fields['+a+']"]').val(),r=t(this).attr("data-piotnetforms-repassword-msg");String(n)!==String(t(this).val())?(this.setCustomValidity(r),t(this).keyup((function(){this.setCustomValidity("")}))):this.setCustomValidity("")}if(void 0!==t(this).attr("data-piotnetforms-confirm-field")&&!1!==t(this).attr("data-piotnetforms-confirm-field")){var m=t('[name="form_fields['+t(this).attr("data-piotnetforms-confirm-field")+']"]').val(),c=t(this).attr("data-piotnetforms-confirm-msg");c=c||"Field don't match",String(m)!==String(t(this).val())?(this.setCustomValidity(c),d++,t(this).on("keyup",(function(){this.setCustomValidity("")}))):this.setCustomValidity("")}if(null!=t(this).data("piotnetforms-image-upload-minimum-files")&&"multiple"==t(this).attr("multiple")){var u=t(this).data("piotnetforms-image-upload-minimum-files");t(this).val().split(",").length<u&&(o=t(this).data("piotnetforms-image-upload-minimum-files-msg"),this.setCustomValidity(o),d++,t(this).on("change",(function(){this.setCustomValidity("")})))}if(null!=t(this).attr("data-piotnetforms-iban-field")&&!IBAN.isValid(t(this).val())){var h=t(this).attr("data-piotnetforms-iban-msg");this.setCustomValidity(h),d++,t(this).on("keyup",(function(){this.setCustomValidity("")}))}var g=t(this)[0].checkValidity(),v=t(t(this)[0]).next()[0];if(t(v).hasClass("flatpickr-mobile")&&(g=v.checkValidity()),!g&&!t(this).hasClass("piotnetforms-hidden")&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&"none"!=t(this).closest("[data-piotnetforms-conditional-logic]").css("display")&&null==t(this).data("piotnetforms-honeypot")&&0==t(this).closest("[data-piotnetforms-signature]").length||0==i&&e.length>0&&"none"!=t(this).closest(".piotnetforms-fields-wrapper").css("display")){if((0==t(this).closest(".piotnetforms-multi-step-form__content-item").length||t(this).closest(".piotnetforms-multi-step-form__content-item.active").length>0)&&!t(this).closest(".piotnetforms-conditional-logic-hidden").length){if("none"==t(this).css("display")||"none"==t(this).closest("div").css("display")||null!=t(this).data("piotnetforms-image-select")||e.length>0){t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(o);var _=t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").next();0===_.length||p||(t("html, body").animate({scrollTop:_.offset().top-100},500),p=!0)}else p||null!=t(this).data("piotnetforms-image-select")||(t(this)[0].reportValidity(),p=!0);d++}}else if(""==t(this).val()&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&"true"==t(this).attr("aria-required")&&void 0!==t(this).attr("data-piotnetforms-select-autocomplete"))t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(o),d++;else{if(null!=t(this).data("piotnetforms-image-select")&&(t(this).closest(".piotnetforms-image-select-field").find(".image_picker_selector").find(".selected").length<t(this).data("piotnetforms-image-select-min-select")?(t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-image_select_min_select_check]").html(t(this).data("piotnetforms-image-select-min-select-message")),d++):t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-image_select_min_select_check]").remove()),t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(""),null!=t(this).data("piotnetforms-flatpickr-custom-options")&&""==t(this).val()&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&null!=t(this).attr("required")&&(t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(o),d++),t(this).closest("[data-piotnetforms-signature]").length>0)t(this).closest("[data-piotnetforms-signature]").find("[data-piotnetforms-signature-export]").trigger("click"),""==t(this).val()&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&null!=t(this).attr("required")&&(t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(o),d++);var y=t(this).attr("type"),w=t(this).attr("name"),b=t(this).closest("[data-piotnetforms-repeater-form-id]"),x="",C="",k="",z=-1,S=0;if(b.length>0){var V=t(this).parents("[data-piotnetforms-repeater-form-id]");C=b.data("piotnetforms-repeater-id"),V.each((function(){var e=t(this).data("piotnetforms-repeater-id"),i=t(document).find('[data-piotnetforms-repeater-form-id="'+s+'"][data-piotnetforms-repeater-id="'+e+'"]'),o=t(this).index()-i.index();x+=e+"|index"+o+"|"+w.replace("[]","").replace("form_fields[","").replace("]","")+","})),k=b.data("piotnetforms-repeater-label");var O=t(document).find('[data-piotnetforms-repeater-id="'+b.data("piotnetforms-repeater-id")+'"]');S=b.siblings('[data-piotnetforms-repeater-id="'+b.data("piotnetforms-repeater-id")+'"]').length+1,z=b.index()-O.index()}if("file"==y)if(t(this).hasClass("error"))d++;else{var F=[];w=t(this).attr("id").replace("form-field-",""),t.each(t(this)[0].files,(function(t,e){F.push(e.name),f.append(w+"[]",e)})),(P={}).label=t(this).closest(".piotnetforms-field-group").find(".piotnetforms-field-label").html(),P.name=w,P.value="",P.type=t(this).attr("type"),P.upload=1,P.file_name=F,P.repeater_id=x,P.repeater_id_one=C,P.repeater_label=k,P.repeater_index=z,P.repeater_length=S,null!=t(this).data("piotnetforms-remove-this-field-from-repeater")&&(P.repeater_remove_this_field="1"),null!=t(this).data("attach-files")&&(P["attach-files"]=1),l.push(P)}else{if(-1!==w.indexOf("[]")){var j=[];if("checkbox"==y)t(this).closest(".piotnetforms-fields-wrapper").find('[name="'+w+'"]:checked').each((function(){j.push(t(this).val())}));else if(null==(j=t(this).val()))j=[];R="";for(var T="",q=[],I=0;I<j.length;I++){if(null!=t(this).data("piotnetforms-send-data-by-label")){var N=j[I];if("checkbox"==y)(J=t(this).closest(".piotnetforms-fields-wrapper").find('[value="'+N+'"]')).length>0&&(T+=J.data("piotnetforms-send-data-by-label")+",");else(J=t(this).find('[value="'+N+'"]')).length>0&&(T+=J.html()+",")}if(R+=j[I]+",",null!=t(this).attr("data-piotnetforms-booking-item-options")){N=j[I];(J=t(this).closest(".piotnetforms-fields-wrapper").find('[value="'+N+'"]')).length>0&&q.push(J.attr("data-piotnetforms-booking-item-options"))}}R=R.replace(/,(\s+)?$/,"")}else if("radio"==y||"checkbox"==y){if(null!=t(this).data("piotnetforms-send-data-by-label"))T=t(this).closest(".piotnetforms-fields-wrapper").find('[name="'+w+'"]:checked').data("piotnetforms-send-data-by-label");R=(R=t(this).closest(".piotnetforms-fields-wrapper").find('[name="'+w+'"]:checked').val())||""}else{if(null!=t(this).data("piotnetforms-calculated-fields"))var R=t(this).siblings(".piotnetforms-calculated-fields-form").text();else{if(null!=t(this).data("piotnetforms-send-data-by-label")){var J;N=t(this).val().trim();(J=t(this).find('[value="'+N+'"]')).length>0&&(T=J.html())}R=t(this).val()?t(this).val().trim():""}if("tel"==y&&void 0!==t(this).attr("data-piotnetforms-tel-field"))R=t(this).intlTelInput("getNumber")}if(null!=R){var P;(P={}).label=t(this).closest(".piotnetforms-field-group").find(".piotnetforms-field-label").html(),P.name=w.replace("[]","").replace("form_fields[","").replace("]",""),P.value=R;var D=t(this).attr("data-pafe-field-type");P.image_upload=!!D,null!=j&&(P.value_multiple=j),null!=t(this).attr("data-attach-files")&&0!=t(this).attr("data-attach-files")&&(P["attach-files"]=1),P.type=t(this).attr("type"),void 0!==t(this).attr("data-piotnetforms-address-autocomplete")&&(P.lat=t(this).attr("data-piotnetforms-google-maps-lat"),P.lng=t(this).attr("data-piotnetforms-google-maps-lng"),P.zoom=t(this).attr("data-piotnetforms-google-maps-zoom")),void 0!==q&&q.length>0&&(P.booking=q),""!=T&&null!=T&&(P.value_label=T,P.value=(U=T.toString(),E=(L=",")?new RegExp(L+"+$"):new RegExp("\\s+$"),U.replace(E,""))),t(this).closest(".piotnetforms-field-type-calculated_fields").length>0&&(P.calculation_results=t(this).val().trim()),0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&(P.repeater_id=x,P.repeater_id_one=C,P.repeater_label=k,P.repeater_index=z,P.repeater_length=S,null!=t(this).data("piotnetforms-remove-this-field-from-repeater")&&(P.repeater_remove_this_field="1")),null!=t(this).attr("data-piotnetforms-remove-value")&&"false"!=t(this).attr("data-piotnetforms-remove-value")&&t(this).val()==t(this).attr("data-piotnetforms-remove-value")&&(P.value=""),l.push(P)}}}}var U,L,E})),0==d){if(t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").addClass("piotnetforms-waiting"),i.closest(".piotnetforms-submit").addClass("piotnetforms-waiting"),f.append("action","piotnetforms_ajax_form_builder"),f.append("post_id",c.find('input[name="post_id"]').val()),f.append("form_id",c.find('input[name="form_id"]').val()),f.append("fields",JSON.stringify(l)),f.append("referrer",window.location.href),f.append("remote_ip",t(document).find('input[name="remote_ip"][data-piotnetforms-hidden-form-id="'+s+'"]').val()),null!=i.data("piotnetforms-submit-post-edit")&&f.append("edit",i.data("piotnetforms-submit-post-edit")),null!=i.data("piotnetforms-woocommerce-product-id")&&f.append("product_id",i.data("piotnetforms-woocommerce-product-id")),null!=i.attr("data-piotnetforms-paypal-submit-transaction-id")&&f.append("paypal_transaction_id",i.attr("data-piotnetforms-paypal-submit-transaction-id")),null!=i.data("piotnetforms-mollie-payment")){var _=new URL(window.location.href),y=new URLSearchParams(_.search);if(-1!=window.location.href.indexOf("#")){var w=window.location.href.slice(0,window.location.href.indexOf("#")),b=window.location.href.slice(window.location.href.indexOf("#")),x=new URL(w);_=""==new URLSearchParams(x.search).toString()?w+"?piotnetforms_action=mollie_payment"+b:w+"&piotnetforms_action=mollie_payment"+b}else _=""==y.toString()?window.location.href+"?piotnetforms_action=mollie_payment":window.location.href+"&piotnetforms_action=mollie_payment";return f.append("mollie_payment",!0),f.append("mollie_redirect_url",_),void t.ajax({url:t("[data-piotnetforms-ajax-url]").data("piotnetforms-ajax-url"),type:"POST",dataType:"json",data:f,processData:!1,contentType:!1,success:function(t){if("open"==t.status){var e={mollie_payment_id:t.id,formName:s};f.forEach((function(t,i){e[i]=t})),delete e.mollie_payment,localStorage.setItem("piotnetforms_data_form_mollie_payment",JSON.stringify(e)),window.location.href=t._links.checkout.href}},error:function(t){}})}if(null!=i.data("piotnetforms-submit-recaptcha")){var C=i.data("piotnetforms-submit-recaptcha");grecaptcha.ready((function(){grecaptcha.execute(C,{action:"create_comment"}).then((function(e){f.append("recaptcha",e),c.find(".piotnetforms-message").removeClass("visible"),t.ajax({url:t("[data-piotnetforms-ajax-url]").data("piotnetforms-ajax-url"),type:"POST",data:f,processData:!1,contentType:!1,success:function(e){var o=JSON.parse(e);if(o.status&&"email_exists"==o.status)return u.find("[data-piotnetforms-multi-step-form-id]").length?(t(".piotnetforms-message.email-exists").text(o.msg_email_exists).addClass("visible"),setTimeout((function(){t(".piotnetforms-message.email-exists").fadeOut().removeClass("visible")}),5e3)):(t('[name="form_fields['+o.email_name+']"]')[0].setCustomValidity(o.msg_email_exists),t('[name="form_fields['+o.email_name+']"]')[0].reportValidity(),t('[name="form_fields['+o.email_name+']"]').on("keyup",(function(){t('[name="form_fields['+o.email_name+']"]')[0].setCustomValidity("")}))),!1;if(o.reacaptcha)return u.find(".piotnetforms-message-danger").html(o.reacaptcha).addClass("visible"),t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),c.removeClass("piotnetforms-waiting"),!1;if("razorpayment"in o)return n(o.razor_payment_data,s),!1;if("razorpay_sub"in o)return a(o.subscription_razor_data,s),!1;if(u.find(".piotnetforms-upload-preview").length&&m(u),c.removeClass("piotnetforms-waiting"),o.custom_message&&u.find("[data-piotnetforms-message]").html(o.custom_message),t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),""!=e.trim()){c.find(".piotnetforms-message-success").addClass("visible");var d=u.find("[data-piotnetforms-multi-step-form-id]"),f=u.find("[data-piotnetforms-conditional-logic]"),p=u.find('[data-piotnetforms-submit-hide="true"]');p=!!p.length,""!=o.redirect&&d.length>0&&f.length,c.find("[data-piotnetforms-trigger-success]").trigger("click"),p&&u.find(".piotnetforms-button").hide(),t(document).trigger("piotnetforms_submit_success",[l])}else u.find(".piotnetforms-message-danger").addClass("visible"),c.find("[data-piotnetforms-trigger-failed]").trigger("click");if(r(c),-1!==e.indexOf(",")&&u.find(".piotnetforms-message").each((function(){if(""!=o.post_url){var t=i.html().replace("[post_url]",'<a href="'+o.post_url+'">'+o.post_url+"</a>");i.html(t)}})),0!=c.find('input[name="redirect"]').length){var h=c.find('input[name="redirect"]').val().trim(),g=c.find('input[name="redirect"]').attr("data-piotnetforms-open-new-tab");-1!==e.indexOf(",")&&"1"!=o.failed_status&&(""!=o.post_url&&"[post_url]"==h?window.location.href=o.post_url:""!=o.redirect&&("yes"==g?window.open(o.redirect,"_blank"):window.location.href=o.redirect))}0!=t(document).find('[data-piotnetforms-popup][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click"),0!=t(document).find('[data-piotnetforms-popup-open][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup-open][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click"),0!=t(document).find('[data-piotnetforms-popup-close][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup-close][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click")}})}))}))}else c.find(".piotnetforms-message").removeClass("visible"),t.ajax({url:t("[data-piotnetforms-ajax-url]").data("piotnetforms-ajax-url"),type:"POST",data:f,processData:!1,contentType:!1,success:function(e){if(c.removeClass("piotnetforms-waiting"),t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),e){var o=JSON.parse(e);if("razorpayment"in o)return n(o.razor_payment_data,s),!1;if("razorpay_sub"in o)return a(o.subscription_razor_data,s),!1;if(o.status&&"email_exists"==o.status)return u.find("[data-piotnetforms-multi-step-form-id]").length?(t(".piotnetforms-message.email-exists").text(o.msg_email_exists).addClass("visible"),setTimeout((function(){t(".piotnetforms-message.email-exists").fadeOut().removeClass("visible")}),5e3)):(t('[name="form_fields['+o.email_name+']"]')[0].setCustomValidity(o.msg_email_exists),t('[name="form_fields['+o.email_name+']"]')[0].reportValidity(),t('[name="form_fields['+o.email_name+']"]').on("keyup",(function(){t('[name="form_fields['+o.email_name+']"]')[0].setCustomValidity("")}))),!1;if(u.find(".piotnetforms-upload-preview").length&&m(u),"expired"===o.limit_entries_status)return void c.find(".piotnetforms-alert--limit-entries .piotnetforms-message").addClass("visible");if(c.find(".piotnetforms-message").each((function(){if(""!=o.post_url){var t=i.html().replace("[post_url]",'<a href="'+o.post_url+'">'+o.post_url+"</a>");i.html(t)}})),r(c),o.custom_message&&u.find("[data-piotnetforms-message]").html(o.custom_message),"succeeded"!=o.payment_status&&"active"!=o.payment_status||c.find(".piotnetforms-alert--stripe .piotnetforms-message-success").addClass("visible"),"pending"==o.payment_status&&c.find(".piotnetforms-alert--stripe .piotnetforms-help-inline").addClass("visible"),"failed"!=o.payment_status&&"incomplete"!=o.payment_status||(c.find(".piotnetforms-alert--stripe .piotnetforms-message-danger").addClass("visible"),t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),i.closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting")),""!=o.status){c.find(".piotnetforms-alert--mail .piotnetforms-message-success").addClass("visible");var d=u.find("[data-piotnetforms-multi-step-form-id]"),f=u.find("[data-piotnetforms-conditional-logic]"),p=u.find('[data-piotnetforms-submit-hide="true"]');p=!!p.length,""!=o.redirect&&d.length>0&&f.length>0?""!=o.redirect&&(c.find("[data-piotnetforms-trigger-success]").trigger("click"),p&&u.find(".piotnetforms-button").hide()):(c.find("[data-piotnetforms-trigger-success]").trigger("click"),p&&u.find(".piotnetforms-button").hide()),t(document).trigger("piotnetforms_submit_success",[l])}else o.register_message.error?(u.find(".piotnetforms-alert--mail .piotnetforms-message-danger:not(.email-exists)").text(o.register_message.error).addClass("visible"),c.closest("#piotnetforms").find('[name="form_fields['+o.register_message.field_existing+']"]')[0].setCustomValidity(o.register_message.error),c.closest("#piotnetforms").find('[name="form_fields['+o.register_message.field_existing+']"]')[0].reportValidity(),c.closest("#piotnetforms").find('[name="form_fields['+o.register_message.field_existing+']"]').on("keyup",(function(){c.closest("#piotnetforms").find('[name="form_fields['+o.register_message.field_existing+']"]')[0].setCustomValidity("")}))):(o.login_message?u.find(".piotnetforms-alert--mail .piotnetforms-message-danger").text(o.login_message).addClass("visible"):u.find(".piotnetforms-alert--mail .piotnetforms-message-danger").addClass("visible"),t(document).find('[data-piotnetforms-id="'+s+'"]').closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),i.closest(".piotnetforms-fields-wrapper").removeClass("piotnetforms-waiting"),c.find("[data-piotnetforms-trigger-failed]").trigger("click"))}if(0!=c.find('input[name="redirect"]').length){var h=c.find('input[name="redirect"]').val().trim(),g=c.find('input[name="redirect"]').attr("data-piotnetforms-open-new-tab");-1!==e.indexOf(",")&&"1"!=o.failed_status&&(""!=o.post_url&&"[post_url]"==h?window.location.href=o.post_url:""!=o.redirect&&("yes"==g?window.open(o.redirect,"_blank"):window.location.href=o.redirect))}0!=t(document).find('[data-piotnetforms-popup][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click"),0!=t(document).find('[data-piotnetforms-popup-open][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup-open][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click"),0!=t(document).find('[data-piotnetforms-popup-close][data-piotnetforms-hidden-form-id="'+s+'"]').length&&t(document).find('[data-piotnetforms-popup-close][data-piotnetforms-hidden-form-id="'+s+'"]').trigger("click")}})}}}e.length>0&&t.each(e,(function(e,i){var s,o,a,n,r;t(this).PafeFileUpload({multiple:null!==(s=t(this).attr("multiple"))&&void 0!==s&&s,allowType:null!==(o=t(this).data("types-message"))&&void 0!==o?o:"Please enter a value with a valid mimetype.",maxSize:null!==(a=t(this).data("maxsize"))&&void 0!==a&&a,minimumFile:null!==(n=t(this).data("piotnetforms-upload-min-files"))&&void 0!==n&&n,maxFile:null!==(r=t(this).data("piotnetforms-upload-max-files"))&&void 0!==r&&r})})),window.piotnetformsValidateFields=function(e){var i=0;return e.each((function(){if(null==t(this).data("piotnetforms-stripe")&&null==t(this).data("piotnetforms-html")){var e,s=t(this).closest(".piotnetforms-field-type-checkbox.piotnetforms-field-required"),o=0;s.length>0&&(o=s.find("input[type=checkbox]:checked").length),null!=t(this).attr("oninvalid")&&(e=t(this).attr("oninvalid").replace("this.setCustomValidity('","").replace("')",""));var a=t(this)[0].checkValidity(),n=t(t(this)[0]).next()[0];if(t(n).hasClass("flatpickr-mobile")&&(a=n.checkValidity()),!a&&!t(this).hasClass("piotnetforms-hidden")&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&"none"!=t(this).closest("[data-piotnetforms-conditional-logic]").css("display")&&null==t(this).data("piotnetforms-honeypot")&&0==t(this).closest("[data-piotnetforms-signature]").length||0==o&&s.length>0&&"none"!=t(this).closest(".piotnetforms-fields-wrapper").css("display"))"none"==t(this).css("display")||"none"==t(this).closest("div").css("display")||null!=t(this).data("piotnetforms-image-select")||s.length>0?t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(e):null==t(this).data("piotnetforms-image-select")&&t(this)[0].reportValidity(),i++;else if(""==t(this).val()&&"true"==t(this).attr("aria-required")&&void 0!==t(this).attr("data-piotnetforms-select-autocomplete"))t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(e),i++;else if(t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(""),t(this).closest("[data-piotnetforms-signature]").length>0)t(this).closest("[data-piotnetforms-signature]").find("[data-piotnetforms-signature-export]").trigger("click"),""==t(this).val()&&0==t(this).closest(".piotnetforms-conditional-logic-hidden").length&&null!=t(this).attr("required")&&(t(this).closest(".piotnetforms-field-group").find("[data-piotnetforms-required]").html(e),i++)}})),i},t(document).on("click","[data-piotnetforms-submit-form-id]",(function(e){e.preventDefault(),i(t(this))})),t(".piotnetforms input").on("keypress",(function(t){return 13!==t.which})),t(document).on("click","[data-piotnetforms-trigger-success]",(function(){if(0==t(this).closest(".piotnetforms-fields-wrapper").find("[data-piotnetforms-submit-update-user-profile]").length){var e=t(this).attr("data-piotnetforms-trigger-success"),i=t(document).find('[data-piotnetforms-id="'+e+'"]');t(this).closest(".piotnetforms__form").trigger("submit"),i.each((function(){var e=t(this).find("option:first"),s=!1;"radio"!=t(this).attr("type")&&"checkbox"!=t(this).attr("type")||(s=!0);var o=t(this).data("piotnetforms-default-value");null!=o&&""!=o||Number.isInteger(o)?s?(t(this).prop("checked",!1).removeClass("piotnetforms-checked").removeClass("piotnetforms-checked-setvalue"),o==t(this).val()&&t(this).prop("checked",!0)):t(this).val(o):0!=e.length?t(this).val(e.val()):s?t(this).prop("checked",!1).removeClass("piotnetforms-checked").removeClass("piotnetforms-checked-setvalue"):t(this).hasClass("irs-hidden-input")?t(this).data("ionRangeSlider").reset():t(this).val(""),i.closest(".piotnetforms-label-animated").length>0&&i.closest(".piotnetforms-label-animated").removeClass("piotnetforms-label-animated")}))}})),t("#piotnetforms").closest("span.ct-span").css({display:"block"}),t(".oxy-dynamic-list .piotnetforms").each((function(){t(this).attr("id","piotnetforms")})),setTimeout(o(),1e3);var s={};function o(e){if(t(document).find("[data-piotnetforms-live-preview]").length>0){var i,s=t(e).val(),o=t(e).attr("type"),a=t(e).attr("id"),n=t(e).closest(".piotnet-section").attr("data-piotnetforms-repeater-form-id");if(o=o||t(e).data("piotnetforms-type"),void 0!==a){var r=[],l=t(e).attr("name").replace("[]","").replace("form_fields[","").replace("]","");if("checkbox"==o&&(t.each(t('input[name="'+t(e).attr("name")+'"]:checked'),(function(){var i=t(e).hasClass("piotnetforms-preview-label")?t(this).closest(".piotnetforms-field-option").find("label").text():t(this).val();r.push(i)})),s=r.join(", ")),"radio"==o&&(s=t(e).hasClass("piotnetforms-preview-label")?t(e).closest(".piotnetforms-field-option").find("label").text():t(e).val()),"select"==o&&(s=t(e).hasClass("piotnetforms-preview-label")?t(e).find('[value="'+s+'"]').text():s),n)i=t(e).closest(".piotnet-section").find('[data-piotnetforms-live-preview="'+l+'"]');else{var d=t(e).attr("data-piotnetforms-calculated-fields");void 0!==d&&!1!==d?s=t(e).closest(".piotnetforms-field-container").find(".piotnetforms-calculated-fields-form__value").text():(m=t(e).val(),s=null==m?"":(m+"").replace(/([^>\r\n]?)(\r\n|\n\r|\r|\n)/g,"$1"+(f||void 0===f?"<br />":"<br>")+"$2")),i=t(document).find('[data-piotnetforms-live-preview="'+l+'"]')}i.each((function(){if(t(this).hasClass("piotnetforms-live-preview-images")){var e=t(this).data("image-width")?t(this).data("image-width"):150,i=t(this).data("image-height")?t(this).data("image-height"):150,o=s?s.split(","):[],a="";o&&t.each(o,(function(t,s){a+='<img width="'+e+'" height="'+i+'" src="'+s+'"/>'})),t(this).html(a)}else t(this).html(s)}))}}var m,f}function a(e,i){e.handler=function(e){if("razorpay_payment_id"in e&&"razorpay_subscription_id"in e&&"razorpay_signature"in e){var s={info:e,ready_sub:"no"};localStorage.setItem("piotnetforms_razor_subcriptions",JSON.stringify(s)),d(e,!1),t('[data-piotnetforms-submit-form-id="'+i+'"][data-piotnetforms-razorpay-sub="yes"]').trigger("click")}},new Razorpay(e).open()}function n(e,i){e.handler=function(e){var s={info:e,ready_payment:"no"};localStorage.setItem("piotnetforms_razor_payment",JSON.stringify(s)),d(e,!0),t('[data-piotnetforms-submit-form-id="'+i+'"][data-piotnetforms-razor-payment="yes"]').trigger("click")};var s=new Razorpay(e);s.on("payment.failed",(function(t){alert(t.error.description)})),s.open()}function r(t){var e=localStorage.getItem("piotnetforms_razor_payment");null!==(e=null!==e?JSON.parse(localStorage.getItem("piotnetforms_razor_payment")):null)&&e.info.razorpay_payment_id&&(t.find(".piotnetforms-alert--razor .piotnetforms-message-success").addClass("visible"),l());var i=localStorage.getItem("piotnetforms_razor_subcriptions");null!==(i=null!==i?JSON.parse(localStorage.getItem("piotnetforms_razor_subcriptions")):null)&&i.info.razorpay_payment_id&&(t.find(".piotnetforms-alert--razor-sub .piotnetforms-message-success").addClass("visible"),l())}function l(){localStorage.removeItem("piotnetforms_razor_payment"),localStorage.removeItem("piotnetforms_razor_subcriptions")}function d(t,e){if(e){localStorage.setItem("piotnetforms_razor_subcriptions",JSON.stringify({info:{razorpay_payment_id:!1},ready_sub:"no"}))}else{localStorage.setItem("piotnetforms_razor_payment",JSON.stringify({info:{razorpay_payment_id:!1},ready_payment:"no"}))}}function m(e){var i=e.find('[name="upload_field"]');0!==i.length?i.each((function(){var e=this;e.allFiles=[];var i=new DataTransfer;e.files=i.files,t(e).val(""),console.log("clear file input",t(e));var s=t(e).closest(".piotnetforms-field-container").find(".piotnetforms-upload-preview");s.length&&s.empty()})):console.warn('No inputs found for selector "'.concat(selector,'"'))}t(document).on("keyup change","[data-piotnetforms-id]",(function(){var e=this,i=t(e).attr("name");clearTimeout(s[i]),s[i]=setTimeout((function(){o(t(e))}),250)}))}))})()})();