/*!
 * Scoped for ASP plugin
 * 1. replace 'Select2' with 'asp_Select2' - case sensitive
 * 2. replace 'select2' with 'asp_select2' - case sensitive
 * 3. Add ;if ( typeof jQuery != 'undefined' ) { to start
 * 4. Add } to end
 *//*!
 * Select2 4.0.13
 * https://select2.github.io
 *
 * Released under the MIT license
 * https://github.com/select2/select2/blob/master/LICENSE.md
 */typeof jQuery<"u"&&function(M){typeof define=="function"&&define.amd?define(["jquery"],M):typeof module=="object"&&module.exports?module.exports=function(N,z){return z===void 0&&(typeof window<"u"?z=require("jquery"):z=require("jquery")(N)),M(z),z}:M(jQuery)}(function(M){var N=function(){if(M&&M.fn&&M.fn.asp_select2&&M.fn.asp_select2.amd)var g=M.fn.asp_select2.amd;var g;(function(){if(!g||!g.requirejs){g?l=g:g={};/**
 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
 * Released under MIT license, http://github.com/requirejs/almond/LICENSE
 */var a,l,s;(function(r){var t,e,n,i,o={},u={},d={},p={},f=Object.prototype.hasOwnProperty,A=[].slice,E=/\.js$/;function m(h,y){return f.call(h,y)}function _(h,y){var w,B,x,b,P,c,C,D,v,F,S,L,I=y&&y.split("/"),j=d.map,G=j&&j["*"]||{};if(h){for(h=h.split("/"),P=h.length-1,d.nodeIdCompat&&E.test(h[P])&&(h[P]=h[P].replace(E,"")),h[0].charAt(0)==="."&&I&&(L=I.slice(0,I.length-1),h=L.concat(h)),v=0;v<h.length;v++)if(S=h[v],S===".")h.splice(v,1),v-=1;else if(S===".."){if(v===0||v===1&&h[2]===".."||h[v-1]==="..")continue;v>0&&(h.splice(v-1,2),v-=2)}h=h.join("/")}if((I||G)&&j){for(w=h.split("/"),v=w.length;v>0;v-=1){if(B=w.slice(0,v).join("/"),I){for(F=I.length;F>0;F-=1)if(x=j[I.slice(0,F).join("/")],x&&(x=x[B],x)){b=x,c=v;break}}if(b)break;!C&&G&&G[B]&&(C=G[B],D=v)}!b&&C&&(b=C,c=D),b&&(w.splice(0,c,b),h=w.join("/"))}return h}function O(h,y){return function(){var w=A.call(arguments,0);return typeof w[0]!="string"&&w.length===1&&w.push(null),e.apply(r,w.concat([h,y]))}}function T(h){return function(y){return _(y,h)}}function k(h){return function(y){o[h]=y}}function q(h){if(m(u,h)){var y=u[h];delete u[h],p[h]=!0,t.apply(r,y)}if(!m(o,h)&&!m(p,h))throw new Error("No "+h);return o[h]}function R(h){var y,w=h?h.indexOf("!"):-1;return w>-1&&(y=h.substring(0,w),h=h.substring(w+1,h.length)),[y,h]}function H(h){return h?R(h):[]}n=function(h,y){var w,B=R(h),x=B[0],b=y[1];return h=B[1],x&&(x=_(x,b),w=q(x)),x?w&&w.normalize?h=w.normalize(h,T(b)):h=_(h,b):(h=_(h,b),B=R(h),x=B[0],h=B[1],x&&(w=q(x))),{f:x?x+"!"+h:h,n:h,pr:x,p:w}};function W(h){return function(){return d&&d.config&&d.config[h]||{}}}i={require:function(h){return O(h)},exports:function(h){var y=o[h];return typeof y<"u"?y:o[h]={}},module:function(h){return{id:h,uri:"",exports:o[h],config:W(h)}}},t=function(h,y,w,B){var x,b,P,c,C,D,v=[],F=typeof w,S;if(B=B||h,D=H(B),F==="undefined"||F==="function"){for(y=!y.length&&w.length?["require","exports","module"]:y,C=0;C<y.length;C+=1)if(c=n(y[C],D),b=c.f,b==="require")v[C]=i.require(h);else if(b==="exports")v[C]=i.exports(h),S=!0;else if(b==="module")x=v[C]=i.module(h);else if(m(o,b)||m(u,b)||m(p,b))v[C]=q(b);else if(c.p)c.p.load(c.n,O(B,!0),k(b),{}),v[C]=o[b];else throw new Error(h+" missing "+b);P=w?w.apply(o[h],v):void 0,h&&(x&&x.exports!==r&&x.exports!==o[h]?o[h]=x.exports:(P!==r||!S)&&(o[h]=P))}else h&&(o[h]=w)},a=l=e=function(h,y,w,B,x){if(typeof h=="string")return i[h]?i[h](y):q(n(h,H(y)).f);if(!h.splice){if(d=h,d.deps&&e(d.deps,d.callback),!y)return;y.splice?(h=y,y=w,w=null):h=r}return y=y||function(){},typeof w=="function"&&(w=B,B=x),B?t(r,h,y,w):setTimeout(function(){t(r,h,y,w)},4),e},e.config=function(h){return e(h)},a._defined=o,s=function(h,y,w){if(typeof h!="string")throw new Error("See almond README: incorrect module build, no module name");y.splice||(w=y,y=[]),!m(o,h)&&!m(u,h)&&(u[h]=[h,y,w])},s.amd={jQuery:!0}})(),g.requirejs=a,g.require=l,g.define=s}})(),g.define("almond",function(){}),g.define("jquery",[],function(){var a=M||$;return a==null&&console&&console.error&&console.error("asp_Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before asp_Select2 on your web page."),a}),g.define("asp_select2/utils",["jquery"],function(a){var l={};l.Extend=function(e,n){var i={}.hasOwnProperty;function o(){this.constructor=e}for(var u in n)i.call(n,u)&&(e[u]=n[u]);return o.prototype=n.prototype,e.prototype=new o,e.__super__=n.prototype,e};function s(e){var n=e.prototype,i=[];for(var o in n){var u=n[o];typeof u=="function"&&o!=="constructor"&&i.push(o)}return i}l.Decorate=function(e,n){var i=s(n),o=s(e);function u(){var _=Array.prototype.unshift,O=n.prototype.constructor.length,T=e.prototype.constructor;O>0&&(_.call(arguments,e.prototype.constructor),T=n.prototype.constructor),T.apply(this,arguments)}n.displayName=e.displayName;function d(){this.constructor=u}u.prototype=new d;for(var p=0;p<o.length;p++){var f=o[p];u.prototype[f]=e.prototype[f]}for(var A=function(_){var O=function(){};_ in u.prototype&&(O=u.prototype[_]);var T=n.prototype[_];return function(){var k=Array.prototype.unshift;return k.call(arguments,O),T.apply(this,arguments)}},E=0;E<i.length;E++){var m=i[E];u.prototype[m]=A(m)}return u};var r=function(){this.listeners={}};r.prototype.on=function(e,n){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(n):this.listeners[e]=[n]},r.prototype.trigger=function(e){var n=Array.prototype.slice,i=n.call(arguments,1);this.listeners=this.listeners||{},i==null&&(i=[]),i.length===0&&i.push({}),i[0]._type=e,e in this.listeners&&this.invoke(this.listeners[e],n.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(e,n){for(var i=0,o=e.length;i<o;i++)e[i].apply(this,n)},l.Observable=r,l.generateChars=function(e){for(var n="",i=0;i<e;i++){var o=Math.floor(Math.random()*36);n+=o.toString(36)}return n},l.bind=function(e,n){return function(){e.apply(n,arguments)}},l._convertData=function(e){for(var n in e){var i=n.split("-"),o=e;if(i.length!==1){for(var u=0;u<i.length;u++){var d=i[u];d=d.substring(0,1).toLowerCase()+d.substring(1),d in o||(o[d]={}),u==i.length-1&&(o[d]=e[n]),o=o[d]}delete e[n]}}return e},l.hasScroll=function(e,n){var i=a(n),o=n.style.overflowX,u=n.style.overflowY;return o===u&&(u==="hidden"||u==="visible")?!1:o==="scroll"||u==="scroll"?!0:i.innerHeight()<n.scrollHeight||i.innerWidth()<n.scrollWidth},l.escapeMarkup=function(e){var n={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return typeof e!="string"?e:String(e).replace(/[&<>"'\/\\]/g,function(i){return n[i]})},l.appendMany=function(e,n){if(a.fn.jquery.substr(0,3)==="1.7"){var i=a();a.map(n,function(o){i=i.add(o)}),n=i}e.append(n)},l.__cache={};var t=0;return l.GetUniqueElementId=function(e){var n=e.getAttribute("data-asp_select2-id");return n==null&&(e.id?(n=e.id,e.setAttribute("data-asp_select2-id",n)):(e.setAttribute("data-asp_select2-id",++t),n=t.toString())),n},l.StoreData=function(e,n,i){var o=l.GetUniqueElementId(e);l.__cache[o]||(l.__cache[o]={}),l.__cache[o][n]=i},l.GetData=function(e,n){var i=l.GetUniqueElementId(e);return n?l.__cache[i]&&l.__cache[i][n]!=null?l.__cache[i][n]:a(e).data(n):l.__cache[i]},l.RemoveData=function(e){var n=l.GetUniqueElementId(e);l.__cache[n]!=null&&delete l.__cache[n],e.removeAttribute("data-asp_select2-id")},l}),g.define("asp_select2/results",["jquery","./utils"],function(a,l){function s(r,t,e){this.$element=r,this.data=e,this.options=t,s.__super__.constructor.call(this)}return l.Extend(s,l.Observable),s.prototype.render=function(){var r=a('<ul class="asp_select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&r.attr("aria-multiselectable","true"),this.$results=r,r},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(r){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var e=a('<li role="alert" aria-live="assertive" class="asp_select2-results__option"></li>'),n=this.options.get("translations").get(r.message);e.append(t(n(r.args))),e[0].className+=" asp_select2-results__message",this.$results.append(e)},s.prototype.hideMessages=function(){this.$results.find(".asp_select2-results__message").remove()},s.prototype.append=function(r){this.hideLoading();var t=[];if(r.results==null||r.results.length===0){this.$results.children().length===0&&this.trigger("results:message",{message:"noResults"});return}r.results=this.sort(r.results);for(var e=0;e<r.results.length;e++){var n=r.results[e],i=this.option(n);t.push(i)}this.$results.append(t)},s.prototype.position=function(r,t){var e=t.find(".asp_select2-results");e.append(r)},s.prototype.sort=function(r){var t=this.options.get("sorter");return t(r)},s.prototype.highlightFirstItem=function(){var r=this.$results.find(".asp_select2-results__option[aria-selected]"),t=r.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):r.first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var r=this;this.data.current(function(t){var e=a.map(t,function(i){return i.id.toString()}),n=r.$results.find(".asp_select2-results__option[aria-selected]");n.each(function(){var i=a(this),o=l.GetData(this,"data"),u=""+o.id;o.element!=null&&o.element.selected||o.element==null&&a.inArray(u,e)>-1?i.attr("aria-selected","true"):i.attr("aria-selected","false")})})},s.prototype.showLoading=function(r){this.hideLoading();var t=this.options.get("translations").get("searching"),e={disabled:!0,loading:!0,text:t(r)},n=this.option(e);n.className+=" loading-results",this.$results.prepend(n)},s.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},s.prototype.option=function(r){var t=document.createElement("li");t.className="asp_select2-results__option";var e={role:"option","aria-selected":"false"},n=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;(r.element!=null&&n.call(r.element,":disabled")||r.element==null&&r.disabled)&&(delete e["aria-selected"],e["aria-disabled"]="true"),r.id==null&&delete e["aria-selected"],r._resultId!=null&&(t.id=r._resultId),r.title&&(t.title=r.title),r.children&&(e.role="group",e["aria-label"]=r.text,delete e["aria-selected"]);for(var i in e){var o=e[i];t.setAttribute(i,o)}if(r.children){var u=a(t),d=document.createElement("strong");d.className="asp_select2-results__group";var p=a(d);this.template(r,d);for(var f=[],A=0;A<r.children.length;A++){var E=r.children[A],m=this.option(E);f.push(m)}var _=a("<ul></ul>",{class:"asp_select2-results__options asp_select2-results__options--nested"});_.append(f),u.append(d),u.append(_)}else this.template(r,t);return l.StoreData(t,"data",r),t},s.prototype.bind=function(r,t){var e=this,n=r.id+"-results";this.$results.attr("id",n),r.on("results:all",function(i){e.clear(),e.append(i.data),r.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),r.on("results:append",function(i){e.append(i.data),r.isOpen()&&e.setClasses()}),r.on("query",function(i){e.hideMessages(),e.showLoading(i)}),r.on("select",function(){r.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),r.on("unselect",function(){r.isOpen()&&(e.setClasses(),e.options.get("scrollAfterSelect")&&e.highlightFirstItem())}),r.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}),r.on("close",function(){e.$results.attr("aria-expanded","false"),e.$results.attr("aria-hidden","true"),e.$results.removeAttr("aria-activedescendant")}),r.on("results:toggle",function(){var i=e.getHighlightedResults();i.length!==0&&i.trigger("mouseup")}),r.on("results:select",function(){var i=e.getHighlightedResults();if(i.length!==0){var o=l.GetData(i[0],"data");i.attr("aria-selected")=="true"?e.trigger("close",{}):e.trigger("select",{data:o})}}),r.on("results:previous",function(){var i=e.getHighlightedResults(),o=e.$results.find("[aria-selected]"),u=o.index(i);if(!(u<=0)){var d=u-1;i.length===0&&(d=0);var p=o.eq(d);p.trigger("mouseenter");var f=e.$results.offset().top,A=p.offset().top,E=e.$results.scrollTop()+(A-f);d===0?e.$results.scrollTop(0):A-f<0&&e.$results.scrollTop(E)}}),r.on("results:next",function(){var i=e.getHighlightedResults(),o=e.$results.find("[aria-selected]"),u=o.index(i),d=u+1;if(!(d>=o.length)){var p=o.eq(d);p.trigger("mouseenter");var f=e.$results.offset().top+e.$results.outerHeight(!1),A=p.offset().top+p.outerHeight(!1),E=e.$results.scrollTop()+A-f;d===0?e.$results.scrollTop(0):A>f&&e.$results.scrollTop(E)}}),r.on("results:focus",function(i){i.element.addClass("asp_select2-results__option--highlighted")}),r.on("results:message",function(i){e.displayMessage(i)}),a.fn.mousewheel&&this.$results.on("mousewheel",function(i){var o=e.$results.scrollTop(),u=e.$results.get(0).scrollHeight-o+i.deltaY,d=i.deltaY>0&&o-i.deltaY<=0,p=i.deltaY<0&&u<=e.$results.height();d?(e.$results.scrollTop(0),i.preventDefault(),i.stopPropagation()):p&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),i.preventDefault(),i.stopPropagation())}),this.$results.on("mouseup",".asp_select2-results__option[aria-selected]",function(i){var o=a(this),u=l.GetData(this,"data");if(o.attr("aria-selected")==="true"){e.options.get("multiple")?e.trigger("unselect",{originalEvent:i,data:u}):e.trigger("close",{});return}e.trigger("select",{originalEvent:i,data:u})}),this.$results.on("mouseenter",".asp_select2-results__option[aria-selected]",function(i){var o=l.GetData(this,"data");e.getHighlightedResults().removeClass("asp_select2-results__option--highlighted"),e.trigger("results:focus",{data:o,element:a(this)})})},s.prototype.getHighlightedResults=function(){var r=this.$results.find(".asp_select2-results__option--highlighted");return r},s.prototype.destroy=function(){this.$results.remove()},s.prototype.ensureHighlightVisible=function(){var r=this.getHighlightedResults();if(r.length!==0){var t=this.$results.find("[aria-selected]"),e=t.index(r),n=this.$results.offset().top,i=r.offset().top,o=this.$results.scrollTop()+(i-n),u=i-n;o-=r.outerHeight(!1)*2,e<=2?this.$results.scrollTop(0):(u>this.$results.outerHeight()||u<0)&&this.$results.scrollTop(o)}},s.prototype.template=function(r,t){var e=this.options.get("templateResult"),n=this.options.get("escapeMarkup"),i=e(r,t);i==null?t.style.display="none":typeof i=="string"?t.innerHTML=n(i):a(t).append(i)},s}),g.define("asp_select2/keys",[],function(){var a={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};return a}),g.define("asp_select2/selection/base",["jquery","../utils","../keys"],function(a,l,s){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return l.Extend(r,l.Observable),r.prototype.render=function(){var t=a('<span class="asp_select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,l.GetData(this.$element[0],"old-tabindex")!=null?this._tabindex=l.GetData(this.$element[0],"old-tabindex"):this.$element.attr("tabindex")!=null&&(this._tabindex=this.$element.attr("tabindex")),t.attr("title",this.$element.attr("title")),t.attr("tabindex",this._tabindex),t.attr("aria-disabled","false"),this.$selection=t,t},r.prototype.bind=function(t,e){var n=this,i=t.id+"-results";this.container=t,this.$selection.on("focus",function(o){n.trigger("focus",o)}),this.$selection.on("blur",function(o){n._handleBlur(o)}),this.$selection.on("keydown",function(o){n.trigger("keypress",o),o.which===s.SPACE&&o.preventDefault()}),t.on("results:focus",function(o){n.$selection.attr("aria-activedescendant",o.data._resultId)}),t.on("selection:update",function(o){n.update(o.data)}),t.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",i),n._attachCloseHandler(t)}),t.on("close",function(){n.$selection.attr("aria-expanded","false"),n.$selection.removeAttr("aria-activedescendant"),n.$selection.removeAttr("aria-owns"),n.$selection.trigger("focus"),n._detachCloseHandler(t)}),t.on("enable",function(){n.$selection.attr("tabindex",n._tabindex),n.$selection.attr("aria-disabled","false")}),t.on("disable",function(){n.$selection.attr("tabindex","-1"),n.$selection.attr("aria-disabled","true")})},r.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||a.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(t){a(document.body).on("mousedown.asp_select2."+t.id,function(e){var n=a(e.target),i=n.closest(".asp_select2"),o=a(".asp_select2.asp_select2-container--open");o.each(function(){if(this!=i[0]){var u=l.GetData(this,"element");u.asp_select2("close")}})})},r.prototype._detachCloseHandler=function(t){a(document.body).off("mousedown.asp_select2."+t.id)},r.prototype.position=function(t,e){var n=e.find(".selection");n.append(t)},r.prototype.destroy=function(){this._detachCloseHandler(this.container)},r.prototype.update=function(t){throw new Error("The `update` method must be defined in child classes.")},r.prototype.isEnabled=function(){return!this.isDisabled()},r.prototype.isDisabled=function(){return this.options.get("disabled")},r}),g.define("asp_select2/selection/single",["jquery","./base","../utils","../keys"],function(a,l,s,r){function t(){t.__super__.constructor.apply(this,arguments)}return s.Extend(t,l),t.prototype.render=function(){var e=t.__super__.render.call(this);return e.addClass("asp_select2-selection--single"),e.html('<span class="asp_select2-selection__rendered"></span><span class="asp_select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},t.prototype.bind=function(e,n){var i=this;t.__super__.bind.apply(this,arguments);var o=e.id+"-container";this.$selection.find(".asp_select2-selection__rendered").attr("id",o).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",o),this.$selection.on("mousedown",function(u){u.which===1&&i.trigger("toggle",{originalEvent:u})}),this.$selection.on("focus",function(u){}),this.$selection.on("blur",function(u){}),e.on("focus",function(u){e.isOpen()||i.$selection.trigger("focus")})},t.prototype.clear=function(){var e=this.$selection.find(".asp_select2-selection__rendered");e.empty(),e.removeAttr("title")},t.prototype.display=function(e,n){var i=this.options.get("templateSelection"),o=this.options.get("escapeMarkup");return o(i(e,n))},t.prototype.selectionContainer=function(){return a("<span></span>")},t.prototype.update=function(e){if(e.length===0){this.clear();return}var n=e[0],i=this.$selection.find(".asp_select2-selection__rendered"),o=this.display(n,i);i.empty().append(o);var u=n.title||n.text;u?i.attr("title",u):i.removeAttr("title")},t}),g.define("asp_select2/selection/multiple",["jquery","./base","../utils"],function(a,l,s){function r(t,e){r.__super__.constructor.apply(this,arguments)}return s.Extend(r,l),r.prototype.render=function(){var t=r.__super__.render.call(this);return t.addClass("asp_select2-selection--multiple"),t.html('<ul class="asp_select2-selection__rendered"></ul>'),t},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(i){n.trigger("toggle",{originalEvent:i})}),this.$selection.on("click",".asp_select2-selection__choice__remove",function(i){if(!n.isDisabled()){var o=a(this),u=o.parent(),d=s.GetData(u[0],"data");n.trigger("unselect",{originalEvent:i,data:d})}})},r.prototype.clear=function(){var t=this.$selection.find(".asp_select2-selection__rendered");t.empty(),t.removeAttr("title")},r.prototype.display=function(t,e){var n=this.options.get("templateSelection"),i=this.options.get("escapeMarkup");return i(n(t,e))},r.prototype.selectionContainer=function(){var t=a('<li class="asp_select2-selection__choice"><span class="asp_select2-selection__choice__remove" role="presentation">&times;</span></li>');return t},r.prototype.update=function(t){if(this.clear(),t.length!==0){for(var e=[],n=0;n<t.length;n++){var i=t[n],o=this.selectionContainer(),u=this.display(i,o);o.append(u);var d=i.title||i.text;d&&o.attr("title",d),s.StoreData(o[0],"data",i),e.push(o)}var p=this.$selection.find(".asp_select2-selection__rendered");s.appendMany(p,e)}},r}),g.define("asp_select2/selection/placeholder",["../utils"],function(a){function l(s,r,t){this.placeholder=this.normalizePlaceholder(t.get("placeholder")),s.call(this,r,t)}return l.prototype.normalizePlaceholder=function(s,r){return typeof r=="string"&&(r={id:"",text:r}),r},l.prototype.createPlaceholder=function(s,r){var t=this.selectionContainer();return t.html(this.display(r)),t.addClass("asp_select2-selection__placeholder").removeClass("asp_select2-selection__choice"),t},l.prototype.update=function(s,r){var t=r.length==1&&r[0].id!=this.placeholder.id,e=r.length>1;if(e||t)return s.call(this,r);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".asp_select2-selection__rendered").append(n)},l}),g.define("asp_select2/selection/allowClear",["jquery","../keys","../utils"],function(a,l,s){function r(){}return r.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),this.placeholder==null&&this.options.get("debug")&&window.console&&console.error&&console.error("asp_Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".asp_select2-selection__clear",function(o){i._handleClear(o)}),e.on("keypress",function(o){i._handleKeyboardClear(o,e)})},r.prototype._handleClear=function(t,e){if(!this.isDisabled()){var n=this.$selection.find(".asp_select2-selection__clear");if(n.length!==0){e.stopPropagation();var i=s.GetData(n[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var u={data:i};if(this.trigger("clear",u),u.prevented){this.$element.val(o);return}for(var d=0;d<i.length;d++)if(u={data:i[d]},this.trigger("unselect",u),u.prevented){this.$element.val(o);return}this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}},r.prototype._handleKeyboardClear=function(t,e,n){n.isOpen()||(e.which==l.DELETE||e.which==l.BACKSPACE)&&this._handleClear(e)},r.prototype.update=function(t,e){if(t.call(this,e),!(this.$selection.find(".asp_select2-selection__placeholder").length>0||e.length===0)){var n=this.options.get("translations").get("removeAllItems"),i=a('<span class="asp_select2-selection__clear" title="'+n()+'">&times;</span>');s.StoreData(i[0],"data",e),this.$selection.find(".asp_select2-selection__rendered").prepend(i)}},r}),g.define("asp_select2/selection/search",["jquery","../utils","../keys"],function(a,l,s){function r(t,e,n){t.call(this,e,n)}return r.prototype.render=function(t){var e=a('<li class="asp_select2-search asp_select2-search--inline"><input class="asp_select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></li>');this.$searchContainer=e,this.$search=e.find("input");var n=t.call(this);return this._transferTabIndex(),n},r.prototype.bind=function(t,e,n){var i=this,o=e.id+"-results";t.call(this,e,n),e.on("open",function(){i.$search.attr("aria-controls",o),i.$search.trigger("focus")}),e.on("close",function(){i.$search.val(""),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.trigger("focus")}),e.on("enable",function(){i.$search.prop("disabled",!1),i._transferTabIndex()}),e.on("disable",function(){i.$search.prop("disabled",!0)}),e.on("focus",function(p){i.$search.trigger("focus")}),e.on("results:focus",function(p){p.data._resultId?i.$search.attr("aria-activedescendant",p.data._resultId):i.$search.removeAttr("aria-activedescendant")}),this.$selection.on("focusin",".asp_select2-search--inline",function(p){i.trigger("focus",p)}),this.$selection.on("focusout",".asp_select2-search--inline",function(p){i._handleBlur(p)}),this.$selection.on("keydown",".asp_select2-search--inline",function(p){p.stopPropagation(),i.trigger("keypress",p),i._keyUpPrevented=p.isDefaultPrevented();var f=p.which;if(f===s.BACKSPACE&&i.$search.val()===""){var A=i.$searchContainer.prev(".asp_select2-selection__choice");if(A.length>0){var E=l.GetData(A[0],"data");i.searchRemoveChoice(E),p.preventDefault()}}}),this.$selection.on("click",".asp_select2-search--inline",function(p){i.$search.val()&&p.stopPropagation()});var u=document.documentMode,d=u&&u<=11;this.$selection.on("input.searchcheck",".asp_select2-search--inline",function(p){if(d){i.$selection.off("input.search input.searchcheck");return}i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".asp_select2-search--inline",function(p){if(d&&p.type==="input"){i.$selection.off("input.search input.searchcheck");return}var f=p.which;f==s.SHIFT||f==s.CTRL||f==s.ALT||f!=s.TAB&&i.handleSearch(p)})},r.prototype._transferTabIndex=function(t){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},r.prototype.createPlaceholder=function(t,e){this.$search.attr("placeholder",e.text)},r.prototype.update=function(t,e){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),t.call(this,e),this.$selection.find(".asp_select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.trigger("focus")},r.prototype.handleSearch=function(){if(this.resizeSearch(),!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},r.prototype.searchRemoveChoice=function(t,e){this.trigger("unselect",{data:e}),this.$search.val(e.text),this.handleSearch()},r.prototype.resizeSearch=function(){this.$search.css("width","25px");var t="";if(this.$search.attr("placeholder")!=="")t=this.$selection.find(".asp_select2-selection__rendered").width();else{var e=this.$search.val().length+1;t=e*.75+"em"}this.$search.css("width",t)},r}),g.define("asp_select2/selection/eventRelay",["jquery"],function(a){function l(){}return l.prototype.bind=function(s,r,t){var e=this,n=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],i=["opening","closing","selecting","unselecting","clearing"];s.call(this,r,t),r.on("*",function(o,u){if(a.inArray(o,n)!==-1){u=u||{};var d=a.Event("asp_select2:"+o,{params:u});e.$element.trigger(d),a.inArray(o,i)!==-1&&(u.prevented=d.isDefaultPrevented())}})},l}),g.define("asp_select2/translation",["jquery","require"],function(a,l){function s(r){this.dict=r||{}}return s.prototype.all=function(){return this.dict},s.prototype.get=function(r){return this.dict[r]},s.prototype.extend=function(r){this.dict=a.extend({},r.all(),this.dict)},s._cache={},s.loadPath=function(r){if(!(r in s._cache)){var t=l(r);s._cache[r]=t}return new s(s._cache[r])},s}),g.define("asp_select2/diacritics",[],function(){var a={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u0152:"OE",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u0153:"oe",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03CE:"\u03C9",\u03C2:"\u03C3","\u2019":"'"};return a}),g.define("asp_select2/data/base",["../utils"],function(a){function l(s,r){l.__super__.constructor.call(this)}return a.Extend(l,a.Observable),l.prototype.current=function(s){throw new Error("The `current` method must be defined in child classes.")},l.prototype.query=function(s,r){throw new Error("The `query` method must be defined in child classes.")},l.prototype.bind=function(s,r){},l.prototype.destroy=function(){},l.prototype.generateResultId=function(s,r){var t=s.id+"-result-";return t+=a.generateChars(4),r.id!=null?t+="-"+r.id.toString():t+="-"+a.generateChars(4),t},l}),g.define("asp_select2/data/select",["./base","../utils","jquery"],function(a,l,s){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return l.Extend(r,a),r.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each(function(){var i=s(this),o=n.item(i);e.push(o)}),t(e)},r.prototype.select=function(t){var e=this;if(t.selected=!0,s(t.element).is("option")){t.element.selected=!0,this.$element.trigger("input").trigger("change");return}if(this.$element.prop("multiple"))this.current(function(i){var o=[];t=[t],t.push.apply(t,i);for(var u=0;u<t.length;u++){var d=t[u].id;s.inArray(d,o)===-1&&o.push(d)}e.$element.val(o),e.$element.trigger("input").trigger("change")});else{var n=t.id;this.$element.val(n),this.$element.trigger("input").trigger("change")}},r.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,s(t.element).is("option")){t.element.selected=!1,this.$element.trigger("input").trigger("change");return}this.current(function(n){for(var i=[],o=0;o<n.length;o++){var u=n[o].id;u!==t.id&&s.inArray(u,i)===-1&&i.push(u)}e.$element.val(i),e.$element.trigger("input").trigger("change")})}},r.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",function(i){n.select(i.data)}),t.on("unselect",function(i){n.unselect(i.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){l.RemoveData(this)})},r.prototype.query=function(t,e){var n=[],i=this,o=this.$element.children();o.each(function(){var u=s(this);if(!(!u.is("option")&&!u.is("optgroup"))){var d=i.item(u),p=i.matches(t,d);p!==null&&n.push(p)}}),e({results:n})},r.prototype.addOptions=function(t){l.appendMany(this.$element,t)},r.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup"),e.label=t.text):(e=document.createElement("option"),e.textContent!==void 0?e.textContent=t.text:e.innerText=t.text),t.id!==void 0&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var n=s(e),i=this._normalizeItem(t);return i.element=e,l.StoreData(e,"data",i),n},r.prototype.item=function(t){var e={};if(e=l.GetData(t[0],"data"),e!=null)return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var n=t.children("option"),i=[],o=0;o<n.length;o++){var u=s(n[o]),d=this.item(u);i.push(d)}e.children=i}return e=this._normalizeItem(e),e.element=t[0],l.StoreData(t[0],"data",e),e},r.prototype._normalizeItem=function(t){t!==Object(t)&&(t={id:t,text:t}),t=s.extend({},{text:""},t);var e={selected:!1,disabled:!1};return t.id!=null&&(t.id=t.id.toString()),t.text!=null&&(t.text=t.text.toString()),t._resultId==null&&t.id&&this.container!=null&&(t._resultId=this.generateResultId(this.container,t)),s.extend({},e,t)},r.prototype.matches=function(t,e){var n=this.options.get("matcher");return n(t,e)},r}),g.define("asp_select2/data/array",["./select","../utils","jquery"],function(a,l,s){function r(t,e){this._dataToConvert=e.get("data")||[],r.__super__.constructor.call(this,t,e)}return l.Extend(r,a),r.prototype.bind=function(t,e){r.__super__.bind.call(this,t,e),this.addOptions(this.convertToOptions(this._dataToConvert))},r.prototype.select=function(t){var e=this.$element.find("option").filter(function(n,i){return i.value==t.id.toString()});e.length===0&&(e=this.option(t),this.addOptions(e)),r.__super__.select.call(this,t)},r.prototype.convertToOptions=function(t){var e=this,n=this.$element.find("option"),i=n.map(function(){return e.item(s(this)).id}).get(),o=[];function u(T){return function(){return s(this).val()==T.id}}for(var d=0;d<t.length;d++){var p=this._normalizeItem(t[d]);if(s.inArray(p.id,i)>=0){var f=n.filter(u(p)),A=this.item(f),E=s.extend(!0,{},p,A),m=this.option(E);f.replaceWith(m);continue}var _=this.option(p);if(p.children){var O=this.convertToOptions(p.children);l.appendMany(_,O)}o.push(_)}return o},r}),g.define("asp_select2/data/ajax",["./array","../utils","jquery"],function(a,l,s){function r(t,e){this.ajaxOptions=this._applyDefaults(e.get("ajax")),this.ajaxOptions.processResults!=null&&(this.processResults=this.ajaxOptions.processResults),r.__super__.constructor.call(this,t,e)}return l.Extend(r,a),r.prototype._applyDefaults=function(t){var e={data:function(n){return s.extend({},n,{q:n.term})},transport:function(n,i,o){var u=s.ajax(n);return u.then(i),u.fail(o),u}};return s.extend({},e,t,!0)},r.prototype.processResults=function(t){return t},r.prototype.query=function(t,e){var n=[],i=this;this._request!=null&&(s.isFunction(this._request.abort)&&this._request.abort(),this._request=null);var o=s.extend({type:"GET"},this.ajaxOptions);typeof o.url=="function"&&(o.url=o.url.call(this.$element,t)),typeof o.data=="function"&&(o.data=o.data.call(this.$element,t));function u(){var d=o.transport(o,function(p){var f=i.processResults(p,t);i.options.get("debug")&&window.console&&console.error&&(!f||!f.results||!Array.isArray(f.results))&&console.error("asp_Select2: The AJAX results did not return an array in the `results` key of the response."),e(f)},function(){"status"in d&&(d.status===0||d.status==="0")||i.trigger("results:message",{message:"errorLoading"})});i._request=d}this.ajaxOptions.delay&&t.term!=null?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(u,this.ajaxOptions.delay)):u()},r}),g.define("asp_select2/data/tags",["jquery"],function(a){function l(s,r,t){var e=t.get("tags"),n=t.get("createTag");n!==void 0&&(this.createTag=n);var i=t.get("insertTag");if(i!==void 0&&(this.insertTag=i),s.call(this,r,t),Array.isArray(e))for(var o=0;o<e.length;o++){var u=e[o],d=this._normalizeItem(u),p=this.option(d);this.$element.append(p)}}return l.prototype.query=function(s,r,t){var e=this;if(this._removeOldTags(),r.term==null||r.page!=null){s.call(this,r,t);return}function n(i,o){for(var u=i.results,d=0;d<u.length;d++){var p=u[d],f=p.children!=null&&!n({results:p.children},!0),A=(p.text||"").toUpperCase(),E=(r.term||"").toUpperCase(),m=A===E;if(m||f){if(o)return!1;i.data=u,t(i);return}}if(o)return!0;var _=e.createTag(r);if(_!=null){var O=e.option(_);O.attr("data-asp_select2-tag",!0),e.addOptions([O]),e.insertTag(u,_)}i.results=u,t(i)}s.call(this,r,n)},l.prototype.createTag=function(s,r){var t=String.prototype.trim.call(r.term==null?"":r.term);return t===""?null:{id:t,text:t}},l.prototype.insertTag=function(s,r,t){r.unshift(t)},l.prototype._removeOldTags=function(s){var r=this.$element.find("option[data-asp_select2-tag]");r.each(function(){this.selected||a(this).remove()})},l}),g.define("asp_select2/data/tokenizer",["jquery"],function(a){function l(s,r,t){var e=t.get("tokenizer");e!==void 0&&(this.tokenizer=e),s.call(this,r,t)}return l.prototype.bind=function(s,r,t){s.call(this,r,t),this.$search=r.dropdown.$search||r.selection.$search||t.find(".asp_select2-search__field")},l.prototype.query=function(s,r,t){var e=this;function n(u){var d=e._normalizeItem(u),p=e.$element.find("option").filter(function(){return a(this).val()===d.id});if(!p.length){var f=e.option(d);f.attr("data-asp_select2-tag",!0),e._removeOldTags(),e.addOptions([f])}i(d)}function i(u){e.trigger("select",{data:u})}r.term=r.term||"";var o=this.tokenizer(r,this.options,n);o.term!==r.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.trigger("focus")),r.term=o.term),s.call(this,r,t)},l.prototype.tokenizer=function(s,r,t,e){for(var n=t.get("tokenSeparators")||[],i=r.term,o=0,u=this.createTag||function(E){return{id:E.term,text:E.term}};o<i.length;){var d=i[o];if(a.inArray(d,n)===-1){o++;continue}var p=i.substr(0,o),f=a.extend({},r,{term:p}),A=u(f);if(A==null){o++;continue}e(A),i=i.substr(o+1)||"",o=0}return{term:i}},l}),g.define("asp_select2/data/minimumInputLength",[],function(){function a(l,s,r){this.minimumInputLength=r.get("minimumInputLength"),l.call(this,s,r)}return a.prototype.query=function(l,s,r){if(s.term=s.term||"",s.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:s.term,params:s}});return}l.call(this,s,r)},a}),g.define("asp_select2/data/maximumInputLength",[],function(){function a(l,s,r){this.maximumInputLength=r.get("maximumInputLength"),l.call(this,s,r)}return a.prototype.query=function(l,s,r){if(s.term=s.term||"",this.maximumInputLength>0&&s.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:s.term,params:s}});return}l.call(this,s,r)},a}),g.define("asp_select2/data/maximumSelectionLength",[],function(){function a(l,s,r){this.maximumSelectionLength=r.get("maximumSelectionLength"),l.call(this,s,r)}return a.prototype.bind=function(l,s,r){var t=this;l.call(this,s,r),s.on("select",function(){t._checkIfMaximumSelected()})},a.prototype.query=function(l,s,r){var t=this;this._checkIfMaximumSelected(function(){l.call(t,s,r)})},a.prototype._checkIfMaximumSelected=function(l,s){var r=this;this.current(function(t){var e=t!=null?t.length:0;if(r.maximumSelectionLength>0&&e>=r.maximumSelectionLength){r.trigger("results:message",{message:"maximumSelected",args:{maximum:r.maximumSelectionLength}});return}s&&s()})},a}),g.define("asp_select2/dropdown",["jquery","./utils"],function(a,l){function s(r,t){this.$element=r,this.options=t,s.__super__.constructor.call(this)}return l.Extend(s,l.Observable),s.prototype.render=function(){var r=a('<span class="asp_select2-dropdown"><span class="asp_select2-results"></span></span>');return r.attr("dir",this.options.get("dir")),this.$dropdown=r,r},s.prototype.bind=function(){},s.prototype.position=function(r,t){},s.prototype.destroy=function(){this.$dropdown.remove()},s}),g.define("asp_select2/dropdown/search",["jquery","../utils"],function(a,l){function s(){}return s.prototype.render=function(r){var t=r.call(this),e=a('<span class="asp_select2-search asp_select2-search--dropdown"><input class="asp_select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),t.prepend(e),t},s.prototype.bind=function(r,t,e){var n=this,i=t.id+"-results";r.call(this,t,e),this.$search.on("keydown",function(o){n.trigger("keypress",o),n._keyUpPrevented=o.isDefaultPrevented()}),this.$search.on("input",function(o){a(this).off("keyup")}),this.$search.on("keyup input",function(o){n.handleSearch(o)}),t.on("open",function(){n.$search.attr("tabindex",0),n.$search.attr("aria-controls",i),n.$search.trigger("focus"),window.setTimeout(function(){n.$search.trigger("focus")},0)}),t.on("close",function(){n.$search.attr("tabindex",-1),n.$search.removeAttr("aria-controls"),n.$search.removeAttr("aria-activedescendant"),n.$search.val(""),n.$search.trigger("blur")}),t.on("focus",function(){t.isOpen()||n.$search.trigger("focus")}),t.on("results:all",function(o){if(o.query.term==null||o.query.term===""){var u=n.showSearch(o);u?n.$searchContainer.removeClass("asp_select2-search--hide"):n.$searchContainer.addClass("asp_select2-search--hide")}}),t.on("results:focus",function(o){o.data._resultId?n.$search.attr("aria-activedescendant",o.data._resultId):n.$search.removeAttr("aria-activedescendant")})},s.prototype.handleSearch=function(r){if(!this._keyUpPrevented){var t=this.$search.val();this.trigger("query",{term:t})}this._keyUpPrevented=!1},s.prototype.showSearch=function(r,t){return!0},s}),g.define("asp_select2/dropdown/hidePlaceholder",[],function(){function a(l,s,r,t){this.placeholder=this.normalizePlaceholder(r.get("placeholder")),l.call(this,s,r,t)}return a.prototype.append=function(l,s){s.results=this.removePlaceholder(s.results),l.call(this,s)},a.prototype.normalizePlaceholder=function(l,s){return typeof s=="string"&&(s={id:"",text:s}),s},a.prototype.removePlaceholder=function(l,s){for(var r=s.slice(0),t=s.length-1;t>=0;t--){var e=s[t];this.placeholder.id===e.id&&r.splice(t,1)}return r},a}),g.define("asp_select2/dropdown/infiniteScroll",["jquery"],function(a){function l(s,r,t,e){this.lastParams={},s.call(this,r,t,e),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return l.prototype.append=function(s,r){this.$loadingMore.remove(),this.loading=!1,s.call(this,r),this.showLoadingMore(r)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},l.prototype.bind=function(s,r,t){var e=this;s.call(this,r,t),r.on("query",function(n){e.lastParams=n,e.loading=!0}),r.on("query:append",function(n){e.lastParams=n,e.loading=!0}),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},l.prototype.loadMoreIfNeeded=function(){var s=a.contains(document.documentElement,this.$loadingMore[0]);if(!(this.loading||!s)){var r=this.$results.offset().top+this.$results.outerHeight(!1),t=this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1);r+50>=t&&this.loadMore()}},l.prototype.loadMore=function(){this.loading=!0;var s=a.extend({},{page:1},this.lastParams);s.page++,this.trigger("query:append",s)},l.prototype.showLoadingMore=function(s,r){return r.pagination&&r.pagination.more},l.prototype.createLoadingMore=function(){var s=a('<li class="asp_select2-results__option asp_select2-results__option--load-more"role="option" aria-disabled="true"></li>'),r=this.options.get("translations").get("loadingMore");return s.html(r(this.lastParams)),s},l}),g.define("asp_select2/dropdown/attachBody",["jquery","../utils"],function(a,l){function s(r,t,e){this.$dropdownParent=a(e.get("dropdownParent")||document.body),r.call(this,t,e)}return s.prototype.bind=function(r,t,e){var n=this;r.call(this,t,e),t.on("open",function(){n._showDropdown(),n._attachPositioningHandler(t),n._bindContainerResultHandlers(t)}),t.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(i){i.stopPropagation()})},s.prototype.destroy=function(r){r.call(this),this.$dropdownContainer.remove()},s.prototype.position=function(r,t,e){t.attr("class",e.attr("class")),t.removeClass("asp_select2"),t.addClass("asp_select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=e},s.prototype.render=function(r){var t=a("<span></span>"),e=r.call(this);return t.append(e),this.$dropdownContainer=t,t},s.prototype._hideDropdown=function(r){this.$dropdownContainer.detach()},s.prototype._bindContainerResultHandlers=function(r,t){if(!this._containerResultsHandlersBound){var e=this;t.on("results:all",function(){e._positionDropdown(),e._resizeDropdown()}),t.on("results:append",function(){e._positionDropdown(),e._resizeDropdown()}),t.on("results:message",function(){e._positionDropdown(),e._resizeDropdown()}),t.on("select",function(){e._positionDropdown(),e._resizeDropdown()}),t.on("unselect",function(){e._positionDropdown(),e._resizeDropdown()}),this._containerResultsHandlersBound=!0}},s.prototype._attachPositioningHandler=function(r,t){var e=this,n="scroll.asp_select2."+t.id,i="resize.asp_select2."+t.id,o="orientationchange.asp_select2."+t.id,u=this.$container.parents().filter(l.hasScroll);u.each(function(){l.StoreData(this,"asp_select2-scroll-position",{x:a(this).scrollLeft(),y:a(this).scrollTop()})}),u.on(n,function(d){var p=l.GetData(this,"asp_select2-scroll-position");a(this).scrollTop(p.y)}),a(window).on(n+" "+i+" "+o,function(d){e._positionDropdown(),e._resizeDropdown()})},s.prototype._detachPositioningHandler=function(r,t){var e="scroll.asp_select2."+t.id,n="resize.asp_select2."+t.id,i="orientationchange.asp_select2."+t.id,o=this.$container.parents().filter(l.hasScroll);o.off(e),a(window).off(e+" "+n+" "+i)},s.prototype._positionDropdown=function(){var r=a(window),t=this.$dropdown.hasClass("asp_select2-dropdown--above"),e=this.$dropdown.hasClass("asp_select2-dropdown--below"),n=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);var o={height:this.$container.outerHeight(!1)};o.top=i.top,o.bottom=i.top+o.height;var u={height:this.$dropdown.outerHeight(!1)},d={top:r.scrollTop(),bottom:r.scrollTop()+r.height()},p=d.top<i.top-u.height,f=d.bottom>i.bottom+u.height,A={left:i.left,top:o.bottom},E=this.$dropdownParent;E.css("position")==="static"&&(E=E.offsetParent());var m={top:0,left:0};(a.contains(document.body,E[0])||E[0].isConnected)&&(m=E.offset()),A.top-=m.top,A.left-=m.left,!t&&!e&&(n="below"),!f&&p&&!t?n="above":!p&&f&&t&&(n="below"),(n=="above"||t&&n!=="below")&&(A.top=o.top-m.top-u.height),n!=null&&(this.$dropdown.removeClass("asp_select2-dropdown--below asp_select2-dropdown--above").addClass("asp_select2-dropdown--"+n),this.$container.removeClass("asp_select2-container--below asp_select2-container--above").addClass("asp_select2-container--"+n)),this.$dropdownContainer.css(A)},s.prototype._resizeDropdown=function(){var r={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(r.minWidth=r.width,r.position="relative",r.width="auto"),this.$dropdown.css(r)},s.prototype._showDropdown=function(r){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},s}),g.define("asp_select2/dropdown/minimumResultsForSearch",[],function(){function a(s){for(var r=0,t=0;t<s.length;t++){var e=s[t];e.children?r+=a(e.children):r++}return r}function l(s,r,t,e){this.minimumResultsForSearch=t.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),s.call(this,r,t,e)}return l.prototype.showSearch=function(s,r){return a(r.data.results)<this.minimumResultsForSearch?!1:s.call(this,r)},l}),g.define("asp_select2/dropdown/selectOnClose",["../utils"],function(a){function l(){}return l.prototype.bind=function(s,r,t){var e=this;s.call(this,r,t),r.on("close",function(n){e._handleSelectOnClose(n)})},l.prototype._handleSelectOnClose=function(s,r){if(r&&r.originalasp_Select2Event!=null){var t=r.originalasp_Select2Event;if(t._type==="select"||t._type==="unselect")return}var e=this.getHighlightedResults();if(!(e.length<1)){var n=a.GetData(e[0],"data");n.element!=null&&n.element.selected||n.element==null&&n.selected||this.trigger("select",{data:n})}},l}),g.define("asp_select2/dropdown/closeOnSelect",[],function(){function a(){}return a.prototype.bind=function(l,s,r){var t=this;l.call(this,s,r),s.on("select",function(e){t._selectTriggered(e)}),s.on("unselect",function(e){t._selectTriggered(e)})},a.prototype._selectTriggered=function(l,s){var r=s.originalEvent;r&&(r.ctrlKey||r.metaKey)||this.trigger("close",{originalEvent:r,originalasp_Select2Event:s})},a}),g.define("asp_select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(a){var l=a.input.length-a.maximum,s="Please delete "+l+" character";return l!=1&&(s+="s"),s},inputTooShort:function(a){var l=a.minimum-a.input.length,s="Please enter "+l+" or more characters";return s},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(a){var l="You can only select "+a.maximum+" item";return a.maximum!=1&&(l+="s"),l},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"},removeAllItems:function(){return"Remove all items"}}}),g.define("asp_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(a,l,s,r,t,e,n,i,o,u,d,p,f,A,E,m,_,O,T,k,q,R,H,W,h,y,w,B,x){function b(){this.reset()}b.prototype.apply=function(c){if(c=a.extend(!0,{},this.defaults,c),c.dataAdapter==null){if(c.ajax!=null?c.dataAdapter=E:c.data!=null?c.dataAdapter=A:c.dataAdapter=f,c.minimumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,O)),c.maximumInputLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,T)),c.maximumSelectionLength>0&&(c.dataAdapter=u.Decorate(c.dataAdapter,k)),c.tags&&(c.dataAdapter=u.Decorate(c.dataAdapter,m)),(c.tokenSeparators!=null||c.tokenizer!=null)&&(c.dataAdapter=u.Decorate(c.dataAdapter,_)),c.query!=null){var C=l(c.amdBase+"compat/query");c.dataAdapter=u.Decorate(c.dataAdapter,C)}if(c.initSelection!=null){var D=l(c.amdBase+"compat/initSelection");c.dataAdapter=u.Decorate(c.dataAdapter,D)}}if(c.resultsAdapter==null&&(c.resultsAdapter=s,c.ajax!=null&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,W)),c.placeholder!=null&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,H)),c.selectOnClose&&(c.resultsAdapter=u.Decorate(c.resultsAdapter,w))),c.dropdownAdapter==null){if(c.multiple)c.dropdownAdapter=q;else{var v=u.Decorate(q,R);c.dropdownAdapter=v}if(c.minimumResultsForSearch!==0&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,y)),c.closeOnSelect&&(c.dropdownAdapter=u.Decorate(c.dropdownAdapter,B)),c.dropdownCssClass!=null||c.dropdownCss!=null||c.adaptDropdownCssClass!=null){var F=l(c.amdBase+"compat/dropdownCss");c.dropdownAdapter=u.Decorate(c.dropdownAdapter,F)}c.dropdownAdapter=u.Decorate(c.dropdownAdapter,h)}if(c.selectionAdapter==null){if(c.multiple?c.selectionAdapter=t:c.selectionAdapter=r,c.placeholder!=null&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,e)),c.allowClear&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,n)),c.multiple&&(c.selectionAdapter=u.Decorate(c.selectionAdapter,i)),c.containerCssClass!=null||c.containerCss!=null||c.adaptContainerCssClass!=null){var S=l(c.amdBase+"compat/containerCss");c.selectionAdapter=u.Decorate(c.selectionAdapter,S)}c.selectionAdapter=u.Decorate(c.selectionAdapter,o)}c.language=this._resolveLanguage(c.language),c.language.push("en");for(var L=[],I=0;I<c.language.length;I++){var j=c.language[I];L.indexOf(j)===-1&&L.push(j)}return c.language=L,c.translations=this._processTranslations(c.language,c.debug),c},b.prototype.reset=function(){function c(D){function v(F){return p[F]||F}return D.replace(/[^\u0000-\u007E]/g,v)}function C(D,v){if(String.prototype.trim.call(D.term==null?"":D.term)==="")return v;if(v.children&&v.children.length>0){for(var F=a.extend(!0,{},v),S=v.children.length-1;S>=0;S--){var L=v.children[S],I=C(D,L);I==null&&F.children.splice(S,1)}return F.children.length>0?F:C(D,F)}var j=c(v.text).toUpperCase(),G=c(D.term).toUpperCase();return j.indexOf(G)>-1?v:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:u.escapeMarkup,language:{},matcher:C,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(D){return D},templateResult:function(D){return D.text},templateSelection:function(D){return D.text},theme:"default",width:"resolve"}},b.prototype.applyFromElement=function(c,C){var D=c.language,v=this.defaults.language,F=C.prop("lang"),S=C.closest("[lang]").prop("lang"),L=Array.prototype.concat.call(this._resolveLanguage(F),this._resolveLanguage(D),this._resolveLanguage(v),this._resolveLanguage(S));return c.language=L,c},b.prototype._resolveLanguage=function(c){if(!c)return[];if(a.isEmptyObject(c))return[];if(a.isPlainObject(c))return[c];var C;Array.isArray(c)?C=c:C=[c];for(var D=[],v=0;v<C.length;v++)if(D.push(C[v]),typeof C[v]=="string"&&C[v].indexOf("-")>0){var F=C[v].split("-"),S=F[0];D.push(S)}return D},b.prototype._processTranslations=function(c,C){for(var D=new d,v=0;v<c.length;v++){var F=new d,S=c[v];if(typeof S=="string")try{F=d.loadPath(S)}catch{try{S=this.defaults.amdLanguageBase+S,F=d.loadPath(S)}catch{C&&window.console&&console.warn&&console.warn('asp_Select2: The language file for "'+S+'" could not be automatically loaded. A fallback will be used instead.')}}else a.isPlainObject(S)?F=new d(S):F=S;D.extend(F)}return D},b.prototype.set=function(c,C){var D=a.camelCase(c),v={};v[D]=C;var F=u._convertData(v);a.extend(!0,this.defaults,F)};var P=new b;return P}),g.define("asp_select2/options",["require","jquery","./defaults","./utils"],function(a,l,s,r){function t(e,n){if(this.options=e,n!=null&&this.fromElement(n),n!=null&&(this.options=s.applyFromElement(this.options,n)),this.options=s.apply(this.options),n&&n.is("input")){var i=a(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,i)}}return t.prototype.fromElement=function(e){var n=["asp_select2"];this.options.multiple==null&&(this.options.multiple=e.prop("multiple")),this.options.disabled==null&&(this.options.disabled=e.prop("disabled")),this.options.dir==null&&(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),r.GetData(e[0],"asp_select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('asp_Select2: The `data-asp_select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of asp_Select2.'),r.StoreData(e[0],"data",r.GetData(e[0],"asp_select2Tags")),r.StoreData(e[0],"tags",!0)),r.GetData(e[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("asp_Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of asp_Select2."),e.attr("ajax--url",r.GetData(e[0],"ajaxUrl")),r.StoreData(e[0],"ajax-Url",r.GetData(e[0],"ajaxUrl")));var i={};function o(O,T){return T.toUpperCase()}for(var u=0;u<e[0].attributes.length;u++){var d=e[0].attributes[u].name,p="data-";if(d.substr(0,p.length)==p){var f=d.substring(p.length),A=r.GetData(e[0],f),E=f.replace(/-([a-z])/g,o);i[E]=A}}l.fn.jquery&&l.fn.jquery.substr(0,2)=="1."&&e[0].dataset&&(i=l.extend(!0,{},e[0].dataset,i));var m=l.extend(!0,{},r.GetData(e[0]),i);m=r._convertData(m);for(var _ in m)l.inArray(_,n)>-1||(l.isPlainObject(this.options[_])?l.extend(this.options[_],m[_]):this.options[_]=m[_]);return this},t.prototype.get=function(e){return this.options[e]},t.prototype.set=function(e,n){this.options[e]=n},t}),g.define("asp_select2/core",["jquery","./options","./utils","./keys"],function(a,l,s,r){var t=function(e,n){s.GetData(e[0],"asp_select2")!=null&&s.GetData(e[0],"asp_select2").destroy(),this.$element=e,this.id=this._generateId(e),n=n||{},this.options=new l(n,e),t.__super__.constructor.call(this);var i=e.attr("tabindex")||0;s.StoreData(e[0],"old-tabindex",i),e.attr("tabindex","-1");var o=this.options.get("dataAdapter");this.dataAdapter=new o(e,this.options);var u=this.render();this._placeContainer(u);var d=this.options.get("selectionAdapter");this.selection=new d(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,u);var p=this.options.get("dropdownAdapter");this.dropdown=new p(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,u);var f=this.options.get("resultsAdapter");this.results=new f(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var A=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(E){A.trigger("selection:update",{data:E})}),e.addClass("asp_select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),s.StoreData(e[0],"asp_select2",this),e.data("asp_select2",this)};return s.Extend(t,s.Observable),t.prototype._generateId=function(e){var n="";return e.attr("id")!=null?n=e.attr("id"):e.attr("name")!=null?n=e.attr("name")+"-"+s.generateChars(2):n=s.generateChars(4),n=n.replace(/(:|\.|\[|\]|,)/g,""),n="asp_select2-"+n,n},t.prototype._placeContainer=function(e){e.insertAfter(this.$element);var n=this._resolveWidth(this.$element,this.options.get("width"));n!=null&&e.css("width",n)},t.prototype._resolveWidth=function(e,n){var i=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if(n=="resolve"){var o=this._resolveWidth(e,"style");return o??this._resolveWidth(e,"element")}if(n=="element"){var u=e.outerWidth(!1);return u<=0?"auto":u+"px"}if(n=="style"){var d=e.attr("style");if(typeof d!="string")return null;for(var p=d.split(";"),f=0,A=p.length;f<A;f=f+1){var E=p[f].replace(/\s/g,""),m=E.match(i);if(m!==null&&m.length>=1)return m[1]}return null}if(n=="computedstyle"){var _=window.getComputedStyle(e[0]);return _.width}return n},t.prototype._bindAdapters=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)},t.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.asp_select2",function(){e.dataAdapter.current(function(i){e.trigger("selection:update",{data:i})})}),this.$element.on("focus.asp_select2",function(i){e.trigger("focus",i)}),this._syncA=s.bind(this._syncAttributes,this),this._syncS=s.bind(this._syncSubtree,this),this.$element[0].attachEvent&&this.$element[0].attachEvent("onpropertychange",this._syncA);var n=window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver;n!=null?(this._observer=new n(function(i){e._syncA(),e._syncS(null,i)}),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})):this.$element[0].addEventListener&&(this.$element[0].addEventListener("DOMAttrModified",e._syncA,!1),this.$element[0].addEventListener("DOMNodeInserted",e._syncS,!1),this.$element[0].addEventListener("DOMNodeRemoved",e._syncS,!1))},t.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",function(n,i){e.trigger(n,i)})},t.prototype._registerSelectionEvents=function(){var e=this,n=["toggle","focus"];this.selection.on("toggle",function(){e.toggleDropdown()}),this.selection.on("focus",function(i){e.focus(i)}),this.selection.on("*",function(i,o){a.inArray(i,n)===-1&&e.trigger(i,o)})},t.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",function(n,i){e.trigger(n,i)})},t.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",function(n,i){e.trigger(n,i)})},t.prototype._registerEvents=function(){var e=this;this.on("open",function(){e.$container.addClass("asp_select2-container--open")}),this.on("close",function(){e.$container.removeClass("asp_select2-container--open")}),this.on("enable",function(){e.$container.removeClass("asp_select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("asp_select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("asp_select2-container--focus")}),this.on("query",function(n){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(n,function(i){e.trigger("results:all",{data:i,query:n})})}),this.on("query:append",function(n){this.dataAdapter.query(n,function(i){e.trigger("results:append",{data:i,query:n})})}),this.on("keypress",function(n){var i=n.which;e.isOpen()?i===r.ESC||i===r.TAB||i===r.UP&&n.altKey?(e.close(n),n.preventDefault()):i===r.ENTER?(e.trigger("results:select",{}),n.preventDefault()):i===r.SPACE&&n.ctrlKey?(e.trigger("results:toggle",{}),n.preventDefault()):i===r.UP?(e.trigger("results:previous",{}),n.preventDefault()):i===r.DOWN&&(e.trigger("results:next",{}),n.preventDefault()):(i===r.ENTER||i===r.SPACE||i===r.DOWN&&n.altKey)&&(e.open(),n.preventDefault())})},t.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},t.prototype._isChangeMutation=function(e,n){var i=!1,o=this;if(!(e&&e.target&&e.target.nodeName!=="OPTION"&&e.target.nodeName!=="OPTGROUP")){if(!n)i=!0;else if(n.addedNodes&&n.addedNodes.length>0)for(var u=0;u<n.addedNodes.length;u++){var d=n.addedNodes[u];d.selected&&(i=!0)}else n.removedNodes&&n.removedNodes.length>0?i=!0:Array.isArray(n)&&a.each(n,function(p,f){if(o._isChangeMutation(p,f))return i=!0,!1});return i}},t.prototype._syncSubtree=function(e,n){var i=this._isChangeMutation(e,n),o=this;i&&this.dataAdapter.current(function(u){o.trigger("selection:update",{data:u})})},t.prototype.trigger=function(e,n){var i=t.__super__.trigger,o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"};if(n===void 0&&(n={}),e in o){var u=o[e],d={prevented:!1,name:e,args:n};if(i.call(this,u,d),d.prevented){n.prevented=!0;return}}i.call(this,e,n)},t.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},t.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},t.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},t.prototype.isEnabled=function(){return!this.isDisabled()},t.prototype.isDisabled=function(){return this.options.get("disabled")},t.prototype.isOpen=function(){return this.$container.hasClass("asp_select2-container--open")},t.prototype.hasFocus=function(){return this.$container.hasClass("asp_select2-container--focus")},t.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("asp_select2-container--focus"),this.trigger("focus",{}))},t.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('asp_Select2: The `asp_select2("enable")` method has been deprecated and will be removed in later asp_Select2 versions. Use $element.prop("disabled") instead.'),(e==null||e.length===0)&&(e=[!0]);var n=!e[0];this.$element.prop("disabled",n)},t.prototype.data=function(){this.options.get("debug")&&arguments.length>0&&window.console&&console.warn&&console.warn('asp_Select2: Data can no longer be set using `asp_select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current(function(n){e=n}),e},t.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('asp_Select2: The `asp_select2("val")` method has been deprecated and will be removed in later asp_Select2 versions. Use $element.val() instead.'),e==null||e.length===0)return this.$element.val();var n=e[0];Array.isArray(n)&&(n=a.map(n,function(i){return i.toString()})),this.$element.val(n).trigger("input").trigger("change")},t.prototype.destroy=function(){this.$container.remove(),this.$element[0].detachEvent&&this.$element[0].detachEvent("onpropertychange",this._syncA),this._observer!=null?(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(".asp_select2"),this.$element.attr("tabindex",s.GetData(this.$element[0],"old-tabindex")),this.$element.removeClass("asp_select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),s.RemoveData(this.$element[0]),this.$element.removeData("asp_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},t.prototype.render=function(){var e=a('<span class="asp_select2 asp_select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("asp_select2-container--"+this.options.get("theme")),s.StoreData(e[0],"element",this.$element),e},t}),g.define("asp_select2/compat/utils",["jquery"],function(a){function l(s,r,t){var e,n=[],i;e=String.prototype.trim.call(s.attr("class")==null?"":s.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){this.indexOf("asp_select2-")===0&&n.push(this)})),e=String.prototype.trim.call(r.attr("class")==null?"":r.attr("class")),e&&(e=""+e,a(e.split(/\s+/)).each(function(){this.indexOf("asp_select2-")!==0&&(i=t(this),i!=null&&n.push(i))})),s.attr("class",n.join(" "))}return{syncCssClasses:l}}),g.define("asp_select2/compat/containerCss",["jquery","./utils"],function(a,l){function s(t){return null}function r(){}return r.prototype.render=function(t){var e=t.call(this),n=this.options.get("containerCssClass")||"";a.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptContainerCssClass");if(i=i||s,n.indexOf(":all:")!==-1){n=n.replace(":all:","");var o=i;i=function(d){var p=o(d);return p!=null?p+" "+d:d}}var u=this.options.get("containerCss")||{};return a.isFunction(u)&&(u=u(this.$element)),l.syncCssClasses(e,this.$element,i),e.css(u),e.addClass(n),e},r}),g.define("asp_select2/compat/dropdownCss",["jquery","./utils"],function(a,l){function s(t){return null}function r(){}return r.prototype.render=function(t){var e=t.call(this),n=this.options.get("dropdownCssClass")||"";a.isFunction(n)&&(n=n(this.$element));var i=this.options.get("adaptDropdownCssClass");if(i=i||s,n.indexOf(":all:")!==-1){n=n.replace(":all:","");var o=i;i=function(d){var p=o(d);return p!=null?p+" "+d:d}}var u=this.options.get("dropdownCss")||{};return a.isFunction(u)&&(u=u(this.$element)),l.syncCssClasses(e,this.$element,i),e.css(u),e.addClass(n),e},r}),g.define("asp_select2/compat/initSelection",["jquery"],function(a){function l(s,r,t){t.get("debug")&&window.console&&console.warn&&console.warn("asp_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 asp_Select2"),this.initSelection=t.get("initSelection"),this._isInitialized=!1,s.call(this,r,t)}return l.prototype.current=function(s,r){var t=this;if(this._isInitialized){s.call(this,r);return}this.initSelection.call(null,this.$element,function(e){t._isInitialized=!0,Array.isArray(e)||(e=[e]),r(e)})},l}),g.define("asp_select2/compat/inputData",["jquery","../utils"],function(a,l){function s(r,t,e){this._currentData=[],this._valueSeparator=e.get("valueSeparator")||",",t.prop("type")==="hidden"&&e.get("debug")&&console&&console.warn&&console.warn("asp_Select2: Using a hidden input with asp_Select2 is no longer supported and may stop working in the future. It is recommended to use a `<select>` element instead."),r.call(this,t,e)}return s.prototype.current=function(r,t){function e(u,d){var p=[];return u.selected||a.inArray(u.id,d)!==-1?(u.selected=!0,p.push(u)):u.selected=!1,u.children&&p.push.apply(p,e(u.children,d)),p}for(var n=[],i=0;i<this._currentData.length;i++){var o=this._currentData[i];n.push.apply(n,e(o,this.$element.val().split(this._valueSeparator)))}t(n)},s.prototype.select=function(r,t){if(!this.options.get("multiple"))this.current(function(n){a.map(n,function(i){i.selected=!1})}),this.$element.val(t.id),this.$element.trigger("input").trigger("change");else{var e=this.$element.val();e+=this._valueSeparator+t.id,this.$element.val(e),this.$element.trigger("input").trigger("change")}},s.prototype.unselect=function(r,t){var e=this;t.selected=!1,this.current(function(n){for(var i=[],o=0;o<n.length;o++){var u=n[o];t.id!=u.id&&i.push(u.id)}e.$element.val(i.join(e._valueSeparator)),e.$element.trigger("input").trigger("change")})},s.prototype.query=function(r,t,e){for(var n=[],i=0;i<this._currentData.length;i++){var o=this._currentData[i],u=this.matches(t,o);u!==null&&n.push(u)}e({results:n})},s.prototype.addOptions=function(r,t){var e=a.map(t,function(n){return l.GetData(n[0],"data")});this._currentData.push.apply(this._currentData,e)},s}),g.define("asp_select2/compat/matcher",["jquery"],function(a){function l(s){function r(t,e){var n=a.extend(!0,{},e);if(t.term==null||String.prototype.trim.call(t.term==null?"":t.term)==="")return n;if(e.children){for(var i=e.children.length-1;i>=0;i--){var o=e.children[i],u=s(t.term,o.text,o);u||n.children.splice(i,1)}if(n.children.length>0)return n}return s(t.term,e.text,e)?n:null}return r}return l}),g.define("asp_select2/compat/query",[],function(){function a(l,s,r){r.get("debug")&&window.console&&console.warn&&console.warn("asp_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 asp_Select2."),l.call(this,s,r)}return a.prototype.query=function(l,s,r){s.callback=r;var t=this.options.get("query");t.call(null,s)},a}),g.define("asp_select2/dropdown/attachContainer",[],function(){function a(l,s,r){l.call(this,s,r)}return a.prototype.position=function(l,s,r){var t=r.find(".dropdown-wrapper");t.append(s),s.addClass("asp_select2-dropdown--below"),r.addClass("asp_select2-container--below")},a}),g.define("asp_select2/dropdown/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(l,s,r){l.call(this,s,r);var t=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$dropdown.on(t.join(" "),function(e){e.stopPropagation()})},a}),g.define("asp_select2/selection/stopPropagation",[],function(){function a(){}return a.prototype.bind=function(l,s,r){l.call(this,s,r);var t=["blur","change","click","dblclick","focus","focusin","focusout","input","keydown","keyup","keypress","mousedown","mouseenter","mouseleave","mousemove","mouseover","mouseup","search","touchend","touchstart"];this.$selection.on(t.join(" "),function(e){e.stopPropagation()})},a});/*!
 * jQuery Mousewheel 3.1.13
 *
 * Copyright jQuery Foundation and other contributors
 * Released under the MIT license
 * http://jquery.org/license
 */return function(a){typeof g.define=="function"&&g.define.amd?g.define("jquery-mousewheel",["jquery"],a):typeof exports=="object"?module.exports=a:a(M)}(function(a){var l=["wheel","mousewheel","DOMMouseScroll","MozMousePixelScroll"],s="onwheel"in document||document.documentMode>=9?["wheel"]:["mousewheel","DomMouseScroll","MozMousePixelScroll"],r=Array.prototype.slice,t,e;if(a.event.fixHooks)for(var n=l.length;n;)a.event.fixHooks[l[--n]]=a.event.mouseHooks;var i=a.event.special.mousewheel={version:"3.1.12",setup:function(){if(this.addEventListener)for(var p=s.length;p;)this.addEventListener(s[--p],o,!1);else this.onmousewheel=o;a.data(this,"mousewheel-line-height",i.getLineHeight(this)),a.data(this,"mousewheel-page-height",i.getPageHeight(this))},teardown:function(){if(this.removeEventListener)for(var p=s.length;p;)this.removeEventListener(s[--p],o,!1);else this.onmousewheel=null;a.removeData(this,"mousewheel-line-height"),a.removeData(this,"mousewheel-page-height")},getLineHeight:function(p){var f=a(p),A=f["offsetParent"in a.fn?"offsetParent":"parent"]();return A.length||(A=a("body")),parseInt(A.css("fontSize"),10)||parseInt(f.css("fontSize"),10)||16},getPageHeight:function(p){return a(p).height()},settings:{adjustOldDeltas:!0,normalizeOffset:!0}};a.fn.extend({mousewheel:function(p){return p?this.bind("mousewheel",p):this.trigger("mousewheel")},unmousewheel:function(p){return this.unbind("mousewheel",p)}});function o(p){var f=p||window.event,A=r.call(arguments,1),E=0,m=0,_=0,O=0,T=0,k=0;if(p=a.event.fix(f),p.type="mousewheel","detail"in f&&(_=f.detail*-1),"wheelDelta"in f&&(_=f.wheelDelta),"wheelDeltaY"in f&&(_=f.wheelDeltaY),"wheelDeltaX"in f&&(m=f.wheelDeltaX*-1),"axis"in f&&f.axis===f.HORIZONTAL_AXIS&&(m=_*-1,_=0),E=_===0?m:_,"deltaY"in f&&(_=f.deltaY*-1,E=_),"deltaX"in f&&(m=f.deltaX,_===0&&(E=m*-1)),!(_===0&&m===0)){if(f.deltaMode===1){var q=a.data(this,"mousewheel-line-height");E*=q,_*=q,m*=q}else if(f.deltaMode===2){var R=a.data(this,"mousewheel-page-height");E*=R,_*=R,m*=R}if(O=Math.max(Math.abs(_),Math.abs(m)),(!e||O<e)&&(e=O,d(f,O)&&(e/=40)),d(f,O)&&(E/=40,m/=40,_/=40),E=Math[E>=1?"floor":"ceil"](E/e),m=Math[m>=1?"floor":"ceil"](m/e),_=Math[_>=1?"floor":"ceil"](_/e),i.settings.normalizeOffset&&this.getBoundingClientRect){var H=this.getBoundingClientRect();T=p.clientX-H.left,k=p.clientY-H.top}return p.deltaX=m,p.deltaY=_,p.deltaFactor=e,p.offsetX=T,p.offsetY=k,p.deltaMode=0,A.unshift(p,E,m,_),t&&clearTimeout(t),t=setTimeout(u,200),(a.event.dispatch||a.event.handle).apply(this,A)}}function u(){e=null}function d(p,f){return i.settings.adjustOldDeltas&&p.type==="mousewheel"&&f%120===0}}),g.define("jquery.asp_select2",["jquery","jquery-mousewheel","./asp_select2/core","./asp_select2/defaults","./asp_select2/utils"],function(a,l,s,r,t){if(a.fn.asp_select2==null){var e=["open","close","destroy"];a.fn.asp_select2=function(n){if(n=n||{},typeof n=="object")return this.each(function(){var u=a.extend(!0,{},n),d=new s(a(this),u)}),this;if(typeof n=="string"){var i,o=Array.prototype.slice.call(arguments,1);return this.each(function(){var u=t.GetData(this,"asp_select2");u==null&&window.console&&console.error&&console.error("The asp_select2('"+n+"') method was called on an element that is not using asp_Select2."),i=u[n].apply(u,o)}),a.inArray(n,e)>-1?this:i}else throw new Error("Invalid arguments for asp_Select2: "+n)}}return a.fn.asp_select2.defaults==null&&(a.fn.asp_select2.defaults=r),s}),{define:g.define,require:g.require}}(),z=N.require("jquery.asp_select2");return M.fn.asp_select2.amd=N,z});
