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