/* * # Fomantic UI - 2.8.6 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2014 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(ee,te,ne,ie){"use strict";ee.isFunction=ee.isFunction||function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},te=void 0!==te&&te.Math==Math?te:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")(),ee.fn.dropdown=function(U){var B,K=ee(this),W=ee(ne),Q=K.selector||"",Y="ontouchstart"in ne.documentElement,$=Y?"touchstart":"click",X=(new Date).getTime(),G=[],J=U,Z="string"==typeof J,_=[].slice.call(arguments,1);return K.each(function(n){var c,e,t,i,a,s,o,r,l,h,f=ee.isPlainObject(U)?ee.extend(!0,{},ee.fn.dropdown.settings,U):ee.extend({},ee.fn.dropdown.settings),g=f.className,u=f.message,d=f.fields,p=f.keys,b=f.metadata,v=f.namespace,m=f.regExp,w=f.selector,C=f.error,x=f.templates,y="."+v,S="module-"+v,A=ee(this),T=ee(f.context),L=A.find(w.text),I=A.find(w.search),D=A.find(w.sizer),k=A.find(w.input),q=A.find(w.icon),O=A.find(w.clearIcon),R=0").html(a).attr("data-"+b.value,t).attr("data-"+b.text,t).addClass(g.addition).addClass(g.item),f.hideAdditions&&i.addClass(g.hidden),n=n===ie?i:n.add(i),h.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){var t=h.get.userValues();t&&(h.debug("Adding user labels",t),ee.each(t,function(e,t){h.verbose("Adding custom user value"),h.add.label(t,t)}))},menu:function(){E=ee("
").addClass(g.menu).appendTo(A)},sizer:function(){D=ee("").addClass(g.sizer).insertAfter(I)}},search:function(e){e=e!==ie?e:h.get.query(),h.verbose("Searching for query",e),h.has.minCharacters(e)?h.filter(e):h.hide(null,!0)},select:{firstUnfiltered:function(){h.verbose("Selecting first non-filtered element"),h.remove.selectedItem(),V.not(w.unselectable).not(w.addition+w.hidden).eq(0).addClass(g.selected)},nextAvailable:function(e){var t=(e=e.eq(0)).nextAll(w.item).not(w.unselectable).eq(0),n=e.prevAll(w.item).not(w.unselectable).eq(0);0").addClass("remove icon").insertBefore(L)),h.is.search()&&!h.has.search()&&(h.verbose("Adding search input"),I=ee("").addClass(g.search).prop("autocomplete","off").insertBefore(L)),h.is.multiple()&&h.is.searchSelection()&&!h.has.sizer()&&h.create.sizer(),f.allowTab&&h.set.tabbable()},select:function(){var e=h.get.selectValues();h.debug("Dropdown initialized on a select",e),A.is("select")&&(k=A),0").attr("class",k.attr("class")).addClass(g.selection).addClass(g.dropdown).html(x.dropdown(e,d,f.preserveHTML,f.className)).insertBefore(k),k.hasClass(g.multiple)&&!1===k.prop("multiple")&&(h.error(C.missingMultiple),k.prop("multiple",!0)),k.is("[multiple]")&&h.set.multiple(),k.prop("disabled")&&(h.debug("Disabling dropdown"),A.addClass(g.disabled)),k.removeAttr("required").removeAttr("class").detach().prependTo(A)),h.refresh()},menu:function(e){E.html(x.menu(e,d,f.preserveHTML,f.className)),V=E.find(w.item),M=f.hideDividers?V.parent().children(w.divider):ee()},reference:function(){h.debug("Dropdown behavior was called on select, replacing with closest dropdown"),A=A.parent(w.dropdown),j=A.data(S),H=A.get(0),h.refresh(),h.setup.returnedObject()},returnedObject:function(){var e=K.slice(0,n),t=K.slice(n+1);K=e.add(A).add(t)}},refresh:function(){h.refreshSelectors(),h.refreshData()},refreshItems:function(){V=E.find(w.item),M=f.hideDividers?V.parent().children(w.divider):ee()},refreshSelectors:function(){h.verbose("Refreshing selector cache"),L=A.find(w.text),I=A.find(w.search),k=A.find(w.input),q=A.find(w.icon),R=0"),ee.each(e,function(e,t){var n=f.templates.deQuote(t[d.value]),i=f.templates.escape(t[d.name]||"",f.preserveHTML);k.append('")}),h.observe.select())}},event:{change:function(){P||(h.debug("Input changed, updating selection"),h.set.selected())},focus:function(){f.showOnFocus&&!z&&h.is.hidden()&&!t&&h.show()},blur:function(e){t=ne.activeElement===this,z||t||(h.remove.activeLabel(),h.hide())},mousedown:function(){h.is.searchSelection()?i=!0:z=!0},mouseup:function(){h.is.searchSelection()?i=!1:z=!1},click:function(e){ee(e.target).is(A)&&(h.is.focusedOnSearch()?h.show():h.focusSearch())},search:{focus:function(e){z=!0,h.is.multiple()&&h.remove.activeLabel(),(f.showOnFocus||"focus"!==e.type&&"focusin"!==e.type)&&h.search()},blur:function(e){t=ne.activeElement===this,h.is.searchSelection()&&!i&&(F||t||(f.forceSelection?h.forceSelection():f.allowAdditions||h.remove.searchTerm(),h.hide())),i=!1}},clearIcon:{click:function(e){h.clear(),h.is.searchSelection()&&h.remove.searchTerm(),h.hide(),e.stopPropagation()}},icon:{click:function(e){N=!0,h.has.search()?h.is.active()?h.blurSearch():f.showOnFocus?h.focusSearch():h.toggle():h.toggle()}},text:{focus:function(e){z=!0,h.focusSearch()}},input:function(e){(h.is.multiple()||h.is.searchSelection())&&h.set.filtered(),clearTimeout(h.timer),h.timer=setTimeout(h.search,f.delay.search)},label:{click:function(e){var t=ee(this),n=A.find(w.label),i=n.filter("."+g.active),a=t.nextAll("."+g.active),s=t.prevAll("."+g.active),o=0 modified, recreating menu"),h.is.selectMutation(e)&&(h.disconnect.selectObserver(),h.refresh(),h.setup.select(),h.set.selected(),h.observe.select())}},menu:{mutation:function(e){var t=e[0],n=t.addedNodes?ee(t.addedNodes[0]):ee(!1),i=t.removedNodes?ee(t.removedNodes[0]):ee(!1),a=n.add(i),s=a.is(w.addition)||0=f.maxSelections?(h.debug("Maximum selection count reached"),f.useLabels&&(V.addClass(g.filtered),h.add.message(u.maxSelections)),!0):(h.verbose("No longer at maximum selection count"),h.remove.message(),h.remove.filteredItem(),h.is.searchSelection()&&h.filterItems(),!1))},disabled:function(){I.attr("tabindex",h.is.disabled()?-1:0)}},restore:{defaults:function(e){h.clear(e),h.restore.defaultText(),h.restore.defaultValue()},defaultText:function(){var e=h.get.defaultText();e===h.get.placeholderText?(h.debug("Restoring default placeholder text",e),h.set.placeholderText(e)):(h.debug("Restoring default text",e),h.set.text(e))},placeholderText:function(){h.set.placeholderText()},defaultValue:function(){var e=h.get.defaultValue();e!==ie&&(h.debug("Restoring default value",e),""!==e?(h.set.value(e),h.set.selected()):(h.remove.activeItem(),h.remove.selectedItem()))},labels:function(){f.allowAdditions&&(f.useLabels||(h.error(C.labels),f.useLabels=!0),h.debug("Restoring selected values"),h.create.userLabels()),h.check.maxSelections()},selected:function(){h.restore.values(),h.is.multiple()?(h.debug("Restoring previously selected values and labels"),h.restore.labels()):h.debug("Restoring previously selected values")},values:function(){h.set.initialLoad(),f.apiSettings&&f.saveRemoteData&&h.get.remoteValues()?h.restore.remoteValues():h.set.selected();var e=h.get.value();!e||""===e||Array.isArray(e)&&0===e.length?k.addClass(g.noselection):k.removeClass(g.noselection),h.remove.initialLoad()},remoteValues:function(){var e=h.get.remoteValues();h.debug("Recreating selected from session data",e),e&&(h.is.single()?ee.each(e,function(e,t){h.set.text(t)}):ee.each(e,function(e,t){h.add.label(e,t)}))}},read:{remoteData:function(e){var t;if(te.Storage!==ie)return(t=sessionStorage.getItem(e))!==ie&&t;h.error(C.noStorage)}},save:{defaults:function(){h.save.defaultText(),h.save.placeholderText(),h.save.defaultValue()},defaultValue:function(){var e=h.get.value();h.verbose("Saving default value as",e),A.data(b.defaultValue,e)},defaultText:function(){var e=h.get.text();h.verbose("Saving default text as",e),A.data(b.defaultText,e)},placeholderText:function(){var e;!1!==f.placeholder&&L.hasClass(g.placeholder)&&(e=h.get.text(),h.verbose("Saving placeholder text as",e),A.data(b.placeholderText,e))},remoteData:function(e,t){te.Storage!==ie?(h.verbose("Saving remote data to session storage",t,e),sessionStorage.setItem(t,e)):h.error(C.noStorage)}},clear:function(e){h.is.multiple()&&f.useLabels?h.remove.labels():(h.remove.activeItem(),h.remove.selectedItem(),h.remove.filteredItem()),h.set.placeholderText(),h.clearValue(e)},clearValue:function(e){h.set.value("",null,null,e)},scrollPage:function(e,t){var n,i,a=t||h.get.selectedItem(),s=a.closest(w.menu),o=s.outerHeight(),r=s.scrollTop(),l=V.eq(0).outerHeight(),c=Math.floor(o/l),u=(s.prop("scrollHeight"),"up"==e?r-l*c:r+l*c),d=V.not(w.unselectable);i="up"==e?d.index(a)-c:d.index(a)+c,0<(n=("up"==e?0<=i:i").addClass(g.label).attr("data-"+b.value,s).html(x.label(s,t,f.preserveHTML,f.className)),i=f.onLabelCreate.call(i,s,t),h.has.label(e)?h.debug("User selection already exists, skipping",s):(f.label.variation&&i.addClass(f.label.variation),!0===n?(h.debug("Animating in label",i),i.addClass(g.hidden).insertBefore(a).transition({animation:f.label.transition,debug:f.debug,verbose:f.verbose,duration:f.label.duration})):(h.debug("Adding selection label",i),i.insertBefore(a)))},message:function(e){var t=E.children(w.message),n=f.templates.message(h.add.variables(e));0").html(n).addClass(g.message).appendTo(E)},optionValue:function(e){var t=h.escape.value(e);0").prop("value",t).addClass(g.addition).html(e).appendTo(k),h.verbose("Adding user addition as an