1var i,age=[],format=[],organic=[],kosher=[],allergen=[],title="",naturals=[],params="",slider=document.getElementById("slider"),benefit=[];function reset(){age=[],format=[],organic=[],kosher=[],allergen=[],title="",naturals=[],benefit=[],jQuery("input:checkbox").removeAttr("checked"),jQuery("#keyword-search, #filter-keyword-search").val(""),jQuery(".food-product").show(),jQuery(".review-food-product").show(),jQuery("#error-message").hide(),closeFilter(),updateURL(!0)}function applyFilter(){closeFilter(),updateURL(!0)}function closeFilter(){jQuery(".filter-col").hide()}function showFilter(){jQuery(".filter-col").show()}function applyFilters(){updateURL(!1)}var acc=document.getElementsByClassName("accordion-filter");for(i=0;i<acc.length;i++)acc[i].addEventListener("click",function(){this.classList.toggle("active");var e=this.nextElementSibling;"block"===e.style.display?e.style.display="none":e.style.display="block"});function updateURL(e){params="",params+=0!=age.length?"&age="+age:"",params+=kosher.length>0?"&kosher=1":"",params+=title?"&title="+title:"",params+=naturals.length>0?"&naturals=1":"",params+=organic.length>0?"&organic=1":"",format&&format.forEach(function(e){params+="&"+e+"=1"}),allergen&&allergen.forEach(function(e){params+="&"+e+"=1"}),console.log(benefit),benefit&&benefit.forEach(function(e){params+="&"+e+"=1"}),params=params.substr(1),window.history.pushState("","","?"+params),e&&(url=window.location.protocol+"//"+window.location.hostname,window.location.href=url+"/foods/?"+params)}function loadURLData(){window.location.search.substr(1).split("&").forEach(function(e){var a=decodeURIComponent((tmp=e.split("="))[1]);switch(tmp[0]){case"title":title=a,jQuery("#keyword-search, #filter-keyword-search").val(title);break;case"age":0!=a.length?(age=a.split(","),slider.noUiSlider.set([age[0],age[age.length-1]])):(age=[],slider.noUiSlider.set([4,12]));break;case"kosher":kosher.push(tmp[0]);break;case"naturals":naturals.push(tmp[0]);break;case"organic":organic.push(tmp[0]);break;case"pouches":case"snacks":case"cereal":case"jars":format.push(tmp[0]);break;case"milk":case"wheat":case"peanut":case"tree-nut":allergen.push(tmp[0]);break;case"prebiotics-probiotics-baby-toddler-foods-snacks":case"clean_label_project_baby_food":benefit.push(tmp[0])}}),0==allergen.length&&(allergen=[]),applyFilters()}noUiSlider.create(slider,{start:[4,12],connect:!0,tooltips:!0,range:{min:4,max:12},format:wNumb({decimals:0})}),slider.noUiSlider.on("change",function(){var e=slider.noUiSlider.get(),a=[];for(i=parseInt(e[0]);i<=parseInt(e[1]);i++)a.push(i);age=a,applyFilters()}),jQuery(".format-checkbox").on("click",function(){jQuery("input.format-checkbox").removeAttr("checked"),jQuery(this).prop("checked",!0);var e=[];jQuery.each($("input.format-checkbox:checked"),function(){1==$(this).val()&&e.push($(this).attr("name"))}),format=e,jQuery(".review-food-product").filter(function(){jQuery(this).toggle(jQuery(this).attr("data-type").toLowerCase().indexOf(format)>-1)})}),jQuery(".review-filter-search #filter-keyword-search").on("keyup",function(){var e=["cereal","jar","pouches","snacks"];jQuery(".review-food-product").filter(function(){jQuery(this).toggle(jQuery(this).find(".title").text().toLowerCase().indexOf(e)>-1)})}),jQuery(".organic-checkbox").on("click",function(){var e=[];jQuery.each($("input.organic-checkbox:checked"),function(){1==$(this).val()&&e.push($(this).attr("name"))}),organic=e,applyFilters()}),jQuery(".kosher-checkbox").on("click",function(){var e=[];jQuery.each($("input[name='kosher']:checked"),function(){1==$(this).val()&&e.push($(this).attr("name"))}),kosher=e,applyFilters()}),jQuery(".allergen-checkbox").on("click",function(){var e=[];jQuery.each($("input.allergen-checkbox:checked"),function(){1==$(this).val()&&e.push($(this).attr("name"))}),allergen=e,applyFilters()}),jQuery(".benefit-checkbox").on("click",function(){var e=[];jQuery.each($("input.benefit-checkbox:checked"),function(){1==$(this).val()&&e.push($(this).attr("name"))}),benefit=e,console.log(benefit),applyFilters()}),jQuery(".naturals-checkbox").on("click",function(){var e=[];jQuery.each($("input[name='naturals']:checked"),function(){e.push($(this).attr("name"))}),naturals=e,applyFilters()}),jQuery("#keyword-search, #filter-keyword-search").keyup(function(){title=$(this).val(),applyFilters()}),jQuery(document).ready(function(){});
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.