{:uriI"file:///Users/Thomas/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/solidus-1ccba07e13c8/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js?type=application/javascript&pipeline=self&id=179df3cee402d97f1890ce1760269793264af60a5f99d44666e051793956d8c9:ET:load_pathI"}/Users/Thomas/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/solidus-1ccba07e13c8/backend/app/assets/javascripts;T: filenameI"ž/Users/Thomas/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/solidus-1ccba07e13c8/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js;T: nameI"'spree/backend/variant_autocomplete;T:logical_pathI"/spree/backend/variant_autocomplete.self.js;T:content_typeI"application/javascript;T: sourceI"F(function() { var variantTemplate = HandlebarsTemplates["variants/autocomplete"]; var formatVariantResult = function(variant) { return variantTemplate({ variant: variant }); }; $.fn.variantAutocomplete = function(searchOptions) { if (searchOptions == null) { searchOptions = {}; } this.select2({ placeholder: Spree.translations.variant_placeholder, minimumInputLength: 3, initSelection: function(element, callback) { Spree.ajax({ url: Spree.routes.variants_api + "/" + element.val(), success: callback }); }, ajax: { url: Spree.routes.variants_api, datatype: "json", quietMillis: 500, params: { "headers": { "X-Spree-Token": Spree.api_key } }, data: function(term, page) { var searchData = { q: { product_name_or_sku_cont: term }, token: Spree.api_key }; return _.extend(searchData, searchOptions); }, results: function(data, page) { window.variants = data["variants"]; return { results: data["variants"] }; } }, formatResult: formatVariantResult, formatSelection: function(variant, container, escapeMarkup) { if (variant.options_text) { return Select2.util.escapeMarkup(variant.name + " (" + variant.options_text + ")"); } else { return Select2.util.escapeMarkup(variant.name); } } }); }; })(); ;T: metadata{ :dependencieso:Set: @hash} I"environment-version;TTI"environment-paths;TTI"rails-env;TTI"Zprocessors:type=application/javascript&file_type=application/javascript&pipeline=self;TTI"¬file-digest:///Users/Thomas/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/bundler/gems/solidus-1ccba07e13c8/backend/app/assets/javascripts/spree/backend/variant_autocomplete.js;TTF: requiredo;;}F: stubbedo;;}F: linkso;;}F: charsetI" utf-8;F: digest"%‹ït·Ù,×Aæ €õaŒÿÂTmƒ8ÚÞEr±ÏFn~: lengthiF:dependencies_digest"%'ëlH´KîX]…{~¡•ò1ÜU‘#=ñ©Ýeôz”:idI"E179df3cee402d97f1890ce1760269793264af60a5f99d44666e051793956d8c9;F: mtimel+%¾·[