!function(Z,ee,te){"use strict";functionne(e){return"function"==typeofe&&"number"!=typeofe.nodeType}ee=void0!==ee&&ee.Math===Math?ee:globalThis,Z.fn.dropdown=function(B){varK,W=Z(this),Q=Z(te),Y=W.selector||"",$=Date.now(),_=[],X=B,G="string"==typeofX,J=[].slice.call(arguments,1);returnW.each(function(z){varv,e,t,n,i,a,o,s,r,m=Z.isPlainObject(B)?Z.extend(!0,{},Z.fn.dropdown.settings,B):Z.extend({},Z.fn.dropdown.settings),h=m.className,f=m.message,l=m.fields,g=m.keys,p=m.metadata,P=m.namespace,c=m.regExp,b=m.selector,d=m.error,F=m.templates,u="."+P,w="module-"+P,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<y.prev().find(b.text).length?y.prev().find(b.text):y.prev(),k=y.children(b.menu),D=k.find(b.item),I=m.hideDividers?D.parent().children(b.divider):Z(),O=!1,j=!1,U=!1,q=!1,R=this,E=!1,V=y.data(w),M={initialize:function(){M.debug("Initializing dropdown",m),M.is.alreadySetup()?M.setup.reference():(m.ignoreDiacritics&&!String.prototype.normalize&&(m.ignoreDiacritics=!1,M.error(d.noNormalize,R)),M.create.id(),M.setup.layout(),m.values&&(M.set.initialLoad(),M.change.values(m.values),M.remove.initialLoad()),M.refreshData(),M.save.defaults(),M.restore.selected(),M.bind.events(),M.observeChanges(),M.instantiate())},instantiate:function(){M.verbose("Storing instance of dropdown",M),V=M,y.data(w,M)},destroy:function(){M.verbose("Destroying previous dropdown",y),M.remove.tabbable(),M.remove.active(),k.transition("stop all"),k.removeClass(h.visible).addClass(h.hidden),y.off(u).removeData(w),k.off(u),Q.off(i),M.disconnect.menuObserver(),M.disconnect.selectObserver(),M.disconnect.classObserver()},observeChanges:function(){"MutationObserver"inee&&(o=newMutationObserver(M.event.select.mutation),s=newMutationObserver(M.event.menu.mutation),r=newMutationObserver(M.event.class.mutation),M.debug("Setting up mutation observer",o,s,r),M.observe.select(),M.observe.menu(),M.observe.class())},disconnect:{menuObserver:function(){s&&s.disconnect()},selectObserver:function(){o&&o.disconnect()},classObserver:function(){r&&r.disconnect()}},observe:{select:function(){M.has.input()&&o&&o.observe(y[0],{attributes:!0,childList:!0,subtree:!0})},menu:function(){M.has.menu()&&s&&s.observe(k[0],{childList:!0,subtree:!0})},class:function(){M.has.search()&&r&&r.observe(y[0],{attributes:!0})}},create:{id:function(){a=(Math.random().toString(16)+"000000000").slice(2,10),i="."+a,M.verbose("Creating unique id for element",a)},userChoice:function(e){varn,i;return!!(e=e||M.get.userValues())&&(e=Array.isArray(e)?e:[e],Z.each(e,function(e,t){!1===M.get.item(t)&&(i=m.templates.addition(M.add.variables(f.addResult,t)),i=Z("<div />").html(i).attr("data-"+p.value,t).attr("data-"+p.text,t).addClass(h.addition).addClass(h.item),m.hideAdditions&&i.addClass(h.hidden),n=void0===n?i:n.add(i),M.verbose("Creating user choices for value",t,i))}),n)},userLabels:function(e){vart=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(){k=Z("<div />").addClass(h.menu).appendTo(y)},sizer:function(){A=Z("<span />").addClass(h.sizer).insertAfter(S)}},search:function(e){e=void0!==e?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(),D.not(b.unselectable).not(b.addition+b.hidden).eq(0).addClass(h.selected)},nextAvailable:function(e){vart=(e=e.eq(0)).nextAll(b.item).not(b.unselectable).eq(0),e=e.prevAll(b.item).not(b.unselectable).eq(0);0<t.length?(M.verbose("Moving selection to",t),t.addClass(h.selected)):(M.verbose("Moving selection to",e),e.addClass(h.selected))}},setup:{api:function(){vare={debug:m.debug,urlData:{value:M.get.value(),query:M.get.query()},on:!