/*! * 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;v0&&(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;C0&&(_.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":">",'"':""","'":"'","/":"/"};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('
    ');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(''),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;e0?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",{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('');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(''),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("")},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('
      '),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('
    • ×
    • ');return t},r.prototype.update=function(t){if(this.clear(),t.length!==0){for(var e=[],n=0;n1;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;d0||e.length===0)){var n=this.options.get("translations").get("removeAllItems"),i=a('×');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('');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=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;o0&&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('');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('');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('
    • '),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(""),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.topi.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;t0&&(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;I0){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;v0){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-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=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;u0?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('');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 `