text: 
  /*!
   * Bootstrap-select v1.11.2 (http://silviomoreto.github.io/bootstrap-select)
   *
   * Copyright 2013-2016 bootstrap-select
   * Licensed under MIT (https://github.com/silviomoreto/bootstrap-select/blob/master/LICENSE)
   */
  (function(a,b){if(typeof define==="function"&&define.amd){define(["jquery"],function(c){return(b(c))})}else{if(typeof exports==="object"){module.exports=b(require("jquery"))}else{b(jQuery)}}}(this,function(a){(function(f){if(!String.prototype.includes){(function(){var m={}.toString;var j=(function(){try{var q={};var p=Object.defineProperty;var n=p(q,q,q)&&p}catch(o){}return n}());var l="".indexOf;var k=function(s){if(this==null){throw new TypeError()}var q=String(this);if(s&&m.call(s)=="[object RegExp]"){throw new TypeError()}var o=q.length;var p=String(s);var r=p.length;var n=arguments.length>1?arguments[1]:undefined;var u=n?Number(n):0;if(u!=u){u=0}var t=Math.min(Math.max(u,0),o);if(r+t>o){return false}return l.call(q,p,u)!=-1};if(j){j(String.prototype,"includes",{value:k,configurable:true,writable:true})}else{String.prototype.includes=k}}())}if(!String.prototype.startsWith){(function(){var j=(function(){try{var p={};var o=Object.defineProperty;var m=o(p,p,p)&&o}catch(n){}return m}());var l={}.toString;var k=function(t){if(this==null){throw new TypeError()}var q=String(this);if(t&&l.call(t)=="[object RegExp]"){throw new TypeError()}var m=q.length;var u=String(t);var o=u.length;var p=arguments.length>1?arguments[1]:undefined;var s=p?Number(p):0;if(s!=s){s=0}var n=Math.min(Math.max(s,0),m);if(o+n>m){return false}var r=-1;while(++r<o){if(q.charCodeAt(n+r)!=u.charCodeAt(r)){return false}}return true};if(j){j(String.prototype,"startsWith",{value:k,configurable:true,writable:true})}else{String.prototype.startsWith=k}}())}if(!Object.keys){Object.keys=function(m,j,l){l=[];for(j in m){l.hasOwnProperty.call(m,j)&&l.push(j)}return l}}var i={useDefault:false,_set:f.valHooks.select.set};f.valHooks.select.set=function(j,k){if(k&&!i.useDefault){f(j).data("selected",true)}return i._set.apply(this,arguments)};var e=null;f.fn.triggerNative=function(j){var k=this[0],l;if(k.dispatchEvent){if(typeof Event==="function"){l=new Event(j,{bubbles:true})}else{l=document.createEvent("Event");l.initEvent(j,true,false)}k.dispatchEvent(l)}else{if(k.fireEvent){l=document.createEventObject();l.eventType=j;k.fireEvent("on"+j,l)}else{this.trigger(j)}}};f.expr.pseudos.icontains=function(m,j,l){var n=f(m);var k=(n.data("tokens")||n.text()).toString().toUpperCase();return k.includes(l[3].toUpperCase())};f.expr.pseudos.ibegins=function(m,j,l){var n=f(m);var k=(n.data("tokens")||n.text()).toString().toUpperCase();return k.startsWith(l[3].toUpperCase())};f.expr.pseudos.aicontains=function(m,j,l){var n=f(m);var k=(n.data("tokens")||n.data("normalizedText")||n.text()).toString().toUpperCase();return k.includes(l[3].toUpperCase())};f.expr.pseudos.aibegins=function(m,j,l){var n=f(m);var k=(n.data("tokens")||n.data("normalizedText")||n.text()).toString().toUpperCase();return k.startsWith(l[3].toUpperCase())};function h(k){var j=[{re:/[\xC0-\xC6]/g,ch:"A"},{re:/[\xE0-\xE6]/g,ch:"a"},{re:/[\xC8-\xCB]/g,ch:"E"},{re:/[\xE8-\xEB]/g,ch:"e"},{re:/[\xCC-\xCF]/g,ch:"I"},{re:/[\xEC-\xEF]/g,ch:"i"},{re:/[\xD2-\xD6]/g,ch:"O"},{re:/[\xF2-\xF6]/g,ch:"o"},{re:/[\xD9-\xDC]/g,ch:"U"},{re:/[\xF9-\xFC]/g,ch:"u"},{re:/[\xC7-\xE7]/g,ch:"c"},{re:/[\xD1]/g,ch:"N"},{re:/[\xF1]/g,ch:"n"}];f.each(j,function(){k=k.replace(this.re,this.ch)});return k}function g(k){var m={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};var o="(?:"+Object.keys(m).join("|")+")",n=new RegExp(o),l=new RegExp(o,"g"),j=k==null?"":""+k;return n.test(j)?j.replace(l,function(p){return m[p]}):j}var c=function(k,j,l){if(!i.useDefault){f.valHooks.select.set=i._set;i.useDefault=true}if(l){l.stopPropagation();l.preventDefault()}this.$element=f(k);this.$newElement=null;this.$button=null;this.$menu=null;this.$lis=null;this.options=j;if(this.options.title===null){this.options.title=this.$element.attr("title")}this.val=c.prototype.val;this.render=c.prototype.render;this.refresh=c.prototype.refresh;this.setStyle=c.prototype.setStyle;this.selectAll=c.prototype.selectAll;this.deselectAll=c.prototype.deselectAll;this.destroy=c.prototype.destroy;this.remove=c.prototype.remove;this.show=c.prototype.show;this.hide=c.prototype.hide;this.init()};c.VERSION="1.11.2";c.DEFAULTS={noneSelectedText:"Nothing selected",noneResultsText:"No results matched {0}",countSelectedText:function(k,j){return(k==1)?"{0} item selected":"{0} items selected"},maxOptionsText:function(j,k){return[(j==1)?"Limit reached ({n} item max)":"Limit reached ({n} items max)",(k==1)?"Group limit reached ({n} item max)":"Group limit reached ({n} items max)"]},selectAllText:"Select All",deselectAllText:"Deselect All",doneButton:false,doneButtonText:"Close",multipleSeparator:", ",styleBase:"btn",style:"btn-default",size:"auto",title:null,selectedTextFormat:"values",width:false,container:false,hideDisabled:false,showSubtext:false,showIcon:true,showContent:true,dropupAuto:true,header:false,liveSearch:false,liveSearchPlaceholder:null,liveSearchNormalize:false,liveSearchStyle:"contains",actionsBox:false,iconBase:"glyphicon",tickIcon:"glyphicon-ok",showTick:false,template:{caret:'<span class="caret"></span>'},maxOptions:false,mobile:false,selectOnTab:false,dropdownAlignRight:false};c.prototype={constructor:c,init:function(){var j=this,k=this.$element.attr("id");this.$element.addClass("bs-select-hidden");this.liObj={};this.multiple=this.$element.prop("multiple");this.autofocus=this.$element.prop("autofocus");this.$newElement=this.createView();this.$element.after(this.$newElement).appendTo(this.$newElement);this.$button=this.$newElement.children("button");this.$menu=this.$newElement.children(".dropdown-menu");this.$menuInner=this.$menu.children(".inner");this.$searchbox=this.$menu.find("input");this.$element.removeClass("bs-select-hidden");if(this.options.dropdownAlignRight===true){this.$menu.addClass("dropdown-menu-right")}if(typeof k!=="undefined"){this.$button.attr("data-id",k);f('label[for="'+k+'"]').click(function(l){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){l.preventDefault();j.$button.focus()}})}this.checkDisabled();this.clickListener();if(this.options.liveSearch){this.liveSearchListener()}this.render();this.setStyle();this.setWidth();if(this.options.container){this.selectPosition()}this.$menu.data("this",this);this.$newElement.data("this",this);if(this.options.mobile){this.mobile()}this.$newElement.on({"hide.bs.dropdown":function(l){j.$menuInner.attr("aria-expanded",false);j.$element.trigger("hide.bs.select",l)},"hidden.bs.dropdown":function(l){j.$element.trigger("hidden.bs.select",l)},"show.bs.dropdown":function(l){j.$menuInner.attr("aria-expanded",true);j.$element.trigger("show.bs.select",l)},"shown.bs.dropdown":function(l){j.$element.trigger("shown.bs.select",l)}});if(j.$element[0].hasAttribute("required")){this.$element.on("invalid",function(){j.$button.addClass("bs-invalid").focus();j.$element.on({"focus.bs.select":function(){j.$button.focus();j.$element.off("focus.bs.select")},"shown.bs.select":function(){j.$element.val(j.$element.val()).off("shown.bs.select")},"rendered.bs.select":function(){if(this.validity.valid){j.$button.removeClass("bs-invalid")}j.$element.off("rendered.bs.select")}})})}setTimeout(function(){j.$element.trigger("loaded.bs.select")})},createDropdown:function(){var o=(this.multiple||this.options.showTick)?" show-tick":"",k=this.$element.parent().hasClass("input-group")?" input-group-btn":"",q=this.autofocus?" autofocus":"";var p=this.options.header?'<div class="popover-title"><button type="button" class="close" aria-hidden="true">&times;</button>'+this.options.header+"</div>":"";var n=this.options.liveSearch?'<div class="bs-searchbox"><input type="text" class="form-control" autocomplete="off"'+(null===this.options.liveSearchPlaceholder?"":' placeholder="'+g(this.options.liveSearchPlaceholder)+'"')+' role="textbox" aria-label="Search"></div>':"";var m=this.multiple&&this.options.actionsBox?'<div class="bs-actionsbox"><div class="btn-group btn-group-sm btn-block"><button type="button" class="actions-btn bs-select-all btn btn-default">'+this.options.selectAllText+'</button><button type="button" class="actions-btn bs-deselect-all btn btn-default">'+this.options.deselectAllText+"</button></div></div>":"";var j=this.multiple&&this.options.doneButton?'<div class="bs-donebutton"><div class="btn-group btn-block"><button type="button" class="btn btn-sm btn-default">'+this.options.doneButtonText+"</button></div></div>":"";var l='<div class="btn-group lfb_bootstrap-select'+o+k+'"><button type="button" class="'+this.options.styleBase+' dropdown-toggle" data-toggle="dropdown"'+q+' role="button"><span class="filter-option pull-left"></span>&nbsp;<span class="bs-caret">'+this.options.template.caret+'</span></button><div class="dropdown-menu open" role="combobox">'+p+n+m+'<ul class="dropdown-menu inner" role="listbox" aria-expanded="false"></ul>'+j+"</div></div>";return f(l)},createView:function(){var k=this.createDropdown(),j=this.createLi();k.find("ul")[0].innerHTML=j;return k},reloadLi:function(){this.destroyLi();var j=this.createLi();this.$menuInner[0].innerHTML=j},destroyLi:function(){this.$menu.find("li").remove()},createLi:function(){var o=this,n=[],r=0,j=document.createElement("option"),l=-1;var q=function(v,t,u,s){return"<li"+((typeof u!=="undefined"&""!==u)?' class="'+u+'"':"")+((typeof t!=="undefined"&null!==t)?' data-original-index="'+t+'"':"")+((typeof s!=="undefined"&null!==s)?'data-optgroup="'+s+'"':"")+">"+v+"</li>"};var k=function(v,s,u,t){return'<a tabindex="0"'+(typeof s!=="undefined"?' class="'+s+'"':"")+(typeof u!=="undefined"?' style="'+u+'"':"")+(o.options.liveSearchNormalize?' data-normalized-text="'+h(g(v))+'"':"")+(typeof t!=="undefined"||t!==null?' data-tokens="'+t+'"':"")+' role="option">'+v+'<span class="'+o.options.iconBase+" "+o.options.tickIcon+' check-mark"></span></a>'};if(this.options.title&&!this.multiple){l--;if(!this.$element.find(".bs-title-option").length){var m=this.$element[0];j.className="bs-title-option";j.appendChild(document.createTextNode(this.options.title));j.value="";m.insertBefore(j,m.firstChild);var p=f(m.options[m.selectedIndex]);if(p.attr("selected")===undefined&&this.$element.data("selected")===undefined){j.selected=true}}}this.$element.find("option").each(function(v){var u=f(this);l++;if(u.hasClass("bs-title-option")){return}var y=this.className||"",t=this.style.cssText,z=u.data("content")?u.data("content"):u.html(),B=u.data("tokens")?u.data("tokens"):null,O=typeof u.data("subtext")!=="undefined"?'<small class="text-muted">'+u.data("subtext")+"</small>":"",K=typeof u.data("icon")!=="undefined"?'<span class="'+o.options.iconBase+" "+u.data("icon")+'"></span> ':"",D=u.parent(),s=D[0].tagName==="OPTGROUP",G=s&&D[0].disabled,A=this.disabled||G;if(K!==""&&A){K="<span>"+K+"</span>"}if(o.options.hideDisabled&&(A&&!s||G)){l--;return}if(!u.data("content")){z=K+'<span class="text">'+z+O+"</span>"}if(s&&u.data("divider")!==true){if(o.options.hideDisabled&&A){if(D.data("allOptionsDisabled")===undefined){var H=D.children();D.data("allOptionsDisabled",H.filter(":disabled").length===H.length)}if(D.data("allOptionsDisabled")){l--;return}}var M=" "+D[0].className||"";if(u.index()===0){r+=1;var w=D[0].label,N=typeof D.data("subtext")!=="undefined"?'<small class="text-muted">'+D.data("subtext")+"</small>":"",F=D.data("icon")?'<span class="'+o.options.iconBase+" "+D.data("icon")+'"></span> ':"";w=F+'<span class="text">'+w+N+"</span>";if(v!==0&&n.length>0){l++;n.push(q("",null,"divider",r+"div"))}l++;n.push(q(w,null,"dropdown-header"+M,r))}if(o.options.hideDisabled&&A){l--;return}n.push(q(k(z,"opt "+y+M,t,B),v,"",r))}else{if(u.data("divider")===true){n.push(q("",v,"divider"))}else{if(u.data("hidden")===true){n.push(q(k(z,y,t,B),v,"hidden is-hidden"))}else{var C=this.previousElementSibling&&this.previousElementSibling.tagName==="OPTGROUP";if(!C&&o.options.hideDisabled){var J=f(this).prevAll();for(var I=0;I<J.length;I++){if(J[I].tagName==="OPTGROUP"){var E=0;for(var L=0;L<I;L++){var x=J[L];if(x.disabled||f(x).data("hidden")===true){E++}}if(E===I){C=true}break}}}if(C){l++;n.push(q("",null,"divider",r+"div"))}n.push(q(k(z,y,t,B),v))}}}o.liObj[v]=l});if(!this.multiple&&this.$element.find("option:selected").length===0&&!this.options.title){this.$element.find("option").eq(0).prop("selected",true).attr("selected","selected")}return n.join("")},findLis:function(){if(this.$lis==null){this.$lis=this.$menu.find("li")}return this.$lis},render:function(m){var l=this,o;if(m!==false){this.$element.find("option").each(function(r){var s=l.findLis().eq(l.liObj[r]);l.setDisabled(r,this.disabled||this.parentNode.tagName==="OPTGROUP"&&this.parentNode.disabled,s);l.setSelected(r,this.selected,s)})}this.togglePlaceholder();this.tabIndex();var q=this.$element.find("option").map(function(){if(this.selected){if(l.options.hideDisabled&&(this.disabled||this.parentNode.tagName==="OPTGROUP"&&this.parentNode.disabled)){return}var t=f(this),s=t.data("icon")&&l.options.showIcon?'<i class="'+l.options.iconBase+" "+t.data("icon")+'"></i> ':"",r;if(l.options.showSubtext&&t.data("subtext")&&!l.multiple){r=' <small class="text-muted">'+t.data("subtext")+"</small>"}else{r=""}if(typeof t.attr("title")!=="undefined"){return t.attr("title")}else{if(t.data("content")&&l.options.showContent){return t.data("content")}else{return s+t.html()+r}}}}).toArray();var n=!this.multiple?q[0]:q.join(this.options.multipleSeparator);if(this.multiple&&this.options.selectedTextFormat.indexOf("count")>-1){var j=this.options.selectedTextFormat.split(">");if((j.length>1&&q.length>j[1])||(j.length==1&&q.length>=2)){o=this.options.hideDisabled?", [disabled]":"";var k=this.$element.find("option").not('[data-divider="true"], [data-hidden="true"]'+o).length,p=(typeof this.options.countSelectedText==="function")?this.options.countSelectedText(q.length,k):this.options.countSelectedText;n=p.replace("{0}",q.length.toString()).replace("{1}",k.toString())}}if(this.options.title==undefined){this.options.title=this.$element.attr("title")}if(this.options.selectedTextFormat=="static"){n=this.options.title}if(!n){n=typeof this.options.title!=="undefined"?this.options.title:this.options.noneSelectedText}this.$button.attr("title",f.trim(n.replace(/<[^>]*>?/g,"")));this.$button.children(".filter-option").html(n);this.$element.trigger("rendered.bs.select")},setStyle:function(l,k){if(this.$element.attr("class")){this.$newElement.addClass(this.$element.attr("class").replace(/selectpicker|mobile-device|bs-select-hidden|validate\[.*\]/gi,""))}var j=l?l:this.options.style;if(k=="add"){this.$button.addClass(j)}else{if(k=="remove"){this.$button.removeClass(j)}else{this.$button.removeClass(this.options.style);this.$button.addClass(j)}}},liHeight:function(p){if(!p&&(this.options.size===false||this.sizeInfo)){return}var n=document.createElement("div"),j=document.createElement("div"),t=document.createElement("ul"),B=document.createElement("li"),A=document.createElement("li"),F=document.createElement("a"),z=document.createElement("span"),E=this.options.header&&this.$menu.find(".popover-title").length>0?this.$menu.find(".popover-title")[0].cloneNode(true):null,u=this.options.liveSearch?document.createElement("div"):null,v=this.options.actionsBox&&this.multiple&&this.$menu.find(".bs-actionsbox").length>0?this.$menu.find(".bs-actionsbox")[0].cloneNode(true):null,m=this.options.doneButton&&this.multiple&&this.$menu.find(".bs-donebutton").length>0?this.$menu.find(".bs-donebutton")[0].cloneNode(true):null;z.className="text";n.className=this.$menu[0].parentNode.className+" open";j.className="dropdown-menu open";t.className="dropdown-menu inner";B.className="divider";z.appendChild(document.createTextNode("Inner text"));F.appendChild(z);A.appendChild(F);t.appendChild(A);t.appendChild(B);if(E){j.appendChild(E)}if(u){var x=document.createElement("span");u.className="bs-searchbox";x.className="form-control";u.appendChild(x);j.appendChild(u)}if(v){j.appendChild(v)}j.appendChild(t);if(m){j.appendChild(m)}n.appendChild(j);document.body.appendChild(n);var l=F.offsetHeight,D=E?E.offsetHeight:0,w=u?u.offsetHeight:0,s=v?v.offsetHeight:0,o=m?m.offsetHeight:0,y=f(B).outerHeight(true),k=typeof getComputedStyle==="function"?getComputedStyle(j):false,q=k?null:f(j),C={vert:parseInt(k?k.paddingTop:q.css("paddingTop"))+parseInt(k?k.paddingBottom:q.css("paddingBottom"))+parseInt(k?k.borderTopWidth:q.css("borderTopWidth"))+parseInt(k?k.borderBottomWidth:q.css("borderBottomWidth")),horiz:parseInt(k?k.paddingLeft:q.css("paddingLeft"))+parseInt(k?k.paddingRight:q.css("paddingRight"))+parseInt(k?k.borderLeftWidth:q.css("borderLeftWidth"))+parseInt(k?k.borderRightWidth:q.css("borderRightWidth"))},r={vert:C.vert+parseInt(k?k.marginTop:q.css("marginTop"))+parseInt(k?k.marginBottom:q.css("marginBottom"))+2,horiz:C.horiz+parseInt(k?k.marginLeft:q.css("marginLeft"))+parseInt(k?k.marginRight:q.css("marginRight"))+2};document.body.removeChild(n);this.sizeInfo={liHeight:l,headerHeight:D,searchHeight:w,actionsHeight:s,doneButtonHeight:o,dividerHeight:y,menuPadding:C,menuExtras:r}},setSize:function(){this.findLis();this.liHeight();if(this.options.header){this.$menu.css("padding-top",0)}if(this.options.size===false){return}var u=this,r=this.$menu,n=this.$menuInner,z=f(window),H=this.$newElement[0].offsetHeight,J=this.$newElement[0].offsetWidth,o=this.sizeInfo.liHeight,D=this.sizeInfo.headerHeight,w=this.sizeInfo.searchHeight,t=this.sizeInfo.actionsHeight,p=this.sizeInfo.doneButtonHeight,v=this.sizeInfo.dividerHeight,C=this.sizeInfo.menuPadding,s=this.sizeInfo.menuExtras,A=this.options.hideDisabled?".disabled":"",B,j,x,l,I,G,q,F,E=function(){var M=u.$newElement.offset(),K=f(u.options.container),L;if(u.options.container&&!K.is("body")){L=K.offset();L.top+=parseInt(K.css("borderTopWidth"));L.left+=parseInt(K.css("borderLeftWidth"))}else{L={top:0,left:0}}I=M.top-L.top-z.scrollTop();G=z.height()-I-H-L.top;q=M.left-L.left-z.scrollLeft();F=z.width()-q-J-L.left};E();if(this.options.size==="auto"){var m=function(){var N,M=function(Q,P){return function(R){if(P){return(R.classList?R.classList.contains(Q):f(R).hasClass(Q))}else{return !(R.classList?R.classList.contains(Q):f(R).hasClass(Q))}}},L=u.$menuInner[0].getElementsByTagName("li"),K=Array.prototype.filter?Array.prototype.filter.call(L,M("hidden",false)):u.$lis.not(".hidden"),O=Array.prototype.filter?Array.prototype.filter.call(K,M("dropdown-header",true)):K.filter(".dropdown-header");E();B=G-s.vert;j=F-s.horiz;if(u.options.container){if(!r.data("height")){r.data("height",r.height())}x=r.data("height");if(!r.data("width")){r.data("width",r.width())}l=r.data("width")}else{x=r.height();l=r.width()}if(u.options.dropupAuto){u.$newElement.toggleClass("dropup",I>G&&(B-s.vert)<x)}if(u.$newElement.hasClass("dropup")){B=I-s.vert}if(u.options.dropdownAlignRight==="auto"){r.toggleClass("dropdown-menu-right",q>F&&(j-s.horiz)<(l-J))}if((K.length+O.length)>3){N=o*3+s.vert-2}else{N=0}r.css({"max-height":B+"px",overflow:"hidden","min-height":N+D+w+t+p+"px"});n.css({"max-height":B-D-w-t-p-C.vert+"px","overflow-y":"auto","min-height":Math.max(N-C.vert,0)+"px"})};m();this.$searchbox.off("input.getSize propertychange.getSize").on("input.getSize propertychange.getSize",m);z.off("resize.getSize scroll.getSize").on("resize.getSize scroll.getSize",m)}else{if(this.options.size&&this.options.size!="auto"&&this.$lis.not(A).length>this.options.size){var y=this.$lis.not(".divider").not(A).children().slice(0,this.options.size).last().parent().index(),k=this.$lis.slice(0,y+1).filter(".divider").length;B=o*this.options.size+k*v+C.vert;if(u.options.container){if(!r.data("height")){r.data("height",r.height())}x=r.data("height")}else{x=r.height()}if(u.options.dropupAuto){this.$newElement.toggleClass("dropup",I>G&&(B-s.vert)<x)}r.css({"max-height":B+D+w+t+p+"px",overflow:"hidden","min-height":""});n.css({"max-height":B-C.vert+"px","overflow-y":"auto","min-height":""})}}},setWidth:function(){if(this.options.width==="auto"){this.$menu.css("min-width","0");var k=this.$menu.parent().clone().appendTo("body"),j=this.options.container?this.$newElement.clone().appendTo("body"):k,l=k.children(".dropdown-menu").outerWidth(),m=j.css("width","auto").children("button").outerWidth();k.remove();j.remove();this.$newElement.css("width",Math.max(l,m)+"px")}else{if(this.options.width==="fit"){this.$menu.css("min-width","");this.$newElement.css("width","").addClass("fit-width")}else{if(this.options.width){this.$menu.css("min-width","");this.$newElement.css("width",this.options.width)}else{this.$menu.css("min-width","");this.$newElement.css("width","")}}}if(this.$newElement.hasClass("fit-width")&&this.options.width!=="fit"){this.$newElement.removeClass("fit-width")}},selectPosition:function(){this.$bsContainer=f('<div class="bs-container" />');var k=this,l=f(this.options.container),o,n,m,j=function(p){k.$bsContainer.addClass(p.attr("class").replace(/form-control|fit-width/gi,"")).toggleClass("dropup",p.hasClass("dropup"));o=p.offset();if(!l.is("body")){n=l.offset();n.top+=parseInt(l.css("borderTopWidth"))-l.scrollTop();n.left+=parseInt(l.css("borderLeftWidth"))-l.scrollLeft()}else{n={top:0,left:0}}m=p.hasClass("dropup")?0:p[0].offsetHeight;k.$bsContainer.css({top:o.top-n.top+m,left:o.left-n.left,width:p[0].offsetWidth})};this.$button.on("click",function(){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){var p=f(this);if(k.isDisabled()){return}j(k.$newElement);k.$bsContainer.appendTo(k.options.container).toggleClass("open",!p.hasClass("open")).append(k.$menu)}});f(window).on("resize scroll",function(){j(k.$newElement)});this.$element.on("hide.bs.select",function(){k.$menu.data("height",k.$menu.height());k.$bsContainer.detach()})},setSelected:function(j,l,k){if(!k){this.togglePlaceholder();k=this.findLis().eq(this.liObj[j])}k.toggleClass("selected",l).find("a").attr("aria-selected",l)},setDisabled:function(j,l,k){if(!k){k=this.findLis().eq(this.liObj[j])}if(l){k.addClass("disabled").children("a").attr("href","#").attr("tabindex",-1).attr("aria-disabled",true)}else{k.removeClass("disabled").children("a").removeAttr("href").attr("tabindex",0).attr("aria-disabled",false)}},isDisabled:function(){return this.$element[0].disabled},checkDisabled:function(){var j=this;if(this.isDisabled()){this.$newElement.addClass("disabled");this.$button.addClass("disabled").attr("tabindex",-1)}else{if(this.$button.hasClass("disabled")){this.$newElement.removeClass("disabled");this.$button.removeClass("disabled")}if(this.$button.attr("tabindex")==-1&&!this.$element.data("tabindex")){this.$button.removeAttr("tabindex")}}this.$button.click(function(){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){return !j.isDisabled()}})},togglePlaceholder:function(){var j=this.$element.val();this.$button.toggleClass("bs-placeholder",j===null||j==="")},tabIndex:function(){if(this.$element.data("tabindex")!==this.$element.attr("tabindex")&&(this.$element.attr("tabindex")!==-98&&this.$element.attr("tabindex")!=="-98")){this.$element.data("tabindex",this.$element.attr("tabindex"));this.$button.attr("tabindex",this.$element.data("tabindex"))}this.$element.attr("tabindex",-98)},clickListener:function(){var j=this,k=f(document);this.$newElement.on("touchstart.dropdown",".dropdown-menu",function(l){l.stopPropagation()});k.data("spaceSelect",false);this.$button.on("keyup",function(l){if(/(32)/.test(l.keyCode.toString(10))&&k.data("spaceSelect")){l.preventDefault();k.data("spaceSelect",false)}});this.$button.on("click",function(){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){j.setSize()}});this.$element.on("shown.bs.select",function(){if(!j.options.liveSearch&&!j.multiple){j.$menuInner.find(".selected a").focus()}else{if(!j.multiple){var l=j.liObj[j.$element[0].selectedIndex];if(typeof l!=="number"||j.options.size===false){return}var m=j.$lis.eq(l)[0].offsetTop-j.$menuInner[0].offsetTop;m=m-j.$menuInner[0].offsetHeight/2+j.sizeInfo.liHeight/2;j.$menuInner[0].scrollTop=m}}});this.$menuInner.on("click","li a",function(C){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){var r=f(this),m=r.parent().data("originalIndex"),A=j.$element.val(),t=j.$element.prop("selectedIndex"),u=true;if(j.multiple&&j.options.maxOptions!==1){C.stopPropagation()}C.preventDefault();if(!j.isDisabled()&&!r.parent().hasClass("disabled")){var y=j.$element.find("option"),z=y.eq(m),o=z.prop("selected"),x=z.parent("optgroup"),E=j.options.maxOptions,v=x.data("maxOptions")||false;if(!j.multiple){y.prop("selected",false);z.prop("selected",true);j.$menuInner.find(".selected").removeClass("selected").find("a").attr("aria-selected",false);j.setSelected(m,true)}else{z.prop("selected",!o);j.setSelected(m,!o);r.blur();if(E!==false||v!==false){var n=E<y.filter(":selected").length,q=v<x.find("option:selected").length;if((E&&n)||(v&&q)){if(E&&E==1){y.prop("selected",false);z.prop("selected",true);j.$menuInner.find(".selected").removeClass("selected");j.setSelected(m,true)}else{if(v&&v==1){x.find("option:selected").prop("selected",false);z.prop("selected",true);var B=r.parent().data("optgroup");j.$menuInner.find('[data-optgroup="'+B+'"]').removeClass("selected");j.setSelected(m,true)}else{var l=typeof j.options.maxOptionsText==="string"?[j.options.maxOptionsText,j.options.maxOptionsText]:j.options.maxOptionsText,p=typeof l==="function"?l(E,v):l,D=p[0].replace("{n}",E),s=p[1].replace("{n}",v),w=f('<div class="notify"></div>');if(p[2]){D=D.replace("{var}",p[2][E>1?0:1]);s=s.replace("{var}",p[2][v>1?0:1])}z.prop("selected",false);j.$menu.append(w);if(E&&n){w.append(f("<div>"+D+"</div>"));u=false;j.$element.trigger("maxReached.bs.select")}if(v&&q){w.append(f("<div>"+s+"</div>"));u=false;j.$element.trigger("maxReachedGrp.bs.select")}setTimeout(function(){j.setSelected(m,false)},10);w.delay(750).fadeOut(300,function(){f(this).remove()})}}}}}if(!j.multiple||(j.multiple&&j.options.maxOptions===1)){j.$button.focus()}else{if(j.options.liveSearch){j.$searchbox.focus()}}if(u){if((A!=j.$element.val()&&j.multiple)||(t!=j.$element.prop("selectedIndex")&&!j.multiple)){e=[m,z.prop("selected"),o];j.$element.triggerNative("change")}}}}});this.$menu.on("click","li.disabled a, .popover-title, .popover-title :not(.close)",function(l){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){if(l.currentTarget==this){l.preventDefault();l.stopPropagation();if(j.options.liveSearch&&!f(l.target).hasClass("close")){j.$searchbox.focus()}else{j.$button.focus()}}}});this.$menuInner.on("click",".divider, .dropdown-header",function(l){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){l.preventDefault();l.stopPropagation();if(j.options.liveSearch){j.$searchbox.focus()}else{j.$button.focus()}}});this.$menu.on("click",".popover-title .close",function(){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){j.$button.click()}});this.$searchbox.on("click",function(l){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){l.stopPropagation()}});this.$menu.on("click",".actions-btn",function(l){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){if(j.options.liveSearch){j.$searchbox.focus()}else{j.$button.focus()}l.preventDefault();l.stopPropagation();if(f(this).hasClass("bs-select-all")){j.selectAll()}else{j.deselectAll()}}});this.$element.change(function(){j.render(false);j.$element.trigger("changed.bs.select",e);e=null})},liveSearchListener:function(){var k=this,j=f('<li class="no-results"></li>');this.$button.on("click.dropdown.data-api touchstart.dropdown.data-api",function(){if(typeof tld_selectionMode==="undefined"||!tld_selectionMode){k.$menuInner.find(".active").removeClass("active");if(!!k.$searchbox.val()){k.$searchbox.val("");k.$lis.not(".is-hidden").removeClass("hidden");if(!!j.parent().length){j.remove()}}if(!k.multiple){k.$menuInner.find(".selected").addClass("active")}setTimeout(function(){k.$searchbox.focus()},10)}});this.$searchbox.on("click.dropdown.data-api focus.dropdown.data-api touchend.dropdown.data-api",function(l){l.stopPropagation()});this.$searchbox.on("input propertychange",function(){if(k.$searchbox.val()){var l=k.$lis.not(".is-hidden").removeClass("hidden").children("a");if(k.options.liveSearchNormalize){l=l.not(":a"+k._searchStyle()+'("'+h(k.$searchbox.val())+'")')}else{l=l.not(":"+k._searchStyle()+'("'+k.$searchbox.val()+'")')}l.parent().addClass("hidden");k.$lis.filter(".dropdown-header").each(function(){var o=f(this),n=o.data("optgroup");if(k.$lis.filter("[data-optgroup="+n+"]").not(o).not(".hidden").length===0){o.addClass("hidden");k.$lis.filter("[data-optgroup="+n+"div]").addClass("hidden")}});var m=k.$lis.not(".hidden");m.each(function(n){var o=f(this);if(o.hasClass("divider")&&(o.index()===m.first().index()||o.index()===m.last().index()||m.eq(n+1).hasClass("divider"))){o.addClass("hidden")}});if(!k.$lis.not(".hidden, .no-results").length){if(!!j.parent().length){j.remove()}j.html(k.options.noneResultsText.replace("{0}",'"'+g(k.$searchbox.val())+'"')).show();k.$menuInner.append(j)}else{if(!!j.parent().length){j.remove()}}}else{k.$lis.not(".is-hidden").removeClass("hidden");if(!!j.parent().length){j.remove()}}k.$lis.filter(".active").removeClass("active");if(k.$searchbox.val()){k.$lis.not(".hidden, .divider, .dropdown-header").eq(0).addClass("active").children("a").focus()}f(this).focus()})},_searchStyle:function(){var j={begins:"ibegins",startsWith:"ibegins"};return j[this.options.liveSearchStyle]||"icontains"},val:function(j){if(typeof j!=="undefined"){this.$element.val(j);this.render();return this.$element}else{return this.$element.val()}},changeAll:function(k){if(!this.multiple){return}if(typeof k==="undefined"){k=true}this.findLis();var j=this.$element.find("option"),p=this.$lis.not(".divider, .dropdown-header, .disabled, .hidden"),l=p.length,o=[];if(k){if(p.filter(".selected").length===p.length){return}}else{if(p.filter(".selected").length===0){return}}p.toggleClass("selected",k);for(var m=0;m<l;m++){var n=p[m].getAttribute("data-original-index");o[o.length]=j.eq(n)[0]}f(o).prop("selected",k);this.render(false);this.togglePlaceholder();this.$element.triggerNative("change")},selectAll:function(){return this.changeAll(true)},deselectAll:function(){return this.changeAll(false)},toggle:function(j){j=j||window.event;if(j){j.stopPropagation()}this.$button.trigger("click")},keydown:function(A){var l=f(this),u=l.is("input")?l.parent().parent():l.parent(),k,p=u.data("this"),m,w,o,s,v,j,q,y,x=":not(.disabled, .hidden, .dropdown-header, .divider)",t={32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9"};if(p.options.liveSearch){u=l.parent().parent()}if(p.options.container){u=p.$menu}k=f('[role="listbox"] li',u);y=p.$newElement.hasClass("open");if(!y&&(A.keyCode>=48&&A.keyCode<=57||A.keyCode>=96&&A.keyCode<=105||A.keyCode>=65&&A.keyCode<=90)){if(!p.options.container){p.setSize();p.$menu.parent().addClass("open");y=true}else{p.$button.trigger("click")}p.$searchbox.focus();return}if(p.options.liveSearch){if(/(^9$|27)/.test(A.keyCode.toString(10))&&y){A.preventDefault();A.stopPropagation();p.$button.click().focus()}k=f('[role="listbox"] li'+x,u);if(!l.val()&&!/(38|40)/.test(A.keyCode.toString(10))){if(k.filter(".active").length===0){k=p.$menuInner.find("li");if(p.options.liveSearchNormalize){k=k.filter(":a"+p._searchStyle()+"("+h(t[A.keyCode])+")")}else{k=k.filter(":"+p._searchStyle()+"("+t[A.keyCode]+")")}}}}if(!k.length){return}if(/(38|40)/.test(A.keyCode.toString(10))){m=k.index(k.find("a").filter(":focus").parent());o=k.filter(x).first().index();s=k.filter(x).last().index();w=k.eq(m).nextAll(x).eq(0).index();v=k.eq(m).prevAll(x).eq(0).index();j=k.eq(w).prevAll(x).eq(0).index();if(p.options.liveSearch){k.each(function(C){if(!f(this).hasClass("disabled")){f(this).data("index",C)}});m=k.index(k.filter(".active"));o=k.first().data("index");s=k.last().data("index");w=k.eq(m).nextAll().eq(0).data("index");v=k.eq(m).prevAll().eq(0).data("index");j=k.eq(w).prevAll().eq(0).data("index")}q=l.data("prevIndex");if(A.keyCode==38){if(p.options.liveSearch){m--}if(m!=j&&m>v){m=v}if(m<o){m=o}if(m==q){m=s}}else{if(A.keyCode==40){if(p.options.liveSearch){m++}if(m==-1){m=0}if(m!=j&&m<w){m=w}if(m>s){m=s}if(m==q){m=o}}}l.data("prevIndex",m);if(!p.options.liveSearch){k.eq(m).children("a").focus()}else{A.preventDefault();if(!l.hasClass("dropdown-toggle")){k.removeClass("active").eq(m).addClass("active").children("a").focus();l.focus()}}}else{if(!l.is("input")){var r=[],n,B;k.each(function(){if(!f(this).hasClass("disabled")){if(f.trim(f(this).children("a").text().toLowerCase()).substring(0,1)==t[A.keyCode]){r.push(f(this).index())}}});n=f(document).data("keycount");n++;f(document).data("keycount",n);B=f.trim(f(":focus").text().toLowerCase()).substring(0,1);if(B!=t[A.keyCode]){n=1;f(document).data("keycount",n)}else{if(n>=r.length){f(document).data("keycount",0);if(n>r.length){n=1}}}k.eq(r[n-1]).children("a").focus()}}if((/(13|32)/.test(A.keyCode.toString(10))||(/(^9$)/.test(A.keyCode.toString(10))&&p.options.selectOnTab))&&y){if(!/(32)/.test(A.keyCode.toString(10))){A.preventDefault()}if(!p.options.liveSearch){var z=f(":focus");z.click();z.focus();A.preventDefault();f(document).data("spaceSelect",true)}else{if(!/(32)/.test(A.keyCode.toString(10))){p.$menuInner.find(".active a").click();l.focus()}}f(document).data("keycount",0)}if((/(^9$|27)/.test(A.keyCode.toString(10))&&y&&(p.multiple||p.options.liveSearch))||(/(27)/.test(A.keyCode.toString(10))&&!y)){p.$menu.parent().removeClass("open");if(p.options.container){p.$newElement.removeClass("open")}p.$button.focus()}},mobile:function(){this.$element.addClass("mobile-device")},refresh:function(){this.$lis=null;this.liObj={};this.reloadLi();this.render();this.checkDisabled();this.liHeight(true);this.setStyle();this.setWidth();if(this.$lis){this.$searchbox.trigger("propertychange")}this.$element.trigger("refreshed.bs.select")},hide:function(){this.$newElement.hide()},show:function(){this.$newElement.show()},remove:function(){this.$newElement.remove();this.$element.remove()},destroy:function(){this.$newElement.before(this.$element).remove();if(this.$bsContainer){this.$bsContainer.remove()}else{this.$menu.remove()}this.$element.off(".bs.select").removeData("selectpicker").removeClass("bs-select-hidden selectpicker")}};function d(m,n){var k=arguments;var p=m,j=n;[].shift.apply(k);var o;var l=this.each(function(){var u=f(this);if(u.is("select")){var t=u.data("selectpicker"),r=typeof p=="object"&&p;if(!t){var q=f.extend({},c.DEFAULTS,f.fn.selectpicker.defaults||{},u.data(),r);q.template=f.extend({},c.DEFAULTS.template,(f.fn.selectpicker.defaults?f.fn.selectpicker.defaults.template:{}),u.data().template,r.template);u.data("selectpicker",(t=new c(this,q,j)))}else{if(r){for(var s in r){if(r.hasOwnProperty(s)){t.options[s]=r[s]}}}}if(typeof p=="string"){if(t[p] instanceof Function){o=t[p].apply(t,k)}else{o=t.options[p]}}}});if(typeof o!=="undefined"){return o}else{return l}}var b=f.fn.selectpicker;f.fn.selectpicker=d;f.fn.selectpicker.Constructor=c;f.fn.selectpicker.noConflict=function(){f.fn.selectpicker=b;return this};f(document).data("keycount",0).on("keydown.bs.select",'.lfb_bootstrap-select [data-toggle=dropdown], .lfb_bootstrap-select [role="listbox"], .bs-searchbox input',c.prototype.keydown).on("focusin.modal",'.lfb_bootstrap-select [data-toggle=dropdown], .lfb_bootstrap-select [role="listbox"], .bs-searchbox input',function(j){j.stopPropagation()})})(a)}));