1;(function($){'use strict';$.fn.lafka_wcs_variation_swatches_form=function(){return this.each(function(){var $form=$(this),clicked=null,selected=[];$form.addClass('swatches-support').on('click','.swatch',function(e){e.preventDefault();var $el=$(this),$select=$el.closest('.value').find('select'),attribute_name=$select.data('attribute_name')||$select.attr('name'),value=$el.data('value');$select.trigger('focusin');if(!$select.find('option[value="'+value+'"]').length){$el.siblings('.swatch').removeClass('selected');$select.val('').change();$form.trigger('lafka-wcs_no_matching_variations',[$el]);return;} 2clicked=attribute_name;if(selected.indexOf(attribute_name)===-1){selected.push(attribute_name);} 3if($el.hasClass('selected')){$select.val('');$el.removeClass('selected');delete selected[selected.indexOf(attribute_name)];}else{$el.addClass('selected').siblings('.selected').removeClass('selected');$select.val(value);} 4$select.change();}).on('click','.reset_variations',function(){$(this).closest('.variations_form').find('.swatch.selected').removeClass('selected');selected=[];}).on('lafka-wcs_no_matching_variations',function(){if(typeof wc_add_to_cart_variation_params!=='undefined'){window.alert(wc_add_to_cart_variation_params.i18n_no_matching_variations_text);}});});};$(function(){$(document.body).find('.variations').lafka_wcs_variation_swatches_form();$(document.body).trigger('lafka-wcs_initialized');});})(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.