3 lines
70 KiB
JavaScript
3 lines
70 KiB
JavaScript
/*! For license information please see 28.bb005543f41af5fb.js.LICENSE.txt */
|
||
(self.webpackChunkWebComponents=self.webpackChunkWebComponents||[]).push([[28],{14028:(e,t,n)=>{var s,i,o;i=[n(41669)],void 0===(o="function"==typeof(s=function(e){var t,n,s,i,o,r,a,l,c,u,d,p,h,f,g=((x=e&&e.fn&&e.fn.select2&&e.fn.select2.amd?e.fn.select2.amd:x)&&x.requirejs||(x?n=x:x={},l={},c={},u={},d={},p=Object.prototype.hasOwnProperty,h=[].slice,f=/\.js$/,r=function(e,t){var n,s,i=b(e),o=i[0];return t=t[1],e=i[1],o&&(n=_(o=y(o,t))),o?e=n&&n.normalize?n.normalize(e,(s=t,function(e){return y(e,s)})):y(e,t):(o=(i=b(e=y(e,t)))[0],e=i[1],o&&(n=_(o))),{f:o?o+"!"+e:e,n:e,pr:o,p:n}},a={require:function(e){return v(e)},exports:function(e){var t=l[e];return void 0!==t?t:l[e]={}},module:function(e){return{id:e,uri:"",exports:l[e],config:(t=e,function(){return u&&u.config&&u.config[t]||{}})};var t}},i=function(e,t,n,i){var o,u,p,h,f,g=[],y=typeof n,b=w(i=i||e);if("undefined"==y||"function"==y){for(t=!t.length&&n.length?["require","exports","module"]:t,h=0;h<t.length;h+=1)if("require"===(u=(p=r(t[h],b)).f))g[h]=a.require(e);else if("exports"===u)g[h]=a.exports(e),f=!0;else if("module"===u)o=g[h]=a.module(e);else if(m(l,u)||m(c,u)||m(d,u))g[h]=_(u);else{if(!p.p)throw new Error(e+" missing "+u);p.p.load(p.n,v(i,!0),function(e){return function(t){l[e]=t}}(u),{}),g[h]=l[u]}y=n?n.apply(l[e],g):void 0,e&&(o&&o.exports!==s&&o.exports!==l[e]?l[e]=o.exports:y===s&&f||(l[e]=y))}else e&&(l[e]=n)},t=n=o=function(e,t,n,l,c){if("string"==typeof e)return a[e]?a[e](t):_(r(e,w(t)).f);if(!e.splice){if((u=e).deps&&o(u.deps,u.callback),!t)return;t.splice?(e=t,t=n,n=null):e=s}return t=t||function(){},"function"==typeof n&&(n=l,l=c),l?i(s,e,t,n):setTimeout((function(){i(s,e,t,n)}),4),o},o.config=function(e){return o(e)},t._defined=l,(g=function(e,t,n){if("string"!=typeof e)throw new Error("See almond README: incorrect module build, no module name");t.splice||(n=t,t=[]),m(l,e)||m(c,e)||(c[e]=[e,t,n])}).amd={jQuery:!0},x.requirejs=t,x.require=n,x.define=g),x.define("almond",(function(){})),x.define("jquery",[],(function(){var t=e||$;return null==t&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),t})),x.define("select2/utils",["jquery"],(function(e){var t={};function n(e){var t,n=e.prototype,s=[];for(t in n)"function"==typeof n[t]&&"constructor"!==t&&s.push(t);return s}function s(){this.listeners={}}t.Extend=function(e,t){var n,s={}.hasOwnProperty;function i(){this.constructor=e}for(n in t)s.call(t,n)&&(e[n]=t[n]);return i.prototype=t.prototype,e.prototype=new i,e.__super__=t.prototype,e},t.Decorate=function(e,t){var s=n(t),i=n(e);function o(){var n=Array.prototype.unshift,s=t.prototype.constructor.length,i=e.prototype.constructor;0<s&&(n.call(arguments,e.prototype.constructor),i=t.prototype.constructor),i.apply(this,arguments)}t.displayName=e.displayName,o.prototype=new function(){this.constructor=o};for(var r=0;r<i.length;r++){var a=i[r];o.prototype[a]=e.prototype[a]}for(var l=0;l<s.length;l++){var c=s[l];o.prototype[c]=function(e){var n=function(){};e in o.prototype&&(n=o.prototype[e]);var s=t.prototype[e];return function(){return Array.prototype.unshift.call(arguments,n),s.apply(this,arguments)}}(c)}return o},s.prototype.on=function(e,t){this.listeners=this.listeners||{},e in this.listeners?this.listeners[e].push(t):this.listeners[e]=[t]},s.prototype.trigger=function(e){var t=Array.prototype.slice,n=t.call(arguments,1);this.listeners=this.listeners||{},0===(n=null==n?[]:n).length&&n.push({}),(n[0]._type=e)in this.listeners&&this.invoke(this.listeners[e],t.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},s.prototype.invoke=function(e,t){for(var n=0,s=e.length;n<s;n++)e[n].apply(this,t)},t.Observable=s,t.generateChars=function(e){for(var t="",n=0;n<e;n++)t+=Math.floor(36*Math.random()).toString(36);return t},t.bind=function(e,t){return function(){e.apply(t,arguments)}},t._convertData=function(e){for(var t in e){var n=t.split("-"),s=e;if(1!==n.length){for(var i=0;i<n.length;i++){var o=n[i];(o=o.substring(0,1).toLowerCase()+o.substring(1))in s||(s[o]={}),i==n.length-1&&(s[o]=e[t]),s=s[o]}delete e[t]}}return e},t.hasScroll=function(t,n){var s=e(n),i=n.style.overflowX,o=n.style.overflowY;return(i!==o||"hidden"!==o&&"visible"!==o)&&("scroll"===i||"scroll"===o||s.innerHeight()<n.scrollHeight||s.innerWidth()<n.scrollWidth)},t.escapeMarkup=function(e){var t={"\\":"\","&":"&","<":"<",">":">",'"':""","'":"'","/":"/"};return"string"!=typeof e?e:String(e).replace(/[&<>"'\/\\]/g,(function(e){return t[e]}))},t.__cache={};var i=0;return t.GetUniqueElementId=function(e){var n=e.getAttribute("data-select2-id");return null!=n||(n=e.id?"select2-data-"+e.id:"select2-data-"+(++i).toString()+"-"+t.generateChars(4),e.setAttribute("data-select2-id",n)),n},t.StoreData=function(e,n,s){e=t.GetUniqueElementId(e),t.__cache[e]||(t.__cache[e]={}),t.__cache[e][n]=s},t.GetData=function(n,s){var i=t.GetUniqueElementId(n);return s?t.__cache[i]&&null!=t.__cache[i][s]?t.__cache[i][s]:e(n).data(s):t.__cache[i]},t.RemoveData=function(e){var n=t.GetUniqueElementId(e);null!=t.__cache[n]&&delete t.__cache[n],e.removeAttribute("data-select2-id")},t.copyNonInternalCssClasses=function(e,t){var n=(n=e.getAttribute("class").trim().split(/\s+/)).filter((function(e){return 0===e.indexOf("select2-")}));t=(t=t.getAttribute("class").trim().split(/\s+/)).filter((function(e){return 0!==e.indexOf("select2-")})),t=n.concat(t),e.setAttribute("class",t.join(" "))},t})),x.define("select2/results",["jquery","./utils"],(function(e,t){function n(e,t,s){this.$element=e,this.data=s,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<ul class="select2-results__options" role="listbox"></ul>');return this.options.get("multiple")&&t.attr("aria-multiselectable","true"),this.$results=t},n.prototype.clear=function(){this.$results.empty()},n.prototype.displayMessage=function(t){var n=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var s=e('<li role="alert" aria-live="assertive" class="select2-results__option"></li>'),i=this.options.get("translations").get(t.message);s.append(n(i(t.args))),s[0].className+=" select2-results__message",this.$results.append(s)},n.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},n.prototype.append=function(e){this.hideLoading();var t=[];if(null!=e.results&&0!==e.results.length){e.results=this.sort(e.results);for(var n=0;n<e.results.length;n++){var s=e.results[n];s=this.option(s),t.push(s)}this.$results.append(t)}else 0===this.$results.children().length&&this.trigger("results:message",{message:"noResults"})},n.prototype.position=function(e,t){t.find(".select2-results").append(e)},n.prototype.sort=function(e){return this.options.get("sorter")(e)},n.prototype.highlightFirstItem=function(){var e=this.$results.find(".select2-results__option--selectable"),t=e.filter(".select2-results__option--selected");(0<t.length?t:e).first().trigger("mouseenter"),this.ensureHighlightVisible()},n.prototype.setClasses=function(){var n=this;this.data.current((function(s){var i=s.map((function(e){return e.id.toString()}));n.$results.find(".select2-results__option--selectable").each((function(){var n=e(this),s=t.GetData(this,"data"),o=""+s.id;null!=s.element&&s.element.selected||null==s.element&&-1<i.indexOf(o)?(this.classList.add("select2-results__option--selected"),n.attr("aria-selected","true")):(this.classList.remove("select2-results__option--selected"),n.attr("aria-selected","false"))}))}))},n.prototype.showLoading=function(e){this.hideLoading(),e={disabled:!0,loading:!0,text:this.options.get("translations").get("searching")(e)},(e=this.option(e)).className+=" loading-results",this.$results.prepend(e)},n.prototype.hideLoading=function(){this.$results.find(".loading-results").remove()},n.prototype.option=function(n){var s=document.createElement("li");s.classList.add("select2-results__option"),s.classList.add("select2-results__option--selectable");var i,o={role:"option"},r=window.Element.prototype.matches||window.Element.prototype.msMatchesSelector||window.Element.prototype.webkitMatchesSelector;for(i in(null!=n.element&&r.call(n.element,":disabled")||null==n.element&&n.disabled)&&(o["aria-disabled"]="true",s.classList.remove("select2-results__option--selectable"),s.classList.add("select2-results__option--disabled")),null==n.id&&s.classList.remove("select2-results__option--selectable"),null!=n._resultId&&(s.id=n._resultId),n.title&&(s.title=n.title),n.children&&(o.role="group",o["aria-label"]=n.text,s.classList.remove("select2-results__option--selectable"),s.classList.add("select2-results__option--group")),o){var a=o[i];s.setAttribute(i,a)}if(n.children){var l=e(s),c=document.createElement("strong");c.className="select2-results__group",this.template(n,c);for(var u=[],d=0;d<n.children.length;d++){var p=n.children[d];p=this.option(p),u.push(p)}(r=e("<ul></ul>",{class:"select2-results__options select2-results__options--nested",role:"none"})).append(u),l.append(c),l.append(r)}else this.template(n,s);return t.StoreData(s,"data",n),s},n.prototype.bind=function(n,s){var i=this,o=n.id+"-results";this.$results.attr("id",o),n.on("results:all",(function(e){i.clear(),i.append(e.data),n.isOpen()&&(i.setClasses(),i.highlightFirstItem())})),n.on("results:append",(function(e){i.append(e.data),n.isOpen()&&i.setClasses()})),n.on("query",(function(e){i.hideMessages(),i.showLoading(e)})),n.on("select",(function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())})),n.on("unselect",(function(){n.isOpen()&&(i.setClasses(),i.options.get("scrollAfterSelect")&&i.highlightFirstItem())})),n.on("open",(function(){i.$results.attr("aria-expanded","true"),i.$results.attr("aria-hidden","false"),i.setClasses(),i.ensureHighlightVisible()})),n.on("close",(function(){i.$results.attr("aria-expanded","false"),i.$results.attr("aria-hidden","true"),i.$results.removeAttr("aria-activedescendant")})),n.on("results:toggle",(function(){var e=i.getHighlightedResults();0!==e.length&&e.trigger("mouseup")})),n.on("results:select",(function(){var e,n=i.getHighlightedResults();0!==n.length&&(e=t.GetData(n[0],"data"),n.hasClass("select2-results__option--selected")?i.trigger("close",{}):i.trigger("select",{data:e}))})),n.on("results:previous",(function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t);s<=0||(e=s-1,0===t.length&&(e=0),(s=n.eq(e)).trigger("mouseenter"),t=i.$results.offset().top,n=s.offset().top,s=i.$results.scrollTop()+(n-t),0===e?i.$results.scrollTop(0):n-t<0&&i.$results.scrollTop(s))})),n.on("results:next",(function(){var e,t=i.getHighlightedResults(),n=i.$results.find(".select2-results__option--selectable"),s=n.index(t)+1;s>=n.length||((e=n.eq(s)).trigger("mouseenter"),t=i.$results.offset().top+i.$results.outerHeight(!1),n=e.offset().top+e.outerHeight(!1),e=i.$results.scrollTop()+n-t,0===s?i.$results.scrollTop(0):t<n&&i.$results.scrollTop(e))})),n.on("results:focus",(function(e){e.element[0].classList.add("select2-results__option--highlighted"),e.element[0].setAttribute("aria-selected","true")})),n.on("results:message",(function(e){i.displayMessage(e)})),e.fn.mousewheel&&this.$results.on("mousewheel",(function(e){var t=i.$results.scrollTop(),n=i.$results.get(0).scrollHeight-t+e.deltaY;t=0<e.deltaY&&t-e.deltaY<=0,n=e.deltaY<0&&n<=i.$results.height(),t?(i.$results.scrollTop(0),e.preventDefault(),e.stopPropagation()):n&&(i.$results.scrollTop(i.$results.get(0).scrollHeight-i.$results.height()),e.preventDefault(),e.stopPropagation())})),this.$results.on("mouseup",".select2-results__option--selectable",(function(n){var s=e(this),o=t.GetData(this,"data");s.hasClass("select2-results__option--selected")?i.options.get("multiple")?i.trigger("unselect",{originalEvent:n,data:o}):i.trigger("close",{}):i.trigger("select",{originalEvent:n,data:o})})),this.$results.on("mouseenter",".select2-results__option--selectable",(function(n){var s=t.GetData(this,"data");i.getHighlightedResults().removeClass("select2-results__option--highlighted").attr("aria-selected","false"),i.trigger("results:focus",{data:s,element:e(this)})}))},n.prototype.getHighlightedResults=function(){return this.$results.find(".select2-results__option--highlighted")},n.prototype.destroy=function(){this.$results.remove()},n.prototype.ensureHighlightVisible=function(){var e,t,n,s,i=this.getHighlightedResults();0!==i.length&&(e=this.$results.find(".select2-results__option--selectable").index(i),s=this.$results.offset().top,t=i.offset().top,n=this.$results.scrollTop()+(t-s),s=t-s,n-=2*i.outerHeight(!1),e<=2?this.$results.scrollTop(0):(s>this.$results.outerHeight()||s<0)&&this.$results.scrollTop(n))},n.prototype.template=function(t,n){var s=this.options.get("templateResult"),i=this.options.get("escapeMarkup");null==(t=s(t,n))?n.style.display="none":"string"==typeof t?n.innerHTML=i(t):e(n).append(t)},n})),x.define("select2/keys",[],(function(){return{BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,DELETE:46}})),x.define("select2/selection/base",["jquery","../utils","../keys"],(function(e,t,n){function s(e,t){this.$element=e,this.options=t,s.__super__.constructor.call(this)}return t.Extend(s,t.Observable),s.prototype.render=function(){var n=e('<span class="select2-selection" role="combobox" aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,null!=t.GetData(this.$element[0],"old-tabindex")?this._tabindex=t.GetData(this.$element[0],"old-tabindex"):null!=this.$element.attr("tabindex")&&(this._tabindex=this.$element.attr("tabindex")),n.attr("title",this.$element.attr("title")),n.attr("tabindex",this._tabindex),n.attr("aria-disabled","false"),this.$selection=n},s.prototype.bind=function(e,t){var s=this,i=e.id+"-results";this.container=e,this.$selection.on("focus",(function(e){s.trigger("focus",e)})),this.$selection.on("blur",(function(e){s._handleBlur(e)})),this.$selection.on("keydown",(function(e){s.trigger("keypress",e),e.which===n.SPACE&&e.preventDefault()})),e.on("results:focus",(function(e){s.$selection.attr("aria-activedescendant",e.data._resultId)})),e.on("selection:update",(function(e){s.update(e.data)})),e.on("open",(function(){s.$selection.attr("aria-expanded","true"),s.$selection.attr("aria-owns",i),s._attachCloseHandler(e)})),e.on("close",(function(){s.$selection.attr("aria-expanded","false"),s.$selection.removeAttr("aria-activedescendant"),s.$selection.removeAttr("aria-owns"),s.$selection.trigger("focus"),s._detachCloseHandler(e)})),e.on("enable",(function(){s.$selection.attr("tabindex",s._tabindex),s.$selection.attr("aria-disabled","false")})),e.on("disable",(function(){s.$selection.attr("tabindex","-1"),s.$selection.attr("aria-disabled","true")}))},s.prototype._handleBlur=function(t){var n=this;window.setTimeout((function(){document.activeElement==n.$selection[0]||e.contains(n.$selection[0],document.activeElement)||n.trigger("blur",t)}),1)},s.prototype._attachCloseHandler=function(n){e(document.body).on("mousedown.select2."+n.id,(function(n){var s=e(n.target).closest(".select2");e(".select2.select2-container--open").each((function(){this!=s[0]&&t.GetData(this,"element").select2("close")}))}))},s.prototype._detachCloseHandler=function(t){e(document.body).off("mousedown.select2."+t.id)},s.prototype.position=function(e,t){t.find(".selection").append(e)},s.prototype.destroy=function(){this._detachCloseHandler(this.container)},s.prototype.update=function(e){throw new Error("The `update` method must be defined in child classes.")},s.prototype.isEnabled=function(){return!this.isDisabled()},s.prototype.isDisabled=function(){return this.options.get("disabled")},s})),x.define("select2/selection/single",["jquery","./base","../utils","../keys"],(function(e,t,n,s){function i(){i.__super__.constructor.apply(this,arguments)}return n.Extend(i,t),i.prototype.render=function(){var e=i.__super__.render.call(this);return e[0].classList.add("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},i.prototype.bind=function(e,t){var n=this;i.__super__.bind.apply(this,arguments);var s=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",s).attr("role","textbox").attr("aria-readonly","true"),this.$selection.attr("aria-labelledby",s),this.$selection.attr("aria-controls",s),this.$selection.on("mousedown",(function(e){1===e.which&&n.trigger("toggle",{originalEvent:e})})),this.$selection.on("focus",(function(e){})),this.$selection.on("blur",(function(e){})),e.on("focus",(function(t){e.isOpen()||n.$selection.trigger("focus")}))},i.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},i.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},i.prototype.selectionContainer=function(){return e("<span></span>")},i.prototype.update=function(e){var t,n;0!==e.length?(n=e[0],t=this.$selection.find(".select2-selection__rendered"),e=this.display(n,t),t.empty().append(e),(n=n.title||n.text)?t.attr("title",n):t.removeAttr("title")):this.clear()},i})),x.define("select2/selection/multiple",["jquery","./base","../utils"],(function(e,t,n){function s(e,t){s.__super__.constructor.apply(this,arguments)}return n.Extend(s,t),s.prototype.render=function(){var e=s.__super__.render.call(this);return e[0].classList.add("select2-selection--multiple"),e.html('<ul class="select2-selection__rendered"></ul>'),e},s.prototype.bind=function(t,i){var o=this;s.__super__.bind.apply(this,arguments);var r=t.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",r),this.$selection.on("click",(function(e){o.trigger("toggle",{originalEvent:e})})),this.$selection.on("click",".select2-selection__choice__remove",(function(t){var s;o.isDisabled()||(s=e(this).parent(),s=n.GetData(s[0],"data"),o.trigger("unselect",{originalEvent:t,data:s}))})),this.$selection.on("keydown",".select2-selection__choice__remove",(function(e){o.isDisabled()||e.stopPropagation()}))},s.prototype.clear=function(){var e=this.$selection.find(".select2-selection__rendered");e.empty(),e.removeAttr("title")},s.prototype.display=function(e,t){var n=this.options.get("templateSelection");return this.options.get("escapeMarkup")(n(e,t))},s.prototype.selectionContainer=function(){return e('<li class="select2-selection__choice"><button type="button" class="select2-selection__choice__remove" tabindex="-1"><span aria-hidden="true">×</span></button><span class="select2-selection__choice__display"></span></li>')},s.prototype.update=function(e){if(this.clear(),0!==e.length){for(var t=[],s=this.$selection.find(".select2-selection__rendered").attr("id")+"-choice-",i=0;i<e.length;i++){var o=e[i],r=this.selectionContainer(),a=this.display(o,r),l=s+n.generateChars(4)+"-";o.id?l+=o.id:l+=n.generateChars(4),r.find(".select2-selection__choice__display").append(a).attr("id",l);var c=o.title||o.text;c&&r.attr("title",c),a=this.options.get("translations").get("removeItem"),(c=r.find(".select2-selection__choice__remove")).attr("title",a()),c.attr("aria-label",a()),c.attr("aria-describedby",l),n.StoreData(r[0],"data",o),t.push(r)}this.$selection.find(".select2-selection__rendered").append(t)}},s})),x.define("select2/selection/placeholder",[],(function(){function e(e,t,n){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n)}return e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t?{id:"",text:t}:t},e.prototype.createPlaceholder=function(e,t){var n=this.selectionContainer();return n.html(this.display(t)),n[0].classList.add("select2-selection__placeholder"),n[0].classList.remove("select2-selection__choice"),t=t.title||t.text||n.text(),this.$selection.find(".select2-selection__rendered").attr("title",t),n},e.prototype.update=function(e,t){var n=1==t.length&&t[0].id!=this.placeholder.id;if(1<t.length||n)return e.call(this,t);this.clear(),t=this.createPlaceholder(this.placeholder),this.$selection.find(".select2-selection__rendered").append(t)},e})),x.define("select2/selection/allowClear",["jquery","../keys","../utils"],(function(e,t,n){function s(){}return s.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),null==this.placeholder&&this.options.get("debug")&&window.console&&console.error&&console.error("Select2: The `allowClear` option should be used in combination with the `placeholder` option."),this.$selection.on("mousedown",".select2-selection__clear",(function(e){s._handleClear(e)})),t.on("keypress",(function(e){s._handleKeyboardClear(e,t)}))},s.prototype._handleClear=function(e,t){if(!this.isDisabled()){var s=this.$selection.find(".select2-selection__clear");if(0!==s.length){t.stopPropagation();var i=n.GetData(s[0],"data"),o=this.$element.val();this.$element.val(this.placeholder.id);var r={data:i};if(this.trigger("clear",r),r.prevented)this.$element.val(o);else{for(var a=0;a<i.length;a++)if(r={data:i[a]},this.trigger("unselect",r),r.prevented)return void this.$element.val(o);this.$element.trigger("input").trigger("change"),this.trigger("toggle",{})}}}},s.prototype._handleKeyboardClear=function(e,n,s){s.isOpen()||n.which!=t.DELETE&&n.which!=t.BACKSPACE||this._handleClear(n)},s.prototype.update=function(t,s){var i,o;t.call(this,s),this.$selection.find(".select2-selection__clear").remove(),this.$selection[0].classList.remove("select2-selection--clearable"),0<this.$selection.find(".select2-selection__placeholder").length||0===s.length||(i=this.$selection.find(".select2-selection__rendered").attr("id"),o=this.options.get("translations").get("removeAllItems"),(t=e('<button type="button" class="select2-selection__clear" tabindex="-1"><span aria-hidden="true">×</span></button>')).attr("title",o()),t.attr("aria-label",o()),t.attr("aria-describedby",i),n.StoreData(t[0],"data",s),this.$selection.prepend(t),this.$selection[0].classList.add("select2-selection--clearable"))},s})),x.define("select2/selection/search",["jquery","../utils","../keys"],(function(e,t,n){function s(e,t,n){e.call(this,t,n)}return s.prototype.render=function(t){var n=this.options.get("translations").get("search"),s=e('<span class="select2-search select2-search--inline"><textarea class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" ></textarea></span>');return this.$searchContainer=s,this.$search=s.find("textarea"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",n()),t=t.call(this),this._transferTabIndex(),t.append(this.$searchContainer),t},s.prototype.bind=function(e,s,i){var o=this,r=s.id+"-results",a=s.id+"-container";e.call(this,s,i),o.$search.attr("aria-describedby",a),s.on("open",(function(){o.$search.attr("aria-controls",r),o.$search.trigger("focus")})),s.on("close",(function(){o.$search.val(""),o.resizeSearch(),o.$search.removeAttr("aria-controls"),o.$search.removeAttr("aria-activedescendant"),o.$search.trigger("focus")})),s.on("enable",(function(){o.$search.prop("disabled",!1),o._transferTabIndex()})),s.on("disable",(function(){o.$search.prop("disabled",!0)})),s.on("focus",(function(e){o.$search.trigger("focus")})),s.on("results:focus",(function(e){e.data._resultId?o.$search.attr("aria-activedescendant",e.data._resultId):o.$search.removeAttr("aria-activedescendant")})),this.$selection.on("focusin",".select2-search--inline",(function(e){o.trigger("focus",e)})),this.$selection.on("focusout",".select2-search--inline",(function(e){o._handleBlur(e)})),this.$selection.on("keydown",".select2-search--inline",(function(e){var s;e.stopPropagation(),o.trigger("keypress",e),o._keyUpPrevented=e.isDefaultPrevented(),e.which!==n.BACKSPACE||""!==o.$search.val()||0<(s=o.$selection.find(".select2-selection__choice").last()).length&&(s=t.GetData(s[0],"data"),o.searchRemoveChoice(s),e.preventDefault())})),this.$selection.on("click",".select2-search--inline",(function(e){o.$search.val()&&e.stopPropagation()}));var l=(s=document.documentMode)&&s<=11;this.$selection.on("input.searchcheck",".select2-search--inline",(function(e){l?o.$selection.off("input.search input.searchcheck"):o.$selection.off("keyup.search")})),this.$selection.on("keyup.search input.search",".select2-search--inline",(function(e){var t;l&&"input"===e.type?o.$selection.off("input.search input.searchcheck"):(t=e.which)!=n.SHIFT&&t!=n.CTRL&&t!=n.ALT&&t!=n.TAB&&o.handleSearch(e)}))},s.prototype._transferTabIndex=function(e){this.$search.attr("tabindex",this.$selection.attr("tabindex")),this.$selection.attr("tabindex","-1")},s.prototype.createPlaceholder=function(e,t){this.$search.attr("placeholder",t.text)},s.prototype.update=function(e,t){var n=this.$search[0]==document.activeElement;this.$search.attr("placeholder",""),e.call(this,t),this.resizeSearch(),n&&this.$search.trigger("focus")},s.prototype.handleSearch=function(){var e;this.resizeSearch(),this._keyUpPrevented||(e=this.$search.val(),this.trigger("query",{term:e})),this._keyUpPrevented=!1},s.prototype.searchRemoveChoice=function(e,t){this.trigger("unselect",{data:t}),this.$search.val(t.text),this.handleSearch()},s.prototype.resizeSearch=function(){this.$search.css("width","25px");var e="100%";""===this.$search.attr("placeholder")&&(e=.75*(this.$search.val().length+1)+"em"),this.$search.css("width",e)},s})),x.define("select2/selection/selectionCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this);return-1!==(t=this.options.get("selectionCssClass")||"").indexOf(":all:")&&(t=t.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(t),n},t})),x.define("select2/selection/eventRelay",["jquery"],(function(e){function t(){}return t.prototype.bind=function(t,n,s){var i=this,o=["open","opening","close","closing","select","selecting","unselect","unselecting","clear","clearing"],r=["opening","closing","selecting","unselecting","clearing"];t.call(this,n,s),n.on("*",(function(t,n){var s;-1!==o.indexOf(t)&&(n=n||{},s=e.Event("select2:"+t,{params:n}),i.$element.trigger(s),-1!==r.indexOf(t)&&(n.prevented=s.isDefaultPrevented()))}))},t})),x.define("select2/translation",["jquery","require"],(function(e,t){function n(e){this.dict=e||{}}return n.prototype.all=function(){return this.dict},n.prototype.get=function(e){return this.dict[e]},n.prototype.extend=function(t){this.dict=e.extend({},t.all(),this.dict)},n._cache={},n.loadPath=function(e){var s;return e in n._cache||(s=t(e),n._cache[e]=s),new n(n._cache[e])},n})),x.define("select2/diacritics",[],(function(){return{"Ⓐ":"A",A:"A",À:"A",Á:"A",Â:"A",Ầ:"A",Ấ:"A",Ẫ:"A",Ẩ:"A",Ã:"A",Ā:"A",Ă:"A",Ằ:"A",Ắ:"A",Ẵ:"A",Ẳ:"A",Ȧ:"A",Ǡ:"A",Ä:"A",Ǟ:"A",Ả:"A",Å:"A",Ǻ:"A",Ǎ:"A",Ȁ:"A",Ȃ:"A",Ạ:"A",Ậ:"A",Ặ:"A",Ḁ:"A",Ą:"A",Ⱥ:"A",Ɐ:"A",Ꜳ:"AA",Æ:"AE",Ǽ:"AE",Ǣ:"AE",Ꜵ:"AO",Ꜷ:"AU",Ꜹ:"AV",Ꜻ:"AV",Ꜽ:"AY","Ⓑ":"B",B:"B",Ḃ:"B",Ḅ:"B",Ḇ:"B",Ƀ:"B",Ƃ:"B",Ɓ:"B","Ⓒ":"C",C:"C",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",Ç:"C",Ḉ:"C",Ƈ:"C",Ȼ:"C",Ꜿ:"C","Ⓓ":"D",D:"D",Ḋ:"D",Ď:"D",Ḍ:"D",Ḑ:"D",Ḓ:"D",Ḏ:"D",Đ:"D",Ƌ:"D",Ɗ:"D",Ɖ:"D",Ꝺ:"D",DZ:"DZ",DŽ:"DZ",Dz:"Dz",Dž:"Dz","Ⓔ":"E",E:"E",È:"E",É:"E",Ê:"E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return e.Extend(t,e.Observable),t.prototype.current=function(e){throw new Error("The `current` method must be defined in child classes.")},t.prototype.query=function(e,t){throw new Error("The `query` method must be defined in child classes.")},t.prototype.bind=function(e,t){},t.prototype.destroy=function(){},t.prototype.generateResultId=function(t,n){return t=t.id+"-result-",t+=e.generateChars(4),null!=n.id?t+="-"+n.id.toString():t+="-"+e.generateChars(4),t},t})),x.define("select2/data/select",["./base","../utils","jquery"],(function(e,t,n){function s(e,t){this.$element=e,this.options=t,s.__super__.constructor.call(this)}return t.Extend(s,e),s.prototype.current=function(e){var t=this;e(Array.prototype.map.call(this.$element[0].querySelectorAll(":checked"),(function(e){return t.item(n(e))})))},s.prototype.select=function(e){var t,n=this;if(e.selected=!0,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!0,void this.$element.trigger("input").trigger("change");this.$element.prop("multiple")?this.current((function(t){var s=[];(e=[e]).push.apply(e,t);for(var i=0;i<e.length;i++){var o=e[i].id;-1===s.indexOf(o)&&s.push(o)}n.$element.val(s),n.$element.trigger("input").trigger("change")})):(t=e.id,this.$element.val(t),this.$element.trigger("input").trigger("change"))},s.prototype.unselect=function(e){var t=this;if(this.$element.prop("multiple")){if(e.selected=!1,null!=e.element&&"option"===e.element.tagName.toLowerCase())return e.element.selected=!1,void this.$element.trigger("input").trigger("change");this.current((function(n){for(var s=[],i=0;i<n.length;i++){var o=n[i].id;o!==e.id&&-1===s.indexOf(o)&&s.push(o)}t.$element.val(s),t.$element.trigger("input").trigger("change")}))}},s.prototype.bind=function(e,t){var n=this;(this.container=e).on("select",(function(e){n.select(e.data)})),e.on("unselect",(function(e){n.unselect(e.data)}))},s.prototype.destroy=function(){this.$element.find("*").each((function(){t.RemoveData(this)}))},s.prototype.query=function(e,t){var s=[],i=this;this.$element.children().each((function(){var t;"option"!==this.tagName.toLowerCase()&&"optgroup"!==this.tagName.toLowerCase()||(t=n(this),t=i.item(t),null!==(t=i.matches(e,t))&&s.push(t))})),t({results:s})},s.prototype.addOptions=function(e){this.$element.append(e)},s.prototype.option=function(e){var s;return e.children?(s=document.createElement("optgroup")).label=e.text:void 0!==(s=document.createElement("option")).textContent?s.textContent=e.text:s.innerText=e.text,void 0!==e.id&&(s.value=e.id),e.disabled&&(s.disabled=!0),e.selected&&(s.selected=!0),e.title&&(s.title=e.title),(e=this._normalizeItem(e)).element=s,t.StoreData(s,"data",e),n(s)},s.prototype.item=function(e){var s={};if(null!=(s=t.GetData(e[0],"data")))return s;var i=e[0];if("option"===i.tagName.toLowerCase())s={id:e.val(),text:e.text(),disabled:e.prop("disabled"),selected:e.prop("selected"),title:e.prop("title")};else if("optgroup"===i.tagName.toLowerCase()){s={text:e.prop("label"),children:[],title:e.prop("title")};for(var o=e.children("option"),r=[],a=0;a<o.length;a++){var l=n(o[a]);l=this.item(l),r.push(l)}s.children=r}return(s=this._normalizeItem(s)).element=e[0],t.StoreData(e[0],"data",s),s},s.prototype._normalizeItem=function(e){return e!==Object(e)&&(e={id:e,text:e}),null!=(e=n.extend({},{text:""},e)).id&&(e.id=e.id.toString()),null!=e.text&&(e.text=e.text.toString()),null==e._resultId&&e.id&&null!=this.container&&(e._resultId=this.generateResultId(this.container,e)),n.extend({},{selected:!1,disabled:!1},e)},s.prototype.matches=function(e,t){return this.options.get("matcher")(e,t)},s})),x.define("select2/data/array",["./select","../utils","jquery"],(function(e,t,n){function s(e,t){this._dataToConvert=t.get("data")||[],s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype.bind=function(e,t){s.__super__.bind.call(this,e,t),this.addOptions(this.convertToOptions(this._dataToConvert))},s.prototype.select=function(e){var t=this.$element.find("option").filter((function(t,n){return n.value==e.id.toString()}));0===t.length&&(t=this.option(e),this.addOptions(t)),s.__super__.select.call(this,e)},s.prototype.convertToOptions=function(e){for(var t=this,s=this.$element.find("option"),i=s.map((function(){return t.item(n(this)).id})).get(),o=[],r=0;r<e.length;r++){var a,l,c=this._normalizeItem(e[r]);0<=i.indexOf(c.id)?(a=s.filter(function(e){return function(){return n(this).val()==e.id}}(c)),l=this.item(a),l=n.extend(!0,{},c,l),l=this.option(l),a.replaceWith(l)):(l=this.option(c),c.children&&(c=this.convertToOptions(c.children),l.append(c)),o.push(l))}return o},s})),x.define("select2/data/ajax",["./array","../utils","jquery"],(function(e,t,n){function s(e,t){this.ajaxOptions=this._applyDefaults(t.get("ajax")),null!=this.ajaxOptions.processResults&&(this.processResults=this.ajaxOptions.processResults),s.__super__.constructor.call(this,e,t)}return t.Extend(s,e),s.prototype._applyDefaults=function(e){var t={data:function(e){return n.extend({},e,{q:e.term})},transport:function(e,t,s){return(e=n.ajax(e)).then(t),e.fail(s),e}};return n.extend({},t,e,!0)},s.prototype.processResults=function(e){return e},s.prototype.query=function(e,t){var s=this;null!=this._request&&("function"==typeof this._request.abort&&this._request.abort(),this._request=null);var i=n.extend({type:"GET"},this.ajaxOptions);function o(){var n=i.transport(i,(function(n){n=s.processResults(n,e),s.options.get("debug")&&window.console&&console.error&&(n&&n.results&&Array.isArray(n.results)||console.error("Select2: The AJAX results did not return an array in the `results` key of the response.")),t(n)}),(function(){"status"in n&&(0===n.status||"0"===n.status)||s.trigger("results:message",{message:"errorLoading"})}));s._request=n}"function"==typeof i.url&&(i.url=i.url.call(this.$element,e)),"function"==typeof i.data&&(i.data=i.data.call(this.$element,e)),this.ajaxOptions.delay&&null!=e.term?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(o,this.ajaxOptions.delay)):o()},s})),x.define("select2/data/tags",["jquery"],(function(e){function t(e,t,n){var s=n.get("tags"),i=n.get("createTag");if(void 0!==i&&(this.createTag=i),void 0!==(i=n.get("insertTag"))&&(this.insertTag=i),e.call(this,t,n),Array.isArray(s))for(var o=0;o<s.length;o++){var r=s[o];r=this._normalizeItem(r),r=this.option(r),this.$element.append(r)}}return t.prototype.query=function(e,t,n){var s=this;this._removeOldTags(),null!=t.term&&null==t.page?e.call(this,t,(function e(i,o){for(var r=i.results,a=0;a<r.length;a++){var l=r[a],c=null!=l.children&&!e({results:l.children},!0);if((l.text||"").toUpperCase()===(t.term||"").toUpperCase()||c)return!o&&(i.data=r,void n(i))}if(o)return!0;var u,d=s.createTag(t);null!=d&&((u=s.option(d)).attr("data-select2-tag","true"),s.addOptions([u]),s.insertTag(r,d)),i.results=r,n(i)})):e.call(this,t,n)},t.prototype.createTag=function(e,t){return null==t.term||""===(t=t.term.trim())?null:{id:t,text:t}},t.prototype.insertTag=function(e,t,n){t.unshift(n)},t.prototype._removeOldTags=function(t){this.$element.find("option[data-select2-tag]").each((function(){this.selected||e(this).remove()}))},t})),x.define("select2/data/tokenizer",["jquery"],(function(e){function t(e,t,n){var s=n.get("tokenizer");void 0!==s&&(this.tokenizer=s),e.call(this,t,n)}return t.prototype.bind=function(e,t,n){e.call(this,t,n),this.$search=t.dropdown.$search||t.selection.$search||n.find(".select2-search__field")},t.prototype.query=function(t,n,s){var i=this;n.term=n.term||"";var o=this.tokenizer(n,this.options,(function(t){var n,s=i._normalizeItem(t);i.$element.find("option").filter((function(){return e(this).val()===s.id})).length||((n=i.option(s)).attr("data-select2-tag",!0),i._removeOldTags(),i.addOptions([n])),n=s,i.trigger("select",{data:n})}));o.term!==n.term&&(this.$search.length&&(this.$search.val(o.term),this.$search.trigger("focus")),n.term=o.term),t.call(this,n,s)},t.prototype.tokenizer=function(t,n,s,i){for(var o=s.get("tokenSeparators")||[],r=n.term,a=0,l=this.createTag||function(e){return{id:e.term,text:e.term}};a<r.length;){var c=r[a];-1!==o.indexOf(c)?(c=r.substr(0,a),null!=(c=l(e.extend({},n,{term:c})))?(i(c),r=r.substr(a+1)||"",a=0):a++):a++}return{term:r}},t})),x.define("select2/data/minimumInputLength",[],(function(){function e(e,t,n){this.minimumInputLength=n.get("minimumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",t.term.length<this.minimumInputLength?this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),x.define("select2/data/maximumInputLength",[],(function(){function e(e,t,n){this.maximumInputLength=n.get("maximumInputLength"),e.call(this,t,n)}return e.prototype.query=function(e,t,n){t.term=t.term||"",0<this.maximumInputLength&&t.term.length>this.maximumInputLength?this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:t.term,params:t}}):e.call(this,t,n)},e})),x.define("select2/data/maximumSelectionLength",[],(function(){function e(e,t,n){this.maximumSelectionLength=n.get("maximumSelectionLength"),e.call(this,t,n)}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",(function(){s._checkIfMaximumSelected()}))},e.prototype.query=function(e,t,n){var s=this;this._checkIfMaximumSelected((function(){e.call(s,t,n)}))},e.prototype._checkIfMaximumSelected=function(e,t){var n=this;this.current((function(e){e=null!=e?e.length:0,0<n.maximumSelectionLength&&e>=n.maximumSelectionLength?n.trigger("results:message",{message:"maximumSelected",args:{maximum:n.maximumSelectionLength}}):t&&t()}))},e})),x.define("select2/dropdown",["jquery","./utils"],(function(e,t){function n(e,t){this.$element=e,this.options=t,n.__super__.constructor.call(this)}return t.Extend(n,t.Observable),n.prototype.render=function(){var t=e('<span class="select2-dropdown"><span class="select2-results"></span></span>');return t.attr("dir",this.options.get("dir")),this.$dropdown=t},n.prototype.bind=function(){},n.prototype.position=function(e,t){},n.prototype.destroy=function(){this.$dropdown.remove()},n})),x.define("select2/dropdown/search",["jquery"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this),s=this.options.get("translations").get("search");return t=e('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocorrect="off" autocapitalize="none" spellcheck="false" role="searchbox" aria-autocomplete="list" /></span>'),this.$searchContainer=t,this.$search=t.find("input"),this.$search.prop("autocomplete",this.options.get("autocomplete")),this.$search.attr("aria-label",s()),n.prepend(t),n},t.prototype.bind=function(t,n,s){var i=this,o=n.id+"-results";t.call(this,n,s),this.$search.on("keydown",(function(e){i.trigger("keypress",e),i._keyUpPrevented=e.isDefaultPrevented()})),this.$search.on("input",(function(t){e(this).off("keyup")})),this.$search.on("keyup input",(function(e){i.handleSearch(e)})),n.on("open",(function(){i.$search.attr("tabindex",0),i.$search.attr("aria-controls",o),i.$search.trigger("focus"),window.setTimeout((function(){i.$search.trigger("focus")}),0)})),n.on("close",(function(){i.$search.attr("tabindex",-1),i.$search.removeAttr("aria-controls"),i.$search.removeAttr("aria-activedescendant"),i.$search.val(""),i.$search.trigger("blur")})),n.on("focus",(function(){n.isOpen()||i.$search.trigger("focus")})),n.on("results:all",(function(e){null!=e.query.term&&""!==e.query.term||(i.showSearch(e)?i.$searchContainer[0].classList.remove("select2-search--hide"):i.$searchContainer[0].classList.add("select2-search--hide"))})),n.on("results:focus",(function(e){e.data._resultId?i.$search.attr("aria-activedescendant",e.data._resultId):i.$search.removeAttr("aria-activedescendant")}))},t.prototype.handleSearch=function(e){var t;this._keyUpPrevented||(t=this.$search.val(),this.trigger("query",{term:t})),this._keyUpPrevented=!1},t.prototype.showSearch=function(e,t){return!0},t})),x.define("select2/dropdown/hidePlaceholder",[],(function(){function e(e,t,n,s){this.placeholder=this.normalizePlaceholder(n.get("placeholder")),e.call(this,t,n,s)}return e.prototype.append=function(e,t){t.results=this.removePlaceholder(t.results),e.call(this,t)},e.prototype.normalizePlaceholder=function(e,t){return"string"==typeof t?{id:"",text:t}:t},e.prototype.removePlaceholder=function(e,t){for(var n=t.slice(0),s=t.length-1;0<=s;s--){var i=t[s];this.placeholder.id===i.id&&n.splice(s,1)}return n},e})),x.define("select2/dropdown/infiniteScroll",["jquery"],(function(e){function t(e,t,n,s){this.lastParams={},e.call(this,t,n,s),this.$loadingMore=this.createLoadingMore(),this.loading=!1}return t.prototype.append=function(e,t){this.$loadingMore.remove(),this.loading=!1,e.call(this,t),this.showLoadingMore(t)&&(this.$results.append(this.$loadingMore),this.loadMoreIfNeeded())},t.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("query",(function(e){s.lastParams=e,s.loading=!0})),t.on("query:append",(function(e){s.lastParams=e,s.loading=!0})),this.$results.on("scroll",this.loadMoreIfNeeded.bind(this))},t.prototype.loadMoreIfNeeded=function(){var t=e.contains(document.documentElement,this.$loadingMore[0]);!this.loading&&t&&(t=this.$results.offset().top+this.$results.outerHeight(!1),this.$loadingMore.offset().top+this.$loadingMore.outerHeight(!1)<=t+50&&this.loadMore())},t.prototype.loadMore=function(){this.loading=!0;var t=e.extend({},{page:1},this.lastParams);t.page++,this.trigger("query:append",t)},t.prototype.showLoadingMore=function(e,t){return t.pagination&&t.pagination.more},t.prototype.createLoadingMore=function(){var t=e('<li class="select2-results__option select2-results__option--load-more"role="option" aria-disabled="true"></li>'),n=this.options.get("translations").get("loadingMore");return t.html(n(this.lastParams)),t},t})),x.define("select2/dropdown/attachBody",["jquery","../utils"],(function(e,t){function n(t,n,s){this.$dropdownParent=e(s.get("dropdownParent")||document.body),t.call(this,n,s)}return n.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("open",(function(){s._showDropdown(),s._attachPositioningHandler(t),s._bindContainerResultHandlers(t)})),t.on("close",(function(){s._hideDropdown(),s._detachPositioningHandler(t)})),this.$dropdownContainer.on("mousedown",(function(e){e.stopPropagation()}))},n.prototype.destroy=function(e){e.call(this),this.$dropdownContainer.remove()},n.prototype.position=function(e,t,n){t.attr("class",n.attr("class")),t[0].classList.remove("select2"),t[0].classList.add("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=n},n.prototype.render=function(t){var n=e("<span></span>");return t=t.call(this),n.append(t),this.$dropdownContainer=n},n.prototype._hideDropdown=function(e){this.$dropdownContainer.detach()},n.prototype._bindContainerResultHandlers=function(e,t){var n;this._containerResultsHandlersBound||(n=this,t.on("results:all",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:append",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("results:message",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("select",(function(){n._positionDropdown(),n._resizeDropdown()})),t.on("unselect",(function(){n._positionDropdown(),n._resizeDropdown()})),this._containerResultsHandlersBound=!0)},n.prototype._attachPositioningHandler=function(n,s){var i=this,o="scroll.select2."+s.id,r="resize.select2."+s.id,a="orientationchange.select2."+s.id;(s=this.$container.parents().filter(t.hasScroll)).each((function(){t.StoreData(this,"select2-scroll-position",{x:e(this).scrollLeft(),y:e(this).scrollTop()})})),s.on(o,(function(n){var s=t.GetData(this,"select2-scroll-position");e(this).scrollTop(s.y)})),e(window).on(o+" "+r+" "+a,(function(e){i._positionDropdown(),i._resizeDropdown()}))},n.prototype._detachPositioningHandler=function(n,s){var i="scroll.select2."+s.id,o="resize.select2."+s.id;s="orientationchange.select2."+s.id,this.$container.parents().filter(t.hasScroll).off(i),e(window).off(i+" "+o+" "+s)},n.prototype._positionDropdown=function(){var t=e(window),n=this.$dropdown[0].classList.contains("select2-dropdown--above"),s=this.$dropdown[0].classList.contains("select2-dropdown--below"),i=null,o=this.$container.offset();o.bottom=o.top+this.$container.outerHeight(!1);var r={height:this.$container.outerHeight(!1)};r.top=o.top,r.bottom=o.top+r.height;var a=this.$dropdown.outerHeight(!1),l=t.scrollTop(),c=t.scrollTop()+t.height(),u=l<o.top-a;t=c>o.bottom+a,l={left:o.left,top:r.bottom},"static"===(c=this.$dropdownParent).css("position")&&(c=c.offsetParent()),o={top:0,left:0},(e.contains(document.body,c[0])||c[0].isConnected)&&(o=c.offset()),l.top-=o.top,l.left-=o.left,n||s||(i="below"),t||!u||n?!u&&t&&n&&(i="below"):i="above",("above"==i||n&&"below"!==i)&&(l.top=r.top-o.top-a),null!=i&&(this.$dropdown[0].classList.remove("select2-dropdown--below"),this.$dropdown[0].classList.remove("select2-dropdown--above"),this.$dropdown[0].classList.add("select2-dropdown--"+i),this.$container[0].classList.remove("select2-container--below"),this.$container[0].classList.remove("select2-container--above"),this.$container[0].classList.add("select2-container--"+i)),this.$dropdownContainer.css(l)},n.prototype._resizeDropdown=function(){var e={width:this.$container.outerWidth(!1)+"px"};this.options.get("dropdownAutoWidth")&&(e.minWidth=e.width,e.position="relative",e.width="auto"),this.$dropdown.css(e)},n.prototype._showDropdown=function(e){this.$dropdownContainer.appendTo(this.$dropdownParent),this._positionDropdown(),this._resizeDropdown()},n})),x.define("select2/dropdown/minimumResultsForSearch",[],(function(){function e(e,t,n,s){this.minimumResultsForSearch=n.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),e.call(this,t,n,s)}return e.prototype.showSearch=function(e,t){return!(function e(t){for(var n=0,s=0;s<t.length;s++){var i=t[s];i.children?n+=e(i.children):n++}return n}(t.data.results)<this.minimumResultsForSearch)&&e.call(this,t)},e})),x.define("select2/dropdown/selectOnClose",["../utils"],(function(e){function t(){}return t.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("close",(function(e){s._handleSelectOnClose(e)}))},t.prototype._handleSelectOnClose=function(t,n){if(n&&null!=n.originalSelect2Event){var s=n.originalSelect2Event;if("select"===s._type||"unselect"===s._type)return}(s=this.getHighlightedResults()).length<1||null!=(s=e.GetData(s[0],"data")).element&&s.element.selected||null==s.element&&s.selected||this.trigger("select",{data:s})},t})),x.define("select2/dropdown/closeOnSelect",[],(function(){function e(){}return e.prototype.bind=function(e,t,n){var s=this;e.call(this,t,n),t.on("select",(function(e){s._selectTriggered(e)})),t.on("unselect",(function(e){s._selectTriggered(e)}))},e.prototype._selectTriggered=function(e,t){var n=t.originalEvent;n&&(n.ctrlKey||n.metaKey)||this.trigger("close",{originalEvent:n,originalSelect2Event:t})},e})),x.define("select2/dropdown/dropdownCss",["../utils"],(function(e){function t(){}return t.prototype.render=function(t){var n=t.call(this);return-1!==(t=this.options.get("dropdownCssClass")||"").indexOf(":all:")&&(t=t.replace(":all:",""),e.copyNonInternalCssClasses(n[0],this.$element[0])),n.addClass(t),n},t})),x.define("select2/dropdown/tagsSearchHighlight",["../utils"],(function(e){function t(){}return t.prototype.highlightFirstItem=function(t){if(0<(n=this.$results.find(".select2-results__option--selectable:not(.select2-results__option--selected)")).length){var n,s=n.first();if((n=e.GetData(s[0],"data").element)&&n.getAttribute&&"true"===n.getAttribute("data-select2-tag"))return void s.trigger("mouseenter")}t.call(this)},t})),x.define("select2/i18n/en",[],(function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(e){var t=e.input.length-e.maximum;return e="Please delete "+t+" character",1!=t&&(e+="s"),e},inputTooShort:function(e){return"Please enter "+(e.minimum-e.input.length)+" or more characters"},loadingMore:function(){return"Loading more results…"},maximumSelected:function(e){var t="You can only select "+e.maximum+" item";return 1!=e.maximum&&(t+="s"),t},noResults:function(){return"No results found"},searching:function(){return"Searching…"},removeAllItems:function(){return"Remove all items"},removeItem:function(){return"Remove item"},search:function(){return"Search"}}})),x.define("select2/defaults",["jquery","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/selectionCss","./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","./dropdown/dropdownCss","./dropdown/tagsSearchHighlight","./i18n/en"],(function(e,t,n,s,i,o,r,a,l,c,u,d,p,h,f,g,m,y,v,_,b,$,w,x,A,D,S,C,E,O,L){function T(){this.reset()}return T.prototype.apply=function(u){var d;null==(u=e.extend(!0,{},this.defaults,u)).dataAdapter&&(null!=u.ajax?u.dataAdapter=f:null!=u.data?u.dataAdapter=h:u.dataAdapter=p,0<u.minimumInputLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,y)),0<u.maximumInputLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,v)),0<u.maximumSelectionLength&&(u.dataAdapter=c.Decorate(u.dataAdapter,_)),u.tags&&(u.dataAdapter=c.Decorate(u.dataAdapter,g)),null==u.tokenSeparators&&null==u.tokenizer||(u.dataAdapter=c.Decorate(u.dataAdapter,m))),null==u.resultsAdapter&&(u.resultsAdapter=t,null!=u.ajax&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,x)),null!=u.placeholder&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,w)),u.selectOnClose&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,S)),u.tags&&(u.resultsAdapter=c.Decorate(u.resultsAdapter,O))),null==u.dropdownAdapter&&(u.multiple?u.dropdownAdapter=b:(d=c.Decorate(b,$),u.dropdownAdapter=d),0!==u.minimumResultsForSearch&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,D)),u.closeOnSelect&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,C)),null!=u.dropdownCssClass&&(u.dropdownAdapter=c.Decorate(u.dropdownAdapter,E)),u.dropdownAdapter=c.Decorate(u.dropdownAdapter,A)),null==u.selectionAdapter&&(u.multiple?u.selectionAdapter=s:u.selectionAdapter=n,null!=u.placeholder&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,i)),u.allowClear&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,o)),u.multiple&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,r)),null!=u.selectionCssClass&&(u.selectionAdapter=c.Decorate(u.selectionAdapter,a)),u.selectionAdapter=c.Decorate(u.selectionAdapter,l)),u.language=this._resolveLanguage(u.language),u.language.push("en");for(var L=[],T=0;T<u.language.length;T++){var q=u.language[T];-1===L.indexOf(q)&&L.push(q)}return u.language=L,u.translations=this._processTranslations(u.language,u.debug),u},T.prototype.reset=function(){function t(e){return e.replace(/[^\u0000-\u007E]/g,(function(e){return d[e]||e}))}this.defaults={amdLanguageBase:"./i18n/",autocomplete:"off",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:c.escapeMarkup,language:{},matcher:function n(s,i){if(null==s.term||""===s.term.trim())return i;if(i.children&&0<i.children.length){for(var o=e.extend(!0,{},i),r=i.children.length-1;0<=r;r--)null==n(s,i.children[r])&&o.children.splice(r,1);return 0<o.children.length?o:n(s,o)}var a=t(i.text).toUpperCase(),l=t(s.term).toUpperCase();return-1<a.indexOf(l)?i:null},minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,scrollAfterSelect:!1,sorter:function(e){return e},templateResult:function(e){return e.text},templateSelection:function(e){return e.text},theme:"default",width:"resolve"}},T.prototype.applyFromElement=function(e,t){var n=e.language,s=this.defaults.language,i=t.prop("lang");return t=t.closest("[lang]").prop("lang"),t=Array.prototype.concat.call(this._resolveLanguage(i),this._resolveLanguage(n),this._resolveLanguage(s),this._resolveLanguage(t)),e.language=t,e},T.prototype._resolveLanguage=function(t){if(!t)return[];if(e.isEmptyObject(t))return[];if(e.isPlainObject(t))return[t];for(var n,s=Array.isArray(t)?t:[t],i=[],o=0;o<s.length;o++)i.push(s[o]),"string"==typeof s[o]&&0<s[o].indexOf("-")&&(n=s[o].split("-")[0],i.push(n));return i},T.prototype._processTranslations=function(t,n){for(var s=new u,i=0;i<t.length;i++){var o=new u,r=t[i];if("string"==typeof r)try{o=u.loadPath(r)}catch(t){try{r=this.defaults.amdLanguageBase+r,o=u.loadPath(r)}catch(t){n&&window.console&&console.warn&&console.warn('Select2: The language file for "'+r+'" could not be automatically loaded. A fallback will be used instead.')}}else o=e.isPlainObject(r)?new u(r):r;s.extend(o)}return s},T.prototype.set=function(t,n){var s={};s[e.camelCase(t)]=n,s=c._convertData(s),e.extend(!0,this.defaults,s)},new T})),x.define("select2/options",["jquery","./defaults","./utils"],(function(e,t,n){function s(e,n){this.options=e,null!=n&&this.fromElement(n),null!=n&&(this.options=t.applyFromElement(this.options,n)),this.options=t.apply(this.options)}return s.prototype.fromElement=function(t){var s=["select2"];null==this.options.multiple&&(this.options.multiple=t.prop("multiple")),null==this.options.disabled&&(this.options.disabled=t.prop("disabled")),null==this.options.autocomplete&&t.prop("autocomplete")&&(this.options.autocomplete=t.prop("autocomplete")),null==this.options.dir&&(t.prop("dir")?this.options.dir=t.prop("dir"):t.closest("[dir]").prop("dir")?this.options.dir=t.closest("[dir]").prop("dir"):this.options.dir="ltr"),t.prop("disabled",this.options.disabled),t.prop("multiple",this.options.multiple),n.GetData(t[0],"select2Tags")&&(this.options.debug&&window.console&&console.warn&&console.warn('Select2: The `data-select2-tags` attribute has been changed to use the `data-data` and `data-tags="true"` attributes and will be removed in future versions of Select2.'),n.StoreData(t[0],"data",n.GetData(t[0],"select2Tags")),n.StoreData(t[0],"tags",!0)),n.GetData(t[0],"ajaxUrl")&&(this.options.debug&&window.console&&console.warn&&console.warn("Select2: The `data-ajax-url` attribute has been changed to `data-ajax--url` and support for the old attribute will be removed in future versions of Select2."),t.attr("ajax--url",n.GetData(t[0],"ajaxUrl")),n.StoreData(t[0],"ajax-Url",n.GetData(t[0],"ajaxUrl")));var i={};function o(e,t){return t.toUpperCase()}for(var r=0;r<t[0].attributes.length;r++){var a=t[0].attributes[r].name,l="data-";a.substr(0,l.length)==l&&(a=a.substring(l.length),l=n.GetData(t[0],a),i[a.replace(/-([a-z])/g,o)]=l)}e.fn.jquery&&"1."==e.fn.jquery.substr(0,2)&&t[0].dataset&&(i=e.extend(!0,{},t[0].dataset,i));var c,u=e.extend(!0,{},n.GetData(t[0]),i);for(c in u=n._convertData(u))-1<s.indexOf(c)||(e.isPlainObject(this.options[c])?e.extend(this.options[c],u[c]):this.options[c]=u[c]);return this},s.prototype.get=function(e){return this.options[e]},s.prototype.set=function(e,t){this.options[e]=t},s})),x.define("select2/core",["jquery","./options","./utils","./keys"],(function(e,t,n,s){var i=function(e,s){null!=n.GetData(e[0],"select2")&&n.GetData(e[0],"select2").destroy(),this.$element=e,this.id=this._generateId(e),s=s||{},this.options=new t(s,e),i.__super__.constructor.call(this);var o=e.attr("tabindex")||0;n.StoreData(e[0],"old-tabindex",o),e.attr("tabindex","-1"),s=this.options.get("dataAdapter"),this.dataAdapter=new s(e,this.options),o=this.render(),this._placeContainer(o),s=this.options.get("selectionAdapter"),this.selection=new s(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,o),s=this.options.get("dropdownAdapter"),this.dropdown=new s(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,o),o=this.options.get("resultsAdapter"),this.results=new o(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var r=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current((function(e){r.trigger("selection:update",{data:e})})),e[0].classList.add("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),n.StoreData(e[0],"select2",this),e.data("select2",this)};return n.Extend(i,n.Observable),i.prototype._generateId=function(e){return"select2-"+(null!=e.attr("id")?e.attr("id"):null!=e.attr("name")?e.attr("name")+"-"+n.generateChars(2):n.generateChars(4)).replace(/(:|\.|\[|\]|,)/g,"")},i.prototype._placeContainer=function(e){e.insertAfter(this.$element);var t=this._resolveWidth(this.$element,this.options.get("width"));null!=t&&e.css("width",t)},i.prototype._resolveWidth=function(e,t){var n=/^width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i;if("resolve"==t){var s=this._resolveWidth(e,"style");return null!=s?s:this._resolveWidth(e,"element")}if("element"==t)return(s=e.outerWidth(!1))<=0?"auto":s+"px";if("style"!=t)return"computedstyle"!=t?t:window.getComputedStyle(e[0]).width;if("string"!=typeof(e=e.attr("style")))return null;for(var i=e.split(";"),o=0,r=i.length;o<r;o+=1){var a=i[o].replace(/\s/g,"").match(n);if(null!==a&&1<=a.length)return a[1]}return null},i.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)},i.prototype._registerDomEvents=function(){var e=this;this.$element.on("change.select2",(function(){e.dataAdapter.current((function(t){e.trigger("selection:update",{data:t})}))})),this.$element.on("focus.select2",(function(t){e.trigger("focus",t)})),this._syncA=n.bind(this._syncAttributes,this),this._syncS=n.bind(this._syncSubtree,this),this._observer=new window.MutationObserver((function(t){e._syncA(),e._syncS(t)})),this._observer.observe(this.$element[0],{attributes:!0,childList:!0,subtree:!1})},i.prototype._registerDataEvents=function(){var e=this;this.dataAdapter.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerSelectionEvents=function(){var e=this,t=["toggle","focus"];this.selection.on("toggle",(function(){e.toggleDropdown()})),this.selection.on("focus",(function(t){e.focus(t)})),this.selection.on("*",(function(n,s){-1===t.indexOf(n)&&e.trigger(n,s)}))},i.prototype._registerDropdownEvents=function(){var e=this;this.dropdown.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerResultsEvents=function(){var e=this;this.results.on("*",(function(t,n){e.trigger(t,n)}))},i.prototype._registerEvents=function(){var e=this;this.on("open",(function(){e.$container[0].classList.add("select2-container--open")})),this.on("close",(function(){e.$container[0].classList.remove("select2-container--open")})),this.on("enable",(function(){e.$container[0].classList.remove("select2-container--disabled")})),this.on("disable",(function(){e.$container[0].classList.add("select2-container--disabled")})),this.on("blur",(function(){e.$container[0].classList.remove("select2-container--focus")})),this.on("query",(function(t){e.isOpen()||e.trigger("open",{}),this.dataAdapter.query(t,(function(n){e.trigger("results:all",{data:n,query:t})}))})),this.on("query:append",(function(t){this.dataAdapter.query(t,(function(n){e.trigger("results:append",{data:n,query:t})}))})),this.on("keypress",(function(t){var n=t.which;e.isOpen()?n===s.ESC||n===s.UP&&t.altKey?(e.close(t),t.preventDefault()):n===s.ENTER||n===s.TAB?(e.trigger("results:select",{}),t.preventDefault()):n===s.SPACE&&t.ctrlKey?(e.trigger("results:toggle",{}),t.preventDefault()):n===s.UP?(e.trigger("results:previous",{}),t.preventDefault()):n===s.DOWN&&(e.trigger("results:next",{}),t.preventDefault()):(n===s.ENTER||n===s.SPACE||n===s.DOWN&&t.altKey)&&(e.open(),t.preventDefault())}))},i.prototype._syncAttributes=function(){this.options.set("disabled",this.$element.prop("disabled")),this.isDisabled()?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},i.prototype._isChangeMutation=function(e){var t=this;if(e.addedNodes&&0<e.addedNodes.length){for(var n=0;n<e.addedNodes.length;n++)if(e.addedNodes[n].selected)return!0}else{if(e.removedNodes&&0<e.removedNodes.length)return!0;if(Array.isArray(e))return e.some((function(e){return t._isChangeMutation(e)}))}return!1},i.prototype._syncSubtree=function(e){e=this._isChangeMutation(e);var t=this;e&&this.dataAdapter.current((function(e){t.trigger("selection:update",{data:e})}))},i.prototype.trigger=function(e,t){var n=i.__super__.trigger;if(void 0===t&&(t={}),e in(o={open:"opening",close:"closing",select:"selecting",unselect:"unselecting",clear:"clearing"})){var s=o[e],o={prevented:!1,name:e,args:t};if(n.call(this,s,o),o.prevented)return void(t.prevented=!0)}n.call(this,e,t)},i.prototype.toggleDropdown=function(){this.isDisabled()||(this.isOpen()?this.close():this.open())},i.prototype.open=function(){this.isOpen()||this.isDisabled()||this.trigger("query",{})},i.prototype.close=function(e){this.isOpen()&&this.trigger("close",{originalEvent:e})},i.prototype.isEnabled=function(){return!this.isDisabled()},i.prototype.isDisabled=function(){return this.options.get("disabled")},i.prototype.isOpen=function(){return this.$container[0].classList.contains("select2-container--open")},i.prototype.hasFocus=function(){return this.$container[0].classList.contains("select2-container--focus")},i.prototype.focus=function(e){this.hasFocus()||(this.$container[0].classList.add("select2-container--focus"),this.trigger("focus",{}))},i.prototype.enable=function(e){this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("enable")` method has been deprecated and will be removed in later Select2 versions. Use $element.prop("disabled") instead.'),e=!(e=null==e||0===e.length?[!0]:e)[0],this.$element.prop("disabled",e)},i.prototype.data=function(){this.options.get("debug")&&0<arguments.length&&window.console&&console.warn&&console.warn('Select2: Data can no longer be set using `select2("data")`. You should consider setting the value instead using `$element.val()`.');var e=[];return this.dataAdapter.current((function(t){e=t})),e},i.prototype.val=function(e){if(this.options.get("debug")&&window.console&&console.warn&&console.warn('Select2: The `select2("val")` method has been deprecated and will be removed in later Select2 versions. Use $element.val() instead.'),null==e||0===e.length)return this.$element.val();e=e[0],Array.isArray(e)&&(e=e.map((function(e){return e.toString()}))),this.$element.val(e).trigger("input").trigger("change")},i.prototype.destroy=function(){n.RemoveData(this.$container[0]),this.$container.remove(),this._observer.disconnect(),this._observer=null,this._syncA=null,this._syncS=null,this.$element.off(".select2"),this.$element.attr("tabindex",n.GetData(this.$element[0],"old-tabindex")),this.$element[0].classList.remove("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),n.RemoveData(this.$element[0]),this.$element.removeData("select2"),this.dataAdapter.destroy(),this.selection.destroy(),this.dropdown.destroy(),this.results.destroy(),this.dataAdapter=null,this.selection=null,this.dropdown=null,this.results=null},i.prototype.render=function(){var t=e('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return t.attr("dir",this.options.get("dir")),this.$container=t,this.$container[0].classList.add("select2-container--"+this.options.get("theme")),n.StoreData(t[0],"element",this.$element),t},i})),x.define("jquery-mousewheel",["jquery"],(function(e){return e})),x.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults","./select2/utils"],(function(e,t,n,s,i){var o;return null==e.fn.select2&&(o=["open","close","destroy"],e.fn.select2=function(t){if("object"==typeof(t=t||{}))return this.each((function(){var s=e.extend(!0,{},t);new n(e(this),s)})),this;if("string"!=typeof t)throw new Error("Invalid arguments for Select2: "+t);var s,r=Array.prototype.slice.call(arguments,1);return this.each((function(){var e=i.GetData(this,"select2");null==e&&window.console&&console.error&&console.error("The select2('"+t+"') method was called on an element that is not using Select2."),s=e[t].apply(e,r)})),-1<o.indexOf(t)?this:s}),null==e.fn.select2.defaults&&(e.fn.select2.defaults=s),n})),{define:x.define,require:x.require});function m(e,t){return p.call(e,t)}function y(e,t){var n,s,i,o,r,a,l,c,d,p,h=t&&t.split("/"),g=u.map,m=g&&g["*"]||{};if(e){for(t=(e=e.split("/")).length-1,u.nodeIdCompat&&f.test(e[t])&&(e[t]=e[t].replace(f,"")),"."===e[0].charAt(0)&&h&&(e=h.slice(0,h.length-1).concat(e)),c=0;c<e.length;c++)"."===(p=e[c])?(e.splice(c,1),--c):".."===p&&(0===c||1===c&&".."===e[2]||".."===e[c-1]||0<c&&(e.splice(c-1,2),c-=2));e=e.join("/")}if((h||m)&&g){for(c=(n=e.split("/")).length;0<c;--c){if(s=n.slice(0,c).join("/"),h)for(d=h.length;0<d;--d)if(i=(i=g[h.slice(0,d).join("/")])&&i[s]){o=i,r=c;break}if(o)break;!a&&m&&m[s]&&(a=m[s],l=c)}!o&&a&&(o=a,r=l),o&&(n.splice(0,r,o),e=n.join("/"))}return e}function v(e,t){return function(){var n=h.call(arguments,0);return"string"!=typeof n[0]&&1===n.length&&n.push(null),o.apply(s,n.concat([e,t]))}}function _(e){var t;if(m(c,e)&&(t=c[e],delete c[e],d[e]=!0,i.apply(s,t)),!m(l,e)&&!m(d,e))throw new Error("No "+e);return l[e]}function b(e){var t,n=e?e.indexOf("!"):-1;return-1<n&&(t=e.substring(0,n),e=e.substring(n+1,e.length)),[t,e]}function w(e){return e?b(e):[]}var x=g.require("jquery.select2");return e.fn.select2.amd=g,x})?s.apply(t,i):s)||(e.exports=o)}}]);
|
||
//# sourceMappingURL=28.bb005543f41af5fb.js.map
|