(function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{enumerable:!0,get:d})},b.r=function(a){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(a,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(a,'__esModule',{value:!0})},b.t=function(a,c){if(1&c&&(a=b(a)),8&c)return a;if(4&c&&'object'==typeof a&&a&&a.__esModule)return a;var d=Object.create(null);if(b.r(d),Object.defineProperty(d,'default',{enumerable:!0,value:a}),2&c&&'string'!=typeof a)for(var e in a)b.d(d,e,function(b){return a[b]}.bind(null,e));return d},b.n=function(a){var c=a&&a.__esModule?function(){return a['default']}:function(){return a};return b.d(c,'a',c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p='view/public/',b(b.s=493)})({493:function(){function a(){$('input[name=starter_kit_product]').attr('value',$.map($('#starter_kit-product input'),function(a){return a.value}).join())}$(document).ready(function(){var b=$('input[name=product]');b.autocomplete({delay:500,source:function(a,b){$.ajax({url:'index.php?route=catalog/product/autocomplete&token='+TOKEN+'&filter_name='+encodeURIComponent(a.term)+'&filter_grade=0',dataType:'json',success:function(a){b($.map(a,function(a){return{label:a.name,value:a.product_id}}))}})},select:function(b,c){if(0<$('#starter_kit-product'+c.item.value).length)return alert('Este produto j\xE1 foi adicionado a lista!'),!1;var d=$('#starter_kit-product');return d.append('\n        <div id="starter_kit-product'.concat(c.item.value,'" class="scrollbox-item flex between-xs">\n          <span class="text-small text-dark">').concat(c.item.label,'</span>\n          <i class="fas fa-trash-alt text-small right-margin-small text-error cursor-pointer"></i>\n          <input type="hidden" value="').concat(c.item.value,'">\n        </div>\n      ')),d.scrollTop(2e3),a(),!1},focus:function(){return!1},closeOnSelect:!1}),$('#starter_kit-product').on('click','i',function(){$(this).parent().remove(),a()})})}});