}returna.prototype.append=function(a,b){b=this.removePlaceholder(b),a.call(this,b)},a.prototype.normalizePlaceholder=function(a,b){return"string"==typeofb&&(b={id:"",text:b}),b},a.prototype.removePlaceholder=function(a,b){for(varc=b.slice(0),d=b.length-1;d>=0;d--){vare=b[d];this.placeholder.id===e.id&&c.splice(d,1)}returnc},a}),c("select2/dropdown/infiniteScroll",["jquery"],function(a){functionb(a,b,c,d){this.lastParams={},a.call(this,b,c,d),this.$loadingMore=this.createLoadingMore(),this.loading=!1}returnb.prototype.append=function(a,b){this.$loadingMore.remove(),a.call(this,b),b.length>0&&this.$results.append(this.$loadingMore),this.loading=!1},b.prototype.bind=function(b,c,d){vare=this;b.call(this,c,d),c.on("query",function(a){e.lastParams=a,e.loading=!0}),c.on("query:append",function(a){e.lastParams=a,e.loading=!0}),this.$results.on("scroll",function(){varb=a.contains(document.documentElement,e.$loadingMore[0]);if(!e.loading&&b){varc=e.$results.offset().top+e.$results.outerHeight(!1),d=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);c+50>=d&&e.loadMore()}})},b.prototype.loadMore=function(){this.loading=!0;varb=a.extend({},{page:1},this.lastParams);b.page++,this.trigger("query:append",b)},b.prototype.createLoadingMore=function(){varb=a('<li class="option load-more" role="treeitem"></li>'),c=this.options.get("translations").get("loadingMore");returnb.html(c(this.lastParams)),b},b}),c("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){varb=a.input.length-a.maximum,c="Please delete "+b+" character";return1!=b&&(c+="s"),c},inputTooShort:function(a){varb=a.minimum-a.input.length,c="Please enter "+b+" or more character";return1!=b&&(c+="s"),c},searching:function(){return"Searching…"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(a){varb="You can only select"+a.maximum+" item";return1!=a.maximum&&(b+="s"),b},noResults:function(){return"No results found"}}}),c("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/minimumInputLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./i18n/en"],function(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s){functiont(){this.reset()}t.prototype.apply=function(j){if(j=a.extend({},this.defaults,j),null==j.dataAdapter&&(j.dataAdapter=null!=j.ajax?m:null!=j.data?l:k),j.minimumInputLength>0&&(j.dataAdapter=h.Decorate(j.dataAdapter,o)),null!=j.tags&&(j.dataAdapter=h.Decorate(j.dataAdapter,n)),null==j.resultsAdapter&&(j.resultsAdapter=b,null!=j.ajax&&(j.resultsAdapter=h.Decorate(j.resultsAdapter,s)),null!=j.placeholder&&(j.resultsAdapter=h.Decorate(j.resultsAdapter,r))),null==j.dropdownAdapter)if(j.multiple)j.dropdownAdapter=p;else{vart=h.Decorate(p,q);j.dropdownAdapter=t}if(null==j.selectionAdapter&&(j.selectionAdapter=j.multiple?d:c,null!=j.placeholder&&(j.selectionAdapter=h.Decorate(j.selectionAdapter,e),j.allowClear&&(j.selectionAdapter=h.Decorate(j.selectionAdapter,f))),j.multiple&&(j.selectionAdapter=h.Decorate(j.selectionAdapter,g))),"string"==typeofj.language&&(j.language=[j.language]),a.isArray(j.language)){for(varu=newi,v=j.language.concat(this.defaults.language),w=0;w<v.length;w++){varx=v[w],y={};try{y=i.loadPath(x)}catch(z){x="select2/i18n/"+x,y=i.loadPath(x)}u.extend(y)}j.translations=u}elsej.translations=newTranslations(j.language);returnj},t.prototype.reset=function(){functionb(a){functionb(a){returnj[a]||a}returna.replace(/[^\u0000-\u007E]/g,b)}functionc(d,e){if(""===a.trim(d.term))returne;if(e.children&&e.children.length>0){for(varf=a.extend(!0,{},e),g=e.children.length-1;g>=0;g--){varh=e.children[g],i=c(d,h);null==i&&f.children.splice(g,1)}returnf.children.length>0?f:c(d,f)}varj=b(e.text).toUpperCase(),k=b(d.term).toUpperCase();returnj.indexOf(k)>-1?e:null}this.defaults={