/* * # Fomantic UI - 2.9.0 * https://github.com/fomantic/Fomantic-UI * http://fomantic-ui.com/ * * Copyright 2022 Contributors * Released under the MIT license * http://opensource.org/licenses/MIT * */ !function(Z,ee,te,ne){"use strict";Z.isFunction=Z.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")(),Z.fn.dropdown=function(B){var K,W=Z(this),Q=Z(te),$=W.selector||"",Y=(new Date).getTime(),_=[],X=B,G="string"==typeof X,J=[].slice.call(arguments,1);return W.each(function(F){var v,e,t,n,i,a,s,o,r,m=Z.isPlainObject(B)?Z.extend(!0,{},Z.fn.dropdown.settings,B):Z.extend({},Z.fn.dropdown.settings),f=m.className,h=m.message,l=m.fields,g=m.keys,p=m.metadata,z=m.namespace,c=m.regExp,b=m.selector,u=m.error,P=m.templates,d="."+z,w="module-"+z,y=Z(this),C=[ee,te].indexOf(m.context)<0?Q.find(m.context):Z(m.context),x=y.find(b.text),S=y.find(b.search),A=y.find(b.sizer),T=y.find(b.input),N=y.find(b.icon),H=y.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),Z.each(t,function(e,t){M.verbose("Adding custom user value"),M.add.label(t,t)}))},menu:function(){I=Z("
").addClass(f.menu).appendTo(y)},sizer:function(){A=Z("").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"),e=y.prev("label"),S=Z("").addClass(f.search).prop("autocomplete",M.is.chrome()?"fomantic-search":"off"),e.length&&(e.attr("id")||e.attr("id","_"+M.get.id()+"_formLabel"),S.attr("aria-labelledby",e.attr("id"))),S.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=y.is("select")?y:T).parent(b.dropdown).length?(M.debug("UI dropdown already exists. Creating dropdown menu only"),y=T.closest(b.dropdown),M.has.menu()||M.create.menu(),I=y.children(b.menu),M.setup.menu(e)):(M.debug("Creating entire dropdown from select"),y=Z("
").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"),y.addClass(f.disabled)),T.is("[required]")&&(m.forceSelection=!0),T.removeAttr("required").removeAttr("class").detach().prependTo(y)),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):Z()},reference:function(){M.debug("Dropdown behavior was called on select, replacing with closest dropdown"),y=y.parent(b.dropdown),V=y.data(w),R=y[0],M.refresh(),M.setup.returnedObject()},returnedObject:function(){var e=W.slice(0,F),t=W.slice(F+1);W=e.add(y).add(t)}},refresh:function(){M.refreshSelectors(),M.refreshData()},refreshItems:function(){k=I.find(b.item),D=m.hideDividers?k.parent().children(b.divider):Z()},refreshSelectors:function(){M.verbose("Refreshing selector cache"),x=y.find(b.text),S=y.find(b.search),T=y.find(b.input),N=y.find(b.icon),L=0"),Z.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(!0)?n=!0:O=!0},mouseup:function(){M.is.searchSelection(!0)?n=!1:O=!1},click:function(e){Z(e.target).is(y)&&(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)||"touchstart"===e.type||(E=!0,M.search())},blur:function(e){t=te.activeElement===this,!M.is.searchSelection(!0)||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=Z(this),n=y.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?Z(e.addedNodes[0]):Z(!1),e=e.removedNodes?Z(e.removedNodes[0]):Z(!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()?Z.each(e,function(e,t){M.set.text(t)}):Z.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),y.data(p.defaultValue,e)},defaultText:function(){var e=M.get.text();M.verbose("Saving default text as",e),y.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),y.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(y.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="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,silent:m.silent,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