{"version":3,"sources":["bootstrap-combobox.js"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"bootstrap-combobox.min.js","sourcesContent":["/* =============================================================\n * bootstrap-combobox.js v1.1.7\n * =============================================================\n * Copyright 2012 Daniel Farrell\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n * ============================================================ */\n\n!function( $ ) {\n\n \"use strict\";\n\n /* COMBOBOX PUBLIC CLASS DEFINITION\n * ================================ */\n\n var Combobox = function ( element, options ) {\n this.options = $.extend({}, $.fn.combobox.defaults, options);\n this.template = this.options.template || this.template\n this.$source = $(element);\n this.$container = this.setup();\n this.$element = this.$container.find('input[type=text]');\n this.$target = this.$container.find('input[type=hidden]');\n this.$button = this.$container.find('.dropdown-toggle');\n this.$menu = $(this.options.menu).appendTo('body');\n this.matcher = this.options.matcher || this.matcher;\n this.sorter = this.options.sorter || this.sorter;\n this.highlighter = this.options.highlighter || this.highlighter;\n this.shown = false;\n this.selected = false;\n this.refresh();\n this.transferAttributes();\n this.listen();\n };\n\n Combobox.prototype = {\n\n constructor: Combobox\n\n , setup: function () {\n var combobox = $(this.template());\n this.$source.before(combobox);\n this.$source.hide();\n return combobox;\n }\n\n , disable: function() {\n this.$element.prop('disabled', true);\n this.$button.attr('disabled', true);\n this.disabled = true;\n this.$container.addClass('combobox-disabled');\n }\n\n , enable: function() {\n this.$element.prop('disabled', false);\n this.$button.attr('disabled', false);\n this.disabled = false;\n this.$container.removeClass('combobox-disabled');\n }\n , parse: function () {\n var that = this\n , map = {}\n , source = []\n , selected = false\n , selectedValue = '';\n this.$source.find('option').each(function() {\n var option = $(this);\n if (option.val() === '') {\n that.options.placeholder = option.text();\n return;\n }\n map[option.text()] = option.val();\n source.push(option.text());\n if (option.prop('selected')) {\n selected = option.text();\n selectedValue = option.val();\n }\n })\n this.map = map;\n if (selected) {\n this.$element.val(selected);\n this.$target.val(selectedValue);\n this.$container.addClass('combobox-selected');\n this.selected = true;\n }\n return source;\n }\n\n , transferAttributes: function() {\n this.options.placeholder = this.$source.attr('data-placeholder') || this.options.placeholder\n if(this.options.appendId !== \"undefined\") {\n \tthis.$element.attr('id', this.$source.attr('id') + this.options.appendId);\n }\n this.$element.attr('placeholder', this.options.placeholder)\n this.$target.prop('name', this.$source.prop('name'))\n this.$target.val(this.$source.val())\n this.$source.removeAttr('name') // Remove from source otherwise form will pass parameter twice.\n this.$element.attr('required', this.$source.attr('required'))\n this.$element.attr('rel', this.$source.attr('rel'))\n this.$element.attr('title', this.$source.attr('title'))\n this.$element.attr('class', this.$source.attr('class'))\n this.$element.attr('tabindex', this.$source.attr('tabindex'))\n this.$source.removeAttr('tabindex')\n if (this.$source.attr('disabled')!==undefined)\n this.disable();\n }\n\n , select: function () {\n var val = this.$menu.find('.active').attr('data-value');\n this.$element.val(this.updater(val)).trigger('change');\n this.$target.val(this.map[val]).trigger('change');\n this.$source.val(this.map[val]).trigger('change');\n this.$container.addClass('combobox-selected');\n this.selected = true;\n return this.hide();\n }\n\n , updater: function (item) {\n return item;\n }\n\n , show: function () {\n var pos = $.extend({}, this.$element.position(), {\n height: this.$element[0].offsetHeight\n });\n\n this.$menu\n .insertAfter(this.$element)\n .css({\n top: pos.top + pos.height\n , left: pos.left\n })\n .show();\n\n $('.dropdown-menu').on('mousedown', $.proxy(this.scrollSafety, this));\n\n this.shown = true;\n return this;\n }\n\n , hide: function () {\n this.$menu.hide();\n $('.dropdown-menu').off('mousedown', $.proxy(this.scrollSafety, this));\n this.$element.on('blur', $.proxy(this.blur, this));\n this.shown = false;\n return this;\n }\n\n , lookup: function (event) {\n this.query = this.$element.val();\n return this.process(this.source);\n }\n\n , process: function (items) {\n var that = this;\n\n items = $.grep(items, function (item) {\n return that.matcher(item);\n })\n\n items = this.sorter(items);\n\n if (!items.length) {\n return this.shown ? this.hide() : this;\n }\n\n return this.render(items.slice(0, this.options.items)).show();\n }\n\n , template: function() {\n if (this.options.bsVersion == '2') {\n return '