1jQuery(function($){function validateForm(){var hasError=!1;$('#customAjaxForm').find('input[required]:not([type="radio"]):not([type="checkbox"]), select[required], textarea[required]').each(function(){var $field=$(this);var val=$.trim($field.val());if(!val){$field.addClass('err');hasError=!0}else{$field.removeClass('err')}});var radioGroups=[];$('#customAjaxForm').find('input[type="radio"][required]').each(function(){var name=$(this).attr('name');if(radioGroups.indexOf(name)===-1){radioGroups.push(name)}});radioGroups.forEach(function(groupName){var $radios=$('#customAjaxForm').find('input[type="radio"][name="'+groupName+'"]');var isChecked=$radios.is(':checked');if(!isChecked){$radios.closest('.form-group, .consent-box').addClass('err');hasError=!0}else{$radios.closest('.form-group, .consent-box').removeClass('err')}});return hasError} 2$('#saveBtn').on('click',function(){validateForm()});$('#customAjaxForm').on('submit',function(e){e.preventDefault();const allowedExtensions=['pdf','jpg','jpeg','png','docx','doc'];var fileInput=document.querySelector('input[name="resume"]');if(fileInput.files.length>0){var file=fileInput.files[0];var fileSize=file.size;var extension=file.name.split('.').pop().toLowerCase();if(fileSize>=5*1024*1024){toastr.error('CV file size must be less than 5MB.');e.preventDefault();return!1} 3if(!allowedExtensions.includes(extension)){toastr.error('Invalid CV file type. Only PNG, JPG, JPEG, PDF, DOC, DOCX allowed.');e.preventDefault();return!1}} 4var certInput=document.querySelector('input[name="certificates[]"]');if(certInput&&certInput.files.length>0){const MAX_FILE_SIZE=5*1024*1024;const MAX_FILES=10;if(certInput.files.length>MAX_FILES){toastr.error('You can upload a maximum of 10 certificate files.');return!1} 5for(let i=0;i<certInput.files.length;i++){let file=certInput.files[i];let extension=file.name.split('.').pop().toLowerCase();if(file.size>=MAX_FILE_SIZE){toastr.error('Each certificate file must be less than 5MB.');return!1} 6if(!allowedExtensions.includes(extension)){toastr.error('Invalid certificate file type. Only PNG, JPG, JPEG, PDF, DOC, DOCX allowed.');return!1}}} 7var hasError=validateForm();if(hasError){var firstError=$('#customAjaxForm').find('.err').first();if(firstError.length){$('html, body').animate({scrollTop:firstError.offset().top-100},300)} 8return} 9var formData=new FormData(this);$.ajax({url:rockjumper_obj.ajax_url,type:'POST',data:formData,contentType:!1,processData:!1,beforeSend:function(){document.getElementById('saveBtn').innerHTML='<i class="fa fa-spinner"></i> Loading...'},success:function(response){if(response.success){toastr.success(response.data.message);$('#customAjaxForm')[0].reset();document.getElementById('saveBtn').innerHTML='Submitted';document.getElementById('saveBtn').disabled=!0;setTimeout(()=>{location.href="/join-team-confirmation/"},1000)}else{document.getElementById('saveBtn').innerHTML='Submit';document.getElementById('saveBtn').disabled=!1;toastr.error(response.data.message)}},error:function(){toastr.error("Something went wrong.")}})});$('#customAjaxForm').on('focus input change','input, select, textarea',function(){var $field=$(this);if($field.attr('type')==='radio'){$field.closest('.form-group, .consent-box').removeClass('err');return} 10var val=$.trim($field.val());if(val){$field.removeClass('err')}})})
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.