1(function($){const AWAIT_UPLOAD_ERROR_MESSAGE='Veuillez patienter, vos fichiers sont en cours d\'import.';const REQUIRED_FIELD_ERROR_MESSAGE='Ce champ est obligatoire.';const BAD_URL_ERROR_MESSAGE='Veuillez saisir une url valide.' 2const URL_REGEX=/^(https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[-a-zA-Z0-9@:%_+.~#?&/=]{1,}[-a-zA-Z0-9@:%_+~#?&/=]|www\.[a-zA-Z0-9][a-zA-Z0-9-]+[a-zA-Z0-9]\.[-a-zA-Z0-9@:%_+.~#?&/=]{1,}[-a-zA-Z0-9@:%_+~#?&/=]|https?:\/\/(?:www\.|(?!www))[a-zA-Z0-9]+\.[-a-zA-Z0-9@:%_\\+.~#?&/=]{1,}[-a-zA-Z0-9@:%_+~#?&/=]|www\.[a-zA-Z0-9]+\.[a-z]{2,})$/i;$.extend(jQuery.validator.messages,{required:REQUIRED_FIELD_ERROR_MESSAGE,});$(".inscprixmusic_main .wpcf7-form").validate({rules:{"nom-artist":{"required":!0},"maison-prod":{"required":!0},"nom-producteur":{"required":!0},"prenom-producteur":{"required":!0},"email-producteur":{"required":!0,"email":!0},"artist-presentation":{"required":!0},"artist-album-titre":{"required":!0},"artist-album-distri":{"required":!0},"artist-album-distri":{"required":!0},"artist-album-date":{"required":!0},},errorPlacement:function(error,element){if(element.parents('.input_img').length){error.insertAfter(element.parents('.label_file'))}else if(element.parents('.multifile').length){error.insertAfter(element.parents('.multifile'))}else{error.appendTo(element.parent())}}});function addError(elementIdentifier,message){$(elementIdentifier).children('.error').remove();$(elementIdentifier).append('<label class="error">'+message+'</label>')} 3function removeError(elementIdentifier){$(elementIdentifier).children('.error').remove()} 4$('.cs_multistep_controls .cs_next').on('click',function(){var currentStep=parseInt($(this).parents('.cs_multistep').attr('data_current_step'));var nextStep=parseInt($(this).parents('.cs_multistep').next().attr('data_current_step'));var error=!1;if(currentStep===1){if($('.artist-picture-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.artist-picture-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(!$('.artist-picture-upload .codedropz-upload-wrapper').find('.complete').length){addError('.artist-picture-upload',REQUIRED_FIELD_ERROR_MESSAGE);error=!0}else{removeError('.artist-picture-upload')}} 5if(currentStep===2){if($('#url-video-1').val()&&!$('#url-video-1').val().match(URL_REGEX)){addError('#url-video-1-wrapper',BAD_URL_ERROR_MESSAGE);error=!0}else{removeError('#url-video-1-wrapper')} 6if($('#url-video-2').val()&&!$('#url-video-2').val().match(URL_REGEX)){addError('#url-video-2-wrapper',BAD_URL_ERROR_MESSAGE);error=!0}else{removeError('#url-video-2-wrapper')} 7if($('.songs-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.songs-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(!$('.songs-upload .codedropz-upload-wrapper').find('.complete').length){addError('.songs-upload',REQUIRED_FIELD_ERROR_MESSAGE);error=!0}else{removeError('.songs-upload')} 8if(!$('#public-song-1').val()){addError('#public-song-1-wrapper',REQUIRED_FIELD_ERROR_MESSAGE);error=!0}else{removeError('#public-song-1-wrapper')} 9if(!$('#public-song-2').val()){addError('#public-song-2-wrapper',REQUIRED_FIELD_ERROR_MESSAGE);error=!0}else{removeError('#public-song-2-wrapper')}} 10if(currentStep===3){if($('.artist-album-cover-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.artist-album-cover-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(!$('.artist-album-cover-upload .codedropz-upload-wrapper').find('.complete').length){addError('.artist-album-cover-upload',REQUIRED_FIELD_ERROR_MESSAGE);error=!0}else{removeError('.artist-album-cover-upload')}} 11if(error){return} 12$('input[type="date"]').removeAttr('min');if($(".inscprixmusic_main .wpcf7-form").valid()){$(this).parents('.cs_multistep').removeClass('current_step').next().addClass('current_step');$('.inscprixmusic_img').hide();$('.inscprixmusic_img[data_step="'+nextStep+'"]').show()}});$('.cs_multistep_controls .cs_prev:not(.disabled)').on('click',function(){var currentStep=parseInt($(this).parents('.cs_multistep').attr('data_current_step'));var nextStep=parseInt($(this).parents('.cs_multistep').prev().attr('data_current_step'));var error=!1;if(currentStep===1&&$('.artist-picture-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.artist-picture-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(currentStep===1){removeError('.artist-picture-upload')} 13if(currentStep===2&&$('.songs-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.songs-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(currentStep===2){removeError('.songs-upload')} 14if(currentStep===3&&$('.artist-album-cover-upload .codedropz-upload-wrapper').find('.in-progress').length){addError('.artist-album-cover-upload',AWAIT_UPLOAD_ERROR_MESSAGE);error=!0}else if(currentStep===2){removeError('.artist-album-cover-upload')} 15if(error){return} 16$(this).parents('.cs_multistep').removeClass('current_step').prev().addClass('current_step');$('.inscprixmusic_img').hide();$('.inscprixmusic_img[data_step="'+nextStep+'"]').show()});$('input[type="file"]:not([multiple="multiple"]').on('change',function(){if($(this).val()){error=!1;$('.label_file_close').show();var filename=$(this).val();filename=filename.split('\\').pop();$(this).parent().parent().find('.label_file_title').html(filename)}});$('.label_file_close').on('click',function(){var input=$(this).parent().parent().find('input');if(input.val()){input.val('');$(this).parent().parent().find('.label_file_title').text('Charger le fichier');$(this).hide()}});$('.wpcf7-list-item').each(function(){$(this).find('label').append('<span class="radiobtn"></span>')});if($('body').hasClass('page-template-inscription-prix-musical')){document.addEventListener('wpcf7mailsent',function(event){location='/inscription-prix-musical/?status=mail_sent'},!1)} 17var songList=[];function displayPublicSongsPicker(){if(songList.length){var publicSong1Value=$('#public-song-1').val();var publicSong2Value=$('#public-song-2').val();$('.wrap_input.public_titles').show();$('.wrap_input.public_titles select option[value!=""]').remove();for(var i=0;i<songList.length;++i){$('.wrap_input.public_titles select').append('<option value="'+songList[i].filename+'">'+songList[i].name+'</option>')} 18if(publicSong1Value&&songList.some(function(song){return song.filename===publicSong1Value})){$('#public-song-1').val(publicSong1Value)} 19if(publicSong2Value&&songList.some(function(song){return song.filename===publicSong2Value})){$('#public-song-2').val(publicSong2Value)}}else{$('.wrap_input.public_titles').hide()}} 20function updatePublicSongsPicker(){var elements=$('.songs-upload .codedropz-upload-wrapper').find('.dnd-upload-status.complete') 21songList=[];for(var i=0;i<elements.length;i++){var foundSpans=$(elements[i]).find('.name span');if(foundSpans&&foundSpans.length&&!$(elements[i]).find('span.has-error').length&&$(elements[i]).find('span input').length){var input=$(elements[i]).find('span input')[0];var name=foundSpans[0].innerText;songList.push({name:name,filename:input.value.substring(input.value.lastIndexOf('/')+1),})}} 22displayPublicSongsPicker()} 23function removePublicSongFromList(){var foundSpans=$(this).parent().find('.name span');if(foundSpans&&foundSpans.length){var innerText=foundSpans[0].innerText;songList=songList.filter(function(song){if(song!==innerText){return song}});displayPublicSongsPicker()}} 24var observer=new MutationObserver(function(event){updatePublicSongsPicker();$('a.remove-file').on('click',removePublicSongFromList)});if($('.songs-upload').length){observer.observe($('.songs-upload')[0],{childList:!0,subtree:!0})}})(jQuery)
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.