PageSourceSearch

https://medimfarm.ro/js/login.register.bundle.min.js?v=iY8X2eD9MDSQ_O692E8JagOl51ZnA-Hg9-tqNWD-mZM

js medimfarm.ro collected 2026-10-07 07:50:56 UTC 92,984 bytes, 10 lines download raw bytes

1/*!
2 * Select2 4.0.5
3 * https://select2.github.io
4 *
5 * Released under the MIT license
6 * https://github.com/select2/select2/blob/master/LICENSE.md
7 */(function(d){typeof define=="function"&&define.amd?define(["jquery"],d):typeof module=="object"&&module.exports?module.exports=function(c,f){return f===void 0&&(typeof window<"u"?f=require("jquery"):f=require("jquery")(c)),d(f),f}:d(jQuery)})(function(d){var c=function(){if(d&&d.fn&&d.fn.select2&&d.fn.select2.amd)var v=d.fn.select2.amd;var v;return function(){if(!v||!v.requirejs){v?l=v:v={};/**
8 * @license almond 0.3.3 Copyright jQuery Foundation and other contributors.
9 * Released under MIT license, http://github.com/requirejs/almond/LICENSE
10 */var o,l,s;(function(r){var t,e,n,i,a={},u={},p={},m={},y=Object.prototype.hasOwnProperty,w=[].slice,_=/\.js$/;function F(g,E){return y.call(g,E)}function x(g,E){var C,T,b,D,M,h,S,O,A,B,R,j,k=E&&E.split("/"),P=p.map,L=P&&P["*"]||{};if(g){for(g=g.split("/"),M=g.length-1,p.nodeIdCompat&&_.test(g[M])&&(g[M]=g[M].replace(_,"")),g[0].charAt(0)==="."&&k&&(j=k.slice(0,k.length-1),g=j.concat(g)),A=0;A<g.length;A++)if(R=g[A],R===".")g.splice(A,1),A-=1;else if(R===".."){if(A===0||A===1&&g[2]===".."||g[A-1]==="..")continue;A>0&&(g.splice(A-1,2),A-=2)}g=g.join("/")}if((k||L)&&P){for(C=g.split("/"),A=C.length;A>0;A-=1){if(T=C.slice(0,A).join("/"),k){for(B=k.length;B>0;B-=1)if(b=P[k.slice(0,B).join("/")],b&&(b=b[T],b)){D=b,h=A;break}}if(D)break;!S&&L&&L[T]&&(S=L[T],O=A)}!D&&S&&(D=S,h=O),D&&(C.splice(0,h,D),g=C.join("/"))}return g}function I(g,E){return function(){var C=w.call(arguments,0);return typeof C[0]!="string"&&C.length===1&&C.push(null),e.apply(r,C.concat([g,E]))}}function q(g){return function(E){return x(E,g)}}function U(g){return function(E){a[g]=E}}function N(g){if(F(u,g)){var E=u[g];delete u[g],m[g]=!0,t.apply(r,E)}if(!F(a,g)&&!F(m,g))throw new Error("No "+g);return a[g]}function V(g){var E,C=g?g.indexOf("!"):-1;return C>-1&&(E=g.substring(0,C),g=g.substring(C+1,g.length)),[E,g]}function H(g){return g?V(g):[]}n=function(g,E){var C,T=V(g),b=T[0],D=E[1];return g=T[1],b&&(b=x(b,D),C=N(b)),b?C&&C.normalize?g=C.normalize(g,q(D)):g=x(g,D):(g=x(g,D),T=V(g),b=T[0],g=T[1],b&&(C=N(b))),{f:b?b+"!"+g:g,n:g,pr:b,p:C}};function G(g){return function(){return p&&p.config&&p.config[g]||{}}}i={require:function(g){return I(g)},exports:function(g){var E=a[g];return typeof E<"u"?E:a[g]={}},module:function(g){return{id:g,uri:"",exports:a[g],config:G(g)}}},t=function(g,E,C,T){var b,D,M,h,S,O,A=[],B=typeof C,R;if(T=T||g,O=H(T),B==="undefined"||B==="function"){for(E=!E.length&&C.length?["require","exports","module"]:E,S=0;S<E.length;S+=1)if(h=n(E[S],O),D=h.f,D==="require")A[S]=i.require(g);else if(D==="exports")A[S]=i.exports(g),R=!0;else if(D==="module")b=A[S]=i.module(g);else if(F(a,D)||F(u,D)||F(m,D))A[S]=N(D);else if(h.p)h.p.load(h.n,I(T,!0),U(D),{}),A[S]=a[D];else throw new Error(g+" missing "+D);M=C?C.apply(a[g],A):void 0,g&&(b&&b.exports!==r&&b.exports!==a[g]?a[g]=b.exports:(M!==r||!R)&&(a[g]=M))}else g&&(a[g]=C)},o=l=e=function(g,E,C,T,b){if(typeof g=="string")return i[g]?i[g](E):N(n(g,H(E)).f);if(!g.splice){if(p=g,p.deps&&e(p.deps,p.callback),!E)return;E.splice?(g=E,E=C,C=null):g=r}return E=E||function(){},typeof C=="function"&&(C=T,T=b),T?t(r,g,E,C):setTimeout(function(){t(r,g,E,C)},4),e},e.config=function(g){return e(g)},o._defined=a,s=function(g,E,C){if(typeof g!="string")throw new Error("See almond README: incorrect module build, no module name");E.splice||(C=E,E=[]),!F(a,g)&&!F(u,g)&&(u[g]=[g,E,C])},s.amd={jQuery:!0}})(),v.requirejs=o,v.require=l,v.define=s}}(),v.define("almond",function(){}),v.define("jquery",[],function(){var o=d||$;return o==null&&console&&console.error&&console.error("Select2: An instance of jQuery or a jQuery-compatible library was not found. Make sure that you are including jQuery before Select2 on your web page."),o}),v.define("select2/utils",["jquery"],function(o){var l={};l.Extend=function(t,e){var n={}.hasOwnProperty;function i(){this.constructor=t}for(var a in e)n.call(e,a)&&(t[a]=e[a]);return i.prototype=e.prototype,t.prototype=new i,t.__super__=e.prototype,t};function s(t){var e=t.prototype,n=[];for(var i in e){var a=e[i];typeof a=="function"&&i!=="constructor"&&n.push(i)}return n}l.Decorate=function(t,e){var n=s(e),i=s(t);function a(){var F=Array.prototype.unshift,x=e.prototype.constructor.length,I=t.prototype.constructor;x>0&&(F.call(arguments,t.prototype.constructor),I=e.prototype.constructor),I.apply(this,arguments)}e.displayName=t.displayName;function u(){this.constructor=a}a.prototype=new u;for(var p=0;p<i.length;p++){var m=i[p];a.prototype[m]=t.prototype[m]}for(var y=function(F){var x=function(){};F in a.prototype&&(x=a.prototype[F]);var I=e.prototype[F];return function(){var q=Array.prototype.unshift;return q.call(arguments,x),I.apply(this,arguments)}},w=0;w<n.length;w++){var _=n[w];a.prototype[_]=y(_)}return a};var r=function(){this.listeners={}};return r.prototype.on=function(t,e){this.listeners=this.listeners||{},t in this.listeners?this.listeners[t].push(e):this.listeners[t]=[e]},r.prototype.trigger=function(t){var e=Array.prototype.slice,n=e.call(arguments,1
10);this.listeners=this.listeners||{},n==null&&(n=[]),n.length===0&&n.push({}),n[0]._type=t,t in this.listeners&&this.invoke(this.listeners[t],e.call(arguments,1)),"*"in this.listeners&&this.invoke(this.listeners["*"],arguments)},r.prototype.invoke=function(t,e){for(var n=0,i=t.length;n<i;n++)t[n].apply(this,e)},l.Observable=r,l.generateChars=function(t){for(var e="",n=0;n<t;n++){var i=Math.floor(Math.random()*36);e+=i.toString(36)}return e},l.bind=function(t,e){return function(){t.apply(e,arguments)}},l._convertData=function(t){for(var e in t){var n=e.split("-"),i=t;if(n.length!==1){for(var a=0;a<n.length;a++){var u=n[a];u=u.substring(0,1).toLowerCase()+u.substring(1),u in i||(i[u]={}),a==n.length-1&&(i[u]=t[e]),i=i[u]}delete t[e]}}return t},l.hasScroll=function(t,e){var n=o(e),i=e.style.overflowX,a=e.style.overflowY;return i===a&&(a==="hidden"||a==="visible")?!1:i==="scroll"||a==="scroll"?!0:n.innerHeight()<e.scrollHeight||n.innerWidth()<e.scrollWidth},l.escapeMarkup=function(t){var e={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return typeof t!="string"?t:String(t).replace(/[&<>"'\/\\]/g,function(n){return e[n]})},l.appendMany=function(t,e){if(o.fn.jquery.substr(0,3)==="1.7"){var n=o();o.map(e,function(i){n=n.add(i)}),e=n}t.append(e)},l}),v.define("select2/results",["jquery","./utils"],function(o,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=o('<ul class="select2-results__options" role="tree"></ul>');return this.options.get("multiple")&&r.attr("aria-multiselectable","true"),this.$results=r,r},s.prototype.clear=function(){this.$results.empty()},s.prototype.displayMessage=function(r){var t=this.options.get("escapeMarkup");this.clear(),this.hideLoading();var e=o('<li role="treeitem" aria-live="assertive" class="select2-results__option"></li>'),n=this.options.get("translations").get(r.message);e.append(t(n(r.args))),e[0].className+=" select2-results__message",this.$results.append(e)},s.prototype.hideMessages=function(){this.$results.find(".select2-results__message").remove()},s.prototype.append=function(r){this.hideLoading();var t=[];if(r.results==null||r.results.length===0){this.$results.children().length===0&&this.trigger("results:message",{message:"noResults"});return}r.results=this.sort(r.results);for(var e=0;e<r.results.length;e++){var n=r.results[e],i=this.option(n);t.push(i)}this.$results.append(t)},s.prototype.position=function(r,t){var e=t.find(".select2-results");e.append(r)},s.prototype.sort=function(r){var t=this.options.get("sorter");return t(r)},s.prototype.highlightFirstItem=function(){var r=this.$results.find(".select2-results__option[aria-selected]"),t=r.filter("[aria-selected=true]");t.length>0?t.first().trigger("mouseenter"):r.first().trigger("mouseenter"),this.ensureHighlightVisible()},s.prototype.setClasses=function(){var r=this;this.data.current(function(t){var e=o.map(t,function(i){return i.id.toString()}),n=r.$results.find(".select2-results__option[aria-selected]");n.each(function(){var i=o(this),a=o.data(this,"data"),u=""+a.id;a.element!=null&&a.element.selected||a.element==null&&o.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="select2-results__option";var e={role:"treeitem","aria-selected":"false"};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 n in e){var i=e[n];t.setAttribute(n,i)}if(r.children){var a=o(t),u=document.createElement("strong");u.className="select2-results__group";var p=o(u);this.template(r,u);for(var m=[],y=0;y<r.children.length;y++){var w=r.children[y],_=this.option(w);m.push(_)}var F=o("<ul></ul>",{class:"select2-results__options select2-results__options--nested"});F.append(m),a.append(u),a.append(F)}else this.template(r,t);return o.data(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.highlightFirstItem())}),r.on("unselect",function(){r.isOpen()&&(e.setClasses(),e.highlightFirstItem())}),r.on("open",function(){e.$results.attr("aria-expanded","true"),e.$results.attr("aria-hidden","false"),e.setClasses(),e.ensureHighlightVisible()}
10),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 a=i.data("data");i.attr("aria-selected")=="true"?e.trigger("close",{}):e.trigger("select",{data:a})}}),r.on("results:previous",function(){var i=e.getHighlightedResults(),a=e.$results.find("[aria-selected]"),u=a.index(i);if(u!==0){var p=u-1;i.length===0&&(p=0);var m=a.eq(p);m.trigger("mouseenter");var y=e.$results.offset().top,w=m.offset().top,_=e.$results.scrollTop()+(w-y);p===0?e.$results.scrollTop(0):w-y<0&&e.$results.scrollTop(_)}}),r.on("results:next",function(){var i=e.getHighlightedResults(),a=e.$results.find("[aria-selected]"),u=a.index(i),p=u+1;if(!(p>=a.length)){var m=a.eq(p);m.trigger("mouseenter");var y=e.$results.offset().top+e.$results.outerHeight(!1),w=m.offset().top+m.outerHeight(!1),_=e.$results.scrollTop()+w-y;p===0?e.$results.scrollTop(0):w>y&&e.$results.scrollTop(_)}}),r.on("results:focus",function(i){i.element.addClass("select2-results__option--highlighted")}),r.on("results:message",function(i){e.displayMessage(i)}),o.fn.mousewheel&&this.$results.on("mousewheel",function(i){var a=e.$results.scrollTop(),u=e.$results.get(0).scrollHeight-a+i.deltaY,p=i.deltaY>0&&a-i.deltaY<=0,m=i.deltaY<0&&u<=e.$results.height();p?(e.$results.scrollTop(0),i.preventDefault(),i.stopPropagation()):m&&(e.$results.scrollTop(e.$results.get(0).scrollHeight-e.$results.height()),i.preventDefault(),i.stopPropagation())}),this.$results.on("mouseup",".select2-results__option[aria-selected]",function(i){var a=o(this),u=a.data("data");if(a.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",".select2-results__option[aria-selected]",function(i){var a=o(this).data("data");e.getHighlightedResults().removeClass("select2-results__option--highlighted"),e.trigger("results:focus",{data:a,element:o(this)})})},s.prototype.getHighlightedResults=function(){var r=this.$results.find(".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,a=this.$results.scrollTop()+(i-n),u=i-n;a-=r.outerHeight(!1)*2,e<=2?this.$results.scrollTop(0):(u>this.$results.outerHeight()||u<0)&&this.$results.scrollTop(a)}},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):o(t).append(i)},s}),v.define("select2/keys",[],function(){var o={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 o}
vendor: 5,995 bytes, line 10
10),v.define("select2/selection/base",["jquery","../utils","../keys"],function(o,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=o('<span class="select2-selection" role="combobox"  aria-haspopup="true" aria-expanded="false"></span>');return this._tabindex=0,this.$element.data("old-tabindex")!=null?this._tabindex=this.$element.data("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),this.$selection=t,t},r.prototype.bind=function(t,e){var n=this,i=t.id+"-container",a=t.id+"-results";this.container=t,this.$selection.on("focus",function(u){n.trigger("focus",u)}),this.$selection.on("blur",function(u){n._handleBlur(u)}),this.$selection.on("keydown",function(u){n.trigger("keypress",u),u.which===s.SPACE&&u.preventDefault()}),t.on("results:focus",function(u){n.$selection.attr("aria-activedescendant",u.data._resultId)}),t.on("selection:update",function(u){n.update(u.data)}),t.on("open",function(){n.$selection.attr("aria-expanded","true"),n.$selection.attr("aria-owns",a),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.focus(),n._detachCloseHandler(t)}),t.on("enable",function(){n.$selection.attr("tabindex",n._tabindex)}),t.on("disable",function(){n.$selection.attr("tabindex","-1")})},r.prototype._handleBlur=function(t){var e=this;window.setTimeout(function(){document.activeElement==e.$selection[0]||o.contains(e.$selection[0],document.activeElement)||e.trigger("blur",t)},1)},r.prototype._attachCloseHandler=function(t){var e=this;o(document.body).on("mousedown.select2."+t.id,function(n){var i=o(n.target),a=i.closest(".select2"),u=o(".select2.select2-container--open");u.each(function(){var p=o(this);if(this!=a[0]){var m=p.data("element");m.select2("close")}})})},r.prototype._detachCloseHandler=function(t){o(document.body).off("mousedown.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}),v.define("select2/selection/single",["jquery","./base","../utils","../keys"],function(o,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("select2-selection--single"),e.html('<span class="select2-selection__rendered"></span><span class="select2-selection__arrow" role="presentation"><b role="presentation"></b></span>'),e},t.prototype.bind=function(e,n){var i=this;t.__super__.bind.apply(this,arguments);var a=e.id+"-container";this.$selection.find(".select2-selection__rendered").attr("id",a),this.$selection.attr("aria-labelledby",a),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.focus()}),e.on("selection:update",function(u){i.update(u.data)})},t.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},t.prototype.display=function(e,n){var i=this.options.get("templateSelection"),a=this.options.get("escapeMarkup");return a(i(e,n))},t.prototype.selectionContainer=function(){return o("<span></span>")},t.prototype.update=function(e){if(e.length===0){this.clear();return}var n=e[0],i=this.$selection.find(".select2-selection__rendered"),a=this.display(n,i);i.empty().append(a),i.prop("title",n.title||n.text)},t}),v.define("select2/selection/multiple",["jquery","./base","../utils"],function(o,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("select2-selection--multiple"),t.html('<ul class="select2-selection__rendered"></ul>'),t},r.prototype.bind=function(t,e){var n=this;r.__super__.bind.apply(this,arguments),this.$selection.on("click",function(i){n.trigger("toggle",{originalEvent:i})}),this.$selection.on("click",".select2-selection__choice__remove",function(i){if(!n.options.get("disabled")){var a=o(this),u=a.parent(),p=u.data("data");n.trigger("unselect",{originalEvent:i,data:p})}})},r.prototype.clear=function(){this.$selection.find(".select2-selection__rendered").empty()},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=o('<li class="select2-selection__choice"><span class="select2-selection__choice__remove" role="presentation">&times;</span></li>');return t},r.prototype.update=function(t){if(this.clear(),t.length!==0){for(var e=[],n=0;n<t.length;n++){var i=t[n],a=this.selectionContainer(),u=this.display(i,a);a.append(u),a.prop("title",i.title||i.text),a.data("data",i),e.push(a)}var p=this.$selection.find(".select2-selection__rendered");s.appendMany(p,e)}},r}),v.define("select2/selection/placeholder",["../utils"],function(o){function l(s,r,t){this.placeholder=this.normalizePlaceholder(t.get("placeholder")),s.call(this,r,t)}return l.prototype.normalizePlaceholder=function(s,r){return typeof r=="string"&&(r={id:"",text:r}),r},l.prototype.createPlaceholder=function(s,r){var t=this.selectionContainer();return t.html(this.display(r)),t.addClass("select2-selection__placeholder").removeClass("select2-selection__choice"),t},l.prototype.update=function(s,r){var t=r.length==1&&r[0].id!=this.placeholder.id,e=r.length>1;if(e||t)return s.call(this,r);this.clear();var n=this.createPlaceholder(this.placeholder);this.$selection.find(".select2-selection__rendered").append(n)},l}
10),v.define("select2/selection/allowClear",["jquery","../keys"],function(o,l){function s(){}return s.prototype.bind=function(r,t,e){var n=this;r.call(this,t,e),this.placeholder==null&&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(i){n._handleClear(i)}),t.on("keypress",function(i){n._handleKeyboardClear(i,t)})},s.prototype._handleClear=function(r,t){if(!this.options.get("disabled")){var e=this.$selection.find(".select2-selection__clear");if(e.length!==0){t.stopPropagation();for(var n=e.data("data"),i=0;i<n.length;i++){var a={data:n[i]};if(this.trigger("unselect",a),a.prevented)return}this.$element.val(this.placeholder.id).trigger("change"),this.trigger("toggle",{})}}},s.prototype._handleKeyboardClear=function(r,t,e){e.isOpen()||(t.which==l.DELETE||t.which==l.BACKSPACE)&&this._handleClear(t)},s.prototype.update=function(r,t){if(r.call(this,t),!(this.$selection.find(".select2-selection__placeholder").length>0||t.length===0)){var e=o('<span class="select2-selection__clear">&times;</span>');e.data("data",t),this.$selection.find(".select2-selection__rendered").prepend(e)}},s}),v.define("select2/selection/search",["jquery","../utils","../keys"],function(o,l,s){function r(t,e,n){t.call(this,e,n)}return r.prototype.render=function(t){var e=o('<li class="select2-search select2-search--inline"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" aria-autocomplete="list" /></li>');this.$searchContainer=e,this.$search=e.find("input");var n=t.call(this);return this._transferTabIndex(),n},r.prototype.bind=function(t,e,n){var i=this;t.call(this,e,n),e.on("open",function(){i.$search.trigger("focus")}),e.on("close",function(){i.$search.val(""),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){i.$search.attr("aria-activedescendant",p.id)}),this.$selection.on("focusin",".select2-search--inline",function(p){i.trigger("focus",p)}),this.$selection.on("focusout",".select2-search--inline",function(p){i._handleBlur(p)}),this.$selection.on("keydown",".select2-search--inline",function(p){p.stopPropagation(),i.trigger("keypress",p),i._keyUpPrevented=p.isDefaultPrevented();var m=p.which;if(m===s.BACKSPACE&&i.$search.val()===""){var y=i.$searchContainer.prev(".select2-selection__choice");if(y.length>0){var w=y.data("data");i.searchRemoveChoice(w),p.preventDefault()}}});var a=document.documentMode,u=a&&a<=11;this.$selection.on("input.searchcheck",".select2-search--inline",function(p){if(u){i.$selection.off("input.search input.searchcheck");return}i.$selection.off("keyup.search")}),this.$selection.on("keyup.search input.search",".select2-search--inline",function(p){if(u&&p.type==="input"){i.$selection.off("input.search input.searchcheck");return}var m=p.which;m==s.SHIFT||m==s.CTRL||m==s.ALT||m!=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(".select2-selection__rendered").append(this.$searchContainer),this.resizeSearch(),n&&this.$search.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(".select2-selection__rendered").innerWidth();else{var e=this.$search.val().length+1;t=e*.75+"em"}this.$search.css("width",t)},r}),v.define("select2/selection/eventRelay",["jquery"],function(o){function l(){}return l.prototype.bind=function(s,r,t){var e=this,n=["open","opening","close","closing","select","selecting","unselect","unselecting"],i=["opening","closing","selecting","unselecting"];s.call(this,r,t),r.on("*",function(a,u){if(o.inArray(a,n)!==-1){u=u||{};var p=o.Event("select2:"+a,{params:u});e.$element.trigger(p),o.inArray(a,i)!==-1&&(u.prevented=p.isDefaultPrevented())}})},l}),v.define("select2/translation",["jquery","require"],function(o,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=o.extend({},r.all(),this.dict)},s._cache={}
10,s.loadPath=function(r){if(!(r in s._cache)){var t=l(r);s._cache[r]=t}return new s(s._cache[r])},s}),v.define("select2/diacritics",[],function(){var o={"\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",\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
10:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\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",\u03C9:"\u03C9",\u03C2:"\u03C3"};return o}),v.define("select2/data/base",["../utils"],function(o){function l(s,r){l.__super__.constructor.call(this)}return o.Extend(l,o.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+=o.generateChars(4),r.id!=null?t+="-"+r.id.toString():t+="-"+o.generateChars(4),t},l}),v.define("select2/data/select",["./base","../utils","jquery"],function(o,l,s){function r(t,e){this.$element=t,this.options=e,r.__super__.constructor.call(this)}return l.Extend(r,o),r.prototype.current=function(t){var e=[],n=this;this.$element.find(":selected").each(function(){var i=s(this),a=n.item(i);e.push(a)}),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("change");return}if(this.$element.prop("multiple"))this.current(function(i){var a=[];t=[t],t.push.apply(t,i);for(var u=0;u<t.length;u++){var p=t[u].id;s.inArray(p,a)===-1&&a.push(p)}e.$element.val(a),e.$element.trigger("change")});else{var n=t.id;this.$element.val(n),this.$element.trigger("change")}},r.prototype.unselect=function(t){var e=this;if(this.$element.prop("multiple")){if(t.selected=!1,s(t.element).is("option")){t.element.selected=!1,this.$element.trigger("change");return}this.current(function(n){for(var i=[],a=0;a<n.length;a++){var u=n[a].id;u!==t.id&&s.inArray(u,i)===-1&&i.push(u)}e.$element.val(i),e.$element.trigger("change")})}},r.prototype.bind=function(t,e){var n=this;this.container=t,t.on("select",function(i){n.select(i.data)}),t.on("unselect",function(i){n.unselect(i.data)})},r.prototype.destroy=function(){this.$element.find("*").each(function(){s.removeData(this,"data")})},r.prototype.query=function(t,e){var n=[],i=this,a=this.$element.children();a.each(function(){var u=s(this);if(!(!u.is("option")&&!u.is("optgroup"))){var p=i.item(u),m=i.matches(t,p);m!==null&&n.push(m)}}),e({results:n})},r.prototype.addOptions=function(t){l.appendMany(this.$element,t)},r.prototype.option=function(t){var e;t.children?(e=document.createElement("optgroup"),e.label=t.text):(e=document.createElement("option"),e.textContent!==void 0?e.textContent=t.text:e.innerText=t.text),t.id!==void 0&&(e.value=t.id),t.disabled&&(e.disabled=!0),t.selected&&(e.selected=!0),t.title&&(e.title=t.title);var n=s(e),i=this._normalizeItem(t);return i.element=e,s.data(e,"data",i),n},r.prototype.item=function(t){var e={};if(e=s.data(t[0],"data"),e!=null)return e;if(t.is("option"))e={id:t.val(),text:t.text(),disabled:t.prop("disabled"),selected:t.prop("selected"),title:t.prop("title")};else if(t.is("optgroup")){e={text:t.prop("label"),children:[],title:t.prop("title")};for(var n=t.children("option"),i=[],a=0;a<n.length;a++){var u=s(n[a]),p=this.item(u);i.push(p)}e.children=i}return e=this._normalizeItem(e),e.element=t[0],s.data(t[0],"data",e),e},r.prototype._normalizeItem=function(t){s.isPlainObject(t)||(t={id:t,text:t}),t=s.extend({},{text:""},t);var e={selected:!1,disabled:!1};return t.id!=null&&(t.id=t.id.toString()),t.text!=null&&(t.text=t.text.toString()),t._resultId==null&&t.id&&this.container!=null&&(t._resultId=this.generateResultId(this.container,t)),s.extend({},e,t)},r.prototype.matches=function(t,e){var n=this.options.get("matcher");return n(t,e)},r}),v.define("select2/data/array",["./select","../utils","jquery"],function(o,l,s){function r(t,e){var n=e.get("data")||[];r.__super__.constructor.call(this,t,e),this.addOptions(this.convertToOptions(n))}return l.Extend(r,o),r.prototype.select=function(t){var e=this.$element.find("option").filter(function(n,i){return i.value==t.id.toString()});e.length===0&&(e=this.option(t),this.addOptions(e)),r.__super__.select.call(this,t)},r.prototype.convertToOptions=function(t){var e=this,n=this.$element.find("option"),i=n.map(function(){return e.item(s(this)).id}).get(),a=[];function u(q){return function(){return s(this).val()==q.id}}for(var p=0;p<t.length;p++){var m=this._normalizeItem(t[p]);if(s.inArray(m.id,i)>=0){var y=n.filter(u(m)),w=this.item(y),_=s.extend(!0,{},m,w),F=this.option(_);y.replaceWith(F);continue}var x=this.option(m);if(m.children){var I=this.convertToOptions(m.children);l.appendMany(x,I)}a.push(x)}return a},r}),v.define("select2/data/ajax",["./array","../utils","jquery"],function(o,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,o),r.prototype._applyDefaults=function(t){var e={data:function(n){return s.extend({},n,{q:n.term})},transport:function(n,i,a){var u=s.ajax(n);return u.then(i),u.fail(a),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 a=s.extend({type:"GET"},this.ajaxOptions);typeof a.url=="function"&&(a.url=a.url.call(this.$element,t)),typeof a.data=="function"&&(a.data=a.data.call(this.$element,t));function u(){var p=a.transport(a,function(m){var y=i.processResults(m,t);i.options.get("debug")&&window.console&&console.error&&(!y||!y.results||!s.isArray(y.results))&&console.error("Select2: The AJAX results did not return an array in the `results` key of the response."),e(y)},function(){p.status&&p.status==="0"||i.trigger("results:message",{message:"errorLoading"})});i._request=p}this.ajaxOptions.delay&&t.term!=null?(this._queryTimeout&&window.clearTimeout(this._queryTimeout),this._queryTimeout=window.setTimeout(u,this.ajaxOptions.delay)):u()},r}),v.define("select2/data/tags",["jquery"],function(o){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),o.isArray(e))for(var a=0;a<e.length;a++){var u=e[a],p=this._normalizeItem(u),m=this.option(p);this.$element.append(m)}}return l.prototype.query=function(s,r,t){var e=this;if(this._removeOldTags(),r.term==null||r.page!=null){s.call(this,r,t);return}function n(i,a){for(var u=i.results,p=0;p<u.length;p++){var m=u[p],y=m.children!=null&&!n({results:m.children},!0),w=(m.text||"").toUpperCase(),_=(r.term||"").toUpperCase(),F=w===_;if(F||y){if(a)return!1;i.data=u,t(i);return}}if(a)return!0;var x=e.createTag(r);if(x!=null){var I=e.option(x);I.attr("data-select2-tag",!0),e.addOptions([I]),e.insertTag(u,x)}i.results=u,t(i)}s.call(this,r,n)},l.prototype.createTag=function(s,r){var t=o.trim(r.term);return t===""?null:{id:t,text:t}},l.prototype.insertTag=function(s,r,t){r.unshift(t)},l.prototype._removeOldTags=function(s){var r=this._lastTag,t=this.$element.find("option[data-select2-tag]");t.each(function(){this.selected||o(this).remove()})},l}),v.define("select2/data/tokenizer",["jquery"],function(o){function l(s,r,t){var e=t.get("tokenizer");e!==void 0&&(this.tokenizer=e),s.call(this,r,t)}return l.prototype.bind=function(s,r,t){s.call(this,r,t),this.$search=r.dropdown.$search||r.selection.$search||t.find(".select2-search__field")},l.prototype.query=function(s,r,t){var e=this;function n(u){var p=e._normalizeItem(u),m=e.$element.find("option").filter(function(){return o(this).val()===p.id});if(!m.length){var y=e.option(p);y.attr("data-select2-tag",!0),e._removeOldTags(),e.addOptions([y])}i(p)}function i(u){e.trigger("select",{data:u})}r.term=r.term||"";var a=this.tokenizer(r,this.options,n);a.term!==r.term&&(this.$search.length&&(this.$search.val(a.term),this.$search.focus()),r.term=a.term),s.call(this,r,t)},l.prototype.tokenizer=function(s,r,t,e){for(var n=t.get("tokenSeparators")||[],i=r.term,a=0,u=this.createTag||function(_){return{id:_.term,text:_.term}};a<i.length;){var p=i[a];if(o.inArray(p,n)===-1){a++;continue}var m=i.substr(0,a),y=o.extend({},r,{term:m}),w=u(y);if(w==null){a++;continue}e(w),i=i.substr(a+1)||"",a=0}return{term:i}},l}),v.define("select2/data/minimumInputLength",[],function(){function o(l,s,r){this.minimumInputLength=r.get("minimumInputLength"),l.call(this,s,r)}return o.prototype.query=function(l,s,r){if(s.term=s.term||"",s.term.length<this.minimumInputLength){this.trigger("results:message",{message:"inputTooShort",args:{minimum:this.minimumInputLength,input:s.term,params:s}});return}l.call(this,s,r)},o}),v.define("select2/data/maximumInputLength",[],function(){function o(l,s,r){this.maximumInputLength=r.get("maximumInputLength"),l.call(this,s,r)}return o.prototype.query=function(l,s,r){if(s.term=s.term||"",this.maximumInputLength>0&&s.term.length>this.maximumInputLength){this.trigger("results:message",{message:"inputTooLong",args:{maximum:this.maximumInputLength,input:s.term,params:s}});return}l.call(this,s,r)},o}),v.define("select2/data/maximumSelectionLength",[],function(){function o(l,s,r){this.maximumSelectionLength=r.get("maximumSelectionLength"),l.call(this,s,r)}return o.prototype.query=function(l,s,r){var t=this;this.current(function(e){var n=e!=null?e.length:0;if(t.maximumSelectionLength>0&&n>=t.maximumSelectionLength){t.trigger("results:message",{message:"maximumSelected",args:{maximum:t.maximumSelectionLength}});return}l.call(t,s,r)})},o}),v.define("select2/dropdown",["jquery","./utils"],function(o,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=o('<span class="select2-dropdown"><span class="select2-results"></span></span>');return r.attr("dir",this.options.get("dir")),this.$dropdown=r,r},s.prototype.bind=function(){},s.prototype.position=function(r,t){},s.prototype.destroy=function(){this.$dropdown.remove()},s}),v.define("select2/dropdown/search",["jquery","../utils"],function(o,l){function s(){}return s.prototype.render=function(r){var t=r.call(this),e=o('<span class="select2-search select2-search--dropdown"><input class="select2-search__field" type="search" tabindex="-1" autocomplete="off" autocorrect="off" autocapitalize="none" spellcheck="false" role="textbox" /></span>');return this.$searchContainer=e,this.$search=e.find("input"),t.prepend(e),t},s.prototype.bind=function(r,t,e){var n=this;r.call(this,t,e),this.$search.on("keydown",function(i){n.trigger("keypress",i),n._keyUpPrevented=i.isDefaultPrevented()}),this.$search.on("input",function(i){o(this).off("keyup")}),this.$search.on("keyup input",function(i){n.handleSearch(i)}),t.on("open",function(){n.$search.attr("tabindex",0),n.$search.focus(),window.setTimeout(function(){n.$search.focus()},0)}),t.on("close",function(){n.$search.attr("tabindex",-1),n.$search.val("")}
vendor: 4,280 bytes, line 10
10),t.on("focus",function(){t.isOpen()||n.$search.focus()}),t.on("results:all",function(i){if(i.query.term==null||i.query.term===""){var a=n.showSearch(i);a?n.$searchContainer.removeClass("select2-search--hide"):n.$searchContainer.addClass("select2-search--hide")}})},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}),v.define("select2/dropdown/hidePlaceholder",[],function(){function o(l,s,r,t){this.placeholder=this.normalizePlaceholder(r.get("placeholder")),l.call(this,s,r,t)}return o.prototype.append=function(l,s){s.results=this.removePlaceholder(s.results),l.call(this,s)},o.prototype.normalizePlaceholder=function(l,s){return typeof s=="string"&&(s={id:"",text:s}),s},o.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},o}),v.define("select2/dropdown/infiniteScroll",["jquery"],function(o){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)},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",function(){var n=o.contains(document.documentElement,e.$loadingMore[0]);if(!(e.loading||!n)){var i=e.$results.offset().top+e.$results.outerHeight(!1),a=e.$loadingMore.offset().top+e.$loadingMore.outerHeight(!1);i+50>=a&&e.loadMore()}})},l.prototype.loadMore=function(){this.loading=!0;var s=o.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=o('<li class="select2-results__option select2-results__option--load-more"role="treeitem" aria-disabled="true"></li>'),r=this.options.get("translations").get("loadingMore");return s.html(r(this.lastParams)),s},l}),v.define("select2/dropdown/attachBody",["jquery","../utils"],function(o,l){function s(r,t,e){this.$dropdownParent=e.get("dropdownParent")||o(document.body),r.call(this,t,e)}return s.prototype.bind=function(r,t,e){var n=this,i=!1;r.call(this,t,e),t.on("open",function(){n._showDropdown(),n._attachPositioningHandler(t),i||(i=!0,t.on("results:all",function(){n._positionDropdown(),n._resizeDropdown()}),t.on("results:append",function(){n._positionDropdown(),n._resizeDropdown()}))}),t.on("close",function(){n._hideDropdown(),n._detachPositioningHandler(t)}),this.$dropdownContainer.on("mousedown",function(a){a.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("select2"),t.addClass("select2-container--open"),t.css({position:"absolute",top:-999999}),this.$container=e},s.prototype.render=function(r){var t=o("<span></span>"),e=r.call(this);return t.append(e),this.$dropdownContainer=t,t},s.prototype._hideDropdown=function(r){this.$dropdownContainer.detach()},s.prototype._attachPositioningHandler=function(r,t){var e=this,n="scroll.select2."+t.id,i="resize.select2."+t.id,a="orientationchange.select2."+t.id,u=this.$container.parents().filter(l.hasScroll);u.each(function(){o(this).data("select2-scroll-position",{x:o(this).scrollLeft(),y:o(this).scrollTop()})}),u.on(n,function(p){var m=o(this).data("select2-scroll-position");o(this).scrollTop(m.y)}),o(window).on(n+" "+i+" "+a,function(p){e._positionDropdown(),e._resizeDropdown()})},s.prototype._detachPositioningHandler=function(r,t){var e="scroll.select2."+t.id,n="resize.select2."+t.id,i="orientationchange.select2."+t.id,a=this.$container.parents().filter(l.hasScroll);a.off(e),o(window).off(e+" "+n+" "+i)},s.prototype._positionDropdown=function(){var r=o(window),t=this.$dropdown.hasClass("select2-dropdown--above"),e=this.$dropdown.hasClass("select2-dropdown--below"),n=null,i=this.$container.offset();i.bottom=i.top+this.$container.outerHeight(!1);
10var a={height:this.$container.outerHeight(!1)};a.top=i.top,a.bottom=i.top+a.height;var u={height:this.$dropdown.outerHeight(!1)},p={top:r.scrollTop(),bottom:r.scrollTop()+r.height()},m=p.top<i.top-u.height,y=p.bottom>i.bottom+u.height,w={left:i.left,top:a.bottom},_=this.$dropdownParent;_.css("position")==="static"&&(_=_.offsetParent());var F=_.offset();w.top-=F.top,w.left-=F.left,!t&&!e&&(n="below"),!y&&m&&!t?n="above":!m&&y&&t&&(n="below"),(n=="above"||t&&n!=="below")&&(w.top=a.top-F.top-u.height),n!=null&&(this.$dropdown.removeClass("select2-dropdown--below select2-dropdown--above").addClass("select2-dropdown--"+n),this.$container.removeClass("select2-container--below select2-container--above").addClass("select2-container--"+n)),this.$dropdownContainer.css(w)},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}),v.define("select2/dropdown/minimumResultsForSearch",[],function(){function o(s){for(var r=0,t=0;t<s.length;t++){var e=s[t];e.children?r+=o(e.children):r++}return r}function l(s,r,t,e){this.minimumResultsForSearch=t.get("minimumResultsForSearch"),this.minimumResultsForSearch<0&&(this.minimumResultsForSearch=1/0),s.call(this,r,t,e)}return l.prototype.showSearch=function(s,r){return o(r.data.results)<this.minimumResultsForSearch?!1:s.call(this,r)},l}),v.define("select2/dropdown/selectOnClose",[],function(){function o(){}return o.prototype.bind=function(l,s,r){var t=this;l.call(this,s,r),s.on("close",function(e){t._handleSelectOnClose(e)})},o.prototype._handleSelectOnClose=function(l,s){if(s&&s.originalSelect2Event!=null){var r=s.originalSelect2Event;if(r._type==="select"||r._type==="unselect")return}var t=this.getHighlightedResults();if(!(t.length<1)){var e=t.data("data");e.element!=null&&e.element.selected||e.element==null&&e.selected||this.trigger("select",{data:e})}},o}),v.define("select2/dropdown/closeOnSelect",[],function(){function o(){}return o.prototype.bind=function(l,s,r){var t=this;l.call(this,s,r),s.on("select",function(e){t._selectTriggered(e)}),s.on("unselect",function(e){t._selectTriggered(e)})},o.prototype._selectTriggered=function(l,s){var r=s.originalEvent;r&&r.ctrlKey||this.trigger("close",{originalEvent:r,originalSelect2Event:s})},o}),v.define("select2/i18n/en",[],function(){return{errorLoading:function(){return"The results could not be loaded."},inputTooLong:function(o){var l=o.input.length-o.maximum,s="Please delete "+l+" character";return l!=1&&(s+="s"),s},inputTooShort:function(o){var l=o.minimum-o.input.length,s="Please enter "+l+" or more characters";return s},loadingMore:function(){return"Loading more results\u2026"},maximumSelected:function(o){var l="You can only select "+o.maximum+" item";return o.maximum!=1&&(l+="s"),l},noResults:function(){return"No results found"},searching:function(){return"Searching\u2026"}}}),v.define("select2/defaults",["jquery","require","./results","./selection/single","./selection/multiple","./selection/placeholder","./selection/allowClear","./selection/search","./selection/eventRelay","./utils","./translation","./diacritics","./data/select","./data/array","./data/ajax","./data/tags","./data/tokenizer","./data/minimumInputLength","./data/maximumInputLength","./data/maximumSelectionLength","./dropdown","./dropdown/search","./dropdown/hidePlaceholder","./dropdown/infiniteScroll","./dropdown/attachBody","./dropdown/minimumResultsForSearch","./dropdown/selectOnClose","./dropdown/closeOnSelect","./i18n/en"],function(o,l,s,r,t,e,n,i,a,u,p,m,y,w,_,F,x,I,q,U,N,V,H,G,g,E,C,T,b){function D(){this.reset()}D.prototype.apply=function(h){if(h=o.extend(!0,{},this.defaults,h),h.dataAdapter==null){if(h.ajax!=null?h.dataAdapter=_:h.data!=null?h.dataAdapter=w:h.dataAdapter=y,h.minimumInputLength>0&&(h.dataAdapter=u.Decorate(h.dataAdapter,I)),h.maximumInputLength>0&&(h.dataAdapter=u.Decorate(h.dataAdapter,q)),h.maximumSelectionLength>0&&(h.dataAdapter=u.Decorate(h.dataAdapter,U)),h.tags&&(h.dataAdapter=u.Decorate(h.dataAdapter,F)),(h.tokenSeparators!=null||h.tokenizer!=null)&&(h.dataAdapter=u.Decorate(h.dataAdapter,x)),h.query!=null){var S=l(h.amdBase+"compat/query");h.dataAdapter=u.Decorate(h.dataAdapter,S)}if(h.initSelection!=null){var O=l(h.amdBase+"compat/initSelection");h.dataAdapter=u.Decorate(h.dataAdapter,O)}}if(h.resultsAdapter==null&&(h.resultsAdapter=s,h.ajax!=null&&(h.resultsAdapter=u.Decorate(h.resultsAdapter,G)),h.placeholder!=null&&(h.resultsAdapter=u.Decorate(h.resultsAdapter,H)),h.selectOnClose&&(h.resultsAdapter=u.Decorate(h.resultsAdapter,C))),h.dropdownAdapter==null){if(h.multiple)h.dropdownAdapter=N;else{var A=u.Decorate(N,V);h.dropdownAdapter=A}if(h.minimumResultsForSearch!==0&&(h.dropdownAdapter=u.Decorate(h.dropdownAdapter,E)),h.closeOnSelect&&(h.dropdownAdapter=u.Decorate(h.dropdownAdapter,T)),h.dropdownCssClass!=null||h.dropdownCss!=null||h.adaptDropdownCssClass!=null){var B=l(h.amdBase+"compat/dropdownCss");h.dropdownAdapter=u.Decorate(h.dropdownAdapter,B)}h.dropdownAdapter=u.Decorate(h.dropdownAdapter,g)}if(h.selectionAdapter==null){if(h.multiple?h.selectionAdapter=t:h.selectionAdapter=r,h.placeholder!=null&&(h.selectionAdapter=u.Decorate(h.selectionAdapter,e)),h.allowClear&&(h.selectionAdapter=u.Decorate(h.selectionAdapter,n)),h.multiple&&(h.selectionAdapter=u.Decorate(h.selectionAdapter,i)),h.containerCssClass!=null||h.containerCss!=null||h.adaptContainerCssClass!=null){var R=l(h.amdBase+"compat/containerCss");h.selectionAdapter=u.Decorate(h.selectionAdapter,R)}h.selectionAdapter=u.Decorate(h.selectionAdapter,a)}if(typeof h.language=="string")if(h.language.indexOf("-")>0){var j=h.language.split("-"),k=j[0];h.language=[h.language,k]}else h.language=[h.language];if(o.isArray(h.language)){var P=new p;h.language.push("en");for(var L=h.language,W=0;W<L.length;W++){var z=L[W],J={};try{J=p.loadPath(z)}catch{try{z=this.defaults.amdLanguageBase+z,J=p.loadPath(z)}catch{h.debug&&window.console&&console.warn&&console.warn('Select2: The language file for "'+z+'" could not be automatically loaded. A fallback will be used instead.');continue}}P.extend(J)}h.translations=P}else{var Y=p.loadPath(this.defaults.amdLanguageBase+"en"),Z=new p(h.language);Z.extend(Y),h.translations=Z}return h},D.prototype.reset=function(){function h(O){function A(B){return m[B]||B}
10return O.replace(/[^\u0000-\u007E]/g,A)}function S(O,A){if(o.trim(O.term)==="")return A;if(A.children&&A.children.length>0){for(var B=o.extend(!0,{},A),R=A.children.length-1;R>=0;R--){var j=A.children[R],k=S(O,j);k==null&&B.children.splice(R,1)}return B.children.length>0?B:S(O,B)}var P=h(A.text).toUpperCase(),L=h(O.term).toUpperCase();return P.indexOf(L)>-1?A:null}this.defaults={amdBase:"./",amdLanguageBase:"./i18n/",closeOnSelect:!0,debug:!1,dropdownAutoWidth:!1,escapeMarkup:u.escapeMarkup,language:b,matcher:S,minimumInputLength:0,maximumInputLength:0,maximumSelectionLength:0,minimumResultsForSearch:0,selectOnClose:!1,sorter:function(O){return O},templateResult:function(O){return O.text},templateSelection:function(O){return O.text},theme:"default",width:"resolve"}},D.prototype.set=function(h,S){var O=o.camelCase(h),A={};A[O]=S;var B=u._convertData(A);o.extend(this.defaults,B)};var M=new D;return M}),v.define("select2/options",["require","jquery","./defaults","./utils"],function(o,l,s,r){function t(e,n){if(this.options=e,n!=null&&this.fromElement(n),this.options=s.apply(this.options),n&&n.is("input")){var i=o(this.get("amdBase")+"compat/inputData");this.options.dataAdapter=r.Decorate(this.options.dataAdapter,i)}}return t.prototype.fromElement=function(e){var n=["select2"];this.options.multiple==null&&(this.options.multiple=e.prop("multiple")),this.options.disabled==null&&(this.options.disabled=e.prop("disabled")),this.options.language==null&&(e.prop("lang")?this.options.language=e.prop("lang").toLowerCase():e.closest("[lang]").prop("lang")&&(this.options.language=e.closest("[lang]").prop("lang"))),this.options.dir==null&&(e.prop("dir")?this.options.dir=e.prop("dir"):e.closest("[dir]").prop("dir")?this.options.dir=e.closest("[dir]").prop("dir"):this.options.dir="ltr"),e.prop("disabled",this.options.disabled),e.prop("multiple",this.options.multiple),e.data("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.'),e.data("data",e.data("select2Tags")),e.data("tags",!0)),e.data("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."),e.attr("ajax--url",e.data("ajaxUrl")),e.data("ajax--url",e.data("ajaxUrl")));var i={};l.fn.jquery&&l.fn.jquery.substr(0,2)=="1."&&e[0].dataset?i=l.extend(!0,{},e[0].dataset,e.data()):i=e.data();var a=l.extend(!0,{},i);a=r._convertData(a);for(var u in a)l.inArray(u,n)>-1||(l.isPlainObject(this.options[u])?l.extend(this.options[u],a[u]):this.options[u]=a[u]);return this},t.prototype.get=function(e){return this.options[e]},t.prototype.set=function(e,n){this.options[e]=n},t}),v.define("select2/core",["jquery","./options","./utils","./keys"],function(o,l,s,r){var t=function(e,n){e.data("select2")!=null&&e.data("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;e.data("old-tabindex",i),e.attr("tabindex","-1");var a=this.options.get("dataAdapter");this.dataAdapter=new a(e,this.options);var u=this.render();this._placeContainer(u);var p=this.options.get("selectionAdapter");this.selection=new p(e,this.options),this.$selection=this.selection.render(),this.selection.position(this.$selection,u);var m=this.options.get("dropdownAdapter");this.dropdown=new m(e,this.options),this.$dropdown=this.dropdown.render(),this.dropdown.position(this.$dropdown,u);var y=this.options.get("resultsAdapter");this.results=new y(e,this.options,this.dataAdapter),this.$results=this.results.render(),this.results.position(this.$results,this.$dropdown);var w=this;this._bindAdapters(),this._registerDomEvents(),this._registerDataEvents(),this._registerSelectionEvents(),this._registerDropdownEvents(),this._registerResultsEvents(),this._registerEvents(),this.dataAdapter.current(function(_){w.trigger("selection:update",{data:_})}),e.addClass("select2-hidden-accessible"),e.attr("aria-hidden","true"),this._syncAttributes(),e.data("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="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 a=this._resolveWidth(e,"style");return a??this._resolveWidth(e,"element")}if(n=="element"){var u=e.outerWidth(!1);return u<=0?"auto":u+"px"}if(n=="style"){var p=e.attr("style");if(typeof p!="string")return null;for(var m=p.split(";"),y=0,w=m.length;y<w;y=y+1){var _=m[y].replace(/\s/g,""),F=_.match(i);if(F!==null&&F.length>=1)return F[1]}return null}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.select2",function(){e.dataAdapter.current(function(i){e.trigger("selection:update",{data:i})})}),this.$element.on("focus.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){o.each(i,e._syncA),o.each(i,e._syncS)}),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,a){o.inArray(i,n)===-1&&e.trigger(i,a)})},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("select2-container--open")}),this.on("close",function(){e.$container.removeClass("select2-container--open")}),this.on("enable",function(){e.$container.removeClass("select2-container--disabled")}),this.on("disable",function(){e.$container.addClass("select2-container--disabled")}),this.on("blur",function(){e.$container.removeClass("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.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.options.get("disabled")?(this.isOpen()&&this.close(),this.trigger("disable",{})):this.trigger("enable",{})},t.prototype._syncSubtree=function(e,n){var i=!1,a=this;if(!(e&&e.target&&e.target.nodeName!=="OPTION"&&e.target.nodeName!=="OPTGROUP")){if(!n)i=!0;else if(n.addedNodes&&n.addedNodes.length>0)for(var u=0;u<n.addedNodes.length;u++){var p=n.addedNodes[u];p.selected&&(i=!0)}else n.removedNodes&&n.removedNodes.length>0&&(i=!0);i&&this.dataAdapter.current(function(m){a.trigger("selection:update",{data:m})})}},t.prototype.trigger=function(e,n){var i=t.__super__.trigger,a={open:"opening",close:"closing",select:"selecting",unselect:"unselecting"};if(n===void 0&&(n={}),e in a){var u=a[e],p={prevented:!1,name:e,args:n};if(i.call(this,u,p),p.prevented){n.prevented=!0;return}}i.call(this,e,n)},t.prototype.toggleDropdown=function(){this.options.get("disabled")||(this.isOpen()?this.close():this.open())},t.prototype.open=function(){this.isOpen()||this.trigger("query",{})},t.prototype.close=function(){this.isOpen()&&this.trigger("close",{})},t.prototype.isOpen=function(){return this.$container.hasClass("select2-container--open")},t.prototype.hasFocus=function(){return this.$container.hasClass("select2-container--focus")}
10,t.prototype.focus=function(e){this.hasFocus()||(this.$container.addClass("select2-container--focus"),this.trigger("focus",{}))},t.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==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('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(n){e=n}),e},t.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.'),e==null||e.length===0)return this.$element.val();var n=e[0];o.isArray(n)&&(n=o.map(n,function(i){return i.toString()})),this.$element.val(n).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(".select2"),this.$element.attr("tabindex",this.$element.data("old-tabindex")),this.$element.removeClass("select2-hidden-accessible"),this.$element.attr("aria-hidden","false"),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},t.prototype.render=function(){var e=o('<span class="select2 select2-container"><span class="selection"></span><span class="dropdown-wrapper" aria-hidden="true"></span></span>');return e.attr("dir",this.options.get("dir")),this.$container=e,this.$container.addClass("select2-container--"+this.options.get("theme")),e.data("element",this.$element),e},t}),v.define("jquery-mousewheel",["jquery"],function(o){return o}),v.define("jquery.select2",["jquery","jquery-mousewheel","./select2/core","./select2/defaults"],function(o,l,s,r){if(o.fn.select2==null){var t=["open","close","destroy"];o.fn.select2=function(e){if(e=e||{},typeof e=="object")return this.each(function(){var a=o.extend(!0,{},e),u=new s(o(this),a)}),this;if(typeof e=="string"){var n,i=Array.prototype.slice.call(arguments,1);return this.each(function(){var a=o(this).data("select2");a==null&&window.console&&console.error&&console.error("The select2('"+e+"') method was called on an element that is not using Select2."),n=a[e].apply(a,i)}),o.inArray(e,t)>-1?this:n}else throw new Error("Invalid arguments for Select2: "+e)}}return o.fn.select2.defaults==null&&(o.fn.select2.defaults=r),s}),{define:v.define,require:v.require}}(),f=c.require("jquery.select2");return d.fn.select2.amd=c,f});var topManagerOS=topManagerOS||{};topManagerOS.autocomplete=function(){this.ownSelectClass="own-autocomplete",this.popupContainerSelector=".own-popup-container"},topManagerOS.autocomplete.prototype.init=function(d){var c=this;$("select.own-autocomplete").each(function(){c.initAutocompleteForSelect($(this),d)})},topManagerOS.autocomplete.prototype.initForOwnPopups=function(){var d=this,c={dropdownParent:$(d.popupContainerSelector)};d.init(c)},topManagerOS.autocomplete.prototype.initForOwnPopupsUsingContainer=function(d,c){var f=this,v=c?{dropdownParent:$(f.popupContainerSelector)}:null;d.find("select.own-autocomplete").each(function(){f.initAutocompleteForSelect($(this),v)})},topManagerOS.autocomplete.prototype.getDependsOnValues=function(d){var c=this,f;
10if(d){var v=[],o=d.split(",");$.each(o,function(l,s){var r="select#"+s+"."+c.ownSelectClass,t=$(r);if(t.length){var e=t.val(),n=t.attr("data-code");v.push({autocompleteCode:n,uniqueControlId:s,selectedValues:e?typeof e=="object"?e:e.split(","):null})}}),f=JSON.stringify(v)}return f},topManagerOS.autocomplete.prototype.setupDependsOnControlsEvents=function(d,c){if(d&&c&&c.length){var f=d.split(",");$.each(f,function(v,o){var l="#"+o,s=$(l);if(s.length){var r=c.attr("id"),t="change.forDependants"+(r?"."+r:"");s.off(t).on(t,function(){c.val(null).trigger("change")})}})}},topManagerOS.autocomplete.prototype.clearQueryStringParamValue=function(d,c,f){this.updateQueryStringParamValue(d,c,"",f)},topManagerOS.autocomplete.prototype.updateQueryStringParamValue=function(d,c,f,v){var o=this,l=d.attr("data-custom-query-params-json")||"";if(l){var s=JSON.parse(l);if(s&&s.hasOwnProperty(c)){s[c]=f;var r=JSON.stringify(s);d.attr("data-custom-query-params-json",r),v||o.initAutocompleteForSelect(d)}}},topManagerOS.autocomplete.prototype.initAutocompleteForSelect=function(d,c){var f=this,v=d.attr("data-code"),o=d.attr("id"),l=d.prop("disabled"),s=$("#hid-autocomplete-url").val(),r=d.attr("placeholder")||_translate("AutocompletePlaceholder"),t=d.attr("data-depending-on-ids"),e=d.attr("data-custom-query-params-json")||"",n=d.attr("data-alternative")==="true";f.setupDependsOnControlsEvents(t,d);var i={url:s,delay:250,dataType:"json",cache:!0,data:function(p){return{search:p.term,page:p.page||1,code:v,dependsOnValuesJson:f.getDependsOnValues(t),customQueryParamsJson:e,controlUniqueId:o}}};n&&(i.url="/Autocomplete/IndexLarge",i.type="POST",i.contentType="application/json",i.data=function(p){return JSON.stringify({search:p.term,page:p.page||1,code:v,dependsOnValuesJson:f.getDependsOnValues(t),customQueryParamsJson:e,controlUniqueId:o})});var a={minimumInputLength:0,allowClear:!0,width:"100%",disabled:l,placeholder:r,language:{noResults:function(){return _translate("NoResults")},searching:function(){return _translate("Searching")+"..."},loadingMore:function(){return _translate("LoadingMoreResults")+"..."},errorLoading:function(){return _translate("ResultsCouldNotBeLoaded")}},ajax:i,escapeMarkup:function(p){return p}},u=c?$.extend(a,c):a;d.select2(u)},topManagerOS.autocomplete.prototype.getSelectedDataArray=function(d){var c=d.select2("data");return c},topManagerOS.autocomplete.prototype.selectOptionByValue=function(d,c){d.val(c),d.trigger("change")},topManagerOS.autocomplete.prototype.clearSelection=function(d){d.val(null),d.trigger("change")},topManagerOS.autocomplete.prototype.addNewOptionIfNotExists=function(d,c,f){if(!d.find("option[value='"+c+"']").length){var v=new Option(f,c,!0,!0);d.append(v).trigger("change")}},jQuery(document).ready(function(){new topManagerOS.autocomplete().init()});var topManagerOS=topManagerOS||{};topManagerOS.loginRegister=function(){this.representativeCheckbox=$("#chkBecomeRepresentative"),this.useCompanyAtRegister=$("#chkUseCompanyForRegister"),this.theRegisterForm=$("#register-form"),this.antiforgeryTokenFieldName="CSRF-TOKEN-TOP-MANAGER-ECOMMERCE-FORM"},topManagerOS.loginRegister.prototype.init=function(){this.setupEvents()},topManagerOS.loginRegister.prototype.setupEvents=function(){var d=this;$("#chkBecomeRepresentative").off("change").on("change",function(c){d.checkRepresentativeContainerVisibility()}),$("#chkUseCompanyForRegister").off("change").on("change",function(c){d.checkUseCompanyVisibility()}),$("#submit-registration").off("click").on("click",function(c){c.preventDefault(),d.onSubmitTheRegisterForm(),c.stopPropagation()}),$(".enter-in-bo-login-mode").off("click.enterInBOLoginMode").on("click.enterInBOLoginMode",function(c){c.preventDefault();var f=$(this);d.showLoginAsBOUserDialog(f),c.stopPropagation()})},topManagerOS.loginRegister.prototype.showLoginAsBOUserDialog=function(d){var c=this,f=topManagerOS.common.instance(),v=d.attr("data-action-url");f.showBusyBox(),$.get(v,function(o){c.dealWithLoginAsBOUserResults(o,f,d)}).always(function(){f.hideBusyBox()})},topManagerOS.loginRegister.prototype.dealWithLoginAsBOUserResults=function(d,c,f){var v=this;if(!d||d&&d.success===!1){c.operationFailedAlert();return}var o=$(d),l={contents:o,size:"almost-full-screen-popup",hideOkCommand:!0,title:_translate("C
10onnectInAnotherAccount")},s=c.showPopup(l,function(){$(".login-as-bo-user").off("click.loginAsBOUser").on("click.loginAsBOUser",function(r){r.preventDefault();var t=$(this);v.loginAsBOUser(t),r.stopPropagation()})},function(){},function(){},function(){})},topManagerOS.loginRegister.prototype.loginAsBOUser=function(d){var c=this,f=d.closest(".login-as-bo-container"),v=d.attr("data-action-url"),o=topManagerOS.common.instance(),l={email:f.find(".email-form-input").val(),password:f.find(".pw-form-input").val()},s=c.makeCSRFExtendedData(l);o.showBusyBox(),$.ajax({url:v,type:"post",data:{model:s},headers:{RequestVerificationToken:$('input[name="'+c.antiforgeryTokenFieldName+'"]').val()},success:function(r,t,e){if(r&&r.success===!1||!r)o.operationFailedAlert(r);else{var n=$(".login-on-another-mkp-client-container");f.addClass("d-none"),f.find("#email-for-bo-user").prop("disabled",!0),f.find("#password-for-bo-user").prop("disabled",!0),f.find(".login-as-bo-user").prop("disabled",!0),n.append(r),$(".own-popup-title").text(_translate("SelectClientForConnect")),$(".table-row").on("click",function(){var i=$(this),a=i.data("client-id"),u=$("input[name=login-on-another-mkp-client-id]").val(a);$(".table-row").removeClass("selected"),i.addClass("selected")}),$(".connect-as-mkp-client").off("click.loginAsBOUser").on("click.loginAsBOUser",function(i){i.preventDefault();var a=$(this),u=$("input[name=login-on-another-mkp-client-id]").val();if(u){var p=$(`.table-row[data-client-id=${u}]`).attr("data-client-email");c.loginOnAnotherFOAccount(p)}else ownCommonInstance.warningAlert(_translate("LoginAsBOUserMkpListWarningMessage"));i.stopPropagation()})}},error:function(r,t,e){o.operationFailedAlert()}}).always(function(){o.hideBusyBox()})},topManagerOS.loginRegister.prototype.loginOnAnotherFOAccount=function(d){var c=this,f=topManagerOS.common.instance(),v=$("input[name=login-on-another-mkp-client-url]").val(),o=$(".login-as-bo-container"),l={email:o.find(".email-form-input").val(),password:o.find(".pw-form-input").val(),selectedMkpClientEmail:d},s=c.makeCSRFExtendedData(l);f.showBusyBox(),$.ajax({url:v,type:"post",data:{model:s},headers:{RequestVerificationToken:$('input[name="'+c.antiforgeryTokenFieldName+'"]').val()},success:function(r){if(r&&r.success===!0){let t=$("input[name=redirect-after-login-on-another-mkp-client-url]").val();window.location.replace(t)}else f.operationFailedAlert(r)},error:function(r,t,e){f.operationFailedAlert()}}).always(function(){f.hideBusyBox()})},topManagerOS.loginRegister.prototype.isMinimalFormMode=function(){return $("input[name=minimal-form-mode]").attr("data-minimal-form-mode")==="True"},topManagerOS.loginRegister.prototype.generateRandomPassword=function(){var d=[];if(window.crypto&&window.crypto.getRandomValues){var c=new Uint8Array(16);window.crypto.getRandomValues(c),d=Array.prototype.slice.call(c)}else for(var f=0;f<16;f++)d.push(Math.floor(Math.random()*256));return $.map(d,function(v){return("0"+v.toString(16)).slice(-2)}).join("")},topManagerOS.loginRegister.prototype.checkRepresentativeContainerVisibility=function(){var d=this.representativeCheckbox.prop("checked"),c=$("#representative-details-container");d?c.removeClass("d-none"):c.addClass("d-none")},topManagerOS.loginRegister.prototype.checkUseCompanyVisibility=function(){var d=this.useCompanyAtRegister.prop("checked"),c=$("#use-company-container"),f=$("#use-cnp-container");d?(c.removeClass("d-none"),f.addClass("d-none")):(c.addClass("d-none"),f.removeClass("d-none"))},topManagerOS.loginRegister.prototype.onSubmitTheRegisterForm=function(){var d=this,c=d.getRegisterModel();if(c){var f=d.validateRegisterModel(c);if(!f||f.length===0)d.doSubmitTheRegisterForm(c);else{var v=topManagerOS.commonSingleton.instance(),o="<strong>"+_translate("PleaseCorrectValidationProblems")+":</strong><br/><br/>"+f.join("<br/>");v.warningAlert(o)}}},topManagerOS.loginRegister.prototype.getRegisterModel=function(){var d=this,c={basicRegisterData:{},clientGroupsModel:{clientGroupsIds:[]},locationAddress:{}};if(c.ParentRepresentativeId=$("#ParentRepresentativeId").val(),c.basicRegisterData.lastName=$("#LastName").val(),c.basicRegisterData.firstName=$("#FirstName").val(),c.basicRegisterData.middleName=$("#MiddleName").val(),c.basicRegisterData.phone=$("#Phone").val(),c.basicRegisterData.phoneDialCode=$("#PhoneDialCode").val(),c.basicRegisterData.languageCode=$("#LanguageCode").val(),c.basicRegisterData.email=$("#Email").val(),c.basicRegisterData.age=$("#Age").val(),c.basicRegisterData.password=$("#Password").val(),c.basicRegisterData.passwordConfirm=$("#PasswordConfirm").val(),d.isMinimalFormMode()){c.isQuickRegistration=!0;var f=d.generateRandomPassword();c.basicRegisterData.password=f,c.basicRegisterData.passwordConfirm=f}c.locationAddress.countryId=$("#CountryClientAddressId").val(),c.locationAddress.countyId=$("#UATCountyClientAddressId").val(),c.locationAddress.uatId=$("#UATIClientAddressId").val(),c.locationAddress.freeAddressText=$("#FreeClientAddressText").val(),c.iWantToBecomeRepresentative=d.representativeCheckbox.prop("checked"),c.UseCompanyForRegister=d.useCompanyAtRegister.prop("checked"),c.companyCIF=$("#CompanyCIF").val(),c.companyName=$("#CompanyName").val(),c.cnp=$("#CNP").val();var v=$("#CountryId");c.countryId=v.val(),c.countryName=v.children("option:selected").text();var o=$("#UATCountyId");c.uatCountyId=o.val(),c.uatCountyName=o.children("option:selected").text();var l=$("#UATLocalityId");return c.uatLocalityId=l.val(),c.uatLocalityName=l.children("option:selected").text(),c.street=$("#Street").val(),c.streetNo=$("#StreetNo").val(),c.buildingNo=$("#BuildingNo").val(),c.buildingEntry=$("#BuildingEntry").val(),c.floor=$("#Floor").val(),c.apartment=$("#Apartment").val(),c.accessCode=$("#AccessCode").val(),c.postalCode=$("#PostalCode").val(),c.poBox=$("#POBox").val(),c.freeAddressText=$("#FreeAddressText").val(),c.invoicingCountryId=$("#countryForVATId").val(),c.invoicingCurrencyId=$("#invoicingCurrencyId").val(),c.representativeFullName=$("#RepresentativeFullName").val(),c.representativeEmail=$("#RepresentativeEmail").val(),c.representativePhone=$("#RepresentativePhone").val(),c.representativeCountryId=$("#RepresentativeCountryId").val(),c.representativeCountyId=$("#RepresentativeCountyId").val(),c.representativeUATId=$("#RepresentativeUATId").val(),c.gdprOptions=[],$("input[type=checkbox][name=group]:checked").each(function(){var s=$(this);c.clientGroupsModel.clientGroupsIds.push(s.val())}),$("#mandatory-gdpr-options input[type=checkbox][id^=gdpr-option]").each(function(){var s=$(this),r=s.attr("data-option-id"),t=s.prop("checked");c.gdprOptions.push({id:r,isMandatory:!0,selectedByTheClient:t})}),$("#optional-gdpr-options input[type=checkbox][id^=gdpr-option]").each(function(){var s=$(this),r=s.attr("data-option-id"),t=s.prop("checked");c.gdprOptions.push({id:r,isMandatory:!1,selectedByTheClient:t})}),c.customFields=new topManagerOS.customFields().getCustomFieldsValues($("#register-form")),c},topManagerOS.loginRegister.prototype.resetControlsErrorStates=function(){var d=this;d.theRegisterForm.find(".form-group.mandatory").removeClass("errorneous")},topManagerOS.loginRegister.prototype.markFieldAsErrorneous=function(d){d.closest(".form-group.mandatory").addClass("errorneous")},topManagerOS.loginRegister.prototype.validateRegisterModel=function(d){var c=this,f=[];
10c.resetControlsErrorStates(),d||f.push(_translate("CouldNotParseFormData")),d.customFieldsMessage&&d.customFieldsMessage.length>0&&$.each(d.customFieldsMessage,function(a,u){f.push(u)}),d.basicRegisterData.lastName||(f.push(_translate("FirstNameMandatory")),c.markFieldAsErrorneous($("#FirstName"))),d.basicRegisterData.firstName||(f.push(_translate("LastNameMandatory")),c.markFieldAsErrorneous($("#LastName")));var v=$("#phone-container.mandatory").length>0,o=topManagerOS.countryPhonePicker,l=o&&typeof o.validateForInput=="function"?o.validateForInput("Phone",v):{valid:!0};if(l.valid===!1&&(f.push(l.message||_translate("PhoneMinimumCharsCount")),c.markFieldAsErrorneous($("#Phone"))),!d.basicRegisterData.email)f.push(_translate("EmailMandatory")),c.markFieldAsErrorneous($("#Email"));else{var s=topManagerOS.common.instance();s.emailAddressIsValid(d.basicRegisterData.email)||(f.push(_translate("EmailNotLookingValid")),c.markFieldAsErrorneous($("#Email")))}c.isMinimalFormMode()||(d.basicRegisterData.password||(f.push(_translate("PasswordMandatory")),c.markFieldAsErrorneous($("#Password"))),d.basicRegisterData.passwordConfirm||(f.push(_translate("PasswordMustBeConfirmed")),c.markFieldAsErrorneous($("#PasswordConfirm"))),d.basicRegisterData.password!==d.basicRegisterData.passwordConfirm&&f.push(_translate("PasswordsMismatch"))),d.iWantToBecomeRepresentative===!0&&(d.UseCompanyForRegister?(d.companyName||(f.push(_translate("CompanyNameMandatory")),c.markFieldAsErrorneous($("#CompanyName"))),d.companyCIF||(f.push(_translate("CompanyCIFMandatory")),c.markFieldAsErrorneous($("#CompanyCIF")))):d.cnp||(f.push(_translate("CNPMandatory")),c.markFieldAsErrorneous($("#CNP"))),d.countryId||(f.push(_translate("CountryMandatory")),c.markFieldAsErrorneous($("#CountryId"))),d.uatCountyId||(f.push(_translate("CountyMandatory")),c.markFieldAsErrorneous($("#UATCountyId"))),d.uatLocalityId||(f.push(_translate("LocalityMandatory")),c.markFieldAsErrorneous($("#UATLocalityId"))),d.street||(f.push(_translate("StreetMandatory")),c.markFieldAsErrorneous($("#Street"))),d.streetNo||(f.push(_translate("StreetNoMandatory")),c.markFieldAsErrorneous($("#StreetNo"))));var r=$("input[name=show-client-address-fields]");if(r.length&&r.attr("data-show-client-address-fields")=="True"&&d.locationAddress&&!d.locationAddress.uatId&&(f.push(_translate("AddressMandatory")),c.markFieldAsErrorneous($("#UATIClientAddressId"))),d.gdprOptions&&d.gdprOptions.length){for(var t=!1,e=0;e<d.gdprOptions.length;e++){var n=d.gdprOptions[e].isMandatory,i=d.gdprOptions[e].selectedByTheClient;if(n===!0&&i===!1){t=!0;break}}t&&f.push(_translate("AllMandatoryGDPROptionsMustBeChecked"))}return f},topManagerOS.loginRegister.prototype.makeCSRFExtendedData=function(d){var c=this,f=$.extend(d,{"CSRF-TOKEN-TOP-MANAGER-ECOMMERCE-FORM":$('input[name="'+c.antiforgeryTokenFieldName+'"]').val()});return f},topManagerOS.loginRegister.prototype.doSubmitTheRegisterForm=function(d){var c=this,f=c.theRegisterForm.attr("action"),v=topManagerOS.common.instance(),o=c.makeCSRFExtendedData(d);v.showBusyBox(),$.ajax({url:f,type:"post",data:{model:o},headers:{RequestVerificationToken:$('input[name="'+c.antiforgeryTokenFieldName+'"]').val()},dataType:"json",success:function(l,s,r){l&&l.success===!0?l.customData?v.showAlertAccordingToResponse(l,function(){window.location=l.customData}):window.location.reload():v.operationFailedAlert(l)},error:function(l,s,r){v.operationFailedAlert()}}).always(function(){v.hideBusyBox()})},function(){new topManagerOS.loginRegister().init()}();var topManagerOS=topManagerOS||{};topManagerOS.datePicker=function(){},topManagerOS.datePicker.prototype.init=function(d){this.setupEvents(d)},topManagerOS.datePicker.prototype.getMonthNo=function(d){return parseInt(d.find(".month-value > select").val(),10)||0},topManagerOS.datePicker.prototype.setupEvents=function(d){const c=this;(d?d.find(".own-os-date-picker-wrapper .hour-value input, .own-os-date-picker-wrapper .minute-value input, .own-os-date-picker-wrapper .day-value input, .own-os-date-picker-wrapper .year-value input"):$(".own-os-date-picker-wrapper .day-value input, .own-os-date-picker-wrapper .year-value input")).off("input").on("input",function(){const o=$(this);c.validateDate(o.closest(".own-os-date-picker-wrapper"))}),(d?d.find(".own-os-date-picker-wrapper .month-value select"):$(".own-os-date-picker-wrapper .month-value select")).off("change").on("change",function(){const o=$(this);c.validateDate(o.closest(".own-os-date-picker-wrapper"))}),$(".own-flatpickr-input").each(function(){var o=$(this),l=o.data("enable-time")===!0||o.data("enable-time")==="true",s=o.data("time-24hr")===!0||o.data("time-24hr")==="true",r=o.data("date-format")||"Y-m-d",t=o.data("default-date")||null;o.flatpickr({enableTime:l,time_24hr:s,dateFormat:r,allowInput:!0,defaultDate:t})})},topManagerOS.datePicker.prototype.validateDate=function(d){const c=this,f=d.find(".day-value"),v=f.children("input"),o=parseInt(v.val(),10)||0,l=d.find(".month-value"),s=l.children("select"),r=parseInt(s.val(),10)||0,t=d.find(".year-value"),e=t.children("input"),n=parseInt(e.val(),10)||0,i=d.find(".hour-value"),a=i.children("input"),u=parseInt(a.val(),10)||0,p=d.find(".minute-value"),m=p.children("input"),y=parseInt(m.val(),10)||0;f.removeClass("with-error"),l.removeClass("with-error"),t.removeClass("with-error"),i.removeClass("with-error"),p.removeClass("with-error");let w=!0,_=!0,F=!0,x=!0,I=!0;v.val()&&!(o>=1&&o<=31)&&(w=!1),e.val()&&!(n>0)&&(_=!1),a.val()&&!(u>=0&&u<=23)&&(x=!1),m.val()&&!(y>=0&&y<=59)&&(I=!1),o&&r&&n&&([4,6,9,11].indexOf(r)!==-1&&o>=1&&o<=30||r===2&&(n%4===0?o>=1&&o<=29:o>=1&&o<=28)||[1,3,5,7,8,10,12].indexOf(r)!==-1&&o>=1&&o<=31||(F=!1)),u&&y&&(u>=0&&u<=23&&y>=0&&y<=59||(F=!1)),F?(w||f.addClass("with-error"),_||t.addClass("with-error"),x||i.addClass("with-error"),I||p.addClass("with-error")):(f.addClass("with-error"),l.addClass("with-error"),t.addClass("with-error"),i.addClass("with-error"),p.addClass("with-error"))},topManagerOS.datePicker.prototype.resetToToday=function(d){const c=new Date,f=d.find(".day-value input"),v=d.find(".month-value select"),o=d.find(".year-value input"),l=d.find(".hour-value input"),s=d.find(".minute-value input");f.val(c.getDate()),v.val(c.getMonth()+1),o.val(c.getFullYear()),l.val(c.getHours()),s.val(c.getMinutes())},topManagerOS.datePicker.prototype.getDateAsFormattedString=function(d){const c=this;if(d&&d.length>0){const f=d.find(".own-os-date-picker-wrapper").first();if(f&&f.length>0){const v=f.attr("data-date-format"),o=f.attr("data-time-matters")==="True"||f.attr("data-time-matters")==="true",l=parseInt(f.find(".day-value").find("input[type=number]").val(),10)||0,s=c.getMonthNo(f),r=parseInt(f.find(".year-value").find("input[type=number]").val(),10)||0,t=parseInt(f.find(".hour-value").find("input[type=number]").val(),10)||0,e=parseInt(f.find(".minute-value").find("input[type=number]").val(),10)||0;let n="";
10if(o)switch(v){case"MM/dd/yyyy HH:mm":n=String(s).padStart(2,"0")+"/"+String(l).padStart(2,"0")+"/"+String(r).padStart(4,"0")+" "+String(t).padStart(2,"0")+":"+String(e).padStart(2,"0");break;case"dd.MM.yyyy HH:mm":default:n=String(l).padStart(2,"0")+"."+String(s).padStart(2,"0")+"."+String(r).padStart(4,"0")+" "+String(t).padStart(2,"0")+":"+String(e).padStart(2,"0");break}else switch(v){case"MM/dd/yyyy":n=String(s).padStart(2,"0")+"/"+String(l).padStart(2,"0")+"/"+String(r).padStart(4,"0");break;case"dd.MM.yyyy":default:n=String(l).padStart(2,"0")+"."+String(s).padStart(2,"0")+"."+String(r).padStart(4,"0");break}return n}}return null},function(){new topManagerOS.datePicker().init(null)}();var topManagerOS=topManagerOS||{};topManagerOS.customFields=function(){},topManagerOS.customFields.prototype.init=function(){this.setupEvents()},topManagerOS.customFields.prototype.setupEvents=function(){var d=this},topManagerOS.customFields.prototype.getCustomFieldsValues=function(d){var c=this,f=[],v=[];return d.find('div[class*="value-wrapper-"]').each(function(){var o=$(this),l=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-name"),s=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-id"),r=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-value-type-id"),t=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("is-mandatory"),e=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-type-code"),n=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("ignore-at-save"),i=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("section-id"),a,u={name:l,dataValueTypeCode:e,id:s,isMandatory:t,dataValueTypeId:r,ignoreAtSave:n,sectionId:i};if(e==="NumericType")a=o.find(".custom-field-value").val(),u.valueAsString=a;else if(e==="SingleLineTextType")a=o.find(".custom-field-value").val(),u.valueAsString=a;else if(e==="MultiLineTextType"||e==="LongTextType")a=o.find(".custom-field-value").val(),u.valueAsString=a;else if(e==="Boolean")a=o.find(".custom-field-value").prop("checked"),u.valueAsString=a;else if(e==="ClientsGroup")a=o.find(".custom-field-value").prop("checked"),u.valueAsString=a;else if(e==="DateType"){var p=new topManagerOS.datePicker().getDateAsFormattedString(o);c.isValidDate(p)&&(u.valueAsString=p)}else if(e==="FileOrPicture"){var m=o.find(".custom-field-value").first(),y=m[0].files;u.file=y[0],u.allowedFileExtensions=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("allowed-file-extension")}else if(e==="ListOfTextValues"){var w=o.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-is-multiple-selection")==="True";let _=[];w?o.find(".own-checkbox-group").each(function(){let F=$(this).closest(".value-wrapper").find(".custom-field-extra-info").data("id");$(this).find('input[type="checkbox"]:checked').each(function(){_.push({value:$(this).val()})})}):o.find(".own-radio-group").each(function(){let F=$(this).closest(".value-wrapper").find(".custom-field-extra-info").data("id"),x=$(this).find('input[type="radio"]:checked').val()||null;_.push({value:x})}),u.multipleSelectionValues=_}t==="true"&&!u.valueAsString&&v.push(_translate("CompleteFieldValidation")+" '"+l+"' "+_translate("CustomFieldsIsMandatory")),f.push(u)}),f},topManagerOS.customFields.prototype.isValidDate=function(d){var c=this;if(!/^(0[1-9]|[12][0-9]|3[01])\.(0[1-9]|1[0-2])\.(\d{4})$/.test(d))return!1;const[v,o,l]=d.split(".").map(Number),s=new Date(l,o-1,v);return s.getFullYear()===l&&s.getMonth()+1===o&&s.getDate()===v},topManagerOS.customFields.prototype.resetFieldsFromCustomFieldsSection=function(d,c){if(self=this,!c||!c.length)return;var f=topManagerOS.common.instance();new topManagerOS.datePicker().init(c);var v=[];function o(s,r){switch(r){case"NumericType":s.find(".custom-field-value").val(0);break;case"SingleLineTextType":case"MultiLineTextType":case"LongTextType":s.find(".custom-field-value").val("");break;case"Boolean":case"ClientsGroup":s.find(".custom-field-value").prop("checked",!1);break;case"DateType":new topManagerOS.datePicker().resetToToday(s);break;case"ListOfTextValues":s.find(".custom-field-value").prop("checked",!1);break;default:break}}c.find('div[class*="value-wrapper-"]').each(function(){var s=$(this),r=s.closest(".value-wrapper").find(".custom-field-extra-info").attr("data-type-code");if(r){o(s,r);var t=s.find("input[class=custom-field-extra-info]").attr("data-id");t&&v.push(t)}});var l=d?d.attr("data-action-url"):null;if(!l){f.warningAlert(_translate("SomethingWentWrong"));return}f.showBusyBox(),$.post(l,{customFieldIds:v},function(s){s&&s.success===!0?(f.successToastMessage(s),window.location.reload()):f.operationFailedAlert(s)}).always(function(){f.hideBusyBox()})}
10,function(){new topManagerOS.customFields().init()}();

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.