PageSourceSearch

https://jasonfoundation.com/wp-content/plugins/Formality/js/formality.min.js?ver=1790245633

js jasonfoundation.com collected 2026-09-24 10:27:22 UTC 12,494 bytes, 1 lines download raw bytes

1var $=jQuery.noConflict(),overCapacity=!1,overCapacityMsg="File attachments over capacity. Combined total of all files may not exceed 7MB.";$(document).ready(function(){function e(e){e.find(":input").off("blur").on("blur",function(){t($(this))}),e.find('[type="file"]').off("change").on("change",function(){if(void 0!==$(this)[0].files[0]){let e=$(this)[0].files[0].size/1024;e=e<1e3?e.toFixed(0)+" KB":(e/1e3).toFixed(2)+" MB",$(this).siblings(".filesize").first().text(e)}""!=$(this).val()&&t($(this))}),e.find('[data-pattern="age"]').off("keyup").on("keyup",function(){let e=$(this).val().replace(/\D/g,"");$(this).val(e.substring(0,3))}),e.find('[type="tel"]').off("keyup").on("keyup",function(){let e=$(this).val().replace(/\D/g,"");e=(e=(e=e.replace(/^(\d{3})(\d{1,3})/,"($1) $2")).replace(/^\((\d{3})\)\s(\d{3})(.+)/,"($1) $2-$3")).replace(/^\((\d{3})\)\s(\d{3})\-(\d{4})(.+)/,"($1) $2-$3 x$4"),$(this).val(e.substring(0,14))}),e.find('[data-pattern="zip"]').off("keyup").on("keyup",function(e){let t=$(this).val().replace(/\D/g,"");$(this).val(t.substring(0,5))}),$(".esignCanvas").each(function(){let e=$(this).signature(),a=$(this).attr("id").replace("canvas_","");$("#clear_"+a).off("click").on("click",function(){e.signature("clear"),$("#success_icon_"+a).hide(),$("#encoded_sig_"+a).val(""),$(this).closest(".fieldDiv").find(".esignShield").css("z-index","1"),t($("#encoded_sig_"+a))}),$("#base64_"+a).off("click").on("click",function(){let r=e.signature("toDataURL");$("#encoded_sig_"+a).val(r),$("#success_icon_"+a).show(),$(this).closest(".fieldDiv").find(".esignShield").css("z-index","5"),t($("#encoded_sig_"+a))})})}function t(e){if(!e.is(":visible")||e.is('button[class*="repeater"]')||e.hasClass("esignButton"))return!0;var t=null;e.closest("form");var r=e.closest(".fieldDiv"),i=r.find("div.error"),n=e.attr("required")||"true"==e.attr("aria-required")?1:0;n=r.attr("data-repeaterIndex")&&"1"!=r.attr("data-repeaterIndex")?0:n;var s=!!e.attr("minlength")&&e.attr("minlength"),l=250,o=!!e.attr("min")&&e.attr("min"),d=!!e.attr("max")&&e.attr("max"),c=o,f=d;"number"==e.attr("type")&&(o=parseInt(o),d=parseInt(d));var p=e.attr("data-pattern")?e.attr("data-pattern"):"default",u=(void 0===e.prop("tagName")?"":e.prop("tagName")).toLowerCase();switch(u+=(void 0===e.attr("type")?"":e.attr("type")).toLowerCase(),u=u.replace("input","")){case"email":p="email";break;case"file":p="file",l=null;break;case"tel":p="tel";break;case"textarea":"esignature"==p?l=null:(p="textarea",l=3e3)}var h=e;switch(u){case"checkbox":case"radio":{h=e.closest("fieldset");let m=[];h.find("input:checked").each(function(){m.push($(this).val())}),value=m.join(", "),n="true"==h.attr("aria-required")?1:0;break}case"select":{let v=[];e.find("option:selected").each(function(){v.push($(this).val())}),value=v.join(", ");break}default:value=e.val().replace(/^\s+|\s+$/g,"")}if(n){let b=0;null==value?b++:void 0===value.length?b++:0==value.length&&b++,0!=b&&(t="esignature"==p?"Please draw your signature and click the Confirm Signature button.":"This field is required.")}"undefined"!=typeof value&&null!=value&&(s&&value.length<s&&(t="Must be at least "+s+" characters."),l&&value.length>l&&(t="Must be fewer than "+l+" characters."),(value&&o&&value<o||d&&value>d)&&("date"==e.attr("type")&&(c=o.substr(5,2)+"/"+o.substr(9,2)+"/"+o.substr(0,4),f=d.substr(5,2)+"/"+d.substr(9,2)+"/"+d.substr(0,4)),t=o&&d?"Must be between "+c+" and "+f+".":o?"Must be greater than "+c+".":"Mu
1st be less than "+f+"."));var g=RegExp(/^[^\<\>\{\}\[\]\^\~\`\|\\]*$/),y="Please do not use any of these characters < > { } [ ] ^ ~ ` | \\";switch(p){case"address":t=(t=(t=t||a("minlength",value,3,"Must be at least 3 characters."))||a("pattern",value,/^[a-zA-Z0-9\s\#\-\,\.\/]+$/,"Only letters, numbers, spaces, and these characters # - . , / are allowed."))||a("pattern",value,g,y);break;case"age":t=(t=(t=(t=t||a("pattern",value,/^[0-9]{1,3}$/,"Must be a number between 1-125."))||a("minvalue",value,1,"Must be 1 or greater."))||a("maxvalue",value,125,"Must be 125 or less."))||a("pattern",value,g,y);break;case"city":t=(t=(t=t||a("minlength",value,3,"Must be at least 3 characters."))||a("pattern",value,/^[a-zA-Z\s]+$/,"Only letters and spaces are allowed."))||a("pattern",value,g,y);break;case"dob":var x=new Date;x=x.toISOString().split("T")[0],t=(t=(t=t||a("minvalue",value,"1900-01-01","Must be after 01/01/1900."))||a("maxvalue",value,x,"Must be before today."))||a("pattern",value,g,y);break;case"email":t=(t=t||a("pattern",value,/^[A-Za-z][\w.-]*@\w[\w.-]*\.[A-Za-z]{2,6}$/,"Invalid email address format."))||a("pattern",value,g,y);break;case"esignature":t=(t=t||a("pattern",value,/^data:image\/png;base64,(?:[A-Za-z\d+/]{4})*(?:[A-Za-z\d+/]{3}=|[A-Za-z\d+/]{2}==)?$/,"Invalid encryption format."))||a("pattern",value,g,y);break;case"file":t=(t=(t=(t=t||a("pattern",value,/^(.*)\.(jpg|jpeg|png|gif|bmp|tiff|pdf|doc|docx|xls|xlsx|txt|zip|ppt|pptx)$/,"Invalid file format. Allowed formats: jpg, jpeg, png, gif, bmp, pdf, docx, txt, zip."))||a("pattern",value,/^([a-zA-Z0-9\_\-\:\.\/\\]+)\.(jpg|jpeg|png|gif|bmp|tiff|pdf|doc|docx|xls|xlsx|txt|zip|ppt|pptx)$/,"Invalid file name. Only letters, numbers, and these characters - . _ are allowed."))||a("filesize",e,7e6,"File too large (Max 7MB). Please choose a smaller file."))||a("filecapacity",e,7e6,overCapacityMsg);break;case"name":t=(t=(t=t||a("minlength",value,2,"Must be at least 2 characters."))||a("pattern",value,/^[a-zA-Z0-9\s\-\,\.\&\@]+$/,"Only letters, numbers, spaces, and these characters - , . & @ are allowed."))||a("pattern",value,g,y);break;case"ssn":t=(t=t||a("pattern",value,/^(?!666|000|9\d{2})\d{3}-?(?!00)\d{2}-?(?!0{4})\d{4}$/,"Invalid social security number."))||a("pattern",value,g,y);break;case"tel":{let k=value.replace(/[^0-9]/g,"");t=(t=(t=(t=t||a("minlength",k,10,"Must contain at least 10 digits."))||a("maxlength",k,16,"Must contain fewer than 17 digits."))||a("pattern",value,/^\((?!0\d{2}|1\d{2}|555)\d{3}\) (?!555)\d{3}\-\d{4}( x\d{3,4})?$/,"Invalid phone number."))||a("pattern",value,g,y);break}case"textarea":t=t||a("pattern",value,/^[^\@\+\<\>\{\}\[\]\^\~\`\|\\]*$/,"Please do not use any of these characters @ + < > { } [ ] ^ ~ ` | \\");break;case"zip":t=(t=t||a("pattern",value,/^[0-9]{5}$/,"Invalid zip code. Must be exactly 5 digits."))||a("pattern",value,g,y);break;case"default":t=t||a("pattern",value,g,y)}return t?(i.text(t).closest(".fieldDiv").addClass("errorDiv"),h.attr("aria-invalid","true").attr("aria-describedby",i.attr("id")),!1):(i.text("&nbsp;").closest(".fieldDiv").removeClass("errorDiv"),h.attr("aria-invalid","false").attr("aria-describedby",""),
1!0)}function a(e,t,a,r){let i="";if(t)switch(("minvalue"==e||"maxvalue"==e)&&parseInt(t)+""===t&&(t=parseInt(t)),e){case"pattern":i=a.test(t)?null:r;break;case"minlength":i=t.length>=a?null:r;break;case"maxlength":i=t.length<=a?null:r;break;case"minvalue":i=t>=a?null:r;break;case"maxvalue":i=t<=a?null:r;break;case"filesize":{i=null;let n=t;void 0!==n[0].files[0]&&n[0].files[0].size>a&&(i=r);break}case"filecapacity":{i=null;let s=t,l=$(s).closest("form"),o=0;l.find("input[type=file]").each(function(){o++,void 0!==this.files[0]&&(o+=this.files[0].size)}),o>a&&(i=r);break}default:i="UNKNOWN TEST TYPE"}return i}function r(e,t){e.attr("id",t+"Div"),e.find("label").attr("for",t),e.find(":input:not(button)").attr("id",t).attr("name",t),e.find(".error").attr("id",t+"Error")}function i(e){e.find(".formMessages > *").hide()}function n(e,t){!0==t?(e.find('input[type="submit"]').attr("disabled",!1),e.find('input[type="submit"]').removeClass("disabled")):(e.find('input[type="submit"]').attr("disabled",!0),e.find('input[type="submit"]').addClass("disabled"))}function s(e,t,a){i(e),"success"==t&&e.find(".formBody").hide(),n(e,!1),e.find(".formMessages ."+t).show(),"error"==t&&(e.find(".formalityErrorDebug").html(a.responseJSON),setTimeout(function(){n(e,!0)},5e3)),"success"==t&&(window.location.href=e.find(".redirectURL").val()),$(window).scrollTop(0)}window.document.documentMode&&$('input[type="date"]').datepicker(),$(".formalityForm").each(function(){var a,l,o=$(this).attr("id"),d=$("#"+o);d.find('input[name="formType"]').val(),d.find('input[type="submit"]'),(l=(a=d).find('select[name="formality_field_inquiry_type"]')).length>0&&(a.find('[class*="ShowDiv"]').hide(),a.find("."+l.find("option:first-child").val()+"ShowDiv").show(),l.on("change",function(){a.find('[class*="ShowDiv"]').hide(),a.find("."+l.val()+"ShowDiv").show()})),function t(a){$(".repeaterAdd, .repeaterRemove").on("click",function(i){i.preventDefault(),i.stopPropagation(),i.stopImmediatePropagation();var n=$(this).closest(".fieldDiv"),s=n.attr("data-repeaterMax"),l=n.attr("data-repeaterID"),o=a.find('.fieldDiv[data-repeaterID="'+l+'"]'),d=o.length,c=s-d,f=d,p=c;if($(this).hasClass("repeaterRemove"))n.remove(),f--,p++,$(o.find(":input:not(button)").get().reverse()).each(function(){""==$(this).val()&&$(this).trigger("focus")});else if(c>=1){f++,p--;var u=n.clone();u.attr("data-repeaterCount",f).attr("data-repeaterIndex",f).removeClass("errorDiv"),r(u,l+"_"+f);var h=$(u).find(':input[type="file"]').attr("type");void 0!==h&&"file"==h?($(u).insertAfter(n).find(':input[type="hidden"]').val(Math.floor(89999*Math.random()+1e4)).trigger("focus"),$(u).insertAfter(n).find(':input[type="file"]').val("").trigger("focus"),$(u).insertAfter(n).find(".filesize").text("")):$(u).insertAfter(n).find(":input:not(button)").val("").trigger("focus")}(o=a.find('.fieldDiv[data-repeaterID="'+l+'"]')).find(".repeaterAdd .howmany").text(p);var m=1;o.each(function(){0==p?o.last().addClass("repeaterAtMax"):o.removeClass("repeaterAtMax"),$(this).attr("data-repeaterIndex");var e=l+"_"+m;$(this).attr("data-repeaterCount",f).attr("data-repeaterIndex",m).attr("data-repeaterLast","false"),r($(this),e),m++}),o.last().attr("data-repeaterLast","true"),t(a),e(a)})}(d),e(d),d.submit(function(e){var a;let r;if(e.preventDefault(),a=d,r=0,(a.find(":input").each(function(){r=t($(this))?r:r+1}),overCapacity)?(alert(overCapacityMsg),!0):!!(r>0)&&(a.find(".fieldDiv.errorDiv :input").first().trigger("focus"),!0))return!1;(function e(t){thisFormID=t.attr("id");var a=t.find(".formality-submit-recaptcha"),r=t.find(".g-recaptcha-response").val(),l=t.find(".formalityDTT");if(!r)return alert("Please fill out the captcha."),!1;$.ajax({type:"POST",dataType:"json",url:ajax_url,data:{action:"formality_tokenizedRecaptcha",captchaResponse:r,nonce:a.data("nonce"),FormalityNonce:l.data("nonce")},beforeSend:s(t,"validating",null),success:function(e){var a,r;l.val(e.token),r=(a=t).find(".formalityDTT"),$.ajax({type:"POST",dataType:"json",url:ajax_url,data:{action:"formality_dTT_validation",nonce:r.val()},beforeSend:s(a,"authenticating",null),success:function(e){var t,i,n;r.val(e.token),i=(t=a).find(".formalityDTT"),n=new FormData,t.find("input[type=file]").each(function(){let e=$(this).prop("files");if(void 0!==e){let t=e[0],a=$(this).attr("name");n.append(a,t)}}),n.append("action","formality_submit"),n.append("nonce",i.val()),n.append("mydbg",t.find('input[name="mydbg"]').val()),n.append("formalityID",t.find('input[name="formalityID"]').val()),n.append("frmdat",t.serialize()),n.append("inqtyp",t.find('select[name="formality_field_inquiry_type"]').val()),$.ajax({type:"POST",url:ajax_url,dataType:"json",data:n,contentType:!1,processData:!1,beforeSend:s(t,"working",null),success:function(e){s(t,"success",null)},error:function(e){s(t,"error",e)}})},error:function(e){e.responseJSON="Unable to grant token.",s(a,"error",e)}})},error:function(e){return(e.responseText,"SPAM"!==e.responseText)?(e.responseJSON="Unable to grant nonce.",s(t,"error",e)):(i(t),alert("Validation expired. Please fill out the captcha."),grecaptcha.reset(),n(t,!0)),!1}})})(d)})}),document.documentMode&&($(".formalityForm").prepend('<div class="text-center" style="padding: 2em; border: 2px solid #c00; background: #fdd; color: #111;"><h2 style="color: inherit;">This form is not compatible with the Internet Explorer (IE) browser.</h2><p>IE is <a href="https://blogs.windows.com/windowsexperience/2022/06/15/internet-explorer-11-has-retired-and-is-officially-out-of-support-what-you-need-to-know/" target="_blank">no longer supported by Microsoft</a>. Please consider switching to a <a href="https://www.google.com/chrome/downloads/" target="_blank">more modern browser</a>.</p></div></div>'),alert("This form will not work with your browser. For more details, please read the note at the top of the form."))});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.