Uncaught SyntaxError: Unexpected token ,
Created by: ChrisWesterfield
I'm not shure if this is gitlab related or not, but after the update I get this js error:
Uncaught SyntaxError: Unexpected token ,
it's in application.js on line 13. (The compiled file in the assets folder of public. I searched all the coffee script files but could not find the reasion for this to happen.
it seems to be at this code block:
- ============================================================ /
!function(t){"use strict";var e=function(e,n){this.$element=t(e),this.options=t.extend({},t.fn.typeahead.defaults,n),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.updater=this.options.updater||this.updater,this.source=this.options.source,this.$menu=t(this.options.menu),this.shown=!1,this.listen()};e.prototype={constructor:e,select:function(){var t=this.$menu.find(".active").attr("data-value");return this.$element.val(this.updater(t)).change(),this.hide()},updater:function(t){return t},show:function(){var e=t.extend({},this.$element.position(),{height:this.$element[0].offsetHeight});return this.$menu.insertAfter(this.$element).css({top:e.top+e.height,left:e.left}).show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},lookup:function(){var e;return this.query=this.$element.val(),!this.query||this.query.length<this.options.minLength?this.shown?this.hide():this:(e=t.isFunction(this.source)?this.source(this.query,t.proxy(this.process,this)):this.source,e?this.process(e):this)},process:function(e){var n=this;return e=t.grep(e,function(t){return n.matcher(t)}),e=this.sorter(e),e.length?this.render(e.slice(0,this.options.items)).show():this.shown?this.hide():this},matcher:function(t){return~t.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(t){for(var e,n=[],i=[],r=[];e=t.shift();)e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?i.push(e):r.push(e):n.push(e);return n.concat(i,r)},highlighter:function(t){var e=this.query.replace(/[-[]{}()+?.,^$|#\s]/g,"$&");return t.replace(new RegExp("("+e+")","ig"),function(t,e){return""+e+""})},render:function(e){var n=this;return e=t(e).map(function(e,i){return e=t(n.options.item).attr("data-value",i),e.find("a").html(n.highlighter(i)),e[0]}),e.first().addClass("active"),this.$menu.html(e),this},next:function(){var e=this.$menu.find(".active").removeClass("active"),n=e.next();n.length||(n=t(this.$menu.find("li")[0])),n.addClass("active")},prev:function(){var t=this.$menu.find(".active").removeClass("active"),e=t.prev();e.length||(e=this.$menu.find("li").last()),e.addClass("active")},listen:function(){this.$element.on("focus",t.proxy(this.focus,this)).on("blur",t.proxy(this.blur,this)).on("keypress",t.proxy(this.keypress,this)).on("keyup",t.proxy(this.keyup,this)),this.eventSupported("keydown")&&this.$element.on("keydown",t.proxy(this.keydown,this)),this.$menu.on("click",t.proxy(this.click,this)).on("mouseenter","li",t.proxy(this.mouseenter,this)).on("mouseleave","li",t.proxy(this.mouseleave,this))},eventSupported:function(t){var e=t in this.$element;return e||(this.$element.setAttribute(t,"return;"),e="function"==typeof this.$element[t]),e},move:function(t){if(this.shown){switch(t.keyCode){case 9:case 13:case 27:t.preventDefault();break;case 38:t.preventDefault(),this.prev();break;case 40:t.preventDefault(),this.next()}t.stopPropagation()}},keydown:function(e){this.suppressKeyPressRepeat=~t.inArray(e.keyCode,[40,38,9,13,27]),this.move(e)},keypress:function(t){this.suppressKeyPressRepeat||this.move(t)},keyup:function(t){switch(t.keyCode){case 40:case 38:case 16:case 17:case 18:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:if(!this.shown)return;this.hide();break;default:this.lookup()}t.stopPropagation(),t.preventDefault()},focus:function(){this.focused=!0},blur:function(){this.focused=!1,!this.mousedover&&this.shown&&this.hide()},click:function(t){t.stopPropagation(),t.preventDefault(),this.select(),this.$element.focus()},mouseenter:function(e){this.mousedover=!0,this.$menu.find(".active").removeClass("active"),t(e.currentTarget).addClass("active")},mouseleave:function(){this.mousedover=!1,!this.focused&&this.shown&&this.hide()}};var n=t.fn.typeahead;t.fn.typeahead=function(n){return this.each(function(){var i=t(this),r=i.data("typeahead"),s="object"==typeof n&&n;r||i.data("typeahead",r=new e(this,s)),"string"==typeof n&&rn})},t.fn.typeahead.defaults={source:[],items:8,menu:'
- ',minLength:1},t.fn.typeahead.Constructor=e,t.fn.typeahead.noConflict=function(){return t.fn.typeahead=n,this},t(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(){var e=t(this);e.data("typeahead")||e.typeahead(e.data())})}(window.jQuery),/*!
- Modernizr v2.6.2
- www.modernizr.com *
- Copyright (c) Faruk Ates, Paul Irish, Alex Sexton
- Available under the BSD and MIT licenses: www.modernizr.com/license/
/
window.Modernizr=function(t,e,n){function i(t){b.cssText=t}function r(t,e){return i(.join(t+";")+(e||""))}function s(t,e){return typeof t===e}function o(t,e){return!!~(""+t).indexOf(e)}function a(t,e){for(var i in t){var r=t[i];if(!o(r,"-")&&b[r]!==n)return"pfx"==e?r:!0}return!1}function l(t,e,i){for(var r in t){var o=e[t[r]];if(o!==n)return i===!1?t[r]:s(o,"function")?o.bind(i||e):o}return!1}function c(t,e,n){var i=t.charAt(0).toUpperCase()+t.slice(1),r=(t+" "+E.join(i+" ")+i).split(" ");return s(e,"string")||s(e,"undefined")?a(r,e):(r=(t+" "+F.join(i+" ")+i).split(" "),l(r,e,n))}function h(){p.input=function(n){for(var i=0,r=n.length;r>i;i++)B[n[i]]=!!(n[i]in w);return B.list&&(B.list=!(!e.createElement("datalist")||!t.HTMLDataListElement)),B}("autocomplete autofocus list placeholder max min multiple pattern required step".split(" ")),p.inputtypes=function(t){for(var i,r,s,o=0,a=t.length;a>o;o++)w.setAttribute("type",r=t[o]),i="text"!==w.type,i&&(w.value=C,w.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&w.style.WebkitAppearance!==n?(m.appendChild(w),s=e.defaultView,i=s.getComputedStyle&&"textfield"!==s.getComputedStyle(w,null).WebkitAppearance&&0!==w.offsetHeight,m.removeChild(w)):/^(search|tel)$/.test(r)||(i=/^(url|email)$/.test(r)?w.checkValidity&&w.checkValidity()===!1:w.value!=C)),S[t[o]]=!!i;return S}("search tel url email datetime date month week time datetime-local number range color".split(" "))}var u,d,f="2.6.2",p={},g=!0,m=e.documentElement,v="modernizr",y=e.createElement(v),b=y.style,w=e.createElement("input"),C=":)",x={}.toString,=" -webkit- -moz- -o- -ms- ".split(" "),A="Webkit Moz O ms",E=A.split(" "),F=A.toLowerCase().split(" "),k={svg:"http://www.w3.org/2000/svg"},D={},S={},B={},$=[],M=$.slice,T=function(t,n,i,r){var s,o,a,l,c=e.createElement("div"),h=e.body,u=h||e.createElement("body");if(parseInt(i,10))for(;i--;)a=e.createElement("div"),a.id=r?r[i]:v+(i+1),c.appendChild(a);return s=["",'',t,""].join(""),c.id=v,(h?c:u).innerHTML+=s,u.appendChild(c),h||(u.style.background="",u.style.overflow="hidden",l=m.style.overflow,m.style.overflow="hidden",m.appendChild(u)),o=n(c,t),h?c.parentNode.removeChild(c):(u.parentNode.removeChild(u),m.style.overflow=l),!!o},L=function(e){var n=t.matchMedia||t.msMatchMedia;if(n)return n(e).matches;var i;return T("@media "+e+" { #"+v+" { position: absolute; } }",function(e){i="absolute"==(t.getComputedStyle?getComputedStyle(e,null):e.currentStyle).position}),i},R=function(){function t(t,r){r=r||e.createElement(i[t]||"div"),t="on"+t;var o=t in r;return o||(r.setAttribute||(r=e.createElement("div")),r.setAttribute&&r.removeAttribute&&(r.setAttribute(t,""),o=s(r[t],"function"),s(r[t],"undefined")||(r[t]=n),r.removeAttribute(t))),r=null,o}var i={select:"input",change:"input",submit:"form",reset:"form",error:"img",load:"img",abort:"img"};return t}(),I={}.hasOwnProperty;d=s(I,"undefined")||s(I.call,"undefined")?function(t,e){return e in t&&s(t.constructor.prototype[e],"undefined")}:function(t,e){return I.call(t,e)},Function.prototype.bind||(Function.prototype.bind=function(t){var e=this;if("function"!=typeof e)throw new TypeError;var n=M.call(arguments,1),i=function(){if(this instanceof i){var r=function(){};r.prototype=e.prototype;var s=new r,o=e.apply(s,n.concat(M.call(arguments)));return Object(o)===o?o:s}return e.apply(t,n.concat(M.call(arguments)))};return i}),D.flexbox=function(){return c("flexWrap")},D.flexboxlegacy=function(){return c("boxDirection")},D.canvas=function(){var t=e.createElement("canvas");return!(!t.getContext||!t.getContext("2d"))},D.canvastext=function(){return!(!p.canvas||!s(e.createElement("canvas").getContext("2d").fillText,"function"))},D.webgl=function(){return!!t.WebGLRenderingContext},D.touch=function(){var n;return"ontouchstart"in t||t.DocumentTouch&&e instanceof DocumentTouch?n=!0:T(["@media (",.join("touch-enabled),("),v,")","{#modernizr{top:9px;position:absolute}}"].join(""),function(t){n=9===t.offsetTop}),n},D.geolocation=function(){return"geolocation"in navigator},D.postmessage=function(){return!!t.postMessage},D.websqldatabase=function(){return!!t.openDatabase},D.indexedDB=function(){return!!c("indexedDB",t)},D.hashchange=function(){return R("hashchange",t)&&(e.documentMode===n||e.documentMode>7)},D.history=function(){return!(!t.history||!history.pushState)},D.draganddrop=function(){var t=e.createElement("div");return"draggable"in t||"ondragstart"in t&&"ondrop"in t},D.websockets=function(){return"WebSocket"in t||"MozWebSocket"in t},D.rgba=function(){return i("background-color:rgba(150,255,150,.5)"),o(b.backgroundColor,"rgba")},D.hsla=function(){return i("background-color:hsla(120,40%,100%,.5)"),o(b.backgroundColor,"rgba")||o(b.backgroundColor,"hsla")},D.multiplebgs=function(){return i("background:url(https://),url(https://),red url(https://)"),/(url\s_(.?){3}/.test(b.background)},D.backgroundsize=function(){return c("backgroundSize")},D.borderimage=function(){return c("borderImage")},D.borderradius=function(){return c("borderRadius")},D.boxshadow=function(){return c("boxShadow")},D.textshadow=function(){return""===e.createElement("div").style.textShadow},D.opacity=function(){return r("opacity:.55"),/^0.55$/.test(b.opacity)},D.cssanimations=function(){return c("animationName")},D.csscolumns=function(){return c("columnCount")},D.cssgradients=function(){var t="background-image:",e="gradient(linear,left top,right bottom,from(#9f9),to(white));",n="linear-gradient(left top,#9f9, white);";return i((t+"-webkit- ".split(" ").join(e+t)+.join(n+t)).slice(0,-t.length)),o(b.backgroundImage,"gradient")},D.cssreflections=function(){return c("boxReflect")},D.csstransforms=function(){return!!c("transform")},D.csstransforms3d=function(){var t=!!c("perspective");return t&&"webkitPerspective"in m.style&&T("@media (transform-3d),(-webkit-transform-3d){#modernizr{left:9px;position:absolute;height:3px;}}",function(e){t=9===e.offsetLeft&&3===e.offsetHeight}),t},D.csstransitions=function(){return c("transition")},D.fontface=function(){var t;return T('@font-face {font-family:"font";src:url("https://")}',function(n,i){var r=e.getElementById("smodernizr"),s=r.sheet||r.styleSheet,o=s?s.cssRules&&s.cssRules[0]?s.cssRules[0].cssText:s.cssText||"":"";t=/src/i.test(o)&&0===o.indexOf(i.split(" ")[0])}),t},D.generatedcontent=function(){var t;return T(["#",v,"{font:0/0 a}#",v,':after{content:"',C,'";visibility:hidden;font:3px/1 a}'].join(""),function(e){t=e.offsetHeight>=3}),t},D.video=function(){var t=e.createElement("video"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),n.h264=t.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),n.webm=t.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""))}catch(i){}return n},D.audio=function(){var t=e.createElement("audio"),n=!1;try{(n=!!t.canPlayType)&&(n=new Boolean(n),n.ogg=t.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),n.mp3=t.canPlayType("audio/mpeg;").replace(/^no$/,""),n.wav=t.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),n.m4a=(t.canPlayType("audio/x-m4a;")||t.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(i){}return n},D.localstorage=function(){try{return localStorage.setItem(v,v),localStorage.removeItem(v),!0}catch(t){return!1}},D.sessionstorage=function(){try{return sessionStorage.setItem(v,v),sessionStorage.removeItem(v),!0}catch(t){return!1}},D.webworkers=function(){return!!t.Worker},D.applicationcache=function(){return!!t.applicationCache},D.svg=function(){return!!e.createElementNS&&!!e.createElementNS(k.svg,"svg").createSVGRect},D.inlinesvg=function(){var t=e.createElement("div");return t.innerHTML="",(t.firstChild&&t.firstChild.namespaceURI)==k.svg},D.smil=function(){return!!e.createElementNS&&/SVGAnimate/.test(x.call(e.createElementNS(k.svg,"animate")))},D.svgclippaths=function(){return!!e.createElementNS&&/SVGClipPath/.test(x.call(e.createElementNS(k.svg,"clipPath")))};for(var N in D)d(D,N)&&(u=N.toLowerCase(),p[u]=DN,$.push((p[u]?"":"no-")+u));return p.input||h(),p.addTest=function(t,e){if("object"==typeof t)for(var i in t)d(t,i)&&p.addTest(i,t[i]);else{if(t=t.toLowerCase(),p[t]!==n)return p;e="function"==typeof e?e():e,"undefined"!=typeof g&&g&&(m.className+=" "+(e?"":"no-")+t),p[t]=e}return p},i(""),y=w=null,function(t,e){function n(t,e){var n=t.createElement("p"),i=t.getElementsByTagName("head")[0]||t.documentElement;return n.innerHTML="x"+e+"",i.insertBefore(n.lastChild,i.firstChild)}function i(){var t=v.elements;return"string"==typeof t?t.split(" "):t}function r(t){var e=m[t[p]];return e||(e={},g++,t[p]=g,m[g]=e),e}function s(t,n,i){if(n||(n=e),h)return n.createElement(t);i||(i=r(n));var s;return s=i.cache[t]?i.cache[t].cloneNode():f.test(t)?(i.cache[t]=i.createElem(t)).cloneNode():i.createElem(t),s.canHaveChildren&&!d.test(t)?i.frag.appendChild(s):s}function o(t,n){if(t||(t=e),h)return t.createDocumentFragment();n=n||r(t);for(var s=n.frag.cloneNode(),o=0,a=i(),l=a.length;l>o;o++)s.createElement(a[o]);return s}function a(t,e){e.cache||(e.cache={},e.createElem=t.createElement,e.createFrag=t.createDocumentFragment,e.frag=e.createFrag()),t.createElement=function(n){return v.shivMethods?s(n,t,e):e.createElem(n)},t.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+i().join().replace(/\w+/g,function(t){return e.createElem(t),e.frag.createElement(t),'c("'+t+'")'})+");return n}")(v,e.frag)}function l(t){t||(t=e);var i=r(t);return!v.shivCSS||c||i.hasCSS||(i.hasCSS=!!n(t,"article,aside,figcaption,figure,footer,header,hgroup,nav,section{display:block}mark{background:#FF0;color:#000}")),h||a(t,i),t}var c,h,u=t.html5||{},d=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,f=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,p="_html5shiv",g=0,m={};!function(){try{var t=e.createElement("a");t.innerHTML="",c="hidden"in t,h=1==t.childNodes.length||function(){e.createElement("a");var t=e.createDocumentFragment();return"undefined"==typeof t.cloneNode||"undefined"==typeof t.createDocumentFragment||"undefined"==typeof t.createElement}()}catch(n){c=!0,h=!0}}();var v={elements:u.elements||"abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",shivCSS:u.shivCSS!==!1,supportsUnknownElements:h,shivMethods:u.shivMethods!==!1,type:"default",shivDocument:l,createElement:s,createDocumentFragment:o};t.html5=v,l(e)}(this,e),p._version=f,p.prefixes=,p.domPrefixes=F,p.cssomPrefixes=E,p.mq=L,p.hasEvent=R,p.testProp=function(t){return a([t])},p.testAllProps=c,p.testStyles=T,p.prefixed=function(t,e,n){return e?c(t,e,n):c(t,"pfx")},m.className=m.className.replace(/(^|\s)no-js(\s|$)/,"$1$2")+(g?" js "+$.join(" "):""),p}(this,this.document),function(){var t;t=function(){function t(e,n){this.form_field=e,this.options=null!=n?n:{},t.browser_is_supported()&&(this.is_multiple=this.form_field.multiple,this.set_default_text(),this.set_default_values(),this.setup(),this.set_up_html(),this.register_observers())}return t.prototype.set_default_values=function(){var t=this;return this.click_test_action=function(e){return t.test_active_click(e)},this.activate_action=function(e){return t.activate_field(e)},this.active_field=!1,this.mouse_on_container=!1,this.results_showing=!1,this.result_highlighted=null,this.result_single_selected=null,this.allow_single_deselect=null!=this.options.allow_single_deselect&&null!=this.form_field.options[0]&&""===this.form_field.options[0].text?this.options.allow_single_deselect:!1,this.disable_search_threshold=this.options.disable_search_threshold||0,this.disable_search=this.options.disable_search||!1,this.enable_split_word_search=null!=this.options.enable_split_word_search?this.options.enable_split_word_search:!0,this.group_search=null!=this.options.group_search?this.options.group_search:!0,this.search_contains=this.options.search_contains||!1,this.single_backstroke_delete=null!=this.options.single_backstroke_delete?this.options.single_backstroke_delete:!0,this.max_selected_options=this.options.max_selected_options||1/0,this.inherit_select_classes=this.options.inherit_select_classes||!1,this.display_selected_options=null!=this.options.display_selected_options?this.options.display_selected_options:!0,this.display_disabled_options=null!=this.options.display_disabled_options?this.options.display_disabled_options:!0},t.prototype.set_default_text=function(){return this.default_text=this.form_field.getAttribute("data-placeholder")?this.form_field.getAttribute("data-placeholder"):this.is_multiple?this.options.placeholder_text_multiple||this.options.placeholder_text||t.default_multiple_text:this.options.placeholder_text_single||this.options.placeholder_text||t.default_single_text,this.results_none_found=this.form_field.getAttribute("data-no_results_text")||this.options.no_results_text||t.default_no_result_text},t.prototype.mouse_enter=function(){return this.mouse_on_container=!0},t.prototype.mouse_leave=function(){return this.mouse_on_container=!1},t.prototype.input_focus=function(){var t=this;if(this.is_multiple){if(!this.active_field)return setTimeout(function(){return t.container_mousedown()},50)}else if(!this.active_field)return this.activate_field()},t.prototype.input_blur=function(){var t=this;return this.mouse_on_container?void 0:(this.active_field=!1,setTimeout(function(){return t.blur_test()},100))},t.prototype.results_option_build=function(t){var e,n,i,r,s;for(e="",s=this.results_data,i=0,r=s.length;r>i;i++)n=s[i],e+=n.group?this.result_add_group(n):this.result_add_option(n),(null!=t?t.first:void 0)&&(n.selected&&this.is_multiple?this.choice_build(n):n.selected&&!this.is_multiple&&this.single_set_selected_text(n.text));return e},t.prototype.result_add_option=function(t){var e,n;return t.search_match?this.include_option_in_results(t)?(e=[],t.disabled||t.selected&&this.is_multiple||e.push("active-result"),!t.disabled||t.selected&&this.is_multiple||e.push("disabled-result"),t.selected&&e.push("result-selected"),null!=t.group_array_index&&e.push("group-option"),""!==t.classes&&e.push(t.classes),n=document.createElement("li"),n.className=e.join(" "),n.style.cssText=t.style,n.setAttribute("data-option-array-index",t.array_index),n.innerHTML=t.search_text,this.outerHTML(n)):"":""},t.prototype.result_add_group=function(t){var e;return t.search_match||t.group_match?t.active_options>0?(e=document.createElement("li"),e.className="group-result",e.innerHTML=t.search_text,this.outerHTML(e)):"":""},t.prototype.results_update_field=function(){return this.set_default_text(),this.is_multiple||this.results_reset_cleanup(),this.result_clear_highlight(),this.result_single_selected=null,this.results_build(),this.results_showing?this.winnow_results():void 0},t.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},t.prototype.results_search=function(){return this.results_showing?this.winnow_results():this.results_show()},t.prototype.winnow_results=function(){var t,e,n,i,r,s,o,a,l,c,h,u,d;for(this.no_results_clear(),r=0,o=this.get_search_text(),t=o.replace(/[-[]{}()+?.,^$|#\s]/g,"$&"),i=this.search_contains?"":"^",n=new RegExp(i+t,"i"),c=new RegExp(t,"i"),d=this.results_data,h=0,u=d.length;u>h;h++)e=d[h],e.search_match=!1,s=null,this.include_option_in_results(e)&&(e.group&&(e.group_match=!1,e.active_options=0),null!=e.group_array_index&&this.results_data[e.group_array_index]&&(s=this.results_data[e.group_array_index],0===s.active_options&&s.search_match&&(r+=1),s.active_options+=1),(!e.group||this.group_search)&&(e.search_text=e.group?e.label:e.html,e.search_match=this.search_string_match(e.search_text,n),e.search_match&&!e.group&&(r+=1),e.search_match?(o.length&&(a=e.search_text.search(c),l=e.search_text.substr(0,a+o.length)+""+e.search_text.substr(a+o.length),e.search_text=l.substr(0,a)+""+l.substr(a)),null!=s&&(s.group_match=!0)):null!=e.group_array_index&&this.results_data[e.group_array_index].search_match&&(e.search_match=!0)));return this.result_clear_highlight(),1>r&&o.length?(this.update_results_content(""),this.no_results(o)):(this.update_results_content(this.results_option_build()),this.winnow_results_set_highlight())},t.prototype.search_string_match=function(t,e){var n,i,r,s;if(e.test(t))return!0;if(this.enable_split_word_search&&(t.indexOf(" ")>=0||0===t.indexOf("["))&&(i=t.replace(/[|]/g,"").split(" "),i.length))for(r=0,s=i.length;s>r;r++)if(n=i[r],e.test(n))return!0},t.prototype.choices_count=function(){var t,e,n,i;if(null!=this.selected_option_count)return this.selected_option_count;for(this.selected_option_count=0,i=this.form_field.options,e=0,n=i.length;n>e;e++)t=i[e],t.selected&&(this.selected_option_count+=1);return this.selected_option_count},t.prototype.choices_click=function(t){return t.preventDefault(),this.results_showing||this.is_disabled?void 0:this.results_show()},t.prototype.keyup_checker=function(t){var e,n;switch(e=null!=(n=t.which)?n:t.keyCode,this.search_field_scale(),e){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices_count()>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:if(t.preventDefault(),this.results_showing)return this.result_select(t);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},t.prototype.container_width=function(){return null!=this.options.width?this.options.width:""+this.form_field.offsetWidth+"px"},t.prototype.include_option_in_results=function(t){return this.is_multiple&&!this.display_selected_options&&t.selected?!1:!this.display_disabled_options&&t.disabled?!1:t.empty?!1:!0},t.prototype.search_results_touchstart=function(t){return this.touch_started=!0,this.search_results_mouseover(t)},t.prototype.search_results_touchmove=function(t){return this.touch_started=!1,this.search_results_mouseout(t)},t.prototype.search_results_touchend=function(t){return this.touch_started?this.search_results_mouseup(t):void 0},t.prototype.outerHTML=function(t){var e;return t.outerHTML?t.outerHTML:(e=document.createElement("div"),e.appendChild(t),e.innerHTML)},t.browser_is_supported=function(){return"Microsoft Internet Explorer"===window.navigator.appName?document.documentMode>=8:/iP(od|hone)/i.test(window.navigator.userAgent)?!1:/Android/i.test(window.navigator.userAgent)&&/Mobile/i.test(window.navigator.userAgent)?!1:!0},t.default_multiple_text="Select Some Options",t.default_single_text="Select an Option",t.default_no_result_text="No results match",t}(),window.AbstractChosen=t}.call(this),function(){var t;t=function(){function t(){this.options_index=0,this.parsed=[]}return t.prototype.add_node=function(t){return"OPTGROUP"===t.nodeName.toUpperCase()?this.add_group(t):this.add_option(t)},t.prototype.add_group=function(t){var e,n,i,r,s,o;for(e=this.parsed.length,this.parsed.push({array_index:e,group:!0,label:this.escapeExpression(t.label),children:0,disabled:t.disabled}),s=t.childNodes,o=[],i=0,r=s.length;r>i;i++)n=s[i],o.push(this.add_option(n,e,t.disabled));return o},t.prototype.add_option=function(t,e,n){return"OPTION"===t.nodeName.toUpperCase()?(""!==t.text?(null!=e&&(this.parsed[e].children+=1),this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,value:t.value,text:t.text,html:t.innerHTML,selected:t.selected,disabled:n===!0?n:t.disabled,group_array_index:e,classes:t.className,style:t.style.cssText})):this.parsed.push({array_index:this.parsed.length,options_index:this.options_index,empty:!0}),this.options_index+=1):void 0},t.prototype.escapeExpression=function(t){var e,n;return null==t||t===!1?"":/[&<>"'
]/.test(t)?(e={"<":"<",">":">",'"':""","'":"'","
":"`"},n=/&(?!\w+;)|[<>"'`]/g,t.replace(n,function(t){return e[t]||"&"})):t},t}(),t.select_to_array=function(e){var n,i,r,s,o;for(i=new t,o=e.childNodes,r=0,s=o.length;s>r;r++)n=o[r],i.add_node(n);return i.parsed},window.SelectParser=t}.call(this),function(){var t,e,n,i={}.hasOwnProperty,r=function(t,e){function n(){this.constructor=t}for(var r in e)i.call(e,r)&&(t[r]=e[r]);return n.prototype=e.prototype,t.prototype=new n,t.super=e.prototype,t};t=jQuery,t.fn.extend({chosen:function(n){return AbstractChosen.browser_is_supported()?this.each(function(){var i,r;i=t(this),r=i.data("chosen"),"destroy"===n&&r?r.destroy():r||i.data("chosen",new e(this,n))}):this}}),e=function(e){function i(){return n=i.super.constructor.apply(this,arguments)}return r(i,e),i.prototype.setup=function(){return this.form_field_jq=t(this.form_field),this.current_selectedIndex=this.form_field.selectedIndex,this.is_rtl=this.form_field_jq.hasClass("chosen-rtl")},i.prototype.set_up_html=function(){var e,n;return e=["chosen-container"],e.push("chosen-container-"+(this.is_multiple?"multi":"single")),this.inherit_select_classes&&this.form_field.className&&e.push(this.form_field.className),this.is_rtl&&e.push("chosen-rtl"),n={"class":e.join(" "),style:"width: "+this.container_width()+";",title:this.form_field.title},this.form_field.id.length&&(n.id=this.form_field.id.replace(/[^\w]/g,"")+"chosen"),this.container=t("",n),this.is_multiple?this.container.html(''):this.container.html(''+this.default_text+'- ",{"class":"search-choice"}).html(""+e.html+""),e.disabled?n.addClass("search-choice-disabled"):(i=t("",{"class":"search-choice-close","data-option-array-index":e.array_index}),i.bind("click.chosen",function(t){return r.choice_destroy_link_click(t)}),n.append(i)),this.search_container.before(n)},i.prototype.choice_destroy_link_click=function(e){return e.preventDefault(),e.stopPropagation(),this.is_disabled?void 0:this.choice_destroy(t(e.target))},i.prototype.choice_destroy=function(t){return this.result_deselect(t[0].getAttribute("data-option-array-index"))?(this.show_search_field_default(),this.is_multiple&&this.choices_count()>0&&this.search_field.val().length<1&&this.results_hide(),t.parents("li").first().remove(),this.search_field_scale()):void 0},i.prototype.results_reset=function(){return this.form_field.options[0].selected=!0,this.selected_option_count=null,this.single_set_selected_text(),this.show_search_field_default(),this.results_reset_cleanup(),this.form_field_jq.trigger("change"),this.active_field?this.results_hide():void 0},i.prototype.results_reset_cleanup=function(){return this.current_selectedIndex=this.form_field.selectedIndex,this.selected_item.find("abbr").remove()},i.prototype.result_select=function(t){var e,n,i;return this.result_highlight?(e=this.result_highlight,this.result_clear_highlight(),this.is_multiple&&this.max_selected_options<=this.choices_count()?(this.form_field_jq.trigger("chosen:maxselected",{chosen:this}),!1):(this.is_multiple?e.removeClass("active-result"):(this.result_single_selected&&(this.result_single_selected.removeClass("result-selected"),i=this.result_single_selected[0].getAttribute("data-option-array-index"),this.results_data[i].selected=!1),this.result_single_selected=e),e.addClass("result-selected"),n=this.results_data[e[0].getAttribute("data-option-array-index")],n.selected=!0,this.form_field.options[n.options_index].selected=!0,this.selected_option_count=null,this.is_multiple?this.choice_build(n):this.single_set_selected_text(n.text),(t.metaKey||t.ctrlKey)&&this.is_multiple||this.results_hide(),this.search_field.val(""),(this.is_multiple||this.form_field.selectedIndex!==this.current_selectedIndex)&&this.form_field_jq.trigger("change",{selected:this.form_field.options[n.options_index].value}),this.current_selectedIndex=this.form_field.selectedIndex,this.search_field_scale())):void 0 },i.prototype.single_set_selected_text=function(t){return null==t&&(t=this.default_text),t===this.default_text?this.selected_item.addClass("chosen-default"):(this.single_deselect_control_build(),this.selected_item.removeClass("chosen-default")),this.selected_item.find("span").text(t)},i.prototype.result_deselect=function(t){var e;return e=this.results_data[t],this.form_field.options[e.options_index].disabled?!1:(e.selected=!1,this.form_field.options[e.options_index].selected=!1,this.selected_option_count=null,this.result_clear_highlight(),this.results_showing&&this.winnow_results(),this.form_field_jq.trigger("change",{deselected:this.form_field.options[e.options_index].value}),this.search_field_scale(),!0)},i.prototype.single_deselect_control_build=function(){return this.allow_single_deselect?(this.selected_item.find("abbr").length||this.selected_item.find("span").first().after(''),this.selected_item.addClass("chosen-single-with-deselect")):void 0},i.prototype.get_search_text=function(){return this.search_field.val()===this.default_text?"":t("").text(t.trim(this.search_field.val())).html()},i.prototype.winnow_results_set_highlight=function(){var t,e;return e=this.is_multiple?[]:this.search_results.find(".result-selected.active-result"),t=e.length?e.first():this.search_results.find(".active-result").first(),null!=t?this.result_do_highlight(t):void 0},i.prototype.no_results=function(e){var n;return n=t('
- '+this.results_none_found+' ""
'),n.find("span").first().html(e),this.search_results.append(n)},i.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},i.prototype.keydown_arrow=function(){var t;return this.results_showing&&this.result_highlight?(t=this.result_highlight.nextAll("li.active-result").first())?this.result_do_highlight(t):void 0:this.results_show()},i.prototype.keyup_arrow=function(){var t;return this.results_showing||this.is_multiple?this.result_highlight?(t=this.result_highlight.prevAll("li.active-result"),t.length?this.result_do_highlight(t.first()):(this.choices_count()>0&&this.results_hide(),this.result_clear_highlight())):void 0:this.results_show()},i.prototype.keydown_backstroke=function(){var t;return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(t=this.search_container.siblings("li.search-choice").last(),t.length&&!t.hasClass("search-choice-disabled")?(this.pending_backstroke=t,this.single_backstroke_delete?this.keydown_backstroke():this.pending_backstroke.addClass("search-choice-focus")):void 0)},i.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},i.prototype.keydown_checker=function(t){var e,n;switch(e=null!=(n=t.which)?n:t.keyCode,this.search_field_scale(),8!==e&&this.pending_backstroke&&this.clear_backstroke(),e){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(t),this.mouse_on_container=!1;break;case 13:t.preventDefault();break;case 38:t.preventDefault(),this.keyup_arrow();break;case 40:t.preventDefault(),this.keydown_arrow()}},i.prototype.search_field_scale=function(){var e,n,i,r,s,o,a,l,c;if(this.is_multiple){for(i=0,a=0,s="position:absolute; left: -1000px; top: -1000px; display:none;",o=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"],l=0,c=o.length;c>l;l++)r=o[l],s+=r+":"+this.search_field.css(r)+";";return e=t("",{style:s}),e.text(this.search_field.val()),t("body").append(e),a=e.width()+25,e.remove(),n=this.container.outerWidth(),a>n-10&&(a=n-10),this.search_field.css({width:a+"px"})}},i}(AbstractChosen)}.call(this),/ Copyright 2012 Igor Vaynberg
It would be great to get more infos. The installed version is 6.4.3 (the latest stable)