Autoría | Ultima modificación | Ver Log |
var factory;factory=function(jQuery){var S2=function(){if(jQuery&&jQuery.fn&&jQuery.fn.select2&&jQuery.fn.select2.amd)var S2=jQuery.fn.select2.amd;var factory;return function(){
/**
* @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
* Released under MIT license, http://github.com/requirejs/almond/LICENSE
*/
var requirejs,require,define;S2&&S2.requirejs||(S2?require=S2:S2={},function(undef){var main,req,makeMap,handlers,defined={},waiting={},config={},defining={},hasOwn=Object.prototype.hasOwnProperty,aps=[].slice,jsSuffixRegExp=/\.js$/;function hasProp(obj,prop){return hasOwn.call(obj,prop)}function normalize(name,baseName){var nameParts,nameSegment,mapValue,foundMap,lastIndex,foundI,foundStarMap,starI,i,j,part,baseParts=baseName&&baseName.split("/"),map=config.map,starMap=map&&map["*"]||{};if(name){for(lastIndex=(name=name.split("/")).length-1,config.nodeIdCompat&&jsSuffixRegExp.test(name[lastIndex])&&(name[lastIndex]=name[lastIndex].replace(jsSuffixRegExp,"")),"."===name[0].charAt(0)&&baseParts&&(name=baseParts.slice(0,baseParts.length-1).concat(name)),i=0;i<name.length;i++)if("."===(part=name[i]))name.splice(i,1),i-=1;else if(".."===part){if(0===i||1===i&&".."===name[2]||".."===name[i-1])continue;i>0&&(name.splice(i-1,2),i-=2)}name=name.join("/")}if((baseParts||starMap)&&map){for(i=(nameParts=name.split("/")
).length;i>0;i-=1){if(nameSegment=nameParts.slice(0,i).join("/"),baseParts)for(j=baseParts.length;j>0;j-=1)if((mapValue=map[baseParts.slice(0,j).join("/")])&&(mapValue=mapValue[nameSegment])){foundMap=mapValue,foundI=i;break}if(foundMap)break;!foundStarMap&&starMap&&starMap[nameSegment]&&(foundStarMap=starMap[nameSegment],starI=i)}!foundMap&&foundStarMap&&(foundMap=foundStarMap,foundI=starI),foundMap&&(nameParts.splice(0,foundI,foundMap),name=nameParts.join("/"))}return name}function makeRequire(relName,forceSync){return function(){var args=aps.call(arguments,0);return"string"!=typeof args[0]&&1===args.length&&args.push(null),req.apply(void 0,args.concat([relName,forceSync]))}}function makeLoad(depName){return function(value){defined[depName]=value}}function callDep(name){if(hasProp(waiting,name)){var args=waiting[name];delete waiting[name],defining[name]=!0,main.apply(void 0,args)}if(!hasProp(defined,name)&&!hasProp(defining,name))throw new Error("No "+name);return defined[name]}function splitPrefix(name){v
ar prefix,index=name?name.indexOf("!"):-1;return index>-1&&(prefix=name.substring(0,index),name=name.substring(index+1,name.length)),[prefix,name]}function makeRelParts(relName){return relName?splitPrefix(relName):[]}function makeConfig(name){return function(){return config&&config.config&&config.config[name]||{}}}makeMap=function(name,relParts){var plugin,relName,parts=splitPrefix(name),prefix=parts[0],relResourceName=relParts[1];return name=parts[1],prefix&&(plugin=callDep(prefix=normalize(prefix,relResourceName))),prefix?name=plugin&&plugin.normalize?plugin.normalize(name,(relName=relResourceName,function(name){return normalize(name,relName)})):normalize(name,relResourceName):(prefix=(parts=splitPrefix(name=normalize(name,relResourceName)))[0],name=parts[1],prefix&&(plugin=callDep(prefix))),{f:prefix?prefix+"!"+name:name,n:name,pr:prefix,p:plugin}},handlers={require:function(name){return makeRequire(name)},exports:function(name){var e=defined[name];return void 0!==e?e:defined[name]={}},module:function(nam
e){return{id:name,uri:"",exports:defined[name],config:makeConfig(name)}}},main=function(name,deps,callback,relName){var cjsModule,depName,ret,map,i,relParts,usingExports,args=[],callbackType=typeof callback;if(relParts=makeRelParts(relName=relName||name),"undefined"===callbackType||"function"===callbackType){for(deps=!deps.length&&callback.length?["require","exports","module"]:deps,i=0;i<deps.length;i+=1)if("require"===(depName=(map=makeMap(deps[i],relParts)).f))args[i]=handlers.require(name);else if("exports"===depName)args[i]=handlers.exports(name),usingExports=!0;else if("module"===depName)cjsModule=args[i]=handlers.module(name);else if(hasProp(defined,depName)||hasProp(waiting,depName)||hasProp(defining,depName))args[i]=callDep(depName);else{if(!map.p)throw new Error(name+" missing "+depName);map.p.load(map.n,makeRequire(relName,!0),makeLoad(depName),{}),args[i]=defined[depName]}ret=callback?callback.apply(defined[name],args):void 0,name&&(cjsModule&&void 0!==cjsModule.exports&&cjsModule.exports!==define
d[name]?defined[name]=cjsModule.exports:void 0===ret&&usingExports||(defined[name]=ret))}else name&&(defined[name]=callback)},requirejs=require=req=function(deps,callback,relName,forceSync,alt){if("string"==typeof deps)return handlers[deps]?handlers[deps](callback):callDep(makeMap(deps,makeRelParts(callback)).f);if(!deps.splice){if((config=deps).deps&&req(config.deps,config.callback),!callback)return;callback.splice?(deps=callback,callback=relName,relName=null):deps=void 0}return callback=callback||function(){},"function"==typeof relName&&(relName=forceSync,forceSync=alt),forceSync?main(void 0,deps,callback,relName):setTimeout((function(){main(void 0,deps,callback,relName)}),4),req},req.config=function(cfg){return req(cfg)},requirejs._defined=defined,(define=function(name,deps,callback){if("string"!=typeof name)throw new Error("See almond README: incorrect module build, no module name");deps.splice||(callback=deps,deps=[]),hasProp(defined,name)||hasProp(waiting,name)||(waiting[name]=[name,deps,callback])}).a
md={jQuery:!0}}(),S2.requirejs=requirejs,S2.require=require,S2.define=define)}(),S2.define("almond",(function(){})),S2.define("jquery",[],(function(){var _$=jQuery||$;return null==_$&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),_$})),S2.define("select2/utils",["jquery"],(function($){var Utils={};function getMethods(theClass){var proto=theClass.prototype,methods=[];for(var methodName in proto)"function"==typeof proto[methodName]&&"constructor"!==methodName&&methods.push(methodName);return methods}Utils.Extend=function(ChildClass,SuperClass){var __hasProp={}.hasOwnProperty;function BaseConstructor(){this.constructor=ChildClass}for(var key in SuperClass)__hasProp.call(SuperClass,key)&&(ChildClass[key]=SuperClass[key]);return BaseConstructor.prototype=SuperClass.prototype,ChildClass.prototype=new BaseConstructor,ChildClass.__super__=SuperClass.prototype,ChildClass},Ut
ils.Decorate=function(SuperClass,DecoratorClass){var decoratedMethods=getMethods(DecoratorClass),superMethods=getMethods(SuperClass);function DecoratedClass(){var unshift=Array.prototype.unshift,argCount=DecoratorClass.prototype.constructor.length,calledConstructor=SuperClass.prototype.constructor;argCount>0&&(unshift.call(arguments,SuperClass.prototype.constructor),calledConstructor=DecoratorClass.prototype.constructor),calledConstructor.apply(this,arguments)}DecoratorClass.displayName=SuperClass.displayName,DecoratedClass.prototype=new function(){this.constructor=DecoratedClass};for(var m=0;m<superMethods.length;m++){var superMethod=superMethods[m];DecoratedClass.prototype[superMethod]=SuperClass.prototype[superMethod]}for(var calledMethod=function(methodName){var originalMethod=function(){};methodName in DecoratedClass.prototype&&(originalMethod=DecoratedClass.prototype[methodName]);var decoratedMethod=DecoratorClass.prototype[methodName];return function(){var unshift=Array.prototype.unshift;return unshif
t.call(arguments,originalMethod),decoratedMethod.apply(this,arguments)}},d=0;d<decoratedMethods.length;d++){var decoratedMethod=decoratedMethods[d];DecoratedClass.prototype[decoratedMethod]=calledMethod(decoratedMethod)}return DecoratedClass};var Observable=function(){this.listeners={}};Observable.prototype.on=function(event,callback){this.listeners=this.listeners||{},event in this.listeners?this.listeners[event].push(callback):this.listeners[event]=[callback]},Observable.prototype.trigger=function(event){var slice=Array.prototype.slice,params=slice.call(arguments,1);this.listeners=this.listeners||{},null==params&&(params=[]),0===params.length&¶ms.push({}),params[0]._type=event,event in this.listeners&&this.invoke(this.listeners[event],slice.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},Observable.prototype.invoke=function(listeners,params){for(var i=0,len=listeners.length;i<len;i++)listeners[i].apply(this,params)},Utils.Observable=Observable,Utils.generateChars=fun
ction(length){for(var chars="",i=0;i<length;i++)chars+=Math.floor(36*Math.random()).toString(36);return chars},Utils.bind=function(func,context){return function(){func.apply(context,arguments)}},Utils._convertData=function(data){for(var originalKey in data){var keys=originalKey.split("-"),dataLevel=data;if(1!==keys.length){for(var k=0;k<keys.length;k++){var key=keys[k];(key=key.substring(0,1).toLowerCase()+key.substring(1))in dataLevel||(dataLevel[key]={}),k==keys.length-1&&(dataLevel[key]=data[originalKey]),dataLevel=dataLevel[key]}delete data[originalKey]}}return data},Utils.hasScroll=function(index,el){var $el=$(el),overflowX=el.style.overflowX,overflowY=el.style.overflowY;return(overflowX!==overflowY||"hidden"!==overflowY&&"visible"!==overflowY)&&("scroll"===overflowX||"scroll"===overflowY||$el.innerHeight()<el.scrollHeight||$el.innerWidth()<el.scrollWidth)},Utils.escapeMarkup=function(markup){var replaceMap={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"stri
ng"!=typeof markup?markup:String(markup).replace(/[&<>"'\/\\]/g,(function(match){return replaceMap[match]}))},Utils.appendMany=function($element,$nodes){if("1.7"===$.fn.jquery.substr(0,3)){var $jqNodes=$();$.map($nodes,(function(node){$jqNodes=$jqNodes.add(node)})),$nodes=$jqNodes}$element.append($nodes)},Utils.__cache={};var id=0;return Utils.GetUniqueElementId=function(element){var select2Id=element.getAttribute("data-select2-id");return null==select2Id&&(element.id?(select2Id=element.id,element.setAttribute("data-select2-id",select2Id)):(element.setAttribute("data-select2-id",++id),select2Id=id.toString())),select2Id},Utils.StoreData=function(element,name,value){var id=Utils.GetUniqueElementId(element);Utils.__cache[id]||(Utils.__cache[id]={}),Utils.__cache[id][name]=value},Utils.GetData=function(element,name){var id=Utils.GetUniqueElementId(element);return name?Utils.__cache[id]&&null!=Utils.__cache[id][name]?Utils.__cache[id][name]:$(element).data(name):Utils.__cache[id]},Utils.RemoveData=function(eleme
nt){var id=Utils.GetUniqueElementId(element);null!=Utils.__cache[id]&&delete Utils.__cache[id],element.removeAttribute("data-select2-id")},Utils})),S2.define("select2/results",["jquery","./utils"],(function($,Utils){function Results($element,options,dataAdapter){this.$element=$element,this.data=dataAdapter,this.options=options,Results.__super__.constructor.call(this)}return Utils.Extend(Results,Utils.Observable),Results.prototype.render=function(){var $results=$('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&$results.attr("aria-multiselectable","true"),this.$results=$results,$results},Results.prototype.clear=function(){this.$results.empty()},Results.prototype.displayMessage=function(params){var escapeMarkup=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var $message=$('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),message=this.options.get("translations").get(params.message);$message.append(escapeMarkup(messa
ge(params.args))),$message[0].className+=" select2-results__message",this.$results.append($message)},Results.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},Results.prototype.append=function(data){this.hideLoading();var $options=[];if(null!=data.results&&0!==data.results.length){data.results=this.sort(data.results);for(var d=0;d<data.results.length;d++){var item=data.results[d],$option=this.option(item);$options.push($option)}this.$results.append($options)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},Results.prototype.position=function($results,$dropdown){$dropdown.find(".select2-results").append($results)},Results.prototype.sort=function(data){return this.options.get("sorter")(data)},Results.prototype.highlightFirstItem=function(){var $options=this.$results.find(".select2-results__option[aria-selected]"),$selected=$options.filter("[aria-selected=true]");$selected.length>0?$selected.first().trigger("mouseenter"):$
options.first().trigger("mouseenter"),this.ensureHighlightVisible()},Results.prototype.setClasses=function(){var self=this;this.data.current((function(selected){var selectedIds=$.map(selected,(function(s){return s.id.toString()}));self.$results.find(".select2-results__option[aria-selected]").each((function(){var $option=$(this),item=Utils.GetData(this,"data"),id=""+item.id;null!=item.element&&item.element.selected||null==item.element&&$.inArray(id,selectedIds)>-1?$option.attr("aria-selected","true"):$option.attr("aria-selected","false")}))}))},Results.prototype.showLoading=function(params){this.hideLoading();var loading={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(params)},$loading=this.option(loading);$loading.className+=" loading-results",this.$results.prepend($loading)},Results.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},Results.prototype.option=function(data){var option=document.createElement("li");option.className="select2-results__
option";var attrs={role:"option","aria-selected":"false"},matches=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(var attr in(null!=data.element&&matches.call(data.element,":disabled")||null==data.element&&data.disabled)&&(delete attrs["aria-selected"],attrs["aria-disabled"]="true"),null==data.id&&delete attrs["aria-selected"],null!=data._resultId&&(option.id=data._resultId),data.title&&(option.title=data.title),data.children&&(attrs.role="group",attrs["aria-label"]=data.text,delete attrs["aria-selected"]),attrs){var val=attrs[attr];option.setAttribute(attr,val)}if(data.children){var $option=$(option),label=document.createElement("strong");label.className="select2-results__group",$(label),this.template(data,label);for(var $children=[],c=0;c<data.children.length;c++){var child=data.children[c],$child=this.option(child);$children.push($child)}var $childrenContainer=$("<ul></ul>",{class:"select2-results__options select2-results__op
tions--nested"});$childrenContainer.append($children),$option.append(label),$option.append($childrenContainer)}else this.template(data,option);return Utils.StoreData(option,"data",data),option},Results.prototype.bind=function(container,$container){var self=this,id=container.id+"-results";this.$results.attr("id",id),container.on("results:all",(function(params){self.clear(),self.append(params.data),container.isOpen()&&(self.setClasses(),self.highlightFirstItem())})),container.on("results:append",(function(params){self.append(params.data),container.isOpen()&&self.setClasses()})),container.on("query",(function(params){self.hideMessages(),self.showLoading(params)})),container.on("select",(function(){container.isOpen()&&(self.setClasses(),self.options.get("scrollAfterSelect")&&self.highlightFirstItem())})),container.on("unselect",(function(){container.isOpen()&&(self.setClasses(),self.options.get("scrollAfterSelect")&&self.highlightFirstItem())})),container.on("open",(function(){self.$results.attr("aria-expanded",
"true"),self.$results.attr("aria-hidden","false"),self.setClasses(),self.ensureHighlightVisible()})),container.on("close",(function(){self.$results.attr("aria-expanded","false"),self.$results.attr("aria-hidden","true"),self.$results.removeAttr("aria-activedescendant")})),container.on("results:toggle",(function(){var $highlighted=self.getHighlightedResults();0!==$highlighted.length&&$highlighted.trigger("mouseup")})),container.on("results:select",(function(){var $highlighted=self.getHighlightedResults();if(0!==$highlighted.length){var data=Utils.GetData($highlighted[0],"data");"true"==$highlighted.attr("aria-selected")?self.trigger("close",{}):self.trigger("select",{data:data})}})),container.on("results:previous",(function(){var $highlighted=self.getHighlightedResults(),$options=self.$results.find("[aria-selected]"),currentIndex=$options.index($highlighted);if(!(currentIndex<=0)){var nextIndex=currentIndex-1;0===$highlighted.length&&(nextIndex=0);var $next=$options.eq(nextIndex);$next.trigger("mouseenter");va
r currentOffset=self.$results.offset().top,nextTop=$next.offset().top,nextOffset=self.$results.scrollTop()+(nextTop-currentOffset);0===nextIndex?self.$results.scrollTop(0):nextTop-currentOffset<0&&self.$results.scrollTop(nextOffset)}})),container.on("results:next",(function(){var $highlighted=self.getHighlightedResults(),$options=self.$results.find("[aria-selected]"),nextIndex=$options.index($highlighted)+1;if(!(nextIndex>=$options.length)){var $next=$options.eq(nextIndex);$next.trigger("mouseenter");var currentOffset=self.$results.offset().top+self.$results.outerHeight(!1),nextBottom=$next.offset().top+$next.outerHeight(!1),nextOffset=self.$results.scrollTop()+nextBottom-currentOffset;0===nextIndex?self.$results.scrollTop(0):nextBottom>currentOffset&&self.$results.scrollTop(nextOffset)}})),container.on("results:focus",(function(params){params.element.addClass("select2-results__option--highlighted")})),container.on("results:message",(function(params){self.displayMessage(params)})),$.fn.mousewheel&&this.$resu
lts.on("mousewheel",(function(e){var top=self.$results.scrollTop(),bottom=self.$results.get(0).scrollHeight-top+e.deltaY,isAtTop=e.deltaY>0&&top-e.deltaY<=0,isAtBottom=e.deltaY<0&&bottom<=self.$results.height();isAtTop?(self.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):isAtBottom&&(self.$results.scrollTop(self.$results.get(0).scrollHeight-self.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option[aria-selected]",(function(evt){var $this=$(this),data=Utils.GetData(this,"data");"true"!==$this.attr("aria-selected")?self.trigger("select",{originalEvent:evt,data:data}):self.options.get("multiple")?self.trigger("unselect",{originalEvent:evt,data:data}):self.trigger("close",{})})),this.$results.on("mouseenter",".select2-results__option[aria-selected]",(function(evt){var data=Utils.GetData(this,"data");self.getHighlightedResults().removeClass("select2-results__option--highlighted"),self.trigger("results:focus",{data:data,element:$(this)})}
))},Results.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},Results.prototype.destroy=function(){this.$results.remove()},Results.prototype.ensureHighlightVisible=function(){var $highlighted=this.getHighlightedResults();if(0!==$highlighted.length){var currentIndex=this.$results.find("[aria-selected]").index($highlighted),currentOffset=this.$results.offset().top,nextTop=$highlighted.offset().top,nextOffset=this.$results.scrollTop()+(nextTop-currentOffset),offsetDelta=nextTop-currentOffset;nextOffset-=2*$highlighted.outerHeight(!1),currentIndex<=2?this.$results.scrollTop(0):(offsetDelta>this.$results.outerHeight()||offsetDelta<0)&&this.$results.scrollTop(nextOffset)}},Results.prototype.template=function(result,container){var template=this.options.get("templateResult"),escapeMarkup=this.options.get("escapeMarkup"),content=template(result,container);null==content?container.style.display="none":"string"==typeof content?container.innerHTML=escapeMarkup(
content):$(container).append(content)},Results})),S2.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),S2.define("select2/selection/base",["jquery","../utils","../keys"],(function($,Utils,KEYS){function BaseSelection($element,options){this.$element=$element,this.options=options,BaseSelection.__super__.constructor.call(this)}return Utils.Extend(BaseSelection,Utils.Observable),BaseSelection.prototype.render=function(){var $selection=$('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=Utils.GetData(this.$element[0],"old-tabindex")?this._tabindex=Utils.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),$selection.attr("title",this.$element.attr("title")),$selection.attr("tabindex",this._tabindex),$selection.attr("
aria-disabled","false"),this.$selection=$selection,$selection},BaseSelection.prototype.bind=function(container,$container){var self=this,resultsId=container.id+"-results";this.container=container,this.$selection.on("focus",(function(evt){self.trigger("focus",evt)})),this.$selection.on("blur",(function(evt){self._handleBlur(evt)})),this.$selection.on("keydown",(function(evt){self.trigger("keypress",evt),evt.which===KEYS.SPACE&&evt.preventDefault()})),container.on("results:focus",(function(params){self.$selection.attr("aria-activedescendant",params.data._resultId)})),container.on("selection:update",(function(params){self.update(params.data)})),container.on("open",(function(){self.$selection.attr("aria-expanded","true"),self.$selection.attr("aria-owns",resultsId),self._attachCloseHandler(container)})),container.on("close",(function(){self.$selection.attr("aria-expanded","false"),self.$selection.removeAttr("aria-activedescendant"),self.$selection.removeAttr("aria-owns"),self.$selection.trigger("focus"),self._det
achCloseHandler(container)})),container.on("enable",(function(){self.$selection.attr("tabindex",self._tabindex),self.$selection.attr("aria-disabled","false")})),container.on("disable",(function(){self.$selection.attr("tabindex","-1"),self.$selection.attr("aria-disabled","true")}))},BaseSelection.prototype._handleBlur=function(evt){var self=this;window.setTimeout((function(){document.activeElement==self.$selection[0]||$.contains(self.$selection[0],document.activeElement)||self.trigger("blur",evt)}),1)},BaseSelection.prototype._attachCloseHandler=function(container){$(document.body).on("mousedown.select2."+container.id,(function(e){var $select=$(e.target).closest(".select2");$(".select2.select2-container--open").each((function(){this!=$select[0]&&Utils.GetData(this,"element").select2("close")}))}))},BaseSelection.prototype._detachCloseHandler=function(container){$(document.body).off("mousedown.select2."+container.id)},BaseSelection.prototype.position=function($selection,$container){$container.find(".selection"
).append($selection)},BaseSelection.prototype.destroy=function(){this._detachCloseHandler(this.container)},BaseSelection.prototype.update=function(data){throw new Error("The `update` method must be defined in child classes.")},BaseSelection.prototype.isEnabled=function(){return!this.isDisabled()},BaseSelection.prototype.isDisabled=function(){return this.options.get("disabled")},BaseSelection})),S2.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function($,BaseSelection,Utils,KEYS){function SingleSelection(){SingleSelection.__super__.constructor.apply(this,arguments)}return Utils.Extend(SingleSelection,BaseSelection),SingleSelection.prototype.render=function(){var $selection=SingleSelection.__super__.render.call(this);return $selection.addClass("select2-selection--single"),$selection.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),$selection},SingleSelection.prototype.bind=functio
n(container,$container){var self=this;SingleSelection.__super__.bind.apply(this,arguments);var id=container.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",id).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",id),this.$selection.on("mousedown",(function(evt){1===evt.which&&self.trigger("toggle",{originalEvent:evt})})),this.$selection.on("focus",(function(evt){})),this.$selection.on("blur",(function(evt){})),container.on("focus",(function(evt){container.isOpen()||self.$selection.trigger("focus")}))},SingleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty(),$rendered.removeAttr("title")},SingleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection");return this.options.get("escapeMarkup")(template(data,container))},SingleSelection.prototype.selectionContainer=function(){return $("<span></span>")},SingleSelection.prototype.u
pdate=function(data){if(0!==data.length){var selection=data[0],$rendered=this.$selection.find(".select2-selection__rendered"),formatted=this.display(selection,$rendered);$rendered.empty().append(formatted);var title=selection.title||selection.text;title?$rendered.attr("title",title):$rendered.removeAttr("title")}else this.clear()},SingleSelection})),S2.define("select2/selection/multiple",["jquery","./base","../utils"],(function($,BaseSelection,Utils){function MultipleSelection($element,options){MultipleSelection.__super__.constructor.apply(this,arguments)}return Utils.Extend(MultipleSelection,BaseSelection),MultipleSelection.prototype.render=function(){var $selection=MultipleSelection.__super__.render.call(this);return $selection.addClass("select2-selection--multiple"),$selection.html('<ul class="select2-selection__rendered"></ul>'),$selection},MultipleSelection.prototype.bind=function(container,$container){var self=this;MultipleSelection.__super__.bind.apply(this,arguments),this.$selection.on("click",(funct
ion(evt){self.trigger("toggle",{originalEvent:evt})})),this.$selection.on("click",".select2-selection__choice__remove",(function(evt){if(!self.isDisabled()){var $selection=$(this).parent(),data=Utils.GetData($selection[0],"data");self.trigger("unselect",{originalEvent:evt,data:data})}}))},MultipleSelection.prototype.clear=function(){var $rendered=this.$selection.find(".select2-selection__rendered");$rendered.empty(),$rendered.removeAttr("title")},MultipleSelection.prototype.display=function(data,container){var template=this.options.get("templateSelection");return this.options.get("escapeMarkup")(template(data,container))},MultipleSelection.prototype.selectionContainer=function(){return $('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">×</span></li>')},MultipleSelection.prototype.update=function(data){if(this.clear(),0!==data.length){for(var $selections=[],d=0;d<data.length;d++){var selection=data[d],$selection=this.selectionContainer(),formatte
d=this.display(selection,$selection);$selection.append(formatted);var title=selection.title||selection.text;title&&$selection.attr("title",title),Utils.StoreData($selection[0],"data",selection),$selections.push($selection)}var $rendered=this.$selection.find(".select2-selection__rendered");Utils.appendMany($rendered,$selections)}},MultipleSelection})),S2.define("select2/selection/placeholder",["../utils"],(function(Utils){function Placeholder(decorated,$element,options){this.placeholder=this.normalizePlaceholder(options.get("placeholder")),decorated.call(this,$element,options)}return Placeholder.prototype.normalizePlaceholder=function(_,placeholder){return"string"==typeof placeholder&&(placeholder={id:"",text:placeholder}),placeholder},Placeholder.prototype.createPlaceholder=function(decorated,placeholder){var $placeholder=this.selectionContainer();return $placeholder.html(this.display(placeholder)),$placeholder.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),$placeholder},
Placeholder.prototype.update=function(decorated,data){var singlePlaceholder=1==data.length&&data[0].id!=this.placeholder.id;if(data.length>1||singlePlaceholder)return decorated.call(this,data);this.clear();var $placeholder=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append($placeholder)},Placeholder})),S2.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function($,KEYS,Utils){function AllowClear(){}return AllowClear.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(evt){self._handleClear(evt)})),container.on("keypress",(function(evt){self._handleKeyboardClear(evt,container)}))},AllowClear.prototype._handleClear=function
(_,evt){if(!this.isDisabled()){var $clear=this.$selection.find(".select2-selection__clear");if(0!==$clear.length){evt.stopPropagation();var data=Utils.GetData($clear[0],"data"),previousVal=this.$element.val();this.$element.val(this.placeholder.id);var unselectData={data:data};if(this.trigger("clear",unselectData),unselectData.prevented)this.$element.val(previousVal);else{for(var d=0;d<data.length;d++)if(unselectData={data:data[d]},this.trigger("unselect",unselectData),unselectData.prevented)return void this.$element.val(previousVal);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},AllowClear.prototype._handleKeyboardClear=function(_,evt,container){container.isOpen()||evt.which!=KEYS.DELETE&&evt.which!=KEYS.BACKSPACE||this._handleClear(evt)},AllowClear.prototype.update=function(decorated,data){if(decorated.call(this,data),!(this.$selection.find(".select2-selection__placeholder").length>0||0===data.length)){var removeAll=this.options.get("translations").get("removeAllItems"),$remo
ve=$('<span class="select2-selection__clear" title="'+removeAll()+'">×</span>');Utils.StoreData($remove[0],"data",data),this.$selection.find(".select2-selection__rendered").prepend($remove)}},AllowClear})),S2.define("select2/selection/search",["jquery","../utils","../keys"],(function($,Utils,KEYS){function Search(decorated,$element,options){decorated.call(this,$element,options)}return Search.prototype.render=function(decorated){var $search=$('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=$search,this.$search=$search.find("input");var $rendered=decorated.call(this);return this._transferTabIndex(),$rendered},Search.prototype.bind=function(decorated,container,$container){var self=this,resultsId=container.id+"-results";decorated.call(this,container,$container),container.on("open",(function
(){self.$search.attr("aria-controls",resultsId),self.$search.trigger("focus")})),container.on("close",(function(){self.$search.val(""),self.$search.removeAttr("aria-controls"),self.$search.removeAttr("aria-activedescendant"),self.$search.trigger("focus")})),container.on("enable",(function(){self.$search.prop("disabled",!1),self._transferTabIndex()})),container.on("disable",(function(){self.$search.prop("disabled",!0)})),container.on("focus",(function(evt){self.$search.trigger("focus")})),container.on("results:focus",(function(params){params.data._resultId?self.$search.attr("aria-activedescendant",params.data._resultId):self.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(evt){self.trigger("focus",evt)})),this.$selection.on("focusout",".select2-search--inline",(function(evt){self._handleBlur(evt)})),this.$selection.on("keydown",".select2-search--inline",(function(evt){if(evt.stopPropagation(),self.trigger("keypress",evt),self._keyUpPrevented=evt.
isDefaultPrevented(),evt.which===KEYS.BACKSPACE&&""===self.$search.val()){var $previousChoice=self.$searchContainer.prev(".select2-selection__choice");if($previousChoice.length>0){var item=Utils.GetData($previousChoice[0],"data");self.searchRemoveChoice(item),evt.preventDefault()}}})),this.$selection.on("click",".select2-search--inline",(function(evt){self.$search.val()&&evt.stopPropagation()}));var msie=document.documentMode,disableInputEvents=msie&&msie<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(evt){disableInputEvents?self.$selection.off("input.search input.searchcheck"):self.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(evt){if(disableInputEvents&&"input"===evt.type)self.$selection.off("input.search input.searchcheck");else{var key=evt.which;key!=KEYS.SHIFT&&key!=KEYS.CTRL&&key!=KEYS.ALT&&key!=KEYS.TAB&&self.handleSearch(evt)}}))},Search.prototype._transferTabIndex=function(decorated){this.$search.a
ttr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},Search.prototype.createPlaceholder=function(decorated,placeholder){this.$search.attr("placeholder",placeholder.text)},Search.prototype.update=function(decorated,data){var searchHadFocus=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),decorated.call(this,data),this.$selection.find(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),searchHadFocus&&this.$search.trigger("focus")},Search.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var input=this.$search.val();this.trigger("query",{term:input})}this._keyUpPrevented=!1},Search.prototype.searchRemoveChoice=function(decorated,item){this.trigger("unselect",{data:item}),this.$search.val(item.text),this.handleSearch()},Search.prototype.resizeSearch=function(){this.$search.css("width","25px");var width="";width=""!==this.$search.attr("placeholder")?this.$selection.find(".select2-selection__r
endered").width():.75*(this.$search.val().length+1)+"em",this.$search.css("width",width)},Search})),S2.define("select2/selection/eventRelay",["jquery"],(function($){function EventRelay(){}return EventRelay.prototype.bind=function(decorated,container,$container){var self=this,relayEvents=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],preventableEvents=["opening","closing","selecting","unselecting","clearing"];decorated.call(this,container,$container),container.on("*",(function(name,params){if(-1!==$.inArray(name,relayEvents)){params=params||{};var evt=$.Event("select2:"+name,{params:params});self.$element.trigger(evt),-1!==$.inArray(name,preventableEvents)&&(params.prevented=evt.isDefaultPrevented())}}))},EventRelay})),S2.define("select2/translation",["jquery","require"],(function($,require){function Translation(dict){this.dict=dict||{}}return Translation.prototype.all=function(){return this.dict},Translation.prototype.get=function(key){return this.dict[k
ey]},Translation.prototype.extend=function(translation){this.dict=$.extend({},translation.all(),this.dict)},Translation._cache={},Translation.loadPath=function(path){if(!(path in Translation._cache)){var translations=require(path);Translation._cache[path]=translations}return new Translation(Translation._cache[path])},Translation})),S2.define("select2/diacritics",[],(function(){return{"â’¶":"A","A":"A","À":"A","Ã":"A","Â":"A","Ầ":"A","Ấ":"A","Ẫ":"A","Ẩ":"A","Ã":"A","Ä€":"A","Ä‚":"A","Ằ":"A","Ắ":"A","Ẵ":"A","Ẳ":"A","Ȧ":"A","Ç ":"A","Ä":"A","Çž":"A","Ả":"A","Ã…":"A","Ǻ":"A","Ç":"A","È€":"A","È‚":"A","Ạ":"A","Ậ":"A","Ặ":"A","Ḁ":"A","Ä„":"A","Ⱥ":"A","Ɐ":"A","Ꜳ":"AA","Æ":"AE","Ǽ":"AE","Ç¢":"AE","Ꜵ":"AO","Ꜷ":"AU","Ꜹ":"AV","Ꜻ":"AV","Ꜽ":"AY","â’·":"B","ï¼¢":"B","Ḃ":"B","Ḅ":"B","Ḇ":"B","Ƀ":"B","Æ‚":"B","Æ":"B","â’¸":"C","ï¼£":"C","Ć":"C","Ĉ":"C","ÄŠ":"C","ÄŒ":"C","Ç":"C","Ḉ":"C","Ƈ":"C","È»":"C","Ꜿ":"C","â’¹":"D","D":"D","Ḋ":"D","ÄŽ":"D","Ḍ":"D
","á¸":"D","Ḓ":"D","Ḏ":"D","Ä":"D","Æ‹":"D","ÆŠ":"D","Ɖ":"D","ê¹":"D","DZ":"DZ","Ç„":"DZ","Dz":"Dz","Ç…":"Dz","â’º":"E","ï¼¥":"E","È":"E","É":"E","Ê":"E","Ề":"E","Ế":"E","Ễ":"E","Ể":"E","Ẽ":"E","Ä’":"E","Ḕ":"E","Ḗ":"E","Ä”":"E","Ä–":"E","Ë":"E","Ẻ":"E","Äš":"E","È„":"E","Ȇ":"E","Ẹ":"E","Ệ":"E","Ȩ":"E","Ḝ":"E","Ę":"E","Ḙ":"E","Ḛ":"E","Æ":"E","ÆŽ":"E","â’»":"F","F":"F","Ḟ":"F","Æ‘":"F","ê»":"F","â’¼":"G","G":"G","Ç´":"G","Äœ":"G","Ḡ":"G","Äž":"G","Ä ":"G","Ǧ":"G","Ä¢":"G","Ǥ":"G","Æ“":"G","êž ":"G","ê½":"G","ê¾":"G","â’½":"H","H":"H","Ĥ":"H","Ḣ":"H","Ḧ":"H","Èž":"H","Ḥ":"H","Ḩ":"H","Ḫ":"H","Ħ":"H","Ⱨ":"H","â±µ":"H","êž":"H","â’¾":"I","I":"I","ÃŒ":"I","Ã":"I","ÃŽ":"I","Ĩ":"I","Ī":"I","Ĭ":"I","Ä°":"I","Ã":"I","Ḯ":"I","Ỉ":"I","Ç":"I","Ȉ":"I","ÈŠ":"I","Ị":"I","Ä®":"I","Ḭ":"I","Æ—":"I","â’¿":"J","J":"J","Ä´":"J","Ɉ":"J","â“€":"K","K":"K","Ḱ":"K","Ǩ":"K","Ḳ":"K","Ķ":"K","Ḵ":"K","Ƙ":"K","Ⱪ":"K","ê€":"K","ê‚":"K"
,"ê„":"K","Ꞣ":"K","â“":"L","L":"L","Ä¿":"L","Ĺ":"L","Ľ":"L","Ḷ":"L","Ḹ":"L","Ä»":"L","Ḽ":"L","Ḻ":"L","Å":"L","Ƚ":"L","â±¢":"L","â± ":"L","êˆ":"L","ê†":"L","Ꞁ":"L","LJ":"LJ","Lj":"Lj","â“‚":"M","ï¼":"M","Ḿ":"M","á¹€":"M","Ṃ":"M","â±®":"M","Æœ":"M","Ⓝ":"N","ï¼®":"N","Ǹ":"N","Ń":"N","Ñ":"N","Ṅ":"N","Ň":"N","Ṇ":"N","Å…":"N","Ṋ":"N","Ṉ":"N","È ":"N","Æ":"N","êž":"N","Ꞥ":"N","ÇŠ":"NJ","Ç‹":"Nj","â“„":"O","O":"O","Ã’":"O","Ó":"O","Ô":"O","á»’":"O","á»":"O","á»–":"O","á»”":"O","Õ":"O","Ṍ":"O","Ȭ":"O","Ṏ":"O","ÅŒ":"O","á¹":"O","á¹’":"O","ÅŽ":"O","È®":"O","È°":"O","Ö":"O","Ȫ":"O","Ỏ":"O","Å":"O","Ç‘":"O","ÈŒ":"O","ÈŽ":"O","Æ ":"O","Ờ":"O","Ớ":"O","á» ":"O","Ở":"O","Ợ":"O","Ọ":"O","Ộ":"O","Ǫ":"O","Ǭ":"O","Ø":"O","Ǿ":"O","Ɔ":"O","ÆŸ":"O","êŠ":"O","êŒ":"O","Å’":"OE","Æ¢":"OI","êŽ":"OO","È¢":"OU","â“…":"P","ï¼°":"P","á¹”":"P","á¹–":"P","Ƥ":"P","â±£":"P","ê":"P","ê’":"P","ê”":"P","Ⓠ":"Q","ï¼±":"Q","ê–":"Q","ê˜":"Q","ÉŠ":"Q","Ⓡ":"R"
,"ï¼²":"R","Å”":"R","Ṙ":"R","Ř":"R","È":"R","È’":"R","Ṛ":"R","Ṝ":"R","Å–":"R","Ṟ":"R","ÉŒ":"R","Ɽ":"R","êš":"R","Ꞧ":"R","êž‚":"R","Ⓢ":"S","ï¼³":"S","ẞ":"S","Åš":"S","Ṥ":"S","Åœ":"S","á¹ ":"S","Å ":"S","Ṧ":"S","á¹¢":"S","Ṩ":"S","Ș":"S","Åž":"S","â±¾":"S","Ꞩ":"S","êž„":"S","Ⓣ":"T","ï¼´":"T","Ṫ":"T","Ť":"T","Ṭ":"T","Èš":"T","Å¢":"T","á¹°":"T","á¹®":"T","Ŧ":"T","Ƭ":"T","Æ®":"T","Ⱦ":"T","Ꞇ":"T","Ꜩ":"TZ","â“Š":"U","ï¼µ":"U","Ù":"U","Ú":"U","Û":"U","Ũ":"U","Ṹ":"U","Ū":"U","Ṻ":"U","Ŭ":"U","Ãœ":"U","Ç›":"U","Ç—":"U","Ç•":"U","Ç™":"U","Ủ":"U","Å®":"U","Å°":"U","Ç“":"U","È”":"U","È–":"U","Ư":"U","Ừ":"U","Ứ":"U","á»®":"U","Ử":"U","á»°":"U","Ụ":"U","á¹²":"U","Ų":"U","Ṷ":"U","á¹´":"U","É„":"U","â“‹":"V","V":"V","á¹¼":"V","á¹¾":"V","Ʋ":"V","êž":"V","É…":"V","ê ":"VY","â“Œ":"W","ï¼·":"W","Ẁ":"W","Ẃ":"W","Å´":"W","Ẇ":"W","Ẅ":"W","Ẉ":"W","â±²":"W","â“":"X","X":"X","Ẋ":"X","Ẍ":"X","â“Ž":"Y","ï¼¹":"Y","Ỳ":"Y","Ã":"Y","Ŷ":"Y","Ỹ":"Y","È
²":"Y","Ẏ":"Y","Ÿ":"Y","Ỷ":"Y","á»´":"Y","Ƴ":"Y","ÉŽ":"Y","Ỿ":"Y","â“":"Z","Z":"Z","Ź":"Z","áº":"Z","Å»":"Z","Ž":"Z","Ẓ":"Z","Ẕ":"Z","Ƶ":"Z","Ȥ":"Z","Ɀ":"Z","Ⱬ":"Z","ê¢":"Z","â“":"a","ï½":"a","ẚ":"a","à ":"a","á":"a","â":"a","ầ":"a","ấ":"a","ẫ":"a","ẩ":"a","ã":"a","Ä":"a","ă":"a","ằ":"a","ắ":"a","ẵ":"a","ẳ":"a","ȧ":"a","Ç¡":"a","ä":"a","ÇŸ":"a","ả":"a","Ã¥":"a","Ç»":"a","ÇŽ":"a","È":"a","ȃ":"a","ạ":"a","áº":"a","ặ":"a","á¸":"a","Ä…":"a","â±¥":"a","É":"a","ꜳ":"aa","æ":"ae","ǽ":"ae","Ç£":"ae","ꜵ":"ao","ꜷ":"au","ꜹ":"av","ꜻ":"av","ꜽ":"ay","â“‘":"b","b":"b","ḃ":"b","ḅ":"b","ḇ":"b","Æ€":"b","ƃ":"b","É“":"b","â“’":"c","c":"c","ć":"c","ĉ":"c","Ä‹":"c","Ä":"c","ç":"c","ḉ":"c","ƈ":"c","ȼ":"c","ꜿ":"c","ↄ":"c","â““":"d","d":"d","ḋ":"d","Ä":"d","á¸":"d","ḑ":"d","ḓ":"d","á¸":"d","Ä‘":"d","ÆŒ":"d","É–":"d","É—":"d","êº":"d","dz":"dz","dž":"dz","â“”":"e","ï½…":"e","è":"e","é":"e","ê":"e","á»":"e","ế":"e","á»
…":"e","ể":"e","ẽ":"e","Ä“":"e","ḕ":"e","ḗ":"e","Ä•":"e","Ä—":"e","ë":"e","ẻ":"e","Ä›":"e","È…":"e","ȇ":"e","ẹ":"e","ệ":"e","È©":"e","á¸":"e","Ä™":"e","ḙ":"e","ḛ":"e","ɇ":"e","É›":"e","Ç":"e","â“•":"f","f":"f","ḟ":"f","Æ’":"f","ê¼":"f","â“–":"g","g":"g","ǵ":"g","Ä":"g","ḡ":"g","ÄŸ":"g","Ä¡":"g","ǧ":"g","Ä£":"g","Ç¥":"g","É ":"g","êž¡":"g","áµ¹":"g","ê¿":"g","â“—":"h","h":"h","Ä¥":"h","ḣ":"h","ḧ":"h","ÈŸ":"h","ḥ":"h","ḩ":"h","ḫ":"h","ẖ":"h","ħ":"h","ⱨ":"h","ⱶ":"h","É¥":"h","Æ•":"hv","ⓘ":"i","i":"i","ì":"i","Ã":"i","î":"i","Ä©":"i","Ä«":"i","Ä":"i","ï":"i","ḯ":"i","ỉ":"i","Ç":"i","ȉ":"i","È‹":"i","ị":"i","į":"i","á¸":"i","ɨ":"i","ı":"i","â“™":"j","j":"j","ĵ":"j","Ç°":"j","ɉ":"j","â“š":"k","k":"k","ḱ":"k","Ç©":"k","ḳ":"k","Ä·":"k","ḵ":"k","Æ™":"k","ⱪ":"k","ê":"k","êƒ":"k","ê…":"k","ꞣ":"k","â“›":"l","l":"l","Å€":"l","ĺ":"l","ľ":"l","ḷ":"l","ḹ":"l","ļ":"l","ḽ":"l","ḻ":"l","Å¿":"l","Å‚":"l","Æš":"l","É«":"l
","ⱡ":"l","ê‰":"l","êž":"l","ê‡":"l","lj":"lj","â“œ":"m","ï½":"m","ḿ":"m","á¹":"m","ṃ":"m","ɱ":"m","ɯ":"m","â“":"n","n":"n","ǹ":"n","Å„":"n","ñ":"n","á¹…":"n","ň":"n","ṇ":"n","ņ":"n","ṋ":"n","ṉ":"n","Æž":"n","ɲ":"n","ʼn":"n","êž‘":"n","ꞥ":"n","ÇŒ":"nj","â“ž":"o","ï½":"o","ò":"o","ó":"o","ô":"o","ồ":"o","ố":"o","á»—":"o","ổ":"o","õ":"o","á¹":"o","È":"o","á¹":"o","Å":"o","ṑ":"o","ṓ":"o","Å":"o","ȯ":"o","ȱ":"o","ö":"o","È«":"o","á»":"o","Å‘":"o","Ç’":"o","È":"o","È":"o","Æ¡":"o","á»":"o","á»›":"o","ỡ":"o","ở":"o","ợ":"o","á»":"o","á»™":"o","Ç«":"o","Ç":"o","ø":"o","Ç¿":"o","É”":"o","ê‹":"o","ê":"o","ɵ":"o","Å“":"oe","Æ£":"oi","È£":"ou","ê":"oo","â“Ÿ":"p","ï½":"p","ṕ":"p","á¹—":"p","Æ¥":"p","áµ½":"p","ê‘":"p","ê“":"p","ê•":"p","â“ ":"q","q":"q","É‹":"q","ê—":"q","ê™":"q","â“¡":"r","ï½’":"r","Å•":"r","á¹™":"r","Å™":"r","È‘":"r","È“":"r","á¹›":"r","á¹":"r","Å—":"r","ṟ":"r","É":"r","ɽ":"r","ê›":"r","ꞧ":"r","ꞃ":"r","â“¢":"s","
s":"s","ß":"s","Å›":"s","á¹¥":"s","Å":"s","ṡ":"s","Å¡":"s","ṧ":"s","á¹£":"s","ṩ":"s","È™":"s","ÅŸ":"s","È¿":"s","êž©":"s","êž…":"s","ẛ":"s","â“£":"t","ï½”":"t","ṫ":"t","ẗ":"t","Å¥":"t","á¹":"t","È›":"t","Å£":"t","á¹±":"t","ṯ":"t","ŧ":"t","Æ":"t","ʈ":"t","ⱦ":"t","ꞇ":"t","ꜩ":"tz","ⓤ":"u","u":"u","ù":"u","ú":"u","û":"u","Å©":"u","á¹¹":"u","Å«":"u","á¹»":"u","Å":"u","ü":"u","Çœ":"u","ǘ":"u","Ç–":"u","Çš":"u","ủ":"u","ů":"u","ű":"u","Ç”":"u","È•":"u","È—":"u","Æ°":"u","ừ":"u","ứ":"u","ữ":"u","á»":"u","á»±":"u","ụ":"u","á¹³":"u","ų":"u","á¹·":"u","á¹µ":"u","ʉ":"u","â“¥":"v","ï½–":"v","á¹½":"v","ṿ":"v","Ê‹":"v","êŸ":"v","ÊŒ":"v","ê¡":"vy","ⓦ":"w","ï½—":"w","áº":"w","ẃ":"w","ŵ":"w","ẇ":"w","ẅ":"w","ẘ":"w","ẉ":"w","â±³":"w","ⓧ":"x","x":"x","ẋ":"x","áº":"x","ⓨ":"y","ï½™":"y","ỳ":"y","ý":"y","Å·":"y","ỹ":"y","ȳ":"y","áº":"y","ÿ":"y","á»·":"y","ẙ":"y","ỵ":"y","Æ´":"y","É":"y","ỿ":"y","â“©":"z","z":"z","ź":"z","ẑ":"z","ż"
:"z","ž":"z","ẓ":"z","ẕ":"z","ƶ":"z","ȥ":"z","ɀ":"z","ⱬ":"z","ꝣ":"z","Ά":"Α","Έ":"Ε","Ή":"Η","Ί":"Ι","Ϊ":"Ι","Ό":"Ο","Ύ":"Υ","Ϋ":"Υ","Ώ":"Ω","ά":"α","έ":"ε","ή":"η","ί":"ι","ϊ":"ι","ΐ":"ι","ό":"ο","ύ":"υ","ϋ":"υ","ΰ":"υ","ώ":"ω","ς":"σ","’":"'"}})),S2.define("select2/data/base",["../utils"],(function(Utils){function BaseAdapter($element,options){BaseAdapter.__super__.constructor.call(this)}return Utils.Extend(BaseAdapter,Utils.Observable),BaseAdapter.prototype.current=function(callback){throw new Error("The `current` method must be defined in child classes.")},BaseAdapter.prototype.query=function(params,callback){throw new Error("The `query` method must be defined in child classes.")},BaseAdapter.prototype.bind=function(container,$container){},BaseAdapter.prototype.destroy=function(){},BaseAdapter.prototype.generateResultId=function(container,data){var id=container.id+"-result-";return id+=Utils.generateChars(4),null!=data.id?id+="-"+data.id.toString():
id+="-"+Utils.generateChars(4),id},BaseAdapter})),S2.define("select2/data/select",["./base","../utils","jquery"],(function(BaseAdapter,Utils,$){function SelectAdapter($element,options){this.$element=$element,this.options=options,SelectAdapter.__super__.constructor.call(this)}return Utils.Extend(SelectAdapter,BaseAdapter),SelectAdapter.prototype.current=function(callback){var data=[],self=this;this.$element.find(":selected").each((function(){var $option=$(this),option=self.item($option);data.push(option)})),callback(data)},SelectAdapter.prototype.select=function(data){var self=this;if(data.selected=!0,$(data.element).is("option"))return data.element.selected=!0,void this.$element.trigger("input").trigger("change");if(this.$element.prop("multiple"))this.current((function(currentData){var val=[];(data=[data]).push.apply(data,currentData);for(var d=0;d<data.length;d++){var id=data[d].id;-1===$.inArray(id,val)&&val.push(id)}self.$element.val(val),self.$element.trigger("input").trigger("change")}));else{var val=da
ta.id;this.$element.val(val),this.$element.trigger("input").trigger("change")}},SelectAdapter.prototype.unselect=function(data){var self=this;if(this.$element.prop("multiple")){if(data.selected=!1,$(data.element).is("option"))return data.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(currentData){for(var val=[],d=0;d<currentData.length;d++){var id=currentData[d].id;id!==data.id&&-1===$.inArray(id,val)&&val.push(id)}self.$element.val(val),self.$element.trigger("input").trigger("change")}))}},SelectAdapter.prototype.bind=function(container,$container){var self=this;this.container=container,container.on("select",(function(params){self.select(params.data)})),container.on("unselect",(function(params){self.unselect(params.data)}))},SelectAdapter.prototype.destroy=function(){this.$element.find("*").each((function(){Utils.RemoveData(this)}))},SelectAdapter.prototype.query=function(params,callback){var data=[],self=this;this.$element.children().each((function(){var $o
ption=$(this);if($option.is("option")||$option.is("optgroup")){var option=self.item($option),matches=self.matches(params,option);null!==matches&&data.push(matches)}})),callback({results:data})},SelectAdapter.prototype.addOptions=function($options){Utils.appendMany(this.$element,$options)},SelectAdapter.prototype.option=function(data){var option;data.children?(option=document.createElement("optgroup")).label=data.text:void 0!==(option=document.createElement("option")).textContent?option.textContent=data.text:option.innerText=data.text,void 0!==data.id&&(option.value=data.id),data.disabled&&(option.disabled=!0),data.selected&&(option.selected=!0),data.title&&(option.title=data.title);var $option=$(option),normalizedData=this._normalizeItem(data);return normalizedData.element=option,Utils.StoreData(option,"data",normalizedData),$option},SelectAdapter.prototype.item=function($option){var data={};if(null!=(data=Utils.GetData($option[0],"data")))return data;if($option.is("option"))data={id:$option.val(),text:$opti
on.text(),disabled:$option.prop("disabled"),selected:$option.prop("selected"),title:$option.prop("title")};else if($option.is("optgroup")){data={text:$option.prop("label"),children:[],title:$option.prop("title")};for(var $children=$option.children("option"),children=[],c=0;c<$children.length;c++){var $child=$($children[c]),child=this.item($child);children.push(child)}data.children=children}return(data=this._normalizeItem(data)).element=$option[0],Utils.StoreData($option[0],"data",data),data},SelectAdapter.prototype._normalizeItem=function(item){return item!==Object(item)&&(item={id:item,text:item}),null!=(item=$.extend({},{text:""},item)).id&&(item.id=item.id.toString()),null!=item.text&&(item.text=item.text.toString()),null==item._resultId&&item.id&&null!=this.container&&(item._resultId=this.generateResultId(this.container,item)),$.extend({},{selected:!1,disabled:!1},item)},SelectAdapter.prototype.matches=function(params,data){return this.options.get("matcher")(params,data)},SelectAdapter})),S2.define("sele
ct2/data/array",["./select","../utils","jquery"],(function(SelectAdapter,Utils,$){function ArrayAdapter($element,options){this._dataToConvert=options.get("data")||[],ArrayAdapter.__super__.constructor.call(this,$element,options)}return Utils.Extend(ArrayAdapter,SelectAdapter),ArrayAdapter.prototype.bind=function(container,$container){ArrayAdapter.__super__.bind.call(this,container,$container),this.addOptions(this.convertToOptions(this._dataToConvert))},ArrayAdapter.prototype.select=function(data){var $option=this.$element.find("option").filter((function(i,elm){return elm.value==data.id.toString()}));0===$option.length&&($option=this.option(data),this.addOptions($option)),ArrayAdapter.__super__.select.call(this,data)},ArrayAdapter.prototype.convertToOptions=function(data){var self=this,$existing=this.$element.find("option"),existingIds=$existing.map((function(){return self.item($(this)).id})).get(),$options=[];function onlyItem(item){return function(){return $(this).val()==item.id}}for(var d=0;d<data.length;d
++){var item=this._normalizeItem(data[d]);if($.inArray(item.id,existingIds)>=0){var $existingOption=$existing.filter(onlyItem(item)),existingData=this.item($existingOption),newData=$.extend(!0,{},item,existingData),$newOption=this.option(newData);$existingOption.replaceWith($newOption)}else{var $option=this.option(item);if(item.children){var $children=this.convertToOptions(item.children);Utils.appendMany($option,$children)}$options.push($option)}}return $options},ArrayAdapter})),S2.define("select2/data/ajax",["./array","../utils","jquery"],(function(ArrayAdapter,Utils,$){function AjaxAdapter($element,options){this.ajaxOptions=this._applyDefaults(options.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),AjaxAdapter.__super__.constructor.call(this,$element,options)}return Utils.Extend(AjaxAdapter,ArrayAdapter),AjaxAdapter.prototype._applyDefaults=function(options){var defaults={data:function(params){return $.extend({},params,{q:params.term})},transport:fu
nction(params,success,failure){var $request=$.ajax(params);return $request.then(success),$request.fail(failure),$request}};return $.extend({},defaults,options,!0)},AjaxAdapter.prototype.processResults=function(results){return results},AjaxAdapter.prototype.query=function(params,callback){var self=this;null!=this._request&&($.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var options=$.extend({type:"GET"},this.ajaxOptions);function request(){var $request=options.transport(options,(function(data){var results=self.processResults(data,params);self.options.get("debug")&&window.console&&console.error&&(results&&results.results&&$.isArray(results.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),callback(results)}),(function(){(!("status"in $request)||0!==$request.status&&"0"!==$request.status)&&self.trigger("results:message",{message:"errorLoading"})}));self._request=$request}"function"==typeof options.url&&(options.url=o
ptions.url.call(this.$element,params)),"function"==typeof options.data&&(options.data=options.data.call(this.$element,params)),this.ajaxOptions.delay&&null!=params.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(request,this.ajaxOptions.delay)):request()},AjaxAdapter})),S2.define("select2/data/tags",["jquery"],(function($){function Tags(decorated,$element,options){var tags=options.get("tags"),createTag=options.get("createTag");void 0!==createTag&&(this.createTag=createTag);var insertTag=options.get("insertTag");if(void 0!==insertTag&&(this.insertTag=insertTag),decorated.call(this,$element,options),$.isArray(tags))for(var t=0;t<tags.length;t++){var tag=tags[t],item=this._normalizeItem(tag),$option=this.option(item);this.$element.append($option)}}return Tags.prototype.query=function(decorated,params,callback){var self=this;this._removeOldTags(),null!=params.term&&null==params.page?decorated.call(this,params,(function wrapper(obj,child){for(var data=obj.res
ults,i=0;i<data.length;i++){var option=data[i],checkChildren=null!=option.children&&!wrapper({results:option.children},!0);if((option.text||"").toUpperCase()===(params.term||"").toUpperCase()||checkChildren)return!child&&(obj.data=data,void callback(obj))}if(child)return!0;var tag=self.createTag(params);if(null!=tag){var $option=self.option(tag);$option.attr("data-select2-tag",!0),self.addOptions([$option]),self.insertTag(data,tag)}obj.results=data,callback(obj)})):decorated.call(this,params,callback)},Tags.prototype.createTag=function(decorated,params){var term=$.trim(params.term);return""===term?null:{id:term,text:term}},Tags.prototype.insertTag=function(_,data,tag){data.unshift(tag)},Tags.prototype._removeOldTags=function(_){this.$element.find("option[data-select2-tag]").each((function(){this.selected||$(this).remove()}))},Tags})),S2.define("select2/data/tokenizer",["jquery"],(function($){function Tokenizer(decorated,$element,options){var tokenizer=options.get("tokenizer");void 0!==tokenizer&&(this.tokeni
zer=tokenizer),decorated.call(this,$element,options)}return Tokenizer.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container),this.$search=container.dropdown.$search||container.selection.$search||$container.find(".select2-search__field")},Tokenizer.prototype.query=function(decorated,params,callback){var self=this;params.term=params.term||"";var tokenData=this.tokenizer(params,this.options,(function(data){var item=self._normalizeItem(data);if(!self.$element.find("option").filter((function(){return $(this).val()===item.id})).length){var $option=self.option(item);$option.attr("data-select2-tag",!0),self._removeOldTags(),self.addOptions([$option])}!function(data){self.trigger("select",{data:data})}(item)}));tokenData.term!==params.term&&(this.$search.length&&(this.$search.val(tokenData.term),this.$search.trigger("focus")),params.term=tokenData.term),decorated.call(this,params,callback)},Tokenizer.prototype.tokenizer=function(_,params,options,callback){for(var separators=
options.get("tokenSeparators")||[],term=params.term,i=0,createTag=this.createTag||function(params){return{id:params.term,text:params.term}};i<term.length;){var termChar=term[i];if(-1!==$.inArray(termChar,separators)){var part=term.substr(0,i),data=createTag($.extend({},params,{term:part}));null!=data?(callback(data),term=term.substr(i+1)||"",i=0):i++}else i++}return{term:term}},Tokenizer})),S2.define("select2/data/minimumInputLength",[],(function(){function MinimumInputLength(decorated,$e,options){this.minimumInputLength=options.get("minimumInputLength"),decorated.call(this,$e,options)}return MinimumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"",params.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:params.term,params:params}}):decorated.call(this,params,callback)},MinimumInputLength})),S2.define("select2/data/maximumInputLength",[],(function(){function MaximumInputLength(decor
ated,$e,options){this.maximumInputLength=options.get("maximumInputLength"),decorated.call(this,$e,options)}return MaximumInputLength.prototype.query=function(decorated,params,callback){params.term=params.term||"",this.maximumInputLength>0&¶ms.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:params.term,params:params}}):decorated.call(this,params,callback)},MaximumInputLength})),S2.define("select2/data/maximumSelectionLength",[],(function(){function MaximumSelectionLength(decorated,$e,options){this.maximumSelectionLength=options.get("maximumSelectionLength"),decorated.call(this,$e,options)}return MaximumSelectionLength.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("select",(function(){self._checkIfMaximumSelected()}))},MaximumSelectionLength.prototype.query=function(decorated,params,callback){var self=this;this._checkIfMaximumSelected((functio
n(){decorated.call(self,params,callback)}))},MaximumSelectionLength.prototype._checkIfMaximumSelected=function(_,successCallback){var self=this;this.current((function(currentData){var count=null!=currentData?currentData.length:0;self.maximumSelectionLength>0&&count>=self.maximumSelectionLength?self.trigger("results:message",{message:"maximumSelected",args:{maximum:self.maximumSelectionLength}}):successCallback&&successCallback()}))},MaximumSelectionLength})),S2.define("select2/dropdown",["jquery","./utils"],(function($,Utils){function Dropdown($element,options){this.$element=$element,this.options=options,Dropdown.__super__.constructor.call(this)}return Utils.Extend(Dropdown,Utils.Observable),Dropdown.prototype.render=function(){var $dropdown=$('<span class="select2-dropdown"><span class="select2-results"></span></span>');return $dropdown.attr("dir",this.options.get("dir")),this.$dropdown=$dropdown,$dropdown},Dropdown.prototype.bind=function(){},Dropdown.prototype.position=function($dropdown,$container){},Dro
pdown.prototype.destroy=function(){this.$dropdown.remove()},Dropdown})),S2.define("select2/dropdown/search",["jquery","../utils"],(function($,Utils){function Search(){}return Search.prototype.render=function(decorated){var $rendered=decorated.call(this),$search=$('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=$search,this.$search=$search.find("input"),$rendered.prepend($search),$rendered},Search.prototype.bind=function(decorated,container,$container){var self=this,resultsId=container.id+"-results";decorated.call(this,container,$container),this.$search.on("keydown",(function(evt){self.trigger("keypress",evt),self._keyUpPrevented=evt.isDefaultPrevented()})),this.$search.on("input",(function(evt){$(this).off("keyup")})),this.$search.on("keyup input",(function(evt){self.handleSearch
(evt)})),container.on("open",(function(){self.$search.attr("tabindex",0),self.$search.attr("aria-controls",resultsId),self.$search.trigger("focus"),window.setTimeout((function(){self.$search.trigger("focus")}),0)})),container.on("close",(function(){self.$search.attr("tabindex",-1),self.$search.removeAttr("aria-controls"),self.$search.removeAttr("aria-activedescendant"),self.$search.val(""),self.$search.trigger("blur")})),container.on("focus",(function(){container.isOpen()||self.$search.trigger("focus")})),container.on("results:all",(function(params){null!=params.query.term&&""!==params.query.term||(self.showSearch(params)?self.$searchContainer.removeClass("select2-search--hide"):self.$searchContainer.addClass("select2-search--hide"))})),container.on("results:focus",(function(params){params.data._resultId?self.$search.attr("aria-activedescendant",params.data._resultId):self.$search.removeAttr("aria-activedescendant")}))},Search.prototype.handleSearch=function(evt){if(!this._keyUpPrevented){var input=this.$sea
rch.val();this.trigger("query",{term:input})}this._keyUpPrevented=!1},Search.prototype.showSearch=function(_,params){return!0},Search})),S2.define("select2/dropdown/hidePlaceholder",[],(function(){function HidePlaceholder(decorated,$element,options,dataAdapter){this.placeholder=this.normalizePlaceholder(options.get("placeholder")),decorated.call(this,$element,options,dataAdapter)}return HidePlaceholder.prototype.append=function(decorated,data){data.results=this.removePlaceholder(data.results),decorated.call(this,data)},HidePlaceholder.prototype.normalizePlaceholder=function(_,placeholder){return"string"==typeof placeholder&&(placeholder={id:"",text:placeholder}),placeholder},HidePlaceholder.prototype.removePlaceholder=function(_,data){for(var modifiedData=data.slice(0),d=data.length-1;d>=0;d--){var item=data[d];this.placeholder.id===item.id&&modifiedData.splice(d,1)}return modifiedData},HidePlaceholder})),S2.define("select2/dropdown/infiniteScroll",["jquery"],(function($){function InfiniteScroll(decorated,$e
lement,options,dataAdapter){this.lastParams={},decorated.call(this,$element,options,dataAdapter),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return InfiniteScroll.prototype.append=function(decorated,data){this.$loadingMore.remove(),this.loading=!1,decorated.call(this,data),this.showLoadingMore(data)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},InfiniteScroll.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("query",(function(params){self.lastParams=params,self.loading=!0})),container.on("query:append",(function(params){self.lastParams=params,self.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},InfiniteScroll.prototype.loadMoreIfNeeded=function(){var isLoadMoreVisible=$.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&isLoadMoreVisible&&this.$results.offset().top+this.$results.outerHeight(!1)+50>=this.$loadingMore.offset().top+this.$loadingMore.outer
Height(!1)&&this.loadMore()},InfiniteScroll.prototype.loadMore=function(){this.loading=!0;var params=$.extend({},{page:1},this.lastParams);params.page++,this.trigger("query:append",params)},InfiniteScroll.prototype.showLoadingMore=function(_,data){return data.pagination&&data.pagination.more},InfiniteScroll.prototype.createLoadingMore=function(){var $option=$('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),message=this.options.get("translations").get("loadingMore");return $option.html(message(this.lastParams)),$option},InfiniteScroll})),S2.define("select2/dropdown/attachBody",["jquery","../utils"],(function($,Utils){function AttachBody(decorated,$element,options){this.$dropdownParent=$(options.get("dropdownParent")||document.body),decorated.call(this,$element,options)}return AttachBody.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("open",(function(){self._showDropdo
wn(),self._attachPositioningHandler(container),self._bindContainerResultHandlers(container)})),container.on("close",(function(){self._hideDropdown(),self._detachPositioningHandler(container)})),this.$dropdownContainer.on("mousedown",(function(evt){evt.stopPropagation()}))},AttachBody.prototype.destroy=function(decorated){decorated.call(this),this.$dropdownContainer.remove()},AttachBody.prototype.position=function(decorated,$dropdown,$container){$dropdown.attr("class",$container.attr("class")),$dropdown.removeClass("select2"),$dropdown.addClass("select2-container--open"),$dropdown.css({position:"absolute",top:-999999}),this.$container=$container},AttachBody.prototype.render=function(decorated){var $container=$("<span></span>"),$dropdown=decorated.call(this);return $container.append($dropdown),this.$dropdownContainer=$container,$container},AttachBody.prototype._hideDropdown=function(decorated){this.$dropdownContainer.detach()},AttachBody.prototype._bindContainerResultHandlers=function(decorated,container){if(!
this._containerResultsHandlersBound){var self=this;container.on("results:all",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("results:append",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("results:message",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("select",(function(){self._positionDropdown(),self._resizeDropdown()})),container.on("unselect",(function(){self._positionDropdown(),self._resizeDropdown()})),this._containerResultsHandlersBound=!0}},AttachBody.prototype._attachPositioningHandler=function(decorated,container){var self=this,scrollEvent="scroll.select2."+container.id,resizeEvent="resize.select2."+container.id,orientationEvent="orientationchange.select2."+container.id,$watchers=this.$container.parents().filter(Utils.hasScroll);$watchers.each((function(){Utils.StoreData(this,"select2-scroll-position",{x:$(this).scrollLeft(),y:$(this).scrollTop()})})),$watchers.on(scrollEvent,(function(ev){var position=Utils.Get
Data(this,"select2-scroll-position");$(this).scrollTop(position.y)})),$(window).on(scrollEvent+" "+resizeEvent+" "+orientationEvent,(function(e){self._positionDropdown(),self._resizeDropdown()}))},AttachBody.prototype._detachPositioningHandler=function(decorated,container){var scrollEvent="scroll.select2."+container.id,resizeEvent="resize.select2."+container.id,orientationEvent="orientationchange.select2."+container.id;this.$container.parents().filter(Utils.hasScroll).off(scrollEvent),$(window).off(scrollEvent+" "+resizeEvent+" "+orientationEvent)},AttachBody.prototype._positionDropdown=function(){var $window=$(window),isCurrentlyAbove=this.$dropdown.hasClass("select2-dropdown--above"),isCurrentlyBelow=this.$dropdown.hasClass("select2-dropdown--below"),newDirection=null,offset=this.$container.offset();offset.bottom=offset.top+this.$container.outerHeight(!1);var container={height:this.$container.outerHeight(!1)};container.top=offset.top,container.bottom=offset.top+container.height;var dropdown_height=this.$dr
opdown.outerHeight(!1),viewport_top=$window.scrollTop(),viewport_bottom=$window.scrollTop()+$window.height(),enoughRoomAbove=viewport_top<offset.top-dropdown_height,enoughRoomBelow=viewport_bottom>offset.bottom+dropdown_height,css={left:offset.left,top:container.bottom},$offsetParent=this.$dropdownParent;"static"===$offsetParent.css("position")&&($offsetParent=$offsetParent.offsetParent());var parentOffset={top:0,left:0};($.contains(document.body,$offsetParent[0])||$offsetParent[0].isConnected)&&(parentOffset=$offsetParent.offset()),css.top-=parentOffset.top,css.left-=parentOffset.left,isCurrentlyAbove||isCurrentlyBelow||(newDirection="below"),enoughRoomBelow||!enoughRoomAbove||isCurrentlyAbove?!enoughRoomAbove&&enoughRoomBelow&&isCurrentlyAbove&&(newDirection="below"):newDirection="above",("above"==newDirection||isCurrentlyAbove&&"below"!==newDirection)&&(css.top=container.top-parentOffset.top-dropdown_height),null!=newDirection&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above")
.addClass("select2-dropdown--"+newDirection),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+newDirection)),this.$dropdownContainer.css(css)},AttachBody.prototype._resizeDropdown=function(){var css={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(css.minWidth=css.width,css.position="relative",css.width="auto"),this.$dropdown.css(css)},AttachBody.prototype._showDropdown=function(decorated){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},AttachBody})),S2.define("select2/dropdown/minimumResultsForSearch",[],(function(){function countResults(data){for(var count=0,d=0;d<data.length;d++){var item=data[d];item.children?count+=countResults(item.children):count++}return count}function MinimumResultsForSearch(decorated,$element,options,dataAdapter){this.minimumResultsForSearch=options.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResult
sForSearch=1/0),decorated.call(this,$element,options,dataAdapter)}return MinimumResultsForSearch.prototype.showSearch=function(decorated,params){return!(countResults(params.data.results)<this.minimumResultsForSearch)&&decorated.call(this,params)},MinimumResultsForSearch})),S2.define("select2/dropdown/selectOnClose",["../utils"],(function(Utils){function SelectOnClose(){}return SelectOnClose.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("close",(function(params){self._handleSelectOnClose(params)}))},SelectOnClose.prototype._handleSelectOnClose=function(_,params){if(params&&null!=params.originalSelect2Event){var event=params.originalSelect2Event;if("select"===event._type||"unselect"===event._type)return}var $highlightedResults=this.getHighlightedResults();if(!($highlightedResults.length<1)){var data=Utils.GetData($highlightedResults[0],"data");null!=data.element&&data.element.selected||null==data.element&&data.selected||this.trigger
("select",{data:data})}},SelectOnClose})),S2.define("select2/dropdown/closeOnSelect",[],(function(){function CloseOnSelect(){}return CloseOnSelect.prototype.bind=function(decorated,container,$container){var self=this;decorated.call(this,container,$container),container.on("select",(function(evt){self._selectTriggered(evt)})),container.on("unselect",(function(evt){self._selectTriggered(evt)}))},CloseOnSelect.prototype._selectTriggered=function(_,evt){var originalEvent=evt.originalEvent;originalEvent&&(originalEvent.ctrlKey||originalEvent.metaKey)||this.trigger("close",{originalEvent:originalEvent,originalSelect2Event:evt})},CloseOnSelect})),S2.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(args){var overChars=args.input.length-args.maximum,message="Please delete "+overChars+" character";return 1!=overChars&&(message+="s"),message},inputTooShort:function(args){return"Please enter "+(args.minimum-args.input.length)+" or more
characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(args){var message="You can only select "+args.maximum+" item";return 1!=args.maximum&&(message+="s"),message},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"}}})),S2.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],(function($,require,ResultsList,SingleSelectio
n,MultipleSelection,Placeholder,AllowClear,SelectionSearch,EventRelay,Utils,Translation,DIACRITICS,SelectData,ArrayData,AjaxData,Tags,Tokenizer,MinimumInputLength,MaximumInputLength,MaximumSelectionLength,Dropdown,DropdownSearch,HidePlaceholder,InfiniteScroll,AttachBody,MinimumResultsForSearch,SelectOnClose,CloseOnSelect,EnglishTranslation){function Defaults(){this.reset()}return Defaults.prototype.apply=function(options){if(null==(options=$.extend(!0,{},this.defaults,options)).dataAdapter){if(null!=options.ajax?options.dataAdapter=AjaxData:null!=options.data?options.dataAdapter=ArrayData:options.dataAdapter=SelectData,options.minimumInputLength>0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MinimumInputLength)),options.maximumInputLength>0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumInputLength)),options.maximumSelectionLength>0&&(options.dataAdapter=Utils.Decorate(options.dataAdapter,MaximumSelectionLength)),options.tags&&(options.dataAdapter=Utils.Decorate(options.dataAdapt
er,Tags)),null==options.tokenSeparators&&null==options.tokenizer||(options.dataAdapter=Utils.Decorate(options.dataAdapter,Tokenizer)),null!=options.query){var Query=require(options.amdBase+"compat/query");options.dataAdapter=Utils.Decorate(options.dataAdapter,Query)}if(null!=options.initSelection){var InitSelection=require(options.amdBase+"compat/initSelection");options.dataAdapter=Utils.Decorate(options.dataAdapter,InitSelection)}}if(null==options.resultsAdapter&&(options.resultsAdapter=ResultsList,null!=options.ajax&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,InfiniteScroll)),null!=options.placeholder&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,HidePlaceholder)),options.selectOnClose&&(options.resultsAdapter=Utils.Decorate(options.resultsAdapter,SelectOnClose))),null==options.dropdownAdapter){if(options.multiple)options.dropdownAdapter=Dropdown;else{var SearchableDropdown=Utils.Decorate(Dropdown,DropdownSearch);options.dropdownAdapter=SearchableDropdown}if(0!==options.
minimumResultsForSearch&&(options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,MinimumResultsForSearch)),options.closeOnSelect&&(options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,CloseOnSelect)),null!=options.dropdownCssClass||null!=options.dropdownCss||null!=options.adaptDropdownCssClass){var DropdownCSS=require(options.amdBase+"compat/dropdownCss");options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,DropdownCSS)}options.dropdownAdapter=Utils.Decorate(options.dropdownAdapter,AttachBody)}if(null==options.selectionAdapter){if(options.multiple?options.selectionAdapter=MultipleSelection:options.selectionAdapter=SingleSelection,null!=options.placeholder&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,Placeholder)),options.allowClear&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,AllowClear)),options.multiple&&(options.selectionAdapter=Utils.Decorate(options.selectionAdapter,SelectionSearch)),null!=options.containerCssClass||null!=options.co
ntainerCss||null!=options.adaptContainerCssClass){var ContainerCSS=require(options.amdBase+"compat/containerCss");options.selectionAdapter=Utils.Decorate(options.selectionAdapter,ContainerCSS)}options.selectionAdapter=Utils.Decorate(options.selectionAdapter,EventRelay)}options.language=this._resolveLanguage(options.language),options.language.push("en");for(var uniqueLanguages=[],l=0;l<options.language.length;l++){var language=options.language[l];-1===uniqueLanguages.indexOf(language)&&uniqueLanguages.push(language)}return options.language=uniqueLanguages,options.translations=this._processTranslations(options.language,options.debug),options},Defaults.prototype.reset=function(){function stripDiacritics(text){return text.replace(/[^\u0000-\u007E]/g,(function(a){return DIACRITICS[a]||a}))}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:Utils.escapeMarkup,language:{},matcher:function matcher(params,data){if(""===$.trim(params.term))return data;if(d
ata.children&&data.children.length>0){for(var match=$.extend(!0,{},data),c=data.children.length-1;c>=0;c--)null==matcher(params,data.children[c])&&match.children.splice(c,1);return match.children.length>0?match:matcher(params,match)}var original=stripDiacritics(data.text).toUpperCase(),term=stripDiacritics(params.term).toUpperCase();return original.indexOf(term)>-1?data:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(data){return data},templateResult:function(result){return result.text},templateSelection:function(selection){return selection.text},theme:"default",width:"resolve"}},Defaults.prototype.applyFromElement=function(options,$element){var optionLanguage=options.language,defaultLanguage=this.defaults.language,elementLanguage=$element.prop("lang"),parentLanguage=$element.closest("[lang]").prop("lang"),languages=Array.prototype.concat.call(this._resolveLanguage(elementLanguage),this._resolveLanguage(o
ptionLanguage),this._resolveLanguage(defaultLanguage),this._resolveLanguage(parentLanguage));return options.language=languages,options},Defaults.prototype._resolveLanguage=function(language){if(!language)return[];if($.isEmptyObject(language))return[];if($.isPlainObject(language))return[language];var languages;languages=$.isArray(language)?language:[language];for(var resolvedLanguages=[],l=0;l<languages.length;l++)if(resolvedLanguages.push(languages[l]),"string"==typeof languages[l]&&languages[l].indexOf("-")>0){var baseLanguage=languages[l].split("-")[0];resolvedLanguages.push(baseLanguage)}return resolvedLanguages},Defaults.prototype._processTranslations=function(languages,debug){for(var translations=new Translation,l=0;l<languages.length;l++){var languageData=new Translation,language=languages[l];if("string"==typeof language)try{languageData=Translation.loadPath(language)}catch(e){try{language=this.defaults.amdLanguageBase+language,languageData=Translation.loadPath(language)}catch(ex){debug&&window.console
&&console.warn&&console.warn('Select2: The language file for "'+language+'" could not be automatically loaded. A fallback will be used instead.')}}else languageData=$.isPlainObject(language)?new Translation(language):language;translations.extend(languageData)}return translations},Defaults.prototype.set=function(key,value){var data={};data[$.camelCase(key)]=value;var convertedData=Utils._convertData(data);$.extend(!0,this.defaults,convertedData)},new Defaults})),S2.define("select2/options",["require","jquery","./defaults","./utils"],(function(require,$,Defaults,Utils){function Options(options,$element){if(this.options=options,null!=$element&&this.fromElement($element),null!=$element&&(this.options=Defaults.applyFromElement(this.options,$element)),this.options=Defaults.apply(this.options),$element&&$element.is("input")){var InputCompat=require(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=Utils.Decorate(this.options.dataAdapter,InputCompat)}}return Options.prototype.fromElement=function($e){
var excludedData=["select2"];null==this.options.multiple&&(this.options.multiple=$e.prop("multiple")),null==this.options.disabled&&(this.options.disabled=$e.prop("disabled")),null==this.options.dir&&($e.prop("dir")?this.options.dir=$e.prop("dir"):$e.closest("[dir]").prop("dir")?this.options.dir=$e.closest("[dir]").prop("dir"):this.options.dir="ltr"),$e.prop("disabled",this.options.disabled),$e.prop("multiple",this.options.multiple),Utils.GetData($e[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),Utils.StoreData($e[0],"data",Utils.GetData($e[0],"select2Tags")),Utils.StoreData($e[0],"tags",!0)),Utils.GetData($e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be re
moved in future versions of Select2."),$e.attr("ajax--url",Utils.GetData($e[0],"ajaxUrl")),Utils.StoreData($e[0],"ajax-Url",Utils.GetData($e[0],"ajaxUrl")));var dataset={};function upperCaseLetter(_,letter){return letter.toUpperCase()}for(var attr=0;attr<$e[0].attributes.length;attr++){var attributeName=$e[0].attributes[attr].name;if("data-"==attributeName.substr(0,"data-".length)){var dataName=attributeName.substring("data-".length),dataValue=Utils.GetData($e[0],dataName);dataset[dataName.replace(/-([a-z])/g,upperCaseLetter)]=dataValue}}$.fn.jquery&&"1."==$.fn.jquery.substr(0,2)&&$e[0].dataset&&(dataset=$.extend(!0,{},$e[0].dataset,dataset));var data=$.extend(!0,{},Utils.GetData($e[0]),dataset);for(var key in data=Utils._convertData(data))$.inArray(key,excludedData)>-1||($.isPlainObject(this.options[key])?$.extend(this.options[key],data[key]):this.options[key]=data[key]);return this},Options.prototype.get=function(key){return this.options[key]},Options.prototype.set=function(key,val){this.options[key]=val},
Options})),S2.define("select2/core",["jquery","./options","./utils","./keys"],(function($,Options,Utils,KEYS){var Select2=function($element,options){null!=Utils.GetData($element[0],"select2")&&Utils.GetData($element[0],"select2").destroy(),this.$element=$element,this.id=this._generateId($element),options=options||{},this.options=new Options(options,$element),Select2.__super__.constructor.call(this);var tabindex=$element.attr("tabindex")||0;Utils.StoreData($element[0],"old-tabindex",tabindex),$element.attr("tabindex","-1");var DataAdapter=this.options.get("dataAdapter");this.dataAdapter=new DataAdapter($element,this.options);var $container=this.render();this._placeContainer($container);var SelectionAdapter=this.options.get("selectionAdapter");this.selection=new SelectionAdapter($element,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,$container);var DropdownAdapter=this.options.get("dropdownAdapter");this.dropdown=new DropdownAdapter($element,this.options),this.$d
ropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,$container);var ResultsAdapter=this.options.get("resultsAdapter");this.results=new ResultsAdapter($element,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var self=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(initialData){self.trigger("selection:update",{data:initialData})})),$element.addClass("select2-hidden-accessible"),$element.attr("aria-hidden","true"),this._syncAttributes(),Utils.StoreData($element[0],"select2",this),$element.data("select2",this)};return Utils.Extend(Select2,Utils.Observable),Select2.prototype._generateId=function($element){return"select2-"+(null!=$element.attr("id")?$element.attr("id"):null!=$element.attr("name")?$element.attr("name")+"-"+Utils.generateChars(2):Util
s.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},Select2.prototype._placeContainer=function($container){$container.insertAfter(this.$element);var width=this._resolveWidth(this.$element,this.options.get("width"));null!=width&&$container.css("width",width)},Select2.prototype._resolveWidth=function($element,method){var WIDTH=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==method){var styleWidth=this._resolveWidth($element,"style");return null!=styleWidth?styleWidth:this._resolveWidth($element,"element")}if("element"==method){var elementWidth=$element.outerWidth(!1);return elementWidth<=0?"auto":elementWidth+"px"}if("style"==method){var style=$element.attr("style");if("string"!=typeof style)return null;for(var attrs=style.split(";"),i=0,l=attrs.length;i<l;i+=1){var matches=attrs[i].replace(/\s/g,"").match(WIDTH);if(null!==matches&&matches.length>=1)return matches[1]}return null}return"computedstyle"==method?window.getComputedStyle($element[0]).width:method},Select2.prototype._bind
Adapters=function(){this.dataAdapter.bind(this,this.$container),this.selection.bind(this,this.$container),this.dropdown.bind(this,this.$container),this.results.bind(this,this.$container)},Select2.prototype._registerDomEvents=function(){var self=this;this.$element.on("change.select2",(function(){self.dataAdapter.current((function(data){self.trigger("selection:update",{data:data})}))})),this.$element.on("focus.select2",(function(evt){self.trigger("focus",evt)})),this._syncA=Utils.bind(this._syncAttributes,this),this._syncS=Utils.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var observer=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;null!=observer?(this._observer=new observer((function(mutations){self._syncA(),self._syncS(null,mutations)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModi
fied",self._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",self._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",self._syncS,!1))},Select2.prototype._registerDataEvents=function(){var self=this;this.dataAdapter.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerSelectionEvents=function(){var self=this,nonRelayEvents=["toggle","focus"];this.selection.on("toggle",(function(){self.toggleDropdown()})),this.selection.on("focus",(function(params){self.focus(params)})),this.selection.on("*",(function(name,params){-1===$.inArray(name,nonRelayEvents)&&self.trigger(name,params)}))},Select2.prototype._registerDropdownEvents=function(){var self=this;this.dropdown.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerResultsEvents=function(){var self=this;this.results.on("*",(function(name,params){self.trigger(name,params)}))},Select2.prototype._registerEvents=function(){var self=this;this.on("open",(function(){self.$containe
r.addClass("select2-container--open")})),this.on("close",(function(){self.$container.removeClass("select2-container--open")})),this.on("enable",(function(){self.$container.removeClass("select2-container--disabled")})),this.on("disable",(function(){self.$container.addClass("select2-container--disabled")})),this.on("blur",(function(){self.$container.removeClass("select2-container--focus")})),this.on("query",(function(params){self.isOpen()||self.trigger("open",{}),this.dataAdapter.query(params,(function(data){self.trigger("results:all",{data:data,query:params})}))})),this.on("query:append",(function(params){this.dataAdapter.query(params,(function(data){self.trigger("results:append",{data:data,query:params})}))})),this.on("keypress",(function(evt){var key=evt.which;self.isOpen()?key===KEYS.ESC||key===KEYS.TAB||key===KEYS.UP&&evt.altKey?(self.close(evt),evt.preventDefault()):key===KEYS.ENTER?(self.trigger("results:select",{}),evt.preventDefault()):key===KEYS.SPACE&&evt.ctrlKey?(self.trigger("results:toggle",{}),e
vt.preventDefault()):key===KEYS.UP?(self.trigger("results:previous",{}),evt.preventDefault()):key===KEYS.DOWN&&(self.trigger("results:next",{}),evt.preventDefault()):(key===KEYS.ENTER||key===KEYS.SPACE||key===KEYS.DOWN&&evt.altKey)&&(self.open(),evt.preventDefault())}))},Select2.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},Select2.prototype._isChangeMutation=function(evt,mutations){var changed=!1,self=this;if(!evt||!evt.target||"OPTION"===evt.target.nodeName||"OPTGROUP"===evt.target.nodeName){if(mutations)if(mutations.addedNodes&&mutations.addedNodes.length>0)for(var n=0;n<mutations.addedNodes.length;n++)mutations.addedNodes[n].selected&&(changed=!0);else mutations.removedNodes&&mutations.removedNodes.length>0?changed=!0:$.isArray(mutations)&&$.each(mutations,(function(evt,mutation){if(self._isChangeMutation(evt,mutation))return changed=!0,!1}));else change
d=!0;return changed}},Select2.prototype._syncSubtree=function(evt,mutations){var changed=this._isChangeMutation(evt,mutations),self=this;changed&&this.dataAdapter.current((function(currentData){self.trigger("selection:update",{data:currentData})}))},Select2.prototype.trigger=function(name,args){var actualTrigger=Select2.__super__.trigger,preTriggerMap={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(void 0===args&&(args={}),name in preTriggerMap){var preTriggerName=preTriggerMap[name],preTriggerArgs={prevented:!1,name:name,args:args};if(actualTrigger.call(this,preTriggerName,preTriggerArgs),preTriggerArgs.prevented)return void(args.prevented=!0)}actualTrigger.call(this,name,args)},Select2.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},Select2.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},Select2.prototype.close=function(evt){this.isOpen()&&this.trigger("close",{originalEvent
:evt})},Select2.prototype.isEnabled=function(){return!this.isDisabled()},Select2.prototype.isDisabled=function(){return this.options.get("disabled")},Select2.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},Select2.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")},Select2.prototype.focus=function(data){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},Select2.prototype.enable=function(args){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),null!=args&&0!==args.length||(args=[!0]);var disabled=!args[0];this.$element.prop("disabled",disabled)},Select2.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("da
ta")`. You should consider setting the value instead using `$element.val()`.');var data=[];return this.dataAdapter.current((function(currentData){data=currentData})),data},Select2.prototype.val=function(args){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==args||0===args.length)return this.$element.val();var newVal=args[0];$.isArray(newVal)&&(newVal=$.map(newVal,(function(obj){return obj.toString()}))),this.$element.val(newVal).trigger("input").trigger("change")},Select2.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),null!=this._observer?(this._observer.disconnect(),this._observer=null):this.$element[0].removeEventListener&&(this.$element[0].removeEventListener("DOMAttrModified",this._syncA,!1),this.$element[0].removeEventListener("DOMNodeInserted",
this._syncS,!1),this.$element[0].removeEventListener("DOMNodeRemoved",this._syncS,!1)),this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",Utils.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),Utils.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},Select2.prototype.render=function(){var $container=$('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return $container.attr("dir",this.options.get("dir")),this.$container=$container,this.$container.addClass("select2-container--"+this.options.get("theme")),Utils.StoreData($container[0],"element",this.$element),$container},Select2})),S2.define("select2/com
pat/utils",["jquery"],(function($){return{syncCssClasses:function($dest,$src,adapter){var classes,adapted,replacements=[];(classes=$.trim($dest.attr("class")))&&$((classes=""+classes).split(/\s+/)).each((function(){0===this.indexOf("select2-")&&replacements.push(this)})),(classes=$.trim($src.attr("class")))&&$((classes=""+classes).split(/\s+/)).each((function(){0!==this.indexOf("select2-")&&null!=(adapted=adapter(this))&&replacements.push(adapted)})),$dest.attr("class",replacements.join(" "))}}})),S2.define("select2/compat/containerCss",["jquery","./utils"],(function($,CompatUtils){function _containerAdapter(clazz){return null}function ContainerCSS(){}return ContainerCSS.prototype.render=function(decorated){var $container=decorated.call(this),containerCssClass=this.options.get("containerCssClass")||"";$.isFunction(containerCssClass)&&(containerCssClass=containerCssClass(this.$element));var containerCssAdapter=this.options.get("adaptContainerCssClass");if(containerCssAdapter=containerCssAdapter||_containerAda
pter,-1!==containerCssClass.indexOf(":all:")){containerCssClass=containerCssClass.replace(":all:","");var _cssAdapter=containerCssAdapter;containerCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);return null!=adapted?adapted+" "+clazz:clazz}}var containerCss=this.options.get("containerCss")||{};return $.isFunction(containerCss)&&(containerCss=containerCss(this.$element)),CompatUtils.syncCssClasses($container,this.$element,containerCssAdapter),$container.css(containerCss),$container.addClass(containerCssClass),$container},ContainerCSS})),S2.define("select2/compat/dropdownCss",["jquery","./utils"],(function($,CompatUtils){function _dropdownAdapter(clazz){return null}function DropdownCSS(){}return DropdownCSS.prototype.render=function(decorated){var $dropdown=decorated.call(this),dropdownCssClass=this.options.get("dropdownCssClass")||"";$.isFunction(dropdownCssClass)&&(dropdownCssClass=dropdownCssClass(this.$element));var dropdownCssAdapter=this.options.get("adaptDropdownCssClass");if(dropdownCssAdapte
r=dropdownCssAdapter||_dropdownAdapter,-1!==dropdownCssClass.indexOf(":all:")){dropdownCssClass=dropdownCssClass.replace(":all:","");var _cssAdapter=dropdownCssAdapter;dropdownCssAdapter=function(clazz){var adapted=_cssAdapter(clazz);return null!=adapted?adapted+" "+clazz:clazz}}var dropdownCss=this.options.get("dropdownCss")||{};return $.isFunction(dropdownCss)&&(dropdownCss=dropdownCss(this.$element)),CompatUtils.syncCssClasses($dropdown,this.$element,dropdownCssAdapter),$dropdown.css(dropdownCss),$dropdown.addClass(dropdownCssClass),$dropdown},DropdownCSS})),S2.define("select2/compat/initSelection",["jquery"],(function($){function InitSelection(decorated,$element,options){options.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `initSelection` option has been deprecated in favor of a custom data adapter that overrides the `current` method. This method is now called multiple times instead of a single time when the instance is initialized. Support will be removed for the `initSelection
` option in future versions of Select2"),this.initSelection=options.get("initSelection"),this._isInitialized=!1,decorated.call(this,$element,options)}return InitSelection.prototype.current=function(decorated,callback){var self=this;this._isInitialized?decorated.call(this,callback):this.initSelection.call(null,this.$element,(function(data){self._isInitialized=!0,$.isArray(data)||(data=[data]),callback(data)}))},InitSelection})),S2.define("select2/compat/inputData",["jquery","../utils"],(function($,Utils){function InputData(decorated,$element,options){this._currentData=[],this._valueSeparator=options.get("valueSeparator")||",","hidden"===$element.prop("type")&&options.get("debug")&&console&&console.warn&&console.warn("Select2: Using a hidden input with Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),decorated.call(this,$element,options)}return InputData.prototype.current=function(_,callback){function getSelected(data,selectedIds){var s
elected=[];return data.selected||-1!==$.inArray(data.id,selectedIds)?(data.selected=!0,selected.push(data)):data.selected=!1,data.children&&selected.push.apply(selected,getSelected(data.children,selectedIds)),selected}for(var selected=[],d=0;d<this._currentData.length;d++){var data=this._currentData[d];selected.push.apply(selected,getSelected(data,this.$element.val().split(this._valueSeparator)))}callback(selected)},InputData.prototype.select=function(_,data){if(this.options.get("multiple")){var value=this.$element.val();value+=this._valueSeparator+data.id,this.$element.val(value),this.$element.trigger("input").trigger("change")}else this.current((function(allData){$.map(allData,(function(data){data.selected=!1}))})),this.$element.val(data.id),this.$element.trigger("input").trigger("change")},InputData.prototype.unselect=function(_,data){var self=this;data.selected=!1,this.current((function(allData){for(var values=[],d=0;d<allData.length;d++){var item=allData[d];data.id!=item.id&&values.push(item.id)}self.$e
lement.val(values.join(self._valueSeparator)),self.$element.trigger("input").trigger("change")}))},InputData.prototype.query=function(_,params,callback){for(var results=[],d=0;d<this._currentData.length;d++){var data=this._currentData[d],matches=this.matches(params,data);null!==matches&&results.push(matches)}callback({results:results})},InputData.prototype.addOptions=function(_,$options){var options=$.map($options,(function($option){return Utils.GetData($option[0],"data")}));this._currentData.push.apply(this._currentData,options)},InputData})),S2.define("select2/compat/matcher",["jquery"],(function($){return function(matcher){return function(params,data){var match=$.extend(!0,{},data);if(null==params.term||""===$.trim(params.term))return match;if(data.children){for(var c=data.children.length-1;c>=0;c--){var child=data.children[c];matcher(params.term,child.text,child)||match.children.splice(c,1)}if(match.children.length>0)return match}return matcher(params.term,data.text,data)?match:null}}})),S2.define("selec
t2/compat/query",[],(function(){function Query(decorated,$element,options){options.get("debug")&&window.console&&console.warn&&console.warn("Select2: The `query` option has been deprecated in favor of a custom data adapter that overrides the `query` method. Support will be removed for the `query` option in future versions of Select2."),decorated.call(this,$element,options)}return Query.prototype.query=function(_,params,callback){params.callback=callback,this.options.get("query").call(null,params)},Query})),S2.define("select2/dropdown/attachContainer",[],(function(){function AttachContainer(decorated,$element,options){decorated.call(this,$element,options)}return AttachContainer.prototype.position=function(decorated,$dropdown,$container){$container.find(".dropdown-wrapper").append($dropdown),$dropdown.addClass("select2-dropdown--below"),$container.addClass("select2-container--below")},AttachContainer})),S2.define("select2/dropdown/stopPropagation",[],(function(){function StopPropagation(){}return StopPropagati
on.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container),this.$dropdown.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(evt){evt.stopPropagation()}))},StopPropagation})),S2.define("select2/selection/stopPropagation",[],(function(){function StopPropagation(){}return StopPropagation.prototype.bind=function(decorated,container,$container){decorated.call(this,container,$container),this.$selection.on(["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"].join(" "),(function(evt){evt.stopPropagation()}))},StopPropagation})),factory=function($){var nullLowestDeltaTimeout,lowestDelta,toFix=["wheel","mousewheel","DOMMouseScroll","MozMousePixelS
croll"],toBind="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],slice=Array.prototype.slice;if($.event.fixHooks)for(var i=toFix.length;i;)$.event.fixHooks[toFix[--i]]=$.event.mouseHooks;var special=$.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var i=toBind.length;i;)this.addEventListener(toBind[--i],handler,!1);else this.onmousewheel=handler;$.data(this,"mousewheel-line-height",special.getLineHeight(this)),$.data(this,"mousewheel-page-height",special.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var i=toBind.length;i;)this.removeEventListener(toBind[--i],handler,!1);else this.onmousewheel=null;$.removeData(this,"mousewheel-line-height"),$.removeData(this,"mousewheel-page-height")},getLineHeight:function(elem){var $elem=$(elem),$parent=$elem["offsetParent"in $.fn?"offsetParent":"parent"]();return $parent.length||($parent=$("body")),parseInt($parent.css("fontSize"),10)||parseIn
t($elem.css("fontSize"),10)||16},getPageHeight:function(elem){return $(elem).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};function handler(event){var orgEvent=event||window.event,args=slice.call(arguments,1),delta=0,deltaX=0,deltaY=0,absDelta=0,offsetX=0,offsetY=0;if((event=$.event.fix(orgEvent)).type="mousewheel","detail"in orgEvent&&(deltaY=-1*orgEvent.detail),"wheelDelta"in orgEvent&&(deltaY=orgEvent.wheelDelta),"wheelDeltaY"in orgEvent&&(deltaY=orgEvent.wheelDeltaY),"wheelDeltaX"in orgEvent&&(deltaX=-1*orgEvent.wheelDeltaX),"axis"in orgEvent&&orgEvent.axis===orgEvent.HORIZONTAL_AXIS&&(deltaX=-1*deltaY,deltaY=0),delta=0===deltaY?deltaX:deltaY,"deltaY"in orgEvent&&(delta=deltaY=-1*orgEvent.deltaY),"deltaX"in orgEvent&&(deltaX=orgEvent.deltaX,0===deltaY&&(delta=-1*deltaX)),0!==deltaY||0!==deltaX){if(1===orgEvent.deltaMode){var lineHeight=$.data(this,"mousewheel-line-height");delta*=lineHeight,deltaY*=lineHeight,deltaX*=lineHeight}else if(2===orgEvent.deltaMode){var pageHeight=$.data(this,"mou
sewheel-page-height");delta*=pageHeight,deltaY*=pageHeight,deltaX*=pageHeight}if(absDelta=Math.max(Math.abs(deltaY),Math.abs(deltaX)),(!lowestDelta||absDelta<lowestDelta)&&(lowestDelta=absDelta,shouldAdjustOldDeltas(orgEvent,absDelta)&&(lowestDelta/=40)),shouldAdjustOldDeltas(orgEvent,absDelta)&&(delta/=40,deltaX/=40,deltaY/=40),delta=Math[delta>=1?"floor":"ceil"](delta/lowestDelta),deltaX=Math[deltaX>=1?"floor":"ceil"](deltaX/lowestDelta),deltaY=Math[deltaY>=1?"floor":"ceil"](deltaY/lowestDelta),special.settings.normalizeOffset&&this.getBoundingClientRect){var boundingRect=this.getBoundingClientRect();offsetX=event.clientX-boundingRect.left,offsetY=event.clientY-boundingRect.top}return event.deltaX=deltaX,event.deltaY=deltaY,event.deltaFactor=lowestDelta,event.offsetX=offsetX,event.offsetY=offsetY,event.deltaMode=0,args.unshift(event,delta,deltaX,deltaY),nullLowestDeltaTimeout&&clearTimeout(nullLowestDeltaTimeout),nullLowestDeltaTimeout=setTimeout(nullLowestDelta,200),($.event.dispatch||$.event.handle).appl
y(this,args)}}function nullLowestDelta(){lowestDelta=null}function shouldAdjustOldDeltas(orgEvent,absDelta){return special.settings.adjustOldDeltas&&"mousewheel"===orgEvent.type&&absDelta%120==0}$.fn.extend({mousewheel:function(fn){return fn?this.bind("mousewheel",fn):this.trigger("mousewheel")},unmousewheel:function(fn){return this.unbind("mousewheel",fn)}})},"function"==typeof S2.define&&S2.define.amd?S2.define("jquery-mousewheel",["jquery"],factory):"object"==typeof exports?module.exports=factory:factory(jQuery),S2.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function($,_,Select2,Defaults,Utils){if(null==$.fn.select2){var thisMethods=["open","close","destroy"];$.fn.select2=function(options){if("object"==typeof(options=options||{}))return this.each((function(){var instanceOptions=$.extend(!0,{},options);new Select2($(this),instanceOptions)})),this;if("string"==typeof options){var ret,args=Array.prototype.slice.call(arguments,1);return this.
each((function(){var instance=Utils.GetData(this,"select2");null==instance&&window.console&&console.error&&console.error("The select2('"+options+"') method was called on an element that is not using Select2."),ret=instance[options].apply(instance,args)})),$.inArray(options,thisMethods)>-1?this:ret}throw new Error("Invalid arguments for Select2: "+options)}}return null==$.fn.select2.defaults&&($.fn.select2.defaults=Defaults),Select2})),{define:S2.define,require:S2.require}}(),select2=S2.require("jquery.select2");return jQuery.fn.select2.amd=S2,select2},"function"==typeof define&&define.amd?define("block_dash/select2",["jquery"],factory):"object"==typeof module&&module.exports?module.exports=function(root,jQuery){return void 0===jQuery&&(jQuery="undefined"!=typeof window?require("jquery"):require("jquery")(root)),factory(jQuery),jQuery}:factory(jQuery);
//# sourceMappingURL=select2.min.js.map