1/*! 2 * # Semantic UI 2.1.6 - Dropdown 3 * http://github.com/semantic-org/semantic-ui/ 4 * 5 * 6 * Copyright 2015 Contributors 7 * Released under the MIT license 8 * http://opensource.org/licenses/MIT 9 * 10 */ 11(function(n,t,i,r){"use strict";n.fn.dropdown=function(u){var e=n(this),o=n(i),a=e.selector||"",h="ontouchstart"in i.documentElement,c=(new Date).getTime(),s=[],l=arguments[0],v=typeof l=="string",y=[].slice.call(arguments,1),f;return e.each(function(p){var b=n.isPlainObject(u)?n.extend(!0,{},n.fn.dropdown.settings,u):n.extend({},n.fn.dropdown.settings),k=b.className,at=b.message,ri=b.fields,ft=b.keys,ut=b.metadata,ui=b.namespace,ei=b.regExp,g=b.selector,ct=b.error,dt=b.templates,it="."+ui,gt="module-"+ui,d=n(this),fi=n(b.context),st=d.find(g.text),et=d.find(g.search),rt=d.find(g.input),oi=d.find(g.icon),bt=d.prev().find(g.text).length>0?d.prev().find(g.text):d.prev(),nt=d.children(g.menu),tt=nt.find(g.item),vt=!1,ni=!1,ti=!1,ot=this,yt=d.data(gt),ii,pt,lt,kt,ht,wt,w;w={initialize:function(){w.debug("Initializing dropdown",b);w.is.alreadySetup()?w.setup.reference():(w.setup.layout(),w.refreshData(),w.save.defaults(),w.restore.selected(),w.create.id(),w.bind.events(),w.observeChanges(),w.instantiate())},instantiate:function(){w.verbose("Storing instance of dropdown",w);yt=w;d.data(gt,w)},destroy:function(){w.verbose("Destroying previous dropdown",d);w.remove.tabbable();d.off(it).removeData(gt);nt.off(it);o.off(lt);ht&&ht.disconnect();wt&&wt.disconnect()},observeChanges:function(){"MutationObserver"in t&&(ht=new MutationObserver(function(){w.debug("<select> modified, recreating menu");w.setup.select()}),wt=new MutationObserver(function(){w.debug("Menu modified, updating selector cache");w.refresh()}),w.has.input()&&ht.observe(rt[0],{childList:!0,subtree:!0}),w.has.menu()&&wt.observe(nt[0],{childList:!0,subtree:!0}),w.debug("Setting up mutation observer",ht,wt))},create:{id:function(){kt=(Math.random().toString(16)+"000000000").substr(2,8);lt="."+kt;w.verbose("Creating unique id for element",kt)},userChoice:function(t){var i,u,f;return(t=t||w.get.userValues(),!t)?!1:(t=n.isArray(t)?t:[t],n.each(t,function(t,e){w.get.item(e)===!1&&(f=b.templates.addition(w.add.variables(at.addResult,e)),u=n("<div />").html(f).attr("data-"+ut.value,e).attr("data-"+ut.text,e).addClass(k.addition).addClass(k.item),i=i===r?u:i.add(u),w.verbose("Creating user choices for value",e,u))}),i)},userLabels:function(){var t=w.get.userValues();t&&(w.debug("Adding user labels",t),n.each(t,function(n,t){w.verbose("Adding custom user value");w.add.label(t,t)}))},menu:function(){nt=n("<div />").addClass(k.menu).appendTo(d)}},search:function(n){n=n!==r?n:w.get.query();w.verbose("Searching for query",n);w.filter(n)},select:{firstUnfiltered:function(){w.verbose("Selecting first non-filtered element");w.remove.selectedItem();tt.not(g.unselectable).eq(0).addClass(k.selected)},nextAvailable:function(n){n=n.eq(0);var t=n.nextAll(g.item).not(g.unselectable).eq(0),i=n.prevAll(g.item).not(g.unselectable).eq(0),r=t.length>0;r?(w.verbose("Moving selection to",t),t.addClass(k.selected)):(w.verbose("Moving selection to",i),i.addClass(k.selected))}},setup:{api:function(){var n={debug:b.debug,on:!1};w.verbose("First request, initializing API");d.api(n)},layout:function(){d.is("select")&&(w.setup.select(),w.setup.returnedObject());w.has.menu()||w.create.menu();w.is.search()&&!w.has.search()&&(w.verbose("Adding search input"),et=n("<input />").addClass(k.search).prop("autocomplete","off").insertBefore(st));b.allowTab&&w.set.tabbable()},select:function(){var t=w.get.selectValues();w.debug("Dropdown initialized on a select",t);d.is("select")&&(rt=d);rt.parent(g.dropdown).length>0?(w.debug("UI dropdown already exists. Creating dropdown menu only"),d=rt.closest(g.dropdown),w.has.menu()||w.create.menu(),nt=d.children(g.menu),w.setup.menu(t)):(w.debug("Creating entire dropdown from select"),d=n("<div />").attr("class",rt.attr("class")).addClass(k.selection).addClass(k.dropdown).html(dt.dropdown(t)).insertBefore(rt),rt.hasClass(k.multiple)&&rt.prop("multiple")===!1&&(w.error(ct.missingMultiple),rt.prop("multiple",!0)),rt.is("[multiple]")&&w.set.multiple(),rt.prop("disabled")&&(w.debug("Disabling dropdown"),d.addClass(k.disabled)),rt.removeAttr("class").detach().prependTo(d));w.refresh()},menu:function(n){nt.html(dt.menu(n,ri));tt=nt.find(g.item)},reference:function(){w.debug("Dropdown behavior was called on select, replacing with closest dropdown");d=d.parent(g.dropdown);w.refresh();w.setup.returnedObject();v&&(yt=w,w.invoke(l))},returnedObject:function(){var n=e.slice(0,p),t=e.slice(p+1);e=n.add(d).add(t)}},refresh:function(){w.refreshSelectors();w.refreshData()},refreshSelectors:function(){w.verbose("Refreshing selector cache");st=d.find(g.text);et=d.find(g.search);rt=d.find(g.input);oi=d.find(g.icon);bt=d.prev().find(g.text).length>0?d.prev().find(g.text):d.prev();nt=d.children(g.menu);tt=nt.find(g.item)},refreshData:function(){w.verbose("Refreshing cached metadata");tt.removeData(ut.text).removeData(ut.value);d.removeData(ut.defaultText).removeData(ut.defaultValue).removeData(ut.placeholderText)},toggle:function(){w.verbose("Toggling menu visibility");w.is.active()?w.hide():w.show()},show:function(t){if(t=n.isFunction(t)?t:function(){},w.can.show()&&!w.is.active()){if(w.debug("Showing dropdown"),w.is.multiple()&&!w.has.search()&&w.is.allFiltered())return!0;!w.has.message()||w.has.maxSelections()||w.has.allResultsFiltered()||w.remove.message();b.onShow.call(ot)!==!1&&w.animate.show(function(){w.can.click()&&w.bind.intent();w.set.visible();t.call(ot)})}},hide:function(t){t=n.isFunction(t)?t:function(){};w.is.active()&&(w.debug("Hiding dropdown"),b.onHide.call(ot)!==!1&&w.animate.hide(function(){w.remove.visible();t.call(ot)}))},hideOthers:function(){w.verbose("Finding other dropdowns to hide");e.not(d).has(g.menu+"."+k.visible).dropdown("hide")},hideMenu:function(){w.verbose("Hiding menu instantaneously");w.remove.active();w.remove.visible();nt.transition("hide")},hideSubMenus:function(){var n=nt.children(g.item).find(g.menu);w.verbose("Hiding sub menus",n);n.transition("hide")},bind:{events:function(){h&&w.bind.touchEvents();w.bind.keyboardEvents();w.bind.inputEvents();w.bind.mouseEvents()},touchEvents:function(){if(w.debug("Touch device detected binding additional touch events"),!w.is.searchSelection()&&w.is.single())d.on("touchstart"+it,w.event.test.toggle);nt.on("touchstart"+it,g.item,w.event.item.mouseenter)},keyboardEvents:function(){w.verbose("Binding keyboard events");d.on("keydown"+it,w.event.keydown);if(w.has.search())d.on(w.get.inputEvent()+it,g.search,w.event.input);if(w.is.multiple())o.on("keydown"+lt,w.event.document.keydown)},inputEvents:function(){w.verbose("Binding input change events");d.on("change"+it,g.input,w.event.change)},mouseEvents:function(){if(w.verbose("Binding mouse events"),w.is.multiple())d.on("click"+it,g.label,w.event.label.click).on("click"+it,g.remove,w.event.remove.click);if(w.is.searchSelection()){d.on("mousedown"+it,g.menu,w.event.menu.mousedown).on("mouseup"+it,g.menu,w.event.menu.mouseup).on("click"+it,g.icon,w.event.icon.click).on("click"+it,g.search,w.show).on("focus"+it,g.search,w.event.search.focus).on("blur"+it,g.search,w.event.search.blur).on("click"+it,g.text,w.event.text.focus);if(w.is.multiple())d.on("click"+it,w.event.click)}else{if(b.on=="click")d.on("click"+it,g.icon,w.event.icon.click).on("click"+it,w.event.test.toggle);else if(b.on=="hover")d.on("mouseenter"+it,w.delay.show).on("mouseleave"+it,w.delay.hide);else d.on(b.on+it,w.toggle);d.on("mousedown"+it,w.event.mousedown).on("mouseup"+it,w.event.mouseup).on("focus"+it,w.event.focus).on("blur"+it,w.event.blur)}nt.on("mouseenter"+it,g.item,w.event.item.mouseenter).on("mouseleave"+it,g.item,w.event.item.mouseleave).on("click"+it,g.item,w.event.item.click)},intent:function(){if(w.verbose("Binding hide intent event to document"),h)o.on("touchstart"+lt,w.event.test.touch).on("touchmove"+lt,w.event.test.touch);o.on("click"+lt,w.event.test.hide)}},unbind:{intent:function(){w.verbose("Removing hide intent event from document");h&&o.off("touchstart"+lt).off("touchmove"+lt);o.off("click"+lt)}},filter:function(n){var t=n!==r?n:w.get.query(),i=function(){w.is.multiple()&&w.filterActive();w.select.firstUnfiltered();w.has.allResultsFiltered()?b.onNoResults.call(ot,t)?b.allowAdditions||(w.verbose("All items filtered, showing message",t),w.add.message(at.noResults)):(w.verbose("All items filtered, hiding dropdown",t),w.hideMenu()):w.remove.message();b.allowAdditions&&w.add.userSuggestion(n);w.is.searchSelection()&&w.can.show()&&w.is.focusedOnSearch()&&w.show()};b.useLabels&&w.has.maxSelections()||(b.apiSettings?w.can.useAPI()?w.queryRemote(t,function(){i()}):w.error(ct.noAPI):(w.filterItems(t),i()))},queryRemote:function(t,i){var r={errorDuration:!1,throttle:b.throttle,urlData:{query:t},onError:function(){w.add.message(at.serverError);i()},onFailure:function(){w.add.message(at.serverError);i()},onSuccess:function(n){w.remove.message();w.setup.menu({values:n[ri.remoteValues]});i()}};d.api("get request")||w.setup.api();r=n.extend(!0,{},r,b.apiSettings);d.api("setting",r).api("query")},filterItems:function(t){var u=t!==r?t:w.get.query(),i=null,e=w.escape.regExp(u),f=new RegExp("^"+e,"igm");w.has.query()&&(i=[],w.verbose("Searching for matching values",u),tt.each(function(){var e=n(this),t,r;return(b.match=="both"||b.match=="text")&&((t=String(w.get.choiceText(e,!1)),t.search(f)!==-1)||b.fullTextSearch&&w.fuzzySearch(u,t))?(i.push(this),!0):(b.match=="both"||b.match=="value")&&((r=String(w.get.choiceValue(e,t)),r.search(f)!==-1)||b.fullTextSearch&&w.fuzzySearch(u,r))?(i.push(this),!0):void 0}));w.debug("Showing only matched items",u);w.remove.filteredItem();i&&tt.not(i).addClass(k.filtered)},fuzzySearch:function(n,t){var r=t.length,u=n.length,i,f,e;if(n=n.toLowerCase(),t=t.toLowerCase(),u>r)return!1;if(u===r)return n===t;n:for(i=0,f=0;i<u;i++){for(e=n.charCodeAt(i);f<r;)if(t.charCodeAt(f++)===e)continue n;return!1}return!0},filterActive:function(){b.useLabels&&tt.filter("."+k.active).addClass(k.filtered)},focusSearch:function(){w.is.search()&&!w.is.focusedOnSearch()&&et[0].focus()},forceSelection:function(){var t=tt.not(k.filtered).filter("."+k.selected).eq(0),i=tt.not(k.filtered).filter("."+k.active).eq(0),n=t.length>0?t:i,r=n.size()>0;if(w.has.query()){if(r){w.debug("Forcing partial selection to selected item",n);w.event.item.click.call(n);return}w.remove.searchTerm()}w.hide()},event:{change:function(){ti||(w.debug("Input changed, updating selection"),w.set.selected())},focus:function(){b.showOnFocus&&!vt&&w.is.hidden()&&!pt&&w.show()},click:function(t){var i=n(t.target);i.is(d)&&!w.is.focusedOnSearch()&&w.focusSearch()},blur:function(){pt=i.activeElement===this;vt||pt||(w.remove.activeLabel(),w.hide())},mousedown:function(){vt=!0},mouseup:function(){vt=!1}
11,search:{focus:function(){vt=!0;w.is.multiple()&&w.remove.activeLabel();b.showOnFocus&&(w.search(),w.show())},blur:function(){pt=i.activeElement===this;ni||pt?pt&&b.forceSelection&&w.forceSelection():w.is.multiple()?(w.remove.activeLabel(),w.hide()):b.forceSelection?w.forceSelection():w.hide()}},icon:{click:function(n){w.toggle();n.stopPropagation()}},text:{focus:function(){vt=!0;w.focusSearch()}},input:function(){(w.is.multiple()||w.is.searchSelection())&&w.set.filtered();clearTimeout(w.timer);w.timer=setTimeout(w.search,b.delay.search)},label:{click:function(t){var i=n(this),u=d.find(g.label),r=u.filter("."+k.active),f=i.nextAll("."+k.active),e=i.prevAll("."+k.active),o=f.length>0?i.nextUntil(f).add(r).add(i):i.prevUntil(e).add(r).add(i);t.shiftKey?(r.removeClass(k.active),o.addClass(k.active)):t.ctrlKey?i.toggleClass(k.active):(r.removeClass(k.active),i.addClass(k.active));b.onLabelSelect.apply(this,u.filter("."+k.active))}},remove:{click:function(){var t=n(this).parent();t.hasClass(k.active)?w.remove.activeLabels():w.remove.activeLabels(t)}},test:{toggle:function(n){var t=w.is.multiple()?w.show:w.toggle;w.determine.eventOnElement(n,t)&&n.preventDefault()},touch:function(n){w.determine.eventOnElement(n,function(){n.type=="touchstart"?w.timer=setTimeout(function(){w.hide()},b.delay.touch):n.type=="touchmove"&&clearTimeout(w.timer)});n.stopPropagation()},hide:function(n){w.determine.eventInModule(n,w.hide)}},menu:{mousedown:function(){ni=!0},mouseup:function(){ni=!1}},item:{mouseenter:function(t){var i=n(this).children(g.menu),r=n(this).siblings(g.item).children(g.menu);i.length>0&&(clearTimeout(w.itemTimer),w.itemTimer=setTimeout(function(){w.verbose("Showing sub-menu",i);n.each(r,function(){w.animate.hide(!1,n(this))});w.animate.show(!1,i)},b.delay.show),t.preventDefault())},mouseleave:function(){var t=n(this).children(g.menu);t.length>0&&(clearTimeout(w.itemTimer),w.itemTimer=setTimeout(function(){w.verbose("Hiding sub-menu",t);w.animate.hide(!1,t)},b.delay.hide))},touchend:function(){},click:function(t){var i=n(this),f=t?n(t.target):n(""),r=i.find(g.menu),u=w.get.choiceText(i),e=w.get.choiceValue(i,u),o=r.length>0,s=r.find(f).length>0;s||o&&!b.allowCategorySelection||(b.useLabels||(w.remove.filteredItem(),w.remove.searchTerm(),w.set.scrollPosition(i)),w.determine.selectAction.call(this,u,e))}},document:{keydown:function(n){var u=n.which,a=w.is.inObject(u,ft);if(a){var i=d.find(g.label),t=i.filter("."+k.active),p=t.data(ut.value),o=i.index(t),v=i.length,r=t.length>0,s=t.length>1,y=o===0,h=o+1==v,e=w.is.searchSelection(),f=w.is.focusedOnSearch(),c=w.is.focused(),l=f&&w.get.caretPosition()===0;if(e&&!r&&!f)return;u==ft.leftArrow?(c||l)&&!r?(w.verbose("Selecting previous label"),i.last().addClass(k.active)):r&&(n.shiftKey?w.verbose("Adding previous label to selection"):(w.verbose("Selecting previous label"),i.removeClass(k.active)),y&&!s?t.addClass(k.active):t.prev(g.siblingLabel).addClass(k.active).end(),n.preventDefault()):u==ft.rightArrow?(c&&!r&&i.first().addClass(k.active),r&&(n.shiftKey?w.verbose("Adding next label to selection"):(w.verbose("Selecting next label"),i.removeClass(k.active)),h?e?f?i.removeClass(k.active):w.focusSearch():s?t.next(g.siblingLabel).addClass(k.active):t.addClass(k.active):t.next(g.siblingLabel).addClass(k.active),n.preventDefault())):u==ft.deleteKey||u==ft.backspace?r?(w.verbose("Removing active labels"),h&&e&&!f&&w.focusSearch(),t.last().next(g.siblingLabel).addClass(k.active),w.remove.activeLabels(t),n.preventDefault()):l&&!r&&u==ft.backspace&&(w.verbose("Removing last label on input backspace"),t=i.last().addClass(k.active),w.remove.activeLabels(t)):t.removeClass(k.active)}}},keydown:function(n){var t=n.which,a=w.is.inObject(t,ft);if(a){var o=tt.not(g.unselectable).filter("."+k.selected).eq(0),v=nt.children("."+k.active).eq(0),i=o.length>0?o:v,y=i.length>0?i.siblings(":not(."+k.filtered+")").andSelf():nt.children(":not(."+k.filtered+")"),f=i.children(g.menu),u=i.closest(g.menu),s=u.hasClass(k.visible)||u.hasClass(k.animating)||u.parent(g.menu).length>0,h=f.length>0,e=i.length>0,p=i.not(g.unselectable).length>0,c=t==ft.delimiter&&b.allowAdditions&&w.is.multiple(),r,l;if(w.is.visible()){if((t==ft.enter||c)&&(t==ft.enter&&e&&h&&!b.allowCategorySelection?(w.verbose("Pressed enter on unselectable category, opening sub menu"),t=ft.rightArrow):p&&(w.verbose("Selecting item from keyboard shortcut",i),w.event.item.click.call(i,n),w.is.searchSelection()&&w.remove.searchTerm()),n.preventDefault()),t==ft.leftArrow&&(l=u[0]!==nt[0],l&&(w.verbose("Left key pressed, closing sub-menu"),w.animate.hide(!1,u),i.removeClass(k.selected),u.closest(g.item).addClass(k.selected),n.preventDefault())),t==ft.rightArrow&&h&&(w.verbose("Right key pressed, opening sub-menu"),w.animate.show(!1,f),i.removeClass(k.selected),f.find(g.item).eq(0).addClass(k.selected),n.preventDefault()),t==ft.upArrow){if(r=e&&s?i.prevAll(g.item+":not("+g.unselectable
11+")").eq(0):tt.eq(0),y.index(r)<0){w.verbose("Up key pressed but reached top of current menu");n.preventDefault();return}w.verbose("Up key pressed, changing active item");i.removeClass(k.selected);r.addClass(k.selected);w.set.scrollPosition(r);n.preventDefault()}if(t==ft.downArrow){if(r=e&&s?r=i.nextAll(g.item+":not("+g.unselectable+")").eq(0):tt.eq(0),r.length===0){w.verbose("Down key pressed but reached bottom of current menu");n.preventDefault();return}w.verbose("Down key pressed, changing active item");tt.removeClass(k.selected);r.addClass(k.selected);w.set.scrollPosition(r);n.preventDefault()}t==ft.pageUp&&(w.scrollPage("up"),n.preventDefault());t==ft.pageDown&&(w.scrollPage("down"),n.preventDefault());t==ft.escape&&(w.verbose("Escape key pressed, closing dropdown"),w.hide())}else c&&n.preventDefault(),t==ft.downArrow&&(w.verbose("Down key pressed, showing dropdown"),w.show(),n.preventDefault())}else w.is.selection()&&!w.is.search()&&w.set.selectedLetter(String.fromCharCode(t))}},trigger:{change:function(){var n=i.createEvent("HTMLEvents"),t=rt[0];t&&(w.verbose("Triggering native change event"),n.initEvent("change",!0,!1),t.dispatchEvent(n))}},determine:{selectAction:function(t,i){w.verbose("Determining action",b.action);n.isFunction(w.action[b.action])?(w.verbose("Triggering preset action",b.action,t,i),w.action[b.action].call(this,t,i)):n.isFunction(b.action)?(w.verbose("Triggering user action",b.action,t,i),b.action.call(this,t,i)):w.error(ct.action,b.action)},eventInModule:function(t,r){var u=n(t.target),f=u.closest(i.documentElement).length>0,e=u.closest(d).length>0;return r=n.isFunction(r)?r:function(){},f&&!e?(w.verbose("Triggering event",r),r(),!0):(w.verbose("Event occurred in dropdown, canceling callback"),!1)},eventOnElement:function(t,i){var r=n(t.target),u=r.closest(g.siblingLabel),f=d.find(u).length===0,e=r.closest(nt).length===0;return i=n.isFunction(i)?i:function(){},f&&e?(w.verbose("Triggering event",i),i(),!0):(w.verbose("Event occurred in dropdown menu, canceling callback"),!1)}},action:{nothing:function(){},activate:function(t,i){if(i=i!==r?i:t,w.can.activate(n(this))){if(w.set.selected(i,n(this)),w.is.multiple()&&!w.is.allFiltered())return;w.hideAndClear()}},select:function(){w.action.activate.call(this)},combo:function(t,i){i=i!==r?i:t;w.set.selected(i,n(this));w.hideAndClear()},hide:function(n,t){w.set.value(t);w.hideAndClear()}},get:{id:function(){return kt},defaultText:function(){return d.data(ut.defaultText)},defaultValue:function(){return d.data(ut.defaultValue)},placeholderText:function(){return d.data(ut.placeholderText)||""},text:function(){return st.text()},query:function(){return n.trim(et.val())},searchWidth:function(n){return n*b.glyphWidth+"em"},selectionCount:function(){var t=w.get.values();return w.is.multiple()?n.isArray(t)?t.length:0:w.get.value()!==""?1:0},transition:function(n){return b.transition=="auto"?w.is.upward(n)?"slide up":"slide down":b.transition},userValues:function(){var t=w.get.values();return t?(t=n.isArray(t)?t:[t],n.grep(t,function(n){return w.get.item(n)===!1})):!1},uniqueArray:function(t){return n.grep(t,function(i,r){return n.inArray(i,t)===r})},caretPosition:function(){var n=et.get(0),t,r;return"selectionStart"in n?n.selectionStart:i.selection?(n.focus(),t=i.selection.createRange(),r=t.text.length,t.moveStart("character",-n.value.length),t.text.length-r):void 0},value:function(){var t=rt.length>0?rt.val():d.data(ut.value);return n.isArray(t)&&t.length===1&&t[0]===""?"":t},values:function(){var n=w.get.value();return n===""?"":!w.has.selectInput()&&w.is.multiple()?typeof n=="string"?n.split(b.delimiter):"":n},remoteValues:function(){var t=w.get.values(),i=!1;return t&&(typeof t=="string"&&(t=[t]),i={},n.each(t,function(n,t){var r=w.read.remoteData(t);w.verbose("Restoring value from session data",r,t);i[t]=r?r:t})),i},choiceText:function(t,i){return i=i!==r?i:b.preserveHTML,t?(t.find(g.menu).length>0&&(w.verbose("Retreiving text of element with sub-menu"),t=t.clone(),t.find(g.menu).remove(),t.find(g.menuIcon).remove()),t.data(ut.text)!==r?t.data(ut.text):i?n.trim(t.html()):n.trim(t.text())):void 0},choiceValue:function(t,i){return(i=i||w.get.choiceText(t),!t)?!1:t.data(ut.value)!==r?String(t.data(ut.value)):typeof i=="string"?n.trim(i.toLowerCase()):String(i)},inputEvent:function(){var n=et[0];return n?n.oninput!==r?"input":n.onpropertychange!==r?"propertychange":"keyup":!1},selectValues:function(){var t={};return t.values=[],d.find("option").each(function(){var i=n(this),u=i.html(),e=i.attr("disabled"),f=i.attr("value")!==r?i.attr("value"):u;b.placeholder==="auto"&&f===""?t.placeholder=u:t.values.push({name:u,value:f,disabled:e})}),b.placeholder&&b.placeholder!=="auto"&&(w.debug("Setting placeholder value to",b.placeholder),t.placeholder=b.placeholder),b.sortSelect?(t.values.sort(function(n,t){return n.name>t.name?1:-1}),w.debug("Retrieved and sorted values from select",t)):w.debug("Retreived values from select",t),t}
11,activeItem:function(){return tt.filter("."+k.active)},selectedItem:function(){var n=tt.not(g.unselectable).filter("."+k.selected);return n.length>0?n:tt.eq(0)},itemWithAdditions:function(n){var t=w.get.item(n),i=w.create.userChoice(n),r=i&&i.length>0;return r&&(t=t.length>0?t.add(i):i),t},item:function(t,i){var u=!1,e,f;return t=t!==r?t:w.get.values()!==r?w.get.values():w.get.text(),e=f?t.length>0:t!==r&&t!==null,f=w.is.multiple()&&n.isArray(t),i=t===""||t===0?!0:i||!1,e&&tt.each(function(){var e=n(this),s=w.get.choiceText(e),o=w.get.choiceValue(e,s);if(o!==null&&o!==r)if(f)(n.inArray(String(o),t)!==-1||n.inArray(s,t)!==-1)&&(u=u?u.add(e):e);else if(i){if(w.verbose("Ambiguous dropdown value using strict type check",e,t),o===t||s===t)return u=e,!0}else if(String(o)==String(t)||s==t)return w.verbose("Found select item by value",o,t),u=e,!0}),u}},check:{maxSelections:function(n){return b.maxSelections?(n=n!==r?n:w.get.selectionCount(),n>=b.maxSelections?(w.debug("Maximum selection count reached"),b.useLabels&&(tt.addClass(k.filtered),w.add.message(at.maxSelections)),!0):(w.verbose("No longer at maximum selection count"),w.remove.message(),w.remove.filteredItem(),w.is.searchSelection()&&w.filterItems(),!1)):!0}},restore:{defaults:function(){w.clear();w.restore.defaultText();w.restore.defaultValue()},defaultText:function(){var n=w.get.defaultText(),t=w.get.placeholderText;n===t?(w.debug("Restoring default placeholder text",n),w.set.placeholderText(n)):(w.debug("Restoring default text",n),w.set.text(n))},defaultValue:function(){var n=w.get.defaultValue();n!==r&&(w.debug("Restoring default value",n),n!==""?(w.set.value(n),w.set.selected()):(w.remove.activeItem(),w.remove.selectedItem()))},labels:function(){b.allowAdditions&&(b.useLabels||(w.error(ct.labels),b.useLabels=!0),w.debug("Restoring selected values"),w.create.userLabels());w.check.maxSelections()},selected:function(){w.restore.values();w.is.multiple()?(w.debug("Restoring previously selected values and labels"),w.restore.labels()):w.debug("Restoring previously selected values")},values:function(){w.set.initialLoad();b.apiSettings?b.saveRemoteData?w.restore.remoteValues():w.clearValue():w.set.selected();w.remove.initialLoad()},remoteValues:function(){var t=w.get.remoteValues();w.debug("Recreating selected from session data",t);t&&(w.is.single()?n.each(t,function(n,t){w.set.text(t)}):n.each(t,function(n,t){w.add.label(n,t)}))}},read:{remoteData:function(n){var i;if(t.Storage===r){w.error(ct.noStorage);return}return i=sessionStorage.getItem(n),i!==r?i:!1}},save:{defaults:function(){w.save.defaultText();w.save.placeholderText();w.save.defaultValue()},defaultValue:function(){var n=w.get.value();w.verbose("Saving default value as",n);d.data(ut.defaultValue,n)},defaultText:function(){var n=w.get.text();w.verbose("Saving default text as",n);d.data(ut.defaultText,n)},placeholderText:function(){var n;b.placeholder!==!1&&st.hasClass(k.placeholder)&&(n=w.get.text(),w.verbose("Saving placeholder text as",n),d.data(ut.placeholderText,n))},remoteData:function(n,i){if(t.Storage===r){w.error(ct.noStorage);return}w.verbose("Saving remote data to session storage",i,n);sessionStorage.setItem(i,n)}},clear:function(){w.is.multiple()?w.remove.labels():(w.remove.activeItem(),w.remove.selectedItem());w.set.placeholderText();w.clearValue()},clearValue:function(){w.set.value("")},scrollPage:function(n,t){var r=t||w.get.selectedItem(),u=r.closest(g.menu),l=u.outerHeight(),h=u.scrollTop(),s=tt.eq(0).outerHeight(),f=Math.floor(l/s),v=u.prop("scrollHeight"),a=n=="up"?h-s*f:h+s*f,i=tt.not(g.unselectable),c,e,o;o=n=="up"?i.index(r)-f:i.index(r)+f;c=n=="up"?o>=0:o<i.length;e=c?i.eq(o):n=="up"?i.first():i.last();e.length>0&&(w.debug("Scrolling page",n,e),r.removeClass(k.selected),e.addClass(k.selected),u.scrollTop(a))},set:{filtered:function(){var t=w.is.multiple(),i=w.is.searchSelection(),r=t&&i,n=i?w.get.query():"",u=typeof n=="string"&&n.length>0,f=w.get.searchWidth(n.length),e=n!=="";t&&u&&(w.verbose("Adjusting input width",f,b.glyphWidth),et.css("width",f));u||r&&e?(w.verbose("Hiding placeholder text"),st.addClass(k.filtered)):t&&(!r||e)||(w.verbose("Showing placeholder text"),st.removeClass(k.filtered))},loading:function(){d.addClass(k.loading)},placeholderText:function(n){n=n||w.get.placeholderText();w.debug("Setting placeholder text",n);w.set.text(n);st.addClass(k.placeholder)},tabbable:function(){w.has.search()?(w.debug("Added tabindex to searchable dropdown"),et.val("").attr("tabindex",0),nt.attr("tabindex",-1)):(w.debug("Added tabindex to dropdown"),d.attr("tabindex")===r&&(d.attr("tabindex",0),nt.attr("tabindex",-1)))},initialLoad:function(){w.verbose("Setting initial load");ii=!0},activeItem:function(n){b.allowAdditions&&n.filter(g.addition).length>0?n.addClass(k.filtered):n.addClass(k.active)},scrollPosition:function(n,t){var o=5,i,s,u,e,h,f,c,l,a;n=n||w.get.selectedItem();i=n.closest(g.menu);s=n&&n.length>0;t=t!==r?t:!1;n&&i.length>0&&s&&(e=n.position().top,i.addClass(k.loading),f=i.scrollTop(),h=i.offset().top,e=n.offset().top,u=f-h+e,t||(c=i.height(),a=f+c<u+o,l=u-o<f),w.debug("Scrolling to active item",u),(t||l||a)&&i.scrollTop(u),i.removeClass(k.loading))},text:function(n){b.action!=="select"&&(b.action=="combo"?(w.debug("Changing combo button text",n,bt),b.preserveHTML?bt.html(n):bt.text(n)):(n!==w.get.placeholderText()&&st.removeClass(k.placeholder),w.debug("Changing text",n,st),st.removeClass(k.filtered),b.preserveHTML?st.html(n):st.text(n)))},selectedLetter:function(t){var r=tt.filter("."+k.selected),f=r.length>0&&w.has.firstLetter(r,t),i=!1,u;f&&(u=r.nextAll(tt).eq(0),w.has.firstLetter(u,t)&&(i=u));i||tt.each(function(){if(w.has.firstLetter(n(this),t))return i=n(this),!1});i&&(w.verbose("Scrolling to next value with letter",t),w.set.scrollPosition(i),r.removeClass(k.selected),i.addClass(k.selected))},direction:function(n){b.direction=="auto"?w.is.onScreen(n)?w.remove.upward(n):w.set.upward(n):b.direction=="upward"&&w.set.upward(n)},upward:function(n){var t=n||d;t.addClass(k.upward)},value:function(n,t,i){var e=rt.length>0,o=!w.has.value(n),u=w.get.values(),f=n!==r?String(n):n;if(e){if(f==u&&(w.verbose("Skipping value update already same value",n,u),!w.is.initialLoad()))return;w.is.single()&&w.has.selectInput()&&w.can.extendSelect()&&(w.debug("Adding user option",n),w.add.optionValue(n));w.debug("Updating input value",n,u);ti=!0;rt.val(n);b.fireOnInit===!1&&w.is.initialLoad()?w.debug("Input native change event ignored on initial load"):w.trigger.change();ti=!1}else w.verbose("Storing value in metadata",n,rt),n!==u&&d.data(ut.value,f);b.fireOnInit===!1&&w.is.initialLoad()?w.verbose("No callback on initial load",b.onChange):b.onChange.call(ot,n,t,i)},active:function(){d.addClass(k.active)},multiple:function(){d.addClass(k.multiple)},visible:function(){d.addClass(k.visible)},exactly:function(n,t){w.debug("Setting selected to exact values");w.clear();w.set.selected(n,t)},selected:function(t,i){var r=w.is.multiple();(i=b.allowAdditions?i||w.get.itemWithAdditions(t):i||w.get.item(t),i)&&(w.debug("Setting selected menu item to",i),w.is.single()?(w.remove.activeItem(),w.remove.selectedItem()):b.useLabels&&w.remove.selectedItem(),i.each(function(){var t=n(this),u=w.get.choiceText(t),f=w.get.choiceValue(t,u),e=t.hasClass(k.filtered),o=t.hasClass(k.active),s=t.hasClass(k.addition),h=r&&i.length==1;r?!o||s?(b.apiSettings&&b.saveRemoteData&&w.save.remoteData(u,f),b.useLabels?(w.add.value(f,u,t),w.add.label(f,u,h),w.set.activeItem(t),w.filterActive(),w.select.nextAvailable(i)):(w.add.value(f,u,t),w.set.text(w.add.variables(at.count)),w.set.activeItem(t))):e||(w.debug("Selected active value, remov
11ing label"),w.remove.selected(f)):(b.apiSettings&&b.saveRemoteData&&w.save.remoteData(u,f),w.set.text(u),w.set.value(f,u,t),t.addClass(k.active).addClass(k.selected))}))}},add:{label:function(t,i,r){var f=w.is.searchSelection()?et:st,u;if(u=n("<a />").addClass(k.label).attr("data-value",t).html(dt.label(t,i)),u=b.onLabelCreate.call(u,t,i),w.has.label(t)){w.debug("Label already exists, skipping",t);return}b.label.variation&&u.addClass(b.label.variation);r===!0?(w.debug("Animating in label",u),u.addClass(k.hidden).insertBefore(f).transition(b.label.transition,b.label.duration)):(w.debug("Adding selection label",u),u.insertBefore(f))},message:function(t){var i=nt.children(g.message),r=b.templates.message(w.add.variables(t));i.length>0?i.html(r):i=n("<div/>").html(r).addClass(k.message).appendTo(nt)},optionValue:function(t){var i=rt.find('option[value="'+t+'"]'),r=i.length>0;r||(ht&&(ht.disconnect(),w.verbose("Temporarily disconnecting mutation observer",t)),w.is.single()&&(w.verbose("Removing previous user addition"),rt.find("option."+k.addition).remove()),n("<option/>").prop("value",t).addClass(k.addition).html(t).appendTo(rt),w.verbose("Adding user addition as an <option>",t),ht&&ht.observe(rt[0],{childList:!0,subtree:!0}))},userSuggestion:function(n){var t=nt.children(g.addition),i=w.get.item(n),u=i&&i.not(g.addition).length,f=t.length>0,r;if(!b.useLabels||!w.has.maxSelections()){if(n===""||u){t.remove();return}tt.removeClass(k.selected);f?(r=b.templates.addition(w.add.variables(at.addResult,n)),t.html(r).attr("data-"+ut.value,n).attr("data-"+ut.text,n).removeClass(k.filtered).addClass(k.selected),w.verbose("Replacing user suggestion with new value",t)):(t=w.create.userChoice(n),t.prependTo(nt).addClass(k.selected),w.verbose("Adding item choice to menu corresponding with user choice addition",t))}},variables:function(n,t){var u=n.search("{count}")!==-1,f=n.search("{maxCount}")!==-1,e=n.search("{term}")!==-1,i,r;return w.verbose("Adding templated variables to message",n),u&&(i=w.get.selectionCount(),n=n.replace("{count}",i)),f&&(i=w.get.selectionCount(),n=n.replace("{maxCount}",b.maxSelections)),e&&(r=t||w.get.query(),n=n.replace("{term}",r)),n},value:function(t,i,r){var f=w.get.values(),u;if(t===""){w.debug("Cannot select blank values from multiselect");return}n.isArray(f)?(u=f.concat([t]),u=w.get.uniqueArray(u)):u=[t];w.has.selectInput()?w.can.extendSelect()&&(w.debug("Adding value to select",t,u,rt),w.add.optionValue(t)):(u=u.join(b.delimiter),w.debug("Setting hidden input to delimited value",u,rt));b.fireOnInit===!1&&w.is.initialLoad()?w.verbose("Skipping onadd callback on initial load",b.onAdd):b.onAdd.call(ot,t,i,r);w.set.value(u,t,i,r);w.check.maxSelections()}},remove:{active:function(){d.removeClass(k.active)},activeLabel:function(){d.find(g.label).removeClass(k.active)},loading:function(){d.removeClass(k.loading)},initialLoad:function(){ii=!1},upward:function(n){var t=n||d;t.removeClass(k.upward)},visible:function(){d.removeClass(k.visible)},activeItem:function(){tt.removeClass(k.active)},filteredItem:function(){b.useLabels&&w.has.maxSelections()||(b.useLabels&&w.is.multiple()?tt.not("."+k.active).removeClass(k.filtered):tt.removeClass(k.filtered))},optionValue:function(n){var t=rt.find('option[value="'+n+'"]'),i=t.length>0;i&&t.hasClass(k.addition)&&(ht&&(ht.disconnect(),w.verbose("Temporarily disconnecting mutation observer",n)),t.remove(),w.verbose("Removing user addition as an <option>",n),ht&&ht.observe(rt[0],{childList:!0,subtree:!0}))},message:function(){nt.children(g.message).remove()},searchTerm:function(){w.verbose("Cleared search term");et.val("");w.set.filtered()},selected:function(t,i){if(i=b.allowAdditions?i||w.get.itemWithAdditions(t):i||w.get.item(t),!i)return!1;i.each(function(){var t=n(this),i=w.get.choiceText(t),r=w.get.choiceValue(t,i);w.is.multiple()?b.useLabels?(w.remove.value(r,i,t),w.remove.label(r)):(w.remove.value(r,i,t),w.get.selectionCount()===0?w.set.placeholderText():w.set.text(w.add.variables(at.count))):w.remove.value(r,i,t);t.removeClass(k.filtered).removeClass(k.active);b.useLabels&&t.removeClass(k.selected)})},selectedItem:function(){tt.removeClass(k.selected)},value:function(n,t,i){var u=w.get.values(),r;w.has.selectInput()?(w.verbose("Input is <select> removing selected option",n),r=w.remove.arrayValue(n,u),w.remove.optionValue(n)):(w.verbose("Removing from delimited values",n),r=w.remove.arrayValue(n,u),r=r.join(b.delimiter));b.fireOnInit===!1&&w.is.initialLoad()?w.verbose("No callback on initial load",b.onRemove):b.onRemove.call(ot,n,t,i);w.set.value(r,t,i);w.check.maxSelections()},arrayValue:function(t,i){return n.isArray(i)||(i=[i]),i=n.grep(i,function(n){return t!=n}),w.verbose("Removed value from delimited string",t,i),i},label:function(n){var i=d.find(g.label),t=i.filter('[data-value="'+n+'"]');w.verbose("Removing label",t);t.remove()},activeLabels:function(n){n=n||d.find(g.label).filter("."+k.active);w.verbose("Removing active label selections",n);w.remove.labels(n)},labels:function(t){t=t||d.find(g.label);w.verbose("Removing labels",t);t.each(function(){var u=n(this),t=u.data(ut.value),i=t!==r?String(t):t,f=w.is.userValue(i);if(b.onLabelRemove.call(u,t)===!1){w.debug("Label remove callback cancelled removal");return}f?(w.remove.value(i),w.remove.label(i)):w.remove.selected(i)})},tabbable:function(){w.has.search()?(w.debug("Searchable dropdown initialized"),et.removeAttr("tabindex"),nt.removeAttr("tabindex")):(w.debug("Simple selection dropdown initialized"),d.removeAttr("tabindex"),nt.removeAttr("tabindex"))}},has:{search:function(){return et.length>0},selectInput:function(){return rt.is("select")},firstLetter:function(n,t){var i,r;return!n||n.length===0||typeof t!="string"?!1:(i=w.get.choiceText(n,!1),t=t.toLowerCase(),r=String(i).charAt(0).toLowerCase(),t==r)}
11,input:function(){return rt.length>0},items:function(){return tt.length>0},menu:function(){return nt.length>0},message:function(){return nt.children(g.message).length!==0},label:function(n){var t=d.find(g.label);return t.filter('[data-value="'+n+'"]').length>0},maxSelections:function(){return b.maxSelections&&w.get.selectionCount()>=b.maxSelections},allResultsFiltered:function(){return tt.filter(g.unselectable).length===tt.length},query:function(){return w.get.query()!==""},value:function(t){var i=w.get.values(),r=n.isArray(i)?i&&n.inArray(t,i)!==-1:i==t;return r?!0:!1}},is:{active:function(){return d.hasClass(k.active)},alreadySetup:function(){return d.is("select")&&d.parent(g.dropdown).length>0&&d.prev().length===0},animating:function(n){return n?n.transition&&n.transition("is animating"):nt.transition&&nt.transition("is animating")},disabled:function(){return d.hasClass(k.disabled)},focused:function(){return i.activeElement===d[0]},focusedOnSearch:function(){return i.activeElement===et[0]},allFiltered:function(){return(w.is.multiple()||w.has.search())&&!w.has.message()&&w.has.allResultsFiltered()},hidden:function(n){return!w.is.visible(n)},initialLoad:function(){return ii},onScreen:function(n){var r=n||nt,u=!0,i={},t;return r.addClass(k.loading),t={context:{scrollTop:fi.scrollTop(),height:fi.outerHeight()},menu:{offset:r.offset(),height:r.outerHeight()}},i={above:t.context.scrollTop<=t.menu.offset.top-t.menu.height,below:t.context.scrollTop+t.context.height>=t.menu.offset.top+t.menu.height},i.below?(w.verbose("Dropdown can fit in context downward",i),u=!0):i.below||i.above?(w.verbose("Dropdown cannot fit below, opening upward",i),u=!1):(w.verbose("Dropdown cannot fit in either direction, favoring downward",i),u=!0),r.removeClass(k.loading),u},inObject:function(t,i){var r=!1;return n.each(i,function(n,i){if(i==t)return r=!0,!0}),r},multiple:function(){return d.hasClass(k.multiple)},single:function(){return!w.is.multiple()},selectMutation:function(t){var i=!1;return n.each(t,function(t,r){if(r.target&&n(r.target).is("select"))return i=!0,!0}),i},search:function(){return d.hasClass(k.search)},searchSelection:function(){return w.has.search()&&et.parent(g.dropdown).length===1},selection:function(){return d.hasClass(k.selection)},userValue:function(t){return n.inArray(t,w.get.userValues())!==-1},upward:function(n){var t=n||d;return t.hasClass(k.upward)},visible:function(n){return n?n.hasClass(k.visible):nt.hasClass(k.visible)}},can:{activate:function(n){return b.useLabels?!0:w.has.maxSelections()?w.has.maxSelections()&&n.hasClass(k.active)?!0:!1:!0},click:function(){return h||b.on=="click"},extendSelect:function(){return b.allowAdditions||b.apiSettings},show:function(){return!w.is.disabled()&&(w.has.items()||w.has.message())},useAPI:function(){return n.fn.api!==r}},animate:{show:function(t,i){var u=i||nt,e=i?function(){}:function(){w.hideSubMenus();w.hideOthers();w.set.active()},f;t=n.isFunction(t)?t:function(){};w.verbose("Doing menu show animation",u);w.set.direction(i);f=w.get.transition(i);w.is.selection()&&w.set.scrollPosition(w.get.selectedItem(),!0);(w.is.hidden(u)||w.is.animating(u))&&(f=="none"?(e(),u.transition("show"),t.call(ot)):n.fn.transition!==r&&d.transition("is supported")?u.transition({animation:f+" in",debug:b.debug,verbose:b.verbose,duration:b.duration,queue:!0,onStart:e,onComplete:function(){t.call(ot)}}):w.error(ct.noTransition,f))},hide:function(t,i){var u=i||nt,o=i?b.duration*.9:b.duration,f=i?function(){}:function(){w.can.click()&&w.unbind.intent();w.remove.active()},e=w.get.transition(i);t=n.isFunction(t)?t:function(){};(w.is.visible(u)||w.is.animating(u))&&(w.verbose("Doing menu hide animation",u),e=="none"?(f(),u.transition("hide"),t.call(ot)):n.fn.transition!==r&&d.transition("is supported")?u.transition({animation:e+" out",duration:b.duration,debug:b.debug,verbose:b.verbose,queue:!0,onStart:f,onComplete:function(){b.direction=="auto"&&w.remove.upward(i);t.call(ot)}}):w.error(ct.transition))}},hideAndClear:function(){(w.remove.searchTerm(),w.has.maxSelections())||(w.has.search()?w.hide(function(){w.remove.filteredItem()}):w.hide())},delay:{show:function(){w.verbose("Delaying show event to ensure user intent");clearTimeout(w.timer);w.timer=setTimeout(w.show,b.delay.show)},hide:function(){w.verbose("Delaying hide event to ensure user intent");clearTimeout(w.timer);w.timer=setTimeout(w.hide,b.delay.hide)}},escape:{regExp:function(n){return n=String(n),n.replace(ei.escape,"\\$&")}},setting:function(t,i){if(w.debug("Changing setting",t,i),n.isPlainObject(t))n.extend(!0,b,t);else if(i!==r)b[t]=i;else return b[t]},internal:function(t,i){if(n.isPlainObject(t))n.extend(!0,w,t);else if(i!==r)w[t]=i;else return w[t]},debug:function(){b.debug&&(b.performance?w.performance.log(arguments):(w.debug=Function.prototype.bind.call(console.info,console,b.name+":"),w.debug.apply(console,arguments)))}
11,verbose:function(){b.verbose&&b.debug&&(b.performance?w.performance.log(arguments):(w.verbose=Function.prototype.bind.call(console.info,console,b.name+":"),w.verbose.apply(console,arguments)))},error:function(){w.error=Function.prototype.bind.call(console.error,console,b.name+":");w.error.apply(console,arguments)},performance:{log:function(n){var t,i,r;b.performance&&(t=(new Date).getTime(),r=c||t,i=t-r,c=t,s.push({Name:n[0],Arguments:[].slice.call(n,1)||"",Element:ot,"Execution Time":i}));clearTimeout(w.performance.timer);w.performance.timer=setTimeout(w.performance.display,500)},display:function(){var t=b.name+":",i=0;c=!1;clearTimeout(w.performance.timer);n.each(s,function(n,t){i+=t["Execution Time"]});t+=" "+i+"ms";a&&(t+=" '"+a+"'");(console.group!==r||console.table!==r)&&s.length>0&&(console.groupCollapsed(t),console.table?console.table(s):n.each(s,function(n,t){console.log(t.Name+": "+t["Execution Time"]+"ms")}),console.groupEnd());s=[]}},invoke:function(t,i,u){var e=yt,h,o,s;return i=i||y,u=ot||u,typeof t=="string"&&e!==r&&(t=t.split(/[\. ]/),h=t.length-1,n.each(t,function(i,u){var f=i!=h?u+t[i+1].charAt(0).toUpperCase()+t[i+1].slice(1):t;if(n.isPlainObject(e[f])&&i!=h)e=e[f];else{if(e[f]!==r)return o=e[f],!1;if(n.isPlainObject(e[u])&&i!=h)e=e[u];else return e[u]!==r?(o=e[u],!1):(w.error(ct.method,t),!1)}})),n.isFunction(o)?s=o.apply(u,i):o!==r&&(s=o),n.isArray(f)?f.push(s):f!==r?f=[f,s]:s!==r&&(f=s),o}};v?(yt===r&&w.initialize(),w.invoke(l)):(yt!==r&&yt.invoke("destroy"),w.initialize())}),f!==r?f:e};n.fn.dropdown.settings={debug:!1,verbose:!1,performance:!0,on:"click",action:"activate",apiSettings:!1,saveRemoteData:!0,throttle:200,context:t,direction:"auto",keepOnScreen:!0,match:"both",fullTextSearch:!1,placeholder:"auto",preserveHTML:!0,sortSelect:!1,forceSelection:!0,allowAdditions:!1,maxSelections:!1,useLabels:!0,delimiter:",",showOnFocus:!0,allowTab:!0,allowCategorySelection:!1,fireOnInit:!1,transition:"auto",duration:200,glyphWidth:1.0714,label:{transition:"scale",duration:200,variation:!1},delay:{hide:300,show:200,search:20,touch:50},onChange:function(){},onAdd:function(){},onRemove:function(){},onLabelSelect:function(){},onLabelCreate:function(){return n(this)},onLabelRemove:function(){return!0},onNoResults:function(){return!0},onShow:function(){},onHide:function(){},name:"Dropdown",namespace:"dropdown",message:{addResult:"Add <b>{term}<\/b>",count:"{count} selected",maxSelections:"Max {maxCount} selections",noResults:"No results found.",serverError:"There was an error contacting the server"},error:{action:"You called a dropdown action that was not defined",alreadySetup:"Once a select has been initialized behaviors must be called on the created ui dropdown",labels:"Allowing user additions currently requires the use of labels.",missingMultiple:"<select> requires multiple property to be set to correctly preserve multiple values",method:"The method you called is not defined.",noAPI:"The API module is required to load resources remotely",noStorage:"Saving remote data requires session storage",noTransition:"This module requires ui transitions <https://github.com/Semantic-Org/UI-Transition>"},regExp:{escape:/[-[\]{}()*+?.,\\^$|#\s]/g},metadata:{defaultText:"defaultText",defaultValue:"defaultValue",placeholderText:"placeholder",text:"text",value:"value"},fields:{remoteValues:"results",values:"values",name:"name",value:"value"},keys:{backspace:8,delimiter:188,deleteKey:46,enter:13,escape:27,pageUp:33,pageDown:34,leftArrow:37,upArrow:38,rightArrow:39,downArrow:40},selector:{addition:".addition",dropdown:".se-dropdown",icon:"> .se-dropdown.icon",input:'> input[type="hidden"], > select',item:".dropdown-item",label:"> .label",remove:"> .label > .delete.icon",siblingLabel:".label",menu:".dropdown-menu",message:".message",menuIcon:".se-dropdown.icon",search:"input.search, .dropdown-menu > .search > input",text:"> .dropdown-text:not(.icon)",unselectable:".disabled, .filtered"},className:{active:"active",addition:"addition",animating:"animating",disabled:"disabled",dropdown:"se-dropdown",filtered:"filtered",hidden:"hidden transition",item:"item",label:"ui label",loading:"loading",menu:"dropdown-menu",message:"message",multiple:"multiple",placeholder:"default",search:"search",selected:"selected",selection:"selection",upward:"upward",visible:"visible"}};n.fn.dropdown.settings.templates={dropdown:function(t){var r=t.placeholder||!1,u=t.values||{},i="";return i+='<i class="se-dropdown icon fa fa-caret-down"><\/i>',i+=t.placeholder?'<div class="default dropdown-text">'+r+"<\/div>":'<div class="dropdown-text"><\/div>',i+='<div class="dropdown-menu">',n.each(t.values,function(n,t){i+=t.disabled?'<div class="disabled dropdown-item" data-value="'+t.value+'">'+t.name+"<\/div>":'<div class="dropdown-item" data-value="'+t.value+'">'+t.name+"<\/div>"}),i+="<\/div>"},menu:function(t,i){var u=t[i.values]||{},r="";return n.each(u,function(n,t){r+='<div class="dropdown-item" data-value="'+t[i.value]+'">'+t[i.name]+"<\/div>"}),r},label:function(n,t){return t+'<i class="delete icon fa fa-times"><\/i>'},message:function(n){return n},addition:function(n){return n}}})(jQuery,window,document);
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.