text: /*! AUI Flat Pack - version 5.3-m3 - generated 2013-09-11 12:41:05 +1000 */
  
  
  (function(e){function d(h,g){return(typeof h=="function")?(h.call(g)):h}function f(g){while(g=g.parentNode){if(g==document){return true}}return false}var a=0;function b(){var g=a++;return"tipsyuid"+g}function c(h,g){this.$element=e(h);this.options=g;this.enabled=true;this.fixTitle()}c.prototype={show:function(){var p=this.getTitle();if(p&&this.enabled){var i=this.tip();i.find(".tipsy-inner")[this.options.html?"html":"text"](p);i[0].className="tipsy";i.remove().css({top:0,left:0,visibility:"hidden",display:"block"}).prependTo(document.body);var l=this;function h(){l.hoverTooltip=true}function m(){if(l.hoverState=="in"){return}l.hoverTooltip=false;if(l.options.trigger!="manual"){var r=l.options.trigger=="hover"?"mouseleave.tipsy":"blur.tipsy";l.$element.trigger(r)}}if(this.options.hoverable){i.hover(h,m)}var n=e.extend({},this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight});var g=i[0].offsetWidth,k=i[0].offsetHeight,q=d(this.options.gravity,this.$element[0]);var o;switch(q.charAt(0)){case"n":o={top:n.top+n.height+this.options.offset,left:n.left+n.width/2-g/2};break;case"s":o={top:n.top-k-this.options.offset,left:n.left+n.width/2-g/2};break;case"e":o={top:n.top+n.height/2-k/2,left:n.left-g-this.options.offset};break;case"w":o={top:n.top+n.height/2-k/2,left:n.left+n.width+this.options.offset};break}if(q.length==2){if(q.charAt(1)=="w"){o.left=n.left+n.width/2-15}else{o.left=n.left+n.width/2-g+15}}i.css(o).addClass("tipsy-"+q);i.find(".tipsy-arrow")[0].className="tipsy-arrow tipsy-arrow-"+q.charAt(0);if(this.options.className){i.addClass(d(this.options.className,this.$element[0]))}if(this.options.fade){i.stop().css({opacity:0,display:"block",visibility:"visible"}).animate({opacity:this.options.opacity})}else{i.css({visibility:"visible",opacity:this.options.opacity})}if(this.options.aria){var j=b();i.attr("id",j);this.$element.attr("aria-describedby",j)}}},hide:function(){if(this.options.fade){this.tip().stop().fadeOut(function(){e(this).remove()})}else{this.tip().remove()}if(this.options.aria){this.$element.removeAttr("aria-describedby")}},fixTitle:function(){var g=this.$element;if(g.attr("title")||typeof(g.attr("original-title"))!="string"){g.attr("original-title",g.attr("title")||"").removeAttr("title")}},getTitle:function(){var i,g=this.$element,h=this.options;this.fixTitle();var i,h=this.options;if(typeof h.title=="string"){i=g.attr(h.title=="title"?"original-title":h.title)}else{if(typeof h.title=="function"){i=h.title.call(g[0])}}i=(""+i).replace(/(^\s*|\s*$)/,"");return i||h.fallback},tip:function(){if(!this.$tip){this.$tip=e('<div class="tipsy"></div>').html('<div class="tipsy-arrow"></div><div class="tipsy-inner"></div>').attr("role","tooltip");this.$tip.data("tipsy-pointee",this.$element[0])}return this.$tip},validate:function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}},enable:function(){this.enabled=true},disable:function(){this.enabled=false},toggleEnabled:function(){this.enabled=!this.enabled}};e.fn.tipsy=function(j){if(j===true){return this.data("tipsy")}else{if(typeof j=="string"){var l=this.data("tipsy");if(l){l[j]()}return this}}j=e.extend({},e.fn.tipsy.defaults,j);if(j.hoverable){j.delayOut=j.delayOut||20}function i(n){var o=e.data(n,"tipsy");if(!o){o=new c(n,e.fn.tipsy.elementOptions(n,j));e.data(n,"tipsy",o)}return o}function m(){var n=i(this);n.hoverState="in";if(j.delayIn==0){n.show()}else{n.fixTitle();setTimeout(function(){if(n.hoverState=="in"){n.show()}},j.delayIn)}}function h(){var n=i(this);n.hoverState="out";if(j.delayOut==0){n.hide()}else{setTimeout(function(){if(n.hoverState=="out"&&!n.hoverTooltip){n.hide()}},j.delayOut)}}if(!j.live){this.each(function(){i(this)})}if(j.trigger!="manual"){var k=j.trigger=="hover"?"mouseenter.tipsy":"focus.tipsy",g=j.trigger=="hover"?"mouseleave.tipsy":"blur.tipsy";if(j.live){e(this.context).on(k,this.selector,m).on(g,this.selector,h)}else{this.bind(k,m).bind(g,h)}}return this};e.fn.tipsy.defaults={aria:false,className:null,delayIn:0,delayOut:0,fade:false,fallback:"",gravity:"n",html:false,live:false,hoverable:false,offset:0,opacity:0.8,title:"title",trigger:"hover"};e.fn.tipsy.revalidate=function(){e(".tipsy").each(function(){var g=e.data(this,"tipsy-pointee");if(!g||!f(g)){e(this).remove()}})};e.fn.tipsy.elementOptions=function(h,g){return e.metadata?e.extend({},g,e(h).metadata()):g};e.fn.tipsy.autoNS=function(){return e(this).offset().top>(e(document).scrollTop()+e(window).height()/2)?"s":"n"};e.fn.tipsy.autoWE=function(){return e(this).offset().left>(e(document).scrollLeft()+e(window).width()/2)?"e":"w"};e.fn.tipsy.autoBounds=function(h,g){return function(){var i={ns:g[0],ew:(g.length>1?g[1]:false)},l=e(document).scrollTop()+h,j=e(document).scrollLeft()+h,k=e(this);if(k.offset().top<l){i.ns="n"}if(k.offset().left<j){i.ew="w"}if(e(window).width()+e(document).scrollLeft()-k.offset().left<h){i.ew="e"}if(e(window).height()+e(document).scrollTop()-k.offset().top<h){i.ns="s"}return i.ns+(i.ew?i.ew:"")}}})(jQuery);
  (function(a){a.fn.tooltip=function(b){var e=a.extend({},a.fn.tooltip.defaults,b),c=this.tipsy(e);if(e.hideOnClick&&(e.trigger=="hover"||!e.trigger&&this.tipsy.defaults.trigger=="hover")){var d=function(){a(this).tipsy("hide")};if(e.live){a(this.context).on("click.tipsy",this.selector,d)}else{this.bind("click.tipsy",d)}}return c};a.fn.tooltip.defaults={opacity:1,offset:1,delayIn:500,hoverable:true,hideOnClick:true}}(AJS.$));
  (function(){var b={sortMultiSortKey:"",headers:{},debug:false};function a(d){var c=b;d.find("th").each(function(f,g){var e=AJS.$(g);c.headers[f]={};if(e.hasClass("aui-table-column-unsortable")){c.headers[f].sorter=false}else{e.attr("tabindex","0");e.wrapInner("<span class='aui-table-header-content'/>");if(e.hasClass("aui-table-column-issue-key")){c.headers[f].sorter="issue-key"}}});d.tablesorter(c)}AJS.tablessortable={setup:function(){AJS.$.tablesorter.addParser({id:"issue-key",is:function(){return false},format:function(g){var c=g.split("-");var d=c[0];var f=c[1];var i="..........";var h="000000";var e=(d+i).slice(0,i.length);e+=(h+f).slice(-h.length);return e},type:"text"});AJS.$(".aui-table-sortable").each(function(){a(AJS.$(this))})},setTableSortable:function(c){a(c)}};AJS.$(AJS.tablessortable.setup)})();
  /*
   * TableSorter 2.10.8 - Client-side table sorting with ease!
   * @requires jQuery v1.2.6+
   *
   * Copyright (c) 2007 Christian Bach
   * Examples and docs at: http://tablesorter.com
   * Dual licensed under the MIT and GPL licenses:
   * http://www.opensource.org/licenses/mit-license.php
   * http://www.gnu.org/licenses/gpl.html
   *
   * @type jQuery
   * @name tablesorter
   * @cat Plugins/Tablesorter
   * @author Christian Bach/christian.bach@polyester.se
   * @contributor Rob Garrison/https://github.com/Mottie/tablesorter
   */
  !(function(b){b.extend({tablesorter:new function(){var c=this;c.version="2.10.8";c.parsers=[];c.widgets=[];c.defaults={theme:"default",widthFixed:false,showProcessing:false,headerTemplate:"{content}",onRenderTemplate:null,onRenderHeader:null,cancelSelection:true,dateFormat:"mmddyyyy",sortMultiSortKey:"shiftKey",sortResetKey:"ctrlKey",usNumberFormat:true,delayInit:false,serverSideSorting:false,headers:{},ignoreCase:true,sortForce:null,sortList:[],sortAppend:null,sortInitialOrder:"asc",sortLocaleCompare:false,sortReset:false,sortRestart:false,emptyTo:"bottom",stringTo:"max",textExtraction:"simple",textSorter:null,widgets:[],widgetOptions:{zebra:["even","odd"]},initWidgets:true,initialized:null,tableClass:"tablesorter",cssAsc:"tablesorter-headerAsc",cssChildRow:"tablesorter-childRow",cssDesc:"tablesorter-headerDesc",cssHeader:"tablesorter-header",cssHeaderRow:"tablesorter-headerRow",cssIcon:"tablesorter-icon",cssInfoBlock:"tablesorter-infoOnly",cssProcessing:"tablesorter-processing",selectorHeaders:"> thead th, > thead td",selectorSort:"th, td",selectorRemove:".remove-me",debug:false,headerList:[],empties:{},strings:{},parsers:[]};function o(y){if(typeof console!=="undefined"&&typeof console.log!=="undefined"){console.log(y)}else{alert(y)}}function i(y,z){o(y+" ("+(new Date().getTime()-z.getTime())+"ms)")}c.log=o;c.benchmark=i;function f(B,A,y){if(!A){return""}var D=B.config,z=D.textExtraction,C="";if(z==="simple"){if(D.supportsTextContent){C=A.textContent}else{C=b(A).text()}}else{if(typeof z==="function"){C=z(A,B,y)}else{if(typeof z==="object"&&z.hasOwnProperty(y)){C=z[y](A,B,y)}else{C=D.supportsTextContent?A.textContent:b(A).text()}}}return b.trim(C)}function j(E,G,C,B){var D,z=c.parsers.length,y=false,A="",F=true;while(A===""&&F){C++;if(G[C]){y=G[C].cells[B];A=f(E,y,B);if(E.config.debug){o("Checking if value was empty on row "+C+", column: "+B+': "'+A+'"')}}else{F=false}}while(--z>=0){D=c.parsers[z];if(D&&D.id!=="text"&&D.is&&D.is(A,E,y)){return D}}return c.getParserById("text")}function k(H){var G=H.config,C=G.$tbodies=G.$table.children("tbody:not(."+G.cssInfoBlock+")"),I,F,B,D,E,y,A,z="";if(C.length===0){return G.debug?o("*Empty table!* Not building a parser cache"):""}I=C[0].rows;if(I[0]){F=[];B=I[0].cells.length;for(D=0;D<B;D++){E=G.$headers.filter(":not([colspan])");E=E.add(G.$headers.filter('[colspan="1"]')).filter('[data-column="'+D+'"]:last');y=G.headers[D];A=c.getParserById(c.getData(E,y,"sorter"));G.empties[D]=c.getData(E,y,"empty")||G.emptyTo||(G.emptyToBottom?"bottom":"top");G.strings[D]=c.getData(E,y,"string")||G.stringTo||"max";if(!A){A=j(H,I,-1,D)}if(G.debug){z+="column:"+D+"; parser:"+A.id+"; string:"+G.strings[D]+"; empty: "+G.empties[D]+"\n"}F.push(A)}}if(G.debug){o(z)}G.parsers=F}function x(L){var G=L.tBodies,B=L.config,I,y,J=B.parsers,M,K,D,C,A,E,F,H,z=[];B.cache={};if(!J){return B.debug?o("*Empty table!* Not building a cache"):""}if(B.debug){H=new Date()}if(B.showProcessing){c.isProcessing(L,true)}for(A=0;A<G.length;A++){B.cache[A]={row:[],normalized:[]};if(!b(G[A]).hasClass(B.cssInfoBlock)){I=(G[A]&&G[A].rows.length)||0;y=(G[A].rows[0]&&G[A].rows[0].cells.length)||0;for(D=0;D<I;++D){E=b(G[A].rows[D]);F=[];if(E.hasClass(B.cssChildRow)){B.cache[A].row[B.cache[A].row.length-1]=B.cache[A].row[B.cache[A].row.length-1].add(E);continue}B.cache[A].row.push(E);for(C=0;C<y;++C){M=f(L,E[0].cells[C],C);K=J[C].format(M,L,E[0].cells[C],C);F.push(K);if((J[C].type||"").toLowerCase()==="numeric"){z[C]=Math.max(Math.abs(K)||0,z[C]||0)}}F.push(B.cache[A].normalized.length);B.cache[A].normalized.push(F)}B.cache[A].colMax=z}}if(B.showProcessing){c.isProcessing(L)}if(B.debug){i("Building cache for "+I+" rows",H)}}function v(M,K){var N=M.config,O=M.tBodies,B=[],E=N.cache,D,F,A,C,P,z,L,J,I,H,y,G;if(!E[0]){return}if(N.debug){G=new Date()}for(I=0;I<O.length;I++){P=b(O[I]);if(P.length&&!P.hasClass(N.cssInfoBlock)){z=c.processTbody(M,P,true);D=E[I].row;F=E[I].normalized;A=F.length;C=A?(F[0].length-1):0;for(L=0;L<A;L++){y=F[L][C];B.push(D[y]);if(!N.appender||!N.removeRows){H=D[y].length;for(J=0;J<H;J++){z.append(D[y][J])}}}c.processTbody(M,z,false)}}if(N.appender){N.appender(M,B)}if(N.debug){i("Rebuilt table",G)}if(!K){c.applyWidget(M)}b(M).trigger("sortEnd",M)}function q(O){var M=[],A={},L=0,G=b(O).find("thead:eq(0), tfoot").children("tr"),E,D,C,B,J,N,K,y,I,F,H,z;for(E=0;E<G.length;E++){N=G[E].cells;for(D=0;D<N.length;D++){J=N[D];K=J.parentNode.rowIndex;y=K+"-"+J.cellIndex;I=J.rowSpan||1;F=J.colSpan||1;if(typeof(M[K])==="undefined"){M[K]=[]}for(C=0;C<M[K].length+1;C++){if(typeof(M[K][C])==="undefined"){H=C;break}}A[y]=H;L=Math.max(H,L);b(J).attr({"data-column":H});for(C=K;C<K+I;C++){if(typeof(M[C])==="undefined"){M[C]=[]}z=M[C];for(B=H;B<H+F;B++){z[B]="x"}}}}O.config.columns=L;return A}function h(y){return(/^d/i.test(y)||y===1)}function s(G){var A=q(G),y,B,D,C,H,F,z,E=G.config;E.headerList=[];E.headerContent=[];if(E.debug){z=new Date()}C=E.cssIcon?'<i class="'+E.cssIcon+'"></i>':"";E.$headers=b(G).find(E.selectorHeaders).each(function(I){B=b(this);y=E.headers[I];E.headerContent[I]=this.innerHTML;H=E.headerTemplate.replace(/\{content\}/g,this.innerHTML).replace(/\{icon\}/g,C);if(E.onRenderTemplate){D=E.onRenderTemplate.apply(B,[I,H]);if(D&&typeof D==="string"){H=D}}this.innerHTML='<div class="tablesorter-header-inner">'+H+"</div>";if(E.onRenderHeader){E.onRenderHeader.apply(B,[I])}this.column=A[this.parentNode.rowIndex+"-"+this.cellIndex];this.order=h(c.getData(B,y,"sortInitialOrder")||E.sortInitialOrder)?[1,0,2]:[0,1,2];this.count=-1;this.lockedOrder=false;F=c.getData(B,y,"lockedOrder")||false;if(typeof F!=="undefined"&&F!==false){this.order=this.lockedOrder=h(F)?[1,1,1]:[0,0,0]}B.addClass(E.cssHeader);E.headerList[I]=this;B.parent().addClass(E.cssHeaderRow);B.attr("tabindex",0)});l(G);if(E.debug){i("Built headers:",z);o(E.$headers)}}function p(z,y,B){var A=z.config;A.$table.find(A.selectorRemove).remove();k(z);x(z);w(A.$table,y,B)}function l(z){var y,A=z.config;A.$headers.each(function(B,C){y=c.getData(C,A.headers[B],"sorter")==="false";C.sortDisabled=y;b(C)[y?"addClass":"removeClass"]("sorter-false")})}function d(G){var D,B,z,y,F=G.config,E=F.sortList,C=[F.cssAsc,F.cssDesc],A=b(G).find("tfoot tr").children().removeClass(C.join(" "));F.$headers.removeClass(C.join(" "));y=E.length;for(B=0;B<y;B++){if(E[B][1]!==2){D=F.$headers.not(".sorter-false").filter('[data-column="'+E[B][0]+'"]'+(y===1?":last":""));if(D.length){for(z=0;z<D.length;z++){if(!D[z].sortDisabled){D.eq(z).addClass(C[E[B][1]]);if(A.length){A.filter('[data-column="'+E[B][0]+'"]').eq(z).addClass(C[E[B][1]])}}}}}}}function n(A){if(A.config.widthFixed&&b(A).find("colgroup").length===0){var y=b("<colgroup>"),z=b(A).width();b(A.tBodies[0]).find("tr:first").children("td").each(function(){y.append(b("<col>").css("width",parseInt((b(this).width()/z)*1000,10)/10+"%"))});b(A).prepend(y)}}function t(B,C){var A,z,D,E=B.config,y=C||E.sortList;E.sortList=[];b.each(y,function(G,F){A=[parseInt(F[0],10),parseInt(F[1],10)];D=E.headerList[A[0]];if(D){E.sortList.push(A);z=b.inArray(A[1],D.order);D.count=z>=0?z:A[1]%(E.sortReset?3:2)}})}function m(z,y){return(z&&z[y])?z[y].type||"":""}function u(H,G,C){var F,B,A,y,I,E=H.config,z=!C[E.sortMultiSortKey],D=b(H);D.trigger("sortStart",H);G.count=C[E.sortResetKey]?2:(G.count+1)%(E.sortReset?3:2);if(E.sortRestart){B=G;E.$headers.each(function(){if(this!==B&&(z||!b(this).is("."+E.cssDesc+",."+E.cssAsc))){this.count=-1}})}B=G.column;if(z){E.sortList=[];if(E.sortForce!==null){F=E.sortForce;for(A=0;A<F.length;A++){if(F[A][0]!==B){E.sortList.push(F[A])}}}y=G.order[G.count];if(y<2){E.sortList.push([B,y]);if(G.colSpan>1){for(A=1;A<G.colSpan;A++){E.sortList.push([B+A,y])}}}}else{if(E.sortAppend&&E.sortList.length>1){if(c.isValueInArray(E.sortAppend[0][0],E.sortList)){E.sortList.pop()}}if(c.isValueInArray(B,E.sortList)){for(A=0;A<E.sortList.length;A++){I=E.sortList[A];y=E.headerList[I[0]];if(I[0]===B){I[1]=y.order[y.count];if(I[1]===2){E.sortList.splice(A,1);y.count=-1}}}}else{y=G.order[G.count];if(y<2){E.sortList.push([B,y]);if(G.colSpan>1){for(A=1;A<G.colSpan;A++){E.sortList.push([B+A,y])}}}}}if(E.sortAppend!==null){F=E.sortAppend;for(A=0;A<F.length;A++){if(F[A][0]!==B){E.sortList.push(F[A])}}}D.trigger("sortBegin",H);setTimeout(function(){d(H);r(H);v(H)},1)}function r(L){var C=0,G=L.config,H=G.sortList,D=H.length,A=L.tBodies.length,N,J,F,K,E,y,z,M,B,I;if(G.serverSideSorting||!G.cache[0]){return}if(G.debug){N=new Date()}for(F=0;F<A;F++){E=G.cache[F].colMax;y=G.cache[F].normalized;z=y.length;I=(y&&y[0])?y[0].length-1:0;y.sort(function(P,O){for(J=0;J<D;J++){K=H[J][0];B=H[J][1];M=/n/i.test(m(G.parsers,K))?"Numeric":"Text";M+=B===0?"":"Desc";if(/Numeric/.test(M)&&G.strings[K]){if(typeof(G.string[G.strings[K]])==="boolean"){C=(B===0?1:-1)*(G.string[G.strings[K]]?-1:1)}else{C=(G.strings[K])?G.string[G.strings[K]]||0:0}}var Q=b.tablesorter["sort"+M](L,P[K],O[K],K,E[K],C);if(Q){return Q}}return P[I]-O[I]})}if(G.debug){i("Sorting on "+H.toString()+" and dir "+B+" time",N)}}function g(y,z){y.trigger("updateComplete");if(typeof z==="function"){z(y[0])}}function w(z,y,A){if(y!==false&&!z[0].isProcessing){z.trigger("sorton",[z[0].config.sortList,function(){g(z,A)}])}else{g(z,A)}}function e(z){var C=z.config,A=C.$table,y,B;C.$headers.find(C.selectorSort).add(C.$headers.filter(C.selectorSort)).unbind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keypress.tablesorter").bind("mousedown.tablesorter mouseup.tablesorter sort.tablesorter keypress.tablesorter",function(F,G){if(((F.which||F.button)!==1&&!/sort|keypress/.test(F.type))||(F.type==="keypress"&&F.which!==13)){return false}if(F.type==="mouseup"&&G!==true&&(new Date().getTime()-B>250)){return false}if(F.type==="mousedown"){B=new Date().getTime();return F.target.tagName==="INPUT"?"":!C.cancelSelection}if(C.delayInit&&!C.cache){x(z)}var E=/TH|TD/.test(this.tagName)?b(this):b(this).parents("th, td").filter(":first"),D=E[0];if(!D.sortDisabled){u(z,D,F)}});if(C.cancelSelection){C.$headers.attr("unselectable","on").bind("selectstart",false).css({"user-select":"none",MozUserSelect:"none"})}A.unbind("sortReset update updateRows updateCell updateAll addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave ".split(" ").join(".tablesorter ")).bind("sortReset.tablesorter",function(D){D.stopPropagation();C.sortList=[];d(z);r(z);v(z)}).bind("updateAll.tablesorter",function(E,D,F){E.stopPropagation();c.refreshWidgets(z,true,true);c.restoreHeaders(z);s(z);e(z);p(z,D,F)}).bind("update.tablesorter updateRows.tablesorter",function(E,D,F){E.stopPropagation();l(z);p(z,D,F)}).bind("updateCell.tablesorter",function(G,J,H,K){G.stopPropagation();A.find(C.selectorRemove).remove();var E,M,I,D=A.find("tbody"),L=D.index(b(J).parents("tbody").filter(":first")),F=b(J).parents("tr").filter(":first");J=b(J)[0];if(D.length&&L>=0){M=D.eq(L).find("tr").index(F);I=J.cellIndex;E=C.cache[L].normalized[M].length-1;C.cache[L].row[z.config.cache[L].normalized[M][E]]=F;C.cache[L].normalized[M][I]=C.parsers[I].format(f(z,J,I),z,J,I);w(A,H,K)}}).bind("addRows.tablesorter",function(F,H,G,I){F.stopPropagation();var E,L=H.filter("tr").length,J=[],D=H[0].cells.length,K=A.find("tbody").index(H.parents("tbody").filter(":first"));if(!C.parsers){k(z)}for(E=0;E<L;E++){for(y=0;y<D;y++){J[y]=C.parsers[y].format(f(z,H[E].cells[y],y),z,H[E].cells[y],y)}J.push(C.cache[K].row.length);C.cache[K].row.push([H[E]]);C.cache[K].normalized.push(J);J=[]}w(A,G,I)}).bind("sorton.tablesorter",function(E,D,G,F){E.stopPropagation();A.trigger("sortStart",this);t(z,D);d(z);A.trigger("sortBegin",this);r(z);v(z,F);if(typeof G==="function"){G(z)}}).bind("appendCache.tablesorter",function(D,F,E){D.stopPropagation();v(z,E);if(typeof F==="function"){F(z)}}).bind("applyWidgetId.tablesorter",function(D,E){D.stopPropagation();c.getWidgetById(E).format(z,C,C.widgetOptions)}).bind("applyWidgets.tablesorter",function(D,E){D.stopPropagation();c.applyWidget(z,E)}).bind("refreshWidgets.tablesorter",function(F,E,D){F.stopPropagation();c.refreshWidgets(z,E,D)}).bind("destroy.tablesorter",function(E,F,D){E.stopPropagation();c.destroy(z,F,D)})}c.construct=function(y){return this.each(function(){if(!this.tHead||this.tBodies.length===0||this.hasInitialized===true){return(this.config&&this.config.debug)?o("stopping initialization! No thead, tbody or tablesorter has already been initialized"):""}var C=b(this),B=this,D,A="",z=b.metadata;B.hasInitialized=false;B.isProcessing=true;B.config={};D=b.extend(true,B.config,c.defaults,y);b.data(B,"tablesorter",D);if(D.debug){b.data(B,"startoveralltimer",new Date())}D.supportsTextContent=b("<span>x</span>")[0].textContent==="x";D.supportsDataObject=parseFloat(b.fn.jquery)>=1.4;D.string={max:1,min:-1,"max+":1,"max-":-1,zero:0,none:0,"null":0,top:true,bottom:false};if(!/tablesorter\-/.test(C.attr("class"))){A=(D.theme!==""?" tablesorter-"+D.theme:"")}D.$table=C.addClass(D.tableClass+A);D.$tbodies=C.children("tbody:not(."+D.cssInfoBlock+")");s(B);n(B);k(B);if(!D.delayInit){x(B)}e(B);if(D.supportsDataObject&&typeof C.data().sortlist!=="undefined"){D.sortList=C.data().sortlist}else{if(z&&(C.metadata()&&C.metadata().sortlist)){D.sortList=C.metadata().sortlist}}c.applyWidget(B,true);if(D.sortList.length>0){C.trigger("sorton",[D.sortList,{},!D.initWidgets])}else{if(D.initWidgets){c.applyWidget(B)}}if(D.showProcessing){C.unbind("sortBegin.tablesorter sortEnd.tablesorter").bind("sortBegin.tablesorter sortEnd.tablesorter",function(E){c.isProcessing(B,E.type==="sortBegin")})}B.hasInitialized=true;B.isProcessing=false;if(D.debug){c.benchmark("Overall initialization time",b.data(B,"startoveralltimer"))}C.trigger("tablesorter-initialized",B);if(typeof D.initialized==="function"){D.initialized(B)}})};c.isProcessing=function(B,z,A){B=b(B);var C=B[0].config,y=A||B.find("."+C.cssHeader);if(z){if(C.sortList.length>0){y=y.filter(function(){return this.sortDisabled?false:c.isValueInArray(parseFloat(b(this).attr("data-column")),C.sortList)})}y.addClass(C.cssProcessing)}else{y.removeClass(C.cssProcessing)}};c.processTbody=function(A,y,z){var B;if(z){A.isProcessing=true;y.before('<span class="tablesorter-savemyplace"/>');B=(b.fn.detach)?y.detach():y.remove();return B}B=b(A).find("span.tablesorter-savemyplace");y.insertAfter(B);B.remove();A.isProcessing=false};c.clearTableBody=function(y){b(y)[0].config.$tbodies.empty()};c.restoreHeaders=function(y){var z=y.config;z.$table.find(z.selectorHeaders).each(function(A){if(b(this).find(".tablesorter-header-inner").length){b(this).html(z.headerContent[A])}})};c.destroy=function(C,z,F){C=b(C)[0];if(!C.hasInitialized){return}c.refreshWidgets(C,true,true);var E=b(C),D=C.config,y=E.find("thead:first"),A=y.find("tr."+D.cssHeaderRow).removeClass(D.cssHeaderRow),B=E.find("tfoot:first > tr").children("th, td");y.find("tr").not(A).remove();E.removeData("tablesorter").unbind("sortReset update updateAll updateRows updateCell addRows sorton appendCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd ".split(" ").join(".tablesorter "));D.$headers.add(B).removeClass(D.cssHeader+" "+D.cssAsc+" "+D.cssDesc).removeAttr("data-column");A.find(D.selectorSort).unbind("mousedown.tablesorter mouseup.tablesorter keypress.tablesorter");c.restoreHeaders(C);if(z!==false){E.removeClass(D.tableClass+" tablesorter-"+D.theme)}C.hasInitialized=false;if(typeof F==="function"){F(C)}};c.regex=[/(^([+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?)?$|^0x[0-9a-f]+$|\d+)/gi,/(^([\w ]+,?[\w ]+)?[\w ]+,?[\w ]+\d+:\d+(:\d+)?[\w ]?|^\d{1,4}[\/\-]\d{1,4}[\/\-]\d{1,4}|^\w+, \w+ \d+, \d{4})/,/^0x[0-9a-f]+$/i];c.sortText=function(M,H,G,A){if(H===G){return 0}var F=M.config,E=F.string[(F.empties[A]||F.emptyTo)],y=c.regex,K,B,D,L,z,J,C,I;if(H===""&&E!==0){return typeof E==="boolean"?(E?-1:1):-E||-1}if(G===""&&E!==0){return typeof E==="boolean"?(E?1:-1):E||1}if(typeof F.textSorter==="function"){return F.textSorter(H,G,M,A)}K=H.replace(y[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");D=G.replace(y[0],"\\0$1\\0").replace(/\\0$/,"").replace(/^\\0/,"").split("\\0");B=parseInt(H.match(y[2]),16)||(K.length!==1&&H.match(y[1])&&Date.parse(H));L=parseInt(G.match(y[2]),16)||(B&&G.match(y[1])&&Date.parse(G))||null;if(L){if(B<L){return -1}if(B>L){return 1}}I=Math.max(K.length,D.length);for(C=0;C<I;C++){z=isNaN(K[C])?K[C]||0:parseFloat(K[C])||0;J=isNaN(D[C])?D[C]||0:parseFloat(D[C])||0;if(isNaN(z)!==isNaN(J)){return(isNaN(z))?1:-1}if(typeof z!==typeof J){z+="";J+=""}if(z<J){return -1}if(z>J){return 1}}return 0};c.sortTextDesc=function(B,z,y,A){if(z===y){return 0}var D=B.config,C=D.string[(D.empties[A]||D.emptyTo)];if(z===""&&C!==0){return typeof C==="boolean"?(C?-1:1):C||1}if(y===""&&C!==0){return typeof C==="boolean"?(C?1:-1):-C||-1}if(typeof D.textSorter==="function"){return D.textSorter(y,z,B,A)}return c.sortText(B,y,z)};c.getTextValue=function(z,C,B){if(C){var A,y=z?z.length:0,D=C+B;for(A=0;A<y;A++){D+=z.charCodeAt(A)}return B*D}return 0};c.sortNumeric=function(B,z,y,A,E,D){if(z===y){return 0}var F=B.config,C=F.string[(F.empties[A]||F.emptyTo)];if(z===""&&C!==0){return typeof C==="boolean"?(C?-1:1):-C||-1}if(y===""&&C!==0){return typeof C==="boolean"?(C?1:-1):C||1}if(isNaN(z)){z=c.getTextValue(z,E,D)}if(isNaN(y)){y=c.getTextValue(y,E,D)}return z-y};c.sortNumericDesc=function(B,z,y,A,E,D){if(z===y){return 0}var F=B.config,C=F.string[(F.empties[A]||F.emptyTo)];if(z===""&&C!==0){return typeof C==="boolean"?(C?-1:1):C||1}if(y===""&&C!==0){return typeof C==="boolean"?(C?1:-1):-C||-1}if(isNaN(z)){z=c.getTextValue(z,E,D)}if(isNaN(y)){y=c.getTextValue(y,E,D)}return y-z};c.characterEquivalents={a:"\u00e1\u00e0\u00e2\u00e3\u00e4\u0105\u00e5",A:"\u00c1\u00c0\u00c2\u00c3\u00c4\u0104\u00c5",c:"\u00e7\u0107\u010d",C:"\u00c7\u0106\u010c",e:"\u00e9\u00e8\u00ea\u00eb\u011b\u0119",E:"\u00c9\u00c8\u00ca\u00cb\u011a\u0118",i:"\u00ed\u00ec\u0130\u00ee\u00ef\u0131",I:"\u00cd\u00cc\u0130\u00ce\u00cf",o:"\u00f3\u00f2\u00f4\u00f5\u00f6",O:"\u00d3\u00d2\u00d4\u00d5\u00d6",ss:"\u00df",SS:"\u1e9e",u:"\u00fa\u00f9\u00fb\u00fc\u016f",U:"\u00da\u00d9\u00db\u00dc\u016e"};c.replaceAccents=function(A){var z,B="[",y=c.characterEquivalents;if(!c.characterRegex){c.characterRegexArray={};for(z in y){if(typeof z==="string"){B+=y[z];c.characterRegexArray[z]=new RegExp("["+y[z]+"]","g")}}c.characterRegex=new RegExp(B+"]")}if(c.characterRegex.test(A)){for(z in y){if(typeof z==="string"){A=A.replace(c.characterRegexArray[z],z)}}}return A};c.isValueInArray=function(A,z){var B,y=z.length;for(B=0;B<y;B++){if(z[B][0]===A){return true}}return false};c.addParser=function(B){var A,z=c.parsers.length,y=true;for(A=0;A<z;A++){if(c.parsers[A].id.toLowerCase()===B.id.toLowerCase()){y=false}}if(y){c.parsers.push(B)}};c.getParserById=function(z){var A,y=c.parsers.length;for(A=0;A<y;A++){if(c.parsers[A].id.toLowerCase()===(z.toString()).toLowerCase()){return c.parsers[A]}}return false};c.addWidget=function(y){c.widgets.push(y)};c.getWidgetById=function(A){var B,z,y=c.widgets.length;for(B=0;B<y;B++){z=c.widgets[B];if(z&&z.hasOwnProperty("id")&&z.id.toLowerCase()===A.toLowerCase()){return z}}};c.applyWidget=function(G,F){G=b(G)[0];var B=G.config,C=B.widgetOptions,D=[],z,A,E,y;if(B.debug){z=new Date()}if(B.widgets.length){B.widgets=b.grep(B.widgets,function(I,H){return b.inArray(I,B.widgets)===H});b.each(B.widgets||[],function(H,I){y=c.getWidgetById(I);if(y&&y.id){if(!y.priority){y.priority=10}D[H]=y}});D.sort(function(I,H){return I.priority<H.priority?-1:I.priority===H.priority?0:1});b.each(D,function(I,H){if(H){if(F){if(H.hasOwnProperty("options")){C=G.config.widgetOptions=b.extend(true,{},H.options,C)}if(H.hasOwnProperty("init")){H.init(G,H,B,C)}}else{if(!F&&H.hasOwnProperty("format")){H.format(G,B,C,false)}}}})}if(B.debug){E=B.widgets.length;i("Completed "+(F===true?"initializing ":"applying ")+E+" widget"+(E!==1?"s":""),z)}};c.refreshWidgets=function(E,D,y){E=b(E)[0];var C,F=E.config,B=F.widgets,A=c.widgets,z=A.length;for(C=0;C<z;C++){if(A[C]&&A[C].id&&(D||b.inArray(A[C].id,B)<0)){if(F.debug){o("Refeshing widgets: Removing "+A[C].id)}if(A[C].hasOwnProperty("remove")){A[C].remove(E,F,F.widgetOptions)}}}if(y!==true){c.applyWidget(E,D)}};c.getData=function(D,C,B){var E="",z=b(D),y,A;if(!z.length){return""}y=b.metadata?z.metadata():false;A=" "+(z.attr("class")||"");if(typeof z.data(B)!=="undefined"||typeof z.data(B.toLowerCase())!=="undefined"){E+=z.data(B)||z.data(B.toLowerCase())}else{if(y&&typeof y[B]!=="undefined"){E+=y[B]}else{if(C&&typeof C[B]!=="undefined"){E+=C[B]}else{if(A!==" "&&A.match(" "+B+"-")){E=A.match(new RegExp("\\s"+B+"-([\\w-]+)"))[1]||""}}}}return b.trim(E)};c.formatFloat=function(A,B){if(typeof A!=="string"||A===""){return A}var z,y=B&&B.config?B.config.usNumberFormat!==false:typeof B!=="undefined"?B:true;if(y){A=A.replace(/,/g,"")}else{A=A.replace(/[\s|\.]/g,"").replace(/,/g,".")}if(/^\s*\([.\d]+\)/.test(A)){A=A.replace(/^\s*\(/,"-").replace(/\)/,"")}z=parseFloat(A);return isNaN(z)?b.trim(A):z};c.isDigit=function(y){return isNaN(y)?(/^[\-+(]?\d+[)]?$/).test(y.toString().replace(/[,.'"\s]/g,"")):true}}()});var a=b.tablesorter;b.fn.extend({tablesorter:a.construct});a.addParser({id:"text",is:function(){return true},format:function(d,e){var f=e.config;if(d){d=b.trim(f.ignoreCase?d.toLocaleLowerCase():d);d=f.sortLocaleCompare?a.replaceAccents(d):d}return d},type:"text"});a.addParser({id:"digit",is:function(c){return a.isDigit(c)},format:function(c,d){var e=a.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),d);return c&&typeof e==="number"?e:c?b.trim(c&&d.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"});a.addParser({id:"currency",is:function(c){return(/^\(?\d+[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]|[\u00a3$\u20ac\u00a4\u00a5\u00a2?.]\d+\)?$/).test((c||"").replace(/[,. ]/g,""))},format:function(c,d){var e=a.formatFloat((c||"").replace(/[^\w,. \-()]/g,""),d);return c&&typeof e==="number"?e:c?b.trim(c&&d.config.ignoreCase?c.toLocaleLowerCase():c):c},type:"numeric"});a.addParser({id:"ipAddress",is:function(c){return(/^\d{1,3}[\.]\d{1,3}[\.]\d{1,3}[\.]\d{1,3}$/).test(c)},format:function(f,h){var e,d=f?f.split("."):"",g="",c=d.length;for(e=0;e<c;e++){g+=("00"+d[e]).slice(-3)}return f?a.formatFloat(g,h):f},type:"numeric"});a.addParser({id:"url",is:function(c){return(/^(https?|ftp|file):\/\//).test(c)},format:function(c){return c?b.trim(c.replace(/(https?|ftp|file):\/\//,"")):c},type:"text"});a.addParser({id:"isoDate",is:function(c){return(/^\d{4}[\/\-]\d{1,2}[\/\-]\d{1,2}/).test(c)},format:function(c,d){return c?a.formatFloat((c!=="")?(new Date(c.replace(/-/g,"/")).getTime()||""):"",d):c},type:"numeric"});a.addParser({id:"percent",is:function(c){return(/(\d\s*?%|%\s*?\d)/).test(c)&&c.length<15},format:function(c,d){return c?a.formatFloat(c.replace(/%/g,""),d):c},type:"numeric"});a.addParser({id:"usLongDate",is:function(c){return(/^[A-Z]{3,10}\.?\s+\d{1,2},?\s+(\d{4})(\s+\d{1,2}:\d{2}(:\d{2})?(\s+[AP]M)?)?$/i).test(c)||(/^\d{1,2}\s+[A-Z]{3,10}\s+\d{4}/i).test(c)},format:function(c,d){return c?a.formatFloat((new Date(c.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||""),d):c},type:"numeric"});a.addParser({id:"shortDate",is:function(c){return(/(^\d{1,2}[\/\s]\d{1,2}[\/\s]\d{4})|(^\d{4}[\/\s]\d{1,2}[\/\s]\d{1,2})/).test((c||"").replace(/\s+/g," ").replace(/[\-.,]/g,"/"))},format:function(g,h,d,e){if(g){var j=h.config,f=j.headerList[e],i=f.dateFormat||a.getData(f,j.headers[e],"dateFormat")||j.dateFormat;g=g.replace(/\s+/g," ").replace(/[\-.,]/g,"/");if(i==="mmddyyyy"){g=g.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$1/$2")}else{if(i==="ddmmyyyy"){g=g.replace(/(\d{1,2})[\/\s](\d{1,2})[\/\s](\d{4})/,"$3/$2/$1")}else{if(i==="yyyymmdd"){g=g.replace(/(\d{4})[\/\s](\d{1,2})[\/\s](\d{1,2})/,"$1/$2/$3")}}}}return g?a.formatFloat((new Date(g).getTime()||""),h):g},type:"numeric"});a.addParser({id:"time",is:function(c){return(/^(([0-2]?\d:[0-5]\d)|([0-1]?\d:[0-5]\d\s?([AP]M)))$/i).test(c)},format:function(c,d){return c?a.formatFloat((new Date("2000/01/01 "+c.replace(/(\S)([AP]M)$/i,"$1 $2")).getTime()||""),d):c},type:"numeric"});a.addParser({id:"metadata",is:function(){return false},format:function(e,f,d){var h=f.config,g=(!h.parserMetadataName)?"sortValue":h.parserMetadataName;return b(d).metadata()[g]},type:"numeric"});a.addWidget({id:"zebra",priority:90,format:function(q,n,p){var e,i,m,r,j,f,h,g,d=new RegExp(n.cssChildRow,"i"),o=n.$tbodies;if(n.debug){f=new Date()}for(h=0;h<o.length;h++){e=o.eq(h);g=e.children("tr").length;if(g>1){r=0;i=e.children("tr:visible");i.each(function(){m=b(this);if(!d.test(this.className)){r++}j=(r%2===0);m.removeClass(p.zebra[j?1:0]).addClass(p.zebra[j?0:1])})}}if(n.debug){a.benchmark("Applying Zebra widget",f)}},remove:function(i,j,g){var f,e,d=j.$tbodies,h=(g.zebra||["even","odd"]).join(" ");for(f=0;f<d.length;f++){e=b.tablesorter.processTbody(i,d.eq(f),true);e.children().removeClass(h);b.tablesorter.processTbody(i,e,false)}}})})(jQuery);
  (function(c){var d=c(document),b=function(f){var e={};e.$trigger=c(f.currentTarget);e.$content=d.find("#"+e.$trigger.attr("aria-controls"));e.triggerIsParent=e.$content.parent().filter(e.$trigger).length!=0;e.$shortContent=e.triggerIsParent?e.$trigger.find(".aui-expander-short-content"):null;e.height=e.$content.css("min-height");e.isCollapsible=e.$trigger.data("collapsible")!=false;e.replaceText=e.$trigger.attr("data-replace-text");e.replaceSelector=e.$trigger.data("replace-selector");return e},a=function(f){if(f.replaceText){var e=f.replaceSelector?f.$trigger.find(f.replaceSelector):f.$trigger;f.$trigger.attr("data-replace-text",e.text());e.text(f.replaceText)}};EXPANDER_EVENTS={"aui-expander-invoke":function(h){var e=c(h.currentTarget);var g=d.find("#"+e.attr("aria-controls"));var f=e.data("collapsible")!=false;if(g.attr("aria-expanded")=="true"&&f){e.trigger("aui-expander-collapse")}else{e.trigger("aui-expander-expand")}},"aui-expander-expand":function(f){var e=b(f);e.$content.attr("aria-expanded","true");if(e.height!="0px"){e.$content.css("height","auto")}else{e.$content.attr("aria-hidden","false")}a(e);if(e.triggerIsParent){e.$shortContent.hide()}e.$trigger.trigger("aui-expander-expanded")},"aui-expander-collapse":function(i){var g=b(i),f,h=parseInt(g.$content.css("line-height"),10),e=g.$content.children().first().height();if(g.height!="0px"){g.$content.css("height",0)}else{g.$content.attr("aria-hidden","true")}a(g);g.$content.attr("aria-expanded","false");if(g.triggerIsParent){g.$shortContent.show()}g.$trigger.trigger("aui-expander-collapsed")},"click.aui-expander":function(e){$target=c(e.currentTarget);$target.trigger("aui-expander-invoke",e.currentTarget)}};d.on(EXPANDER_EVENTS,".aui-expander-trigger")})(jQuery);
  AJS.progressBars={update:function(g,m){var b=AJS.$(g).first();var f=b.children(".aui-progress-indicator-value");var l=f.attr("data-value")||0;var k="aui-progress-indicator-after-update";var i="aui-progress-indicator-before-update";var d="transitionend webkitTransitionEnd";var e=!b.attr("data-value");if(e){f.detach().css("width",0).appendTo(b)}if(typeof m==="number"&&m<=1&&m>=0){b.trigger(i,[l,m]);var h=document.body||document.documentElement;var a=h.style;var j="transition";function c(n){window.setTimeout(function(){f.css("width",n*100+"%");b.attr("data-value",n)},0)}if(typeof a.transition==="string"||typeof a.WebkitTransition==="string"){f.one(d,function(){b.trigger(k,[l,m])});c(m)}else{c(m);b.trigger(k,[l,m])}}return b},setIndeterminate:function(c){var b=AJS.$(c).first();var a=b.children(".aui-progress-indicator-value");b.removeAttr("data-value");a.css("width","100%")}};
  !function(i,k,a){var e=["webkit","Moz","ms","O"],p={},o;function g(q,t){var r=k.createElement(q||"div"),s;for(s in t){r[s]=t[s]}return r}function h(r){for(var q=1,s=arguments.length;q<s;q++){r.appendChild(arguments[q])}return r}var j=function(){var q=g("style",{type:"text/css"});h(k.getElementsByTagName("head")[0],q);return q.sheet||q.styleSheet}();function c(u,q,v,y){var r=["opacity",q,~~(u*100),v,y].join("-"),s=0.01+v/y*100,x=Math.max(1-(1-u)/q*(100-s),u),w=o.substring(0,o.indexOf("Animation")).toLowerCase(),t=w&&"-"+w+"-"||"";if(!p[r]){j.insertRule("@"+t+"keyframes "+r+"{0%{opacity:"+x+"}"+s+"%{opacity:"+u+"}"+(s+0.01)+"%{opacity:1}"+(s+q)%100+"%{opacity:"+u+"}100%{opacity:"+x+"}}",j.cssRules.length);p[r]=1}return r}function n(u,v){var t=u.style,q,r;if(t[v]!==a){return v}v=v.charAt(0).toUpperCase()+v.slice(1);for(r=0;r<e.length;r++){q=e[r]+v;if(t[q]!==a){return q}}}function f(q,s){for(var r in s){q.style[n(q,r)||r]=s[r]}return q}function m(s){for(var q=1;q<arguments.length;q++){var r=arguments[q];for(var t in r){if(s[t]===a){s[t]=r[t]}}}return s}function l(q){var r={x:q.offsetLeft,y:q.offsetTop};while((q=q.offsetParent)){r.x+=q.offsetLeft,r.y+=q.offsetTop}return r}var d={lines:12,length:7,width:5,radius:10,rotate:0,corners:1,color:"#000",speed:1,trail:100,opacity:1/4,fps:20,zIndex:2000000000,className:"spinner",top:"auto",left:"auto",position:"relative"};var b=function b(q){if(!this.spin){return new b(q)}this.opts=m(q||{},b.defaults,d)};b.defaults={};m(b.prototype,{spin:function(x){this.stop();var B=this,q=B.opts,r=B.el=f(g(0,{className:q.className}),{position:q.position,width:0,zIndex:q.zIndex}),A=q.radius+q.length+q.width,C,z;if(x){x.insertBefore(r,x.firstChild||null);z=l(x);C=l(r);f(r,{left:(q.left=="auto"?z.x-C.x+(x.offsetWidth>>1):parseInt(q.left,10)+A)+"px",top:(q.top=="auto"?z.y-C.y+(x.offsetHeight>>1):parseInt(q.top,10)+A)+"px"})}r.setAttribute("aria-role","progressbar");B.lines(r,B.opts);if(!o){var u=0,s=q.fps,w=s/q.speed,v=(1-q.opacity)/(w*q.trail/100),y=w/q.lines;(function t(){u++;for(var D=q.lines;D;D--){var E=Math.max(1-(u+D*y)%w*v,q.opacity);B.opacity(r,q.lines-D,E,q)}B.timeout=B.el&&setTimeout(t,~~(1000/s))})()}return B},stop:function(){var q=this.el;if(q){clearTimeout(this.timeout);if(q.parentNode){q.parentNode.removeChild(q)}this.el=a}return this},lines:function(s,u){var r=0,q;function t(v,w){return f(g(),{position:"absolute",width:(u.length+u.width)+"px",height:u.width+"px",background:v,boxShadow:w,transformOrigin:"left",transform:"rotate("+~~(360/u.lines*r+u.rotate)+"deg) translate("+u.radius+"px,0)",borderRadius:(u.corners*u.width>>1)+"px"})}for(;r<u.lines;r++){q=f(g(),{position:"absolute",top:1+~(u.width/2)+"px",transform:u.hwaccel?"translate3d(0,0,0)":"",opacity:u.opacity,animation:o&&c(u.opacity,u.trail,r,u.lines)+" "+1/u.speed+"s linear infinite"});if(u.shadow){h(q,f(t("#000","0 0 4px #000"),{top:2+"px"}))}h(s,h(q,t(u.color,"0 0 1px rgba(0,0,0,.1)")))}return s},opacity:function(r,q,s){if(q<r.childNodes.length){r.childNodes[q].style.opacity=s}}});(function(){function q(t,s){return g("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="spin-vml">',s)}var r=f(g("group"),{behavior:"url(#default#VML)"});if(!n(r,"transform")&&r.adj){j.addRule(".spin-vml","behavior:url(#default#VML)");b.prototype.lines=function(v,u){var t=u.length+u.width,B=2*t;function A(){return f(q("group",{coordsize:B+" "+B,coordorigin:-t+" "+-t}),{width:B,height:B})}var w=-(u.width+u.length)*2+"px",z=f(A(),{position:"absolute",top:w,left:w}),y;function x(C,s,D){h(z,h(f(A(),{rotation:360/u.lines*C+"deg",left:~~s}),h(f(q("roundrect",{arcsize:u.corners}),{width:t,height:u.width,left:u.radius,top:-u.width>>1,filter:D}),q("fill",{color:u.color,opacity:u.opacity}),q("stroke",{opacity:0}))))}if(u.shadow){for(y=1;y<=u.lines;y++){x(y,-2,"progid:DXImageTransform.Microsoft.Blur(pixelradius=2,makeshadow=1,shadowopacity=.3)")}}for(y=1;y<=u.lines;y++){x(y)}return h(v,z)};b.prototype.opacity=function(t,s,v,u){var w=t.firstChild;u=u.shadow&&u.lines||0;if(w&&s+u<w.childNodes.length){w=w.childNodes[s+u];w=w&&w.firstChild;w=w&&w.firstChild;if(w){w.opacity=v}}}}else{o=n(r,"animation")}})();if(typeof define=="function"&&define.amd){define(function(){return b})}else{i.Spinner=b}}(window,document);
  (function(a){a.fn.spin=function(e,d){var c,b;if(typeof e==="string"){if(!e in a.fn.spin.presets){throw new Error("Preset '"+e+"' isn't defined")}c=a.fn.spin.presets[e];b=d||{}}else{if(d){throw new Error("Invalid arguments. Accepted arguments:\n$.spin([String preset[, Object options]]),\n$.spin(Object options),\n$.spin(Boolean shouldSpin)")}c=a.fn.spin.presets.small;b=a.isPlainObject(e)?e:{}}if(window.Spinner){return this.each(function(){var g=a(this),f=g.data();if(f.spinner){f.spinner.stop();delete f.spinner}if(e===false){return}b=a.extend({color:g.css("color")},c,b);f.spinner=new Spinner(b).spin(this)})}else{throw"Spinner class not available."}};a.fn.spin.presets={small:{lines:12,length:3,width:2,radius:3,trail:60,speed:1.5},medium:{lines:12,length:5,width:3,radius:8,trail:60,speed:1.5},large:{lines:12,length:8,width:4,radius:10,trail:60,speed:1.5}};a.fn.spinStop=function(){if(window.Spinner){return this.each(function(){var c=a(this),b=c.data();if(b.spinner){b.spinner.stop();delete b.spinner}})}else{throw"Spinner class not available."}}})(jQuery);
  (function(a){if(typeof a.fn.each2=="undefined"){a.fn.extend({each2:function(f){var d=a([0]),e=-1,b=this.length;while(++e<b&&(d.context=d[0]=this[e])&&f.call(d[0],e,d)!==false){}return this}})}})(jQuery);(function(B,k){if(window.Select2!==k){return}var I,L,v,c,a,n,m={x:0,y:0},t,u,I={TAB:9,ENTER:13,ESC:27,SPACE:32,LEFT:37,UP:38,RIGHT:39,DOWN:40,SHIFT:16,CTRL:17,ALT:18,PAGE_UP:33,PAGE_DOWN:34,HOME:36,END:35,BACKSPACE:8,DELETE:46,isArrow:function(M){M=M.which?M.which:M;switch(M){case I.LEFT:case I.RIGHT:case I.UP:case I.DOWN:return true}return false},isControl:function(N){var M=N.which;switch(M){case I.SHIFT:case I.CTRL:case I.ALT:return true}if(N.metaKey){return true}return false},isFunctionKey:function(M){M=M.which?M.which:M;return M>=112&&M<=123}},z="<div class='select2-measure-scrollbar'></div>";t=B(document);a=(function(){var M=1;return function(){return M++}}());function o(O,P){var N=0,M=P.length;for(;N<M;N=N+1){if(r(O,P[N])){return N}}return -1}function K(){var M=B(z);M.appendTo("body");var N={width:M.width()-M[0].clientWidth,height:M.height()-M[0].clientHeight};M.remove();return N}function r(N,M){if(N===M){return true}if(N===k||M===k){return false}if(N===null||M===null){return false}if(N.constructor===String){return N+""===M+""}if(M.constructor===String){return M+""===N+""}return false}function g(N,P){var Q,O,M;if(N===null||N.length<1){return[]}Q=N.split(P);for(O=0,M=Q.length;O<M;O=O+1){Q[O]=B.trim(Q[O])}return Q}function f(M){return M.outerWidth(false)-M.width()}function D(N){var M="keyup-change-value";N.on("keydown",function(){if(B.data(N,M)===k){B.data(N,M,N.val())}});N.on("keyup",function(){var O=B.data(N,M);if(O!==k&&N.val()!==O){B.removeData(N,M);N.trigger("keyup-change")}})}t.on("mousemove",function(M){m.x=M.pageX;m.y=M.pageY});function H(M){M.on("mousemove",function(O){var N=m;if(N===k||N.x!==O.pageX||N.y!==O.pageY){B(O.target).trigger("mousemove-filtered",O)}})}function i(P,N,M){M=M||k;var O;return function(){var Q=arguments;window.clearTimeout(O);O=window.setTimeout(function(){N.apply(M,Q)},P)}}function q(O){var M=false,N;return function(){if(M===false){N=O();M=true}return N}}function j(M,O){var N=i(M,function(P){O.trigger("scroll-debounced",P)});O.on("scroll",function(P){if(o(P.target,O.get())>=0){N(P)}})}function G(M){if(M[0]===document.activeElement){return}window.setTimeout(function(){var O=M[0],P=M.val().length,N;M.focus();if(M.is(":visible")&&O===document.activeElement){if(O.setSelectionRange){O.setSelectionRange(P,P)}else{if(O.createTextRange){N=O.createTextRange();N.collapse(false);N.select()}}}},0)}function d(M){M=B(M)[0];var P=0;var N=0;if("selectionStart" in M){P=M.selectionStart;N=M.selectionEnd-P}else{if("selection" in document){M.focus();var O=document.selection.createRange();N=document.selection.createRange().text.length;O.moveStart("character",-M.value.length);P=O.text.length-N}}return{offset:P,length:N}}function y(M){M.preventDefault();M.stopPropagation()}function b(M){M.preventDefault();M.stopImmediatePropagation()}function l(N){if(!n){var M=N[0].currentStyle||window.getComputedStyle(N[0],null);n=B(document.createElement("div")).css({position:"absolute",left:"-10000px",top:"-10000px",display:"none",fontSize:M.fontSize,fontFamily:M.fontFamily,fontStyle:M.fontStyle,fontWeight:M.fontWeight,letterSpacing:M.letterSpacing,textTransform:M.textTransform,whiteSpace:"nowrap"});n.attr("class","select2-sizer");B("body").append(n)}n.text(N.val());return n.width()}function h(N,R,M){var P,Q=[],O;P=N.attr("class");if(P){P=""+P;B(P.split(" ")).each2(function(){if(this.indexOf("select2-")===0){Q.push(this)}})}P=R.attr("class");if(P){P=""+P;B(P.split(" ")).each2(function(){if(this.indexOf("select2-")!==0){O=M(this);if(O){Q.push(this)}}})}N.attr("class",Q.join(" "))}function s(R,Q,O,M){var P=R.toUpperCase().indexOf(Q.toUpperCase()),N=Q.length;if(P<0){O.push(M(R));return}O.push(M(R.substring(0,P)));O.push("<span class='select2-match'>");O.push(M(R.substring(P,P+N)));O.push("</span>");O.push(M(R.substring(P+N,R.length)))}function E(M){var N={"\\":"&#92;","&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#47;"};return String(M).replace(/[&<>"'\/\\]/g,function(O){return N[O]})}function C(O){var R,N=0,P=null,S=O.quietMillis||100,Q=O.url,M=this;return function(T){window.clearTimeout(R);R=window.setTimeout(function(){N+=1;var W=N,X=O.data,V=Q,Z=O.transport||B.fn.select2.ajaxDefaults.transport,U={type:O.type||"GET",cache:O.cache||false,jsonpCallback:O.jsonpCallback||k,dataType:O.dataType||"json"},Y=B.extend({},B.fn.select2.ajaxDefaults.params,U);X=X?X.call(M,T.term,T.page,T.context):null;V=(typeof V==="function")?V.call(M,T.term,T.page,T.context):V;if(P){P.abort()}if(O.params){if(B.isFunction(O.params)){B.extend(Y,O.params.call(M))}else{B.extend(Y,O.params)}}B.extend(Y,{url:V,dataType:O.dataType,data:X,success:function(ab){if(W<N){return}var aa=O.results(ab,T.page);T.callback(aa)}});P=Z.call(M,Y)},S)}}function F(N){var Q=N,P,O,R=function(S){return""+S.text};if(B.isArray(Q)){O=Q;Q={results:O}}if(B.isFunction(Q)===false){O=Q;Q=function(){return O}}var M=Q();if(M.text){R=M.text;if(!B.isFunction(R)){P=M.text;R=function(S){return S[P]}}}return function(U){var T=U.term,S={results:[]},V;if(T===""){U.callback(Q());return}V=function(X,Z){var Y,W;X=X[0];if(X.children){Y={};for(W in X){if(X.hasOwnProperty(W)){Y[W]=X[W]}}Y.children=[];B(X.children).each2(function(aa,ab){V(ab,Y.children)});if(Y.children.length||U.matcher(T,R(Y),X)){Z.push(Y)}}else{if(U.matcher(T,R(X),X)){Z.push(X)}}};B(Q().results).each2(function(X,W){V(W,S.results)});U.callback(S)}}function x(N){var M=B.isFunction(N);return function(Q){var P=Q.term,O={results:[]};B(M?N():N).each(function(){var R=this.text!==k,S=R?this.text:this;if(P===""||Q.matcher(P,S)){O.results.push(R?this:{id:this,text:this})}});Q.callback(O)}}function w(M,N){if(B.isFunction(M)){return true}if(!M){return false}throw new Error(N+" must be a function or a falsy value")}function A(M){return B.isFunction(M)?M():M}function p(M){var N=0;B.each(M,function(O,P){if(P.children){N+=p(P.children)}else{N++}});return N}function e(U,V,S,M){var N=U,W=false,P,T,Q,O,R;if(!M.createSearchChoice||!M.tokenSeparators||M.tokenSeparators.length<1){return k}while(true){T=-1;for(Q=0,O=M.tokenSeparators.length;Q<O;Q++){R=M.tokenSeparators[Q];T=U.indexOf(R);if(T>=0){break}}if(T<0){break}P=U.substring(0,T);U=U.substring(T+R.length);if(P.length>0){P=M.createSearchChoice.call(this,P,V);if(P!==k&&P!==null&&M.id(P)!==k&&M.id(P)!==null){W=false;for(Q=0,O=V.length;Q<O;Q++){if(r(M.id(P),M.id(V[Q]))){W=true;break}}if(!W){S(P)}}}}if(N!==U){return U}}function J(M,N){var O=function(){};O.prototype=new M;O.prototype.constructor=O;O.prototype.parent=M.prototype;O.prototype=B.extend(O.prototype,N);return O}L=J(Object,{bind:function(N){var M=this;return function(){N.apply(M,arguments)}},init:function(Q){var O,N,R=".select2-results",P,M;this.opts=Q=this.prepareOpts(Q);this.id=Q.id;if(Q.element.data("select2")!==k&&Q.element.data("select2")!==null){Q.element.data("select2").destroy()}this.container=this.createContainer();this.containerId="s2id_"+(Q.element.attr("id")||"autogen"+a());this.containerSelector="#"+this.containerId.replace(/([;&,\.\+\*\~':"\!\^#$%@\[\]\(\)=>\|])/g,"\\$1");this.container.attr("id",this.containerId);this.body=q(function(){return Q.element.closest("body")});h(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.css(A(Q.containerCss));this.container.addClass(A(Q.containerCssClass));this.elementTabIndex=this.opts.element.attr("tabindex");this.opts.element.data("select2",this).attr("tabindex","-1").before(this.container);this.container.data("select2",this);this.dropdown=this.container.find(".select2-drop");this.dropdown.addClass(A(Q.dropdownCssClass));this.dropdown.data("select2",this);this.results=O=this.container.find(R);this.search=N=this.container.find("input.select2-input");this.resultsPage=0;this.context=null;this.initContainer();H(this.results);this.dropdown.on("mousemove-filtered touchstart touchmove touchend",R,this.bind(this.highlightUnderEvent));j(80,this.results);this.dropdown.on("scroll-debounced",R,this.bind(this.loadMoreIfNeeded));B(this.container).on("change",".select2-input",function(S){S.stopPropagation()});B(this.dropdown).on("change",".select2-input",function(S){S.stopPropagation()});if(B.fn.mousewheel){O.mousewheel(function(W,X,U,T){var V=O.scrollTop(),S;if(T>0&&V-T<=0){O.scrollTop(0);y(W)}else{if(T<0&&O.get(0).scrollHeight-O.scrollTop()+T<=O.height()){O.scrollTop(O.get(0).scrollHeight-O.height());y(W)}}})}D(N);N.on("keyup-change input paste",this.bind(this.updateResults));N.on("focus",function(){N.addClass("select2-focused")});N.on("blur",function(){N.removeClass("select2-focused")});this.dropdown.on("mouseup",R,this.bind(function(S){if(B(S.target).closest(".select2-result-selectable").length>0){this.highlightUnderEvent(S);this.selectHighlighted(S)}}));this.dropdown.on("click mouseup mousedown",function(S){S.stopPropagation()});if(B.isFunction(this.opts.initSelection)){this.initSelection();this.monitorSource()}if(Q.maximumInputLength!==null){this.search.attr("maxlength",Q.maximumInputLength)}var P=Q.element.prop("disabled");if(P===k){P=false}this.enable(!P);var M=Q.element.prop("readonly");if(M===k){M=false}this.readonly(M);u=u||K();this.autofocus=Q.element.prop("autofocus");Q.element.prop("autofocus",false);if(this.autofocus){this.focus()}},destroy:function(){var N=this.opts.element,M=N.data("select2");if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null}if(M!==k){M.container.remove();M.dropdown.remove();N.removeClass("select2-offscreen").removeData("select2").off(".select2").prop("autofocus",this.autofocus||false);if(this.elementTabIndex){N.attr({tabindex:this.elementTabIndex})}else{N.removeAttr("tabindex")}N.show()}},optionToData:function(M){if(M.is("option")){return{id:M.prop("value"),text:M.text(),element:M.get(),css:M.attr("class"),disabled:M.prop("disabled"),locked:r(M.attr("locked"),"locked")||r(M.data("locked"),true)}}else{if(M.is("optgroup")){return{text:M.attr("label"),children:[],element:M.get(),css:M.attr("class")}}}},prepareOpts:function(R){var P,N,M,Q,O=this;P=R.element;if(P.get(0).tagName.toLowerCase()==="select"){this.select=N=R.element}if(N){B.each(["id","multiple","ajax","query","createSearchChoice","initSelection","data","tags"],function(){if(this in R){throw new Error("Option '"+this+"' is not allowed for Select2 when attached to a <select> element.")}})}R=B.extend({},{populateResults:function(T,V,Y){var X,W,S,U,Z=this.opts.id;X=function(ag,aa,af){var ah,ac,am,aj,ad,al,ab,ak,ai,ae;ag=R.sortResults(ag,aa,Y);for(ah=0,ac=ag.length;ah<ac;ah=ah+1){am=ag[ah];ad=(am.disabled===true);aj=(!ad)&&(Z(am)!==k);al=am.children&&am.children.length>0;ab=B("<li></li>");ab.addClass("select2-results-dept-"+af);ab.addClass("select2-result");ab.addClass(aj?"select2-result-selectable":"select2-result-unselectable");if(ad){ab.addClass("select2-disabled")}if(al){ab.addClass("select2-result-with-children")}ab.addClass(O.opts.formatResultCssClass(am));ak=B(document.createElement("div"));ak.addClass("select2-result-label");ae=R.formatResult(am,ak,Y,O.opts.escapeMarkup);if(ae!==k){ak.html(ae)}ab.append(ak);if(al){ai=B("<ul></ul>");ai.addClass("select2-result-sub");X(am.children,ai,af+1);ab.append(ai)}ab.data("select2-data",am);aa.append(ab)}};X(V,T,0)}},B.fn.select2.defaults,R);if(typeof(R.id)!=="function"){M=R.id;R.id=function(S){return S[M]}}if(B.isArray(R.element.data("select2Tags"))){if("tags" in R){throw"tags specified as both an attribute 'data-select2-tags' and in options of Select2 "+R.element.attr("id")}R.tags=R.element.data("select2Tags")}if(N){R.query=this.bind(function(W){var V={results:[],more:false},U=W.term,T,S,X;X=function(Y,aa){var Z;if(Y.is("option")){if(W.matcher(U,Y.text(),Y)){aa.push(O.optionToData(Y))}}else{if(Y.is("optgroup")){Z=O.optionToData(Y);Y.children().each2(function(ab,ac){X(ac,Z.children)});if(Z.children.length>0){aa.push(Z)}}}};T=P.children();if(this.getPlaceholder()!==k&&T.length>0){S=this.getPlaceholderOption();if(S){T=T.not(S)}}T.each2(function(Y,Z){X(Z,V.results)});W.callback(V)});R.id=function(S){return S.id};R.formatResultCssClass=function(S){return S.css}}else{if(!("query" in R)){if("ajax" in R){Q=R.element.data("ajax-url");if(Q&&Q.length>0){R.ajax.url=Q}R.query=C.call(R.element,R.ajax)}else{if("data" in R){R.query=F(R.data)}else{if("tags" in R){R.query=x(R.tags);if(R.createSearchChoice===k){R.createSearchChoice=function(S){return{id:S,text:S}}}if(R.initSelection===k){R.initSelection=function(S,U){var T=[];B(g(S.val(),R.separator)).each(function(){var X=this,W=this,V=R.tags;if(B.isFunction(V)){V=V()}B(V).each(function(){if(r(this.id,X)){W=this.text;return false}});T.push({id:X,text:W})});U(T)}}}}}}}if(typeof(R.query)!=="function"){throw"query function not defined for Select2 "+R.element.attr("id")}return R},monitorSource:function(){var M=this.opts.element,N;M.on("change.select2",this.bind(function(O){if(this.opts.element.data("select2-change-triggered")!==true){this.initSelection()}}));N=this.bind(function(){var Q,P,O=this;var R=M.prop("disabled");if(R===k){R=false}this.enable(!R);var P=M.prop("readonly");if(P===k){P=false}this.readonly(P);h(this.container,this.opts.element,this.opts.adaptContainerCssClass);this.container.addClass(A(this.opts.containerCssClass));h(this.dropdown,this.opts.element,this.opts.adaptDropdownCssClass);this.dropdown.addClass(A(this.opts.dropdownCssClass))});M.on("propertychange.select2 DOMAttrModified.select2",N);if(this.mutationCallback===k){this.mutationCallback=function(O){O.forEach(N)}}if(typeof WebKitMutationObserver!=="undefined"){if(this.propertyObserver){delete this.propertyObserver;this.propertyObserver=null}this.propertyObserver=new WebKitMutationObserver(this.mutationCallback);this.propertyObserver.observe(M.get(0),{attributes:true,subtree:false})}},triggerSelect:function(N){var M=B.Event("select2-selecting",{val:this.id(N),object:N});this.opts.element.trigger(M);return !M.isDefaultPrevented()},triggerChange:function(M){M=M||{};M=B.extend({},M,{type:"change",val:this.val()});this.opts.element.data("select2-change-triggered",true);this.opts.element.trigger(M);this.opts.element.data("select2-change-triggered",false);this.opts.element.click();if(this.opts.blurOnChange){this.opts.element.blur()}},isInterfaceEnabled:function(){return this.enabledInterface===true},enableInterface:function(){var M=this._enabled&&!this._readonly,N=!M;if(M===this.enabledInterface){return false}this.container.toggleClass("select2-container-disabled",N);this.close();this.enabledInterface=M;return true},enable:function(M){if(M===k){M=true}if(this._enabled===M){return false}this._enabled=M;this.opts.element.prop("disabled",!M);this.enableInterface();return true},readonly:function(M){if(M===k){M=false}if(this._readonly===M){return false}this._readonly=M;this.opts.element.prop("readonly",M);this.enableInterface();return true},opened:function(){return this.container.hasClass("select2-dropdown-open")},positionDropdown:function(){var O=this.dropdown,Q=this.container.offset(),X=this.container.outerHeight(false),Y=this.container.outerWidth(false),U=O.outerHeight(false),N=B(window).scrollLeft()+B(window).width(),ab=B(window).scrollTop()+B(window).height(),P=Q.top+X,Z=Q.left,M=P+U<=ab,S=(Q.top-U)>=this.body().scrollTop(),V=O.outerWidth(false),ad=Z+V<=N,ac=O.hasClass("select2-drop-above"),R,aa,T,W;if(this.opts.dropdownAutoWidth){W=B(".select2-results",O)[0];O.addClass("select2-drop-auto-width");O.css("width","");V=O.outerWidth(false)+(W.scrollHeight===W.clientHeight?0:u.width);V>Y?Y=V:V=Y;ad=Z+V<=N}else{this.container.removeClass("select2-drop-auto-width")}if(this.body().css("position")!=="static"){R=this.body().offset();P-=R.top;Z-=R.left}if(ac){aa=true;if(!S&&M){aa=false}}else{aa=false;if(!M&&S){aa=true}}if(!ad){Z=Q.left+Y-V}if(aa){P=Q.top-U;this.container.addClass("select2-drop-above");O.addClass("select2-drop-above")}else{this.container.removeClass("select2-drop-above");O.removeClass("select2-drop-above")}T=B.extend({top:P,left:Z,width:Y},A(this.opts.dropdownCss));O.css(T)},shouldOpen:function(){var M;if(this.opened()){return false}if(this._enabled===false||this._readonly===true){return false}M=B.Event("select2-opening");this.opts.element.trigger(M);return !M.isDefaultPrevented()},clearDropdownAlignmentPreference:function(){this.container.removeClass("select2-drop-above");this.dropdown.removeClass("select2-drop-above")},open:function(){if(!this.shouldOpen()){return false}this.opening();return true},opening:function(){var T=this.containerId,M="scroll."+T,Q="resize."+T,P="orientationchange."+T,N,S;this.container.addClass("select2-dropdown-open").addClass("select2-container-active");this.clearDropdownAlignmentPreference();if(this.dropdown[0]!==this.body().children().last()[0]){this.dropdown.detach().appendTo(this.body())}N=B("#select2-drop-mask");if(N.length==0){N=B(document.createElement("div"));N.attr("id","select2-drop-mask").attr("class","select2-drop-mask");N.hide();N.appendTo(this.body());N.on("mousedown touchstart click",function(V){var W=B("#select2-drop"),U;if(W.length>0){U=W.data("select2");if(U.opts.selectOnBlur){U.selectHighlighted({noFocus:true})}U.close();V.preventDefault();V.stopPropagation()}})}if(this.dropdown.prev()[0]!==N[0]){this.dropdown.before(N)}B("#select2-drop").removeAttr("id");this.dropdown.attr("id","select2-drop");S=O();N.css(S).show();this.dropdown.show();this.positionDropdown();this.dropdown.addClass("select2-drop-active");var R=this;this.container.parents().add(window).each(function(){B(this).on(Q+" "+M+" "+P,function(U){var V=O();B("#select2-drop-mask").css(V);R.positionDropdown()})});function O(){return{width:Math.max(document.documentElement.scrollWidth,B(window).width()),height:Math.max(document.documentElement.scrollHeight,B(window).height())}}},close:function(){if(!this.opened()){return}var P=this.containerId,M="scroll."+P,O="resize."+P,N="orientationchange."+P;this.container.parents().add(window).each(function(){B(this).off(M).off(O).off(N)});this.clearDropdownAlignmentPreference();B("#select2-drop-mask").hide();this.dropdown.removeAttr("id");this.dropdown.hide();this.container.removeClass("select2-dropdown-open");this.results.empty();this.clearSearch();this.search.removeClass("select2-active");this.opts.element.trigger(B.Event("select2-close"))},externalSearch:function(M){this.open();this.search.val(M);this.updateResults(false)},clearSearch:function(){},getMaximumSelectionSize:function(){return A(this.opts.maximumSelectionSize)},ensureHighlightVisible:function(){var P=this.results,O,M,T,S,Q,R,N;M=this.highlight();if(M<0){return}if(M==0){P.scrollTop(0);return}O=this.findHighlightableChoices().find(".select2-result-label");T=B(O[M]);S=T.offset().top+T.outerHeight(true);if(M===O.length-1){N=P.find("li.select2-more-results");if(N.length>0){S=N.offset().top+N.outerHeight(true)}}Q=P.offset().top+P.outerHeight(true);if(S>Q){P.scrollTop(P.scrollTop()+(S-Q))}R=T.offset().top-P.offset().top;if(R<0&&T.css("display")!="none"){P.scrollTop(P.scrollTop()+R)}},findHighlightableChoices:function(){return this.results.find(".select2-result-selectable:not(.select2-selected):not(.select2-disabled)")},moveHighlight:function(P){var O=this.findHighlightableChoices(),N=this.highlight();while(N>-1&&N<O.length){N+=P;var M=B(O[N]);if(M.hasClass("select2-result-selectable")&&!M.hasClass("select2-disabled")&&!M.hasClass("select2-selected")){this.highlight(N);break}}},highlight:function(N){var P=this.findHighlightableChoices(),M,O;if(arguments.length===0){return o(P.filter(".select2-highlighted")[0],P.get())}if(N>=P.length){N=P.length-1}if(N<0){N=0}this.results.find(".select2-highlighted").removeClass("select2-highlighted");M=B(P[N]);M.addClass("select2-highlighted");this.ensureHighlightVisible();O=M.data("select2-data");if(O){this.opts.element.trigger({type:"select2-highlight",val:this.id(O),choice:O})}},countSelectableResults:function(){return this.findHighlightableChoices().length},highlightUnderEvent:function(N){var M=B(N.target).closest(".select2-result-selectable");if(M.length>0&&!M.is(".select2-highlighted")){var O=this.findHighlightableChoices();this.highlight(O.index(M))}else{if(M.length==0){this.results.find(".select2-highlighted").removeClass("select2-highlighted")}}},loadMoreIfNeeded:function(){var Q=this.results,P=Q.find("li.select2-more-results"),T,S=-1,R=this.resultsPage+1,M=this,O=this.search.val(),N=this.context;if(P.length===0){return}T=P.offset().top-Q.offset().top-Q.height();if(T<=this.opts.loadMorePadding){P.addClass("select2-active");this.opts.query({element:this.opts.element,term:O,page:R,context:N,matcher:this.opts.matcher,callback:this.bind(function(U){if(!M.opened()){return}M.opts.populateResults.call(this,Q,U.results,{term:O,page:R,context:N});M.postprocessResults(U,false,false);if(U.more===true){P.detach().appendTo(Q).text(M.opts.formatLoadMore(R+1));window.setTimeout(function(){M.loadMoreIfNeeded()},10)}else{P.remove()}M.positionDropdown();M.resultsPage=R;M.context=U.context})})}},tokenize:function(){},updateResults:function(U){var X=this.search,S=this.results,M=this.opts,R,W=this,V,Q=X.val(),O=B.data(this.container,"select2-last-term");if(U!==true&&O&&r(Q,O)){return}B.data(this.container,"select2-last-term",Q);if(U!==true&&(this.showSearchInput===false||!this.opened())){return}function T(){X.removeClass("select2-active");W.positionDropdown()}function N(Y){S.html(Y);T()}var P=this.getMaximumSelectionSize();if(P>=1){R=this.data();if(B.isArray(R)&&R.length>=P&&w(M.formatSelectionTooBig,"formatSelectionTooBig")){N("<li class='select2-selection-limit'>"+M.formatSelectionTooBig(P)+"</li>");return}}if(X.val().length<M.minimumInputLength){if(w(M.formatInputTooShort,"formatInputTooShort")){N("<li class='select2-no-results'>"+M.formatInputTooShort(X.val(),M.minimumInputLength)+"</li>")}else{N("")}if(U&&this.showSearch){this.showSearch(true)}return}if(M.maximumInputLength&&X.val().length>M.maximumInputLength){if(w(M.formatInputTooLong,"formatInputTooLong")){N("<li class='select2-no-results'>"+M.formatInputTooLong(X.val(),M.maximumInputLength)+"</li>")}else{N("")}return}if(M.formatSearching&&this.findHighlightableChoices().length===0){N("<li class='select2-searching'>"+M.formatSearching()+"</li>")}X.addClass("select2-active");V=this.tokenize();if(V!=k&&V!=null){X.val(V)}this.resultsPage=1;M.query({element:M.element,term:X.val(),page:this.resultsPage,context:null,matcher:M.matcher,callback:this.bind(function(Z){var Y;if(!this.opened()){this.search.removeClass("select2-active");return}this.context=(Z.context===k)?null:Z.context;if(this.opts.createSearchChoice&&X.val()!==""){Y=this.opts.createSearchChoice.call(W,X.val(),Z.results);if(Y!==k&&Y!==null&&W.id(Y)!==k&&W.id(Y)!==null){if(B(Z.results).filter(function(){return r(W.id(this),W.id(Y))}).length===0){Z.results.unshift(Y)}}}if(Z.results.length===0&&w(M.formatNoMatches,"formatNoMatches")){N("<li class='select2-no-results'>"+M.formatNoMatches(X.val())+"</li>");return}S.empty();W.opts.populateResults.call(this,S,Z.results,{term:X.val(),page:this.resultsPage,context:null});if(Z.more===true&&w(M.formatLoadMore,"formatLoadMore")){S.append("<li class='select2-more-results'>"+W.opts.escapeMarkup(M.formatLoadMore(this.resultsPage))+"</li>");window.setTimeout(function(){W.loadMoreIfNeeded()},10)}this.postprocessResults(Z,U);T();this.opts.element.trigger({type:"select2-loaded",items:Z})})})},cancel:function(){this.close()},blur:function(){if(this.opts.selectOnBlur){this.selectHighlighted({noFocus:true})}this.close();this.container.removeClass("select2-container-active");if(this.search[0]===document.activeElement){this.search.blur()}this.clearSearch();this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus")},focusSearch:function(){G(this.search)},selectHighlighted:function(N){var M=this.highlight(),O=this.results.find(".select2-highlighted"),P=O.closest(".select2-result").data("select2-data");if(P){this.highlight(M);this.onSelect(P,N)}else{if(N&&N.noFocus){this.close()}}},getPlaceholder:function(){var M;return this.opts.element.attr("placeholder")||this.opts.element.attr("data-placeholder")||this.opts.element.data("placeholder")||this.opts.placeholder||((M=this.getPlaceholderOption())!==k?M.text():k)},getPlaceholderOption:function(){if(this.select){var M=this.select.children().first();if(this.opts.placeholderOption!==k){return(this.opts.placeholderOption==="first"&&M)||(typeof this.opts.placeholderOption==="function"&&this.opts.placeholderOption(this.select))}else{if(M.text()===""&&M.val()===""){return M}}}},initContainerWidth:function(){function N(){var R,P,S,Q,O;if(this.opts.width==="off"){return null}else{if(this.opts.width==="element"){return this.opts.element.outerWidth(false)===0?"auto":this.opts.element.outerWidth(false)+"px"}else{if(this.opts.width==="copy"||this.opts.width==="resolve"){R=this.opts.element.attr("style");if(R!==k){P=R.split(";");for(Q=0,O=P.length;Q<O;Q=Q+1){S=P[Q].replace(/\s/g,"").match(/width:(([-+]?([0-9]*\.)?[0-9]+)(px|em|ex|%|in|cm|mm|pt|pc))/i);if(S!==null&&S.length>=1){return S[1]}}}if(this.opts.width==="resolve"){R=this.opts.element.css("width");if(R.indexOf("%")>0){return R}return(this.opts.element.outerWidth(false)===0?"auto":this.opts.element.outerWidth(false)+"px")}return null}else{if(B.isFunction(this.opts.width)){return this.opts.width()}else{return this.opts.width}}}}}var M=N.call(this);if(M!==null){this.container.css("width",M)}}});v=J(L,{createContainer:function(){var M=B(document.createElement("div")).attr({"class":"select2-container"}).html(["<a href='javascript:void(0)' onclick='return false;' class='select2-choice' tabindex='-1'>","   <span class='select2-chosen'>&nbsp;</span><abbr class='select2-search-choice-close'></abbr>","   <span class='select2-arrow'><b></b></span>","</a>","<input class='select2-focusser select2-offscreen' type='text'/>","<div class='select2-drop select2-display-none'>","   <div class='select2-search'>","       <input type='text' autocomplete='off' autocorrect='off' autocapitalize='off' spellcheck='false' class='select2-input'/>","   </div>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return M},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.focusser.prop("disabled",!this.isInterfaceEnabled())}},opening:function(){var O,N,M;if(this.opts.minimumResultsForSearch>=0){this.showSearch(true)}this.parent.opening.apply(this,arguments);if(this.showSearchInput!==false){this.search.val(this.focusser.val())}this.search.focus();O=this.search.get(0);if(O.createTextRange){N=O.createTextRange();N.collapse(false);N.select()}else{if(O.setSelectionRange){M=this.search.val().length;O.setSelectionRange(M,M)}}this.focusser.prop("disabled",true).val("");this.updateResults(true);this.opts.element.trigger(B.Event("select2-open"))},close:function(){if(!this.opened()){return}this.parent.close.apply(this,arguments);this.focusser.removeAttr("disabled");this.focusser.focus()},focus:function(){if(this.opened()){this.close()}else{this.focusser.removeAttr("disabled");this.focusser.focus()}},isFocused:function(){return this.container.hasClass("select2-container-active")},cancel:function(){this.parent.cancel.apply(this,arguments);this.focusser.removeAttr("disabled");this.focusser.focus()},initContainer:function(){var N,M=this.container,O=this.dropdown;if(this.opts.minimumResultsForSearch<0){this.showSearch(false)}else{this.showSearch(true)}this.selection=N=M.find(".select2-choice");this.focusser=M.find(".select2-focusser");this.focusser.attr("id","s2id_autogen"+a());B("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.focusser.attr("id"));this.focusser.attr("tabindex",this.elementTabIndex);this.search.on("keydown",this.bind(function(P){if(!this.isInterfaceEnabled()){return}if(P.which===I.PAGE_UP||P.which===I.PAGE_DOWN){y(P);return}switch(P.which){case I.UP:case I.DOWN:this.moveHighlight((P.which===I.UP)?-1:1);y(P);return;case I.ENTER:this.selectHighlighted();y(P);return;case I.TAB:this.selectHighlighted({noFocus:true});return;case I.ESC:this.cancel(P);y(P);return}}));this.search.on("blur",this.bind(function(P){if(document.activeElement===this.body().get(0)){window.setTimeout(this.bind(function(){this.search.focus()}),0)}}));this.focusser.on("keydown",this.bind(function(P){if(!this.isInterfaceEnabled()){return}if(P.which===I.TAB||I.isControl(P)||I.isFunctionKey(P)||P.which===I.ESC){return}if(this.opts.openOnEnter===false&&P.which===I.ENTER){y(P);return}if(P.which==I.DOWN||P.which==I.UP||(P.which==I.ENTER&&this.opts.openOnEnter)){if(P.altKey||P.ctrlKey||P.shiftKey||P.metaKey){return}this.open();y(P);return}if(P.which==I.DELETE||P.which==I.BACKSPACE){if(this.opts.allowClear){this.clear()}y(P);return}}));D(this.focusser);this.focusser.on("keyup-change input",this.bind(function(P){if(this.opts.minimumResultsForSearch>=0){P.stopPropagation();if(this.opened()){return}this.open()}}));N.on("mousedown","abbr",this.bind(function(P){if(!this.isInterfaceEnabled()){return}this.clear();b(P);this.close();this.selection.focus()}));N.on("mousedown",this.bind(function(P){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(B.Event("select2-focus"))}if(this.opened()){this.close()}else{if(this.isInterfaceEnabled()){this.open()}}y(P)}));O.on("mousedown",this.bind(function(){this.search.focus()}));N.on("focus",this.bind(function(P){y(P)}));this.focusser.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(B.Event("select2-focus"))}this.container.addClass("select2-container-active")})).on("blur",this.bind(function(){if(!this.opened()){this.container.removeClass("select2-container-active");this.opts.element.trigger(B.Event("select2-blur"))}}));this.search.on("focus",this.bind(function(){if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(B.Event("select2-focus"))}this.container.addClass("select2-container-active")}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.setPlaceholder()},clear:function(N){var O=this.selection.data("select2-data");if(O){var M=this.getPlaceholderOption();this.opts.element.val(M?M.val():"");this.selection.find(".select2-chosen").empty();this.selection.removeData("select2-data");this.setPlaceholder();if(N!==false){this.opts.element.trigger({type:"select2-removed",val:this.id(O),choice:O});this.triggerChange({removed:O})}}},initSelection:function(){var N;if(this.isPlaceholderOptionSelected()){this.updateSelection([]);this.close();this.setPlaceholder()}else{var M=this;this.opts.initSelection.call(null,this.opts.element,function(O){if(O!==k&&O!==null){M.updateSelection(O);M.close();M.setPlaceholder()}})}},isPlaceholderOptionSelected:function(){var M;return((M=this.getPlaceholderOption())!==k&&M.is(":selected"))||(this.opts.element.val()==="")||(this.opts.element.val()===k)||(this.opts.element.val()===null)},prepareOpts:function(){var N=this.parent.prepareOpts.apply(this,arguments),M=this;if(N.element.get(0).tagName.toLowerCase()==="select"){N.initSelection=function(O,Q){var P=O.find(":selected");Q(M.optionToData(P))}}else{if("data" in N){N.initSelection=N.initSelection||function(P,R){var Q=P.val();var O=null;N.query({matcher:function(S,V,T){var U=r(Q,N.id(T));if(U){O=T}return U},callback:!B.isFunction(R)?B.noop:function(){R(O)}})}}}return N},getPlaceholder:function(){if(this.select){if(this.getPlaceholderOption()===k){return k}}return this.parent.getPlaceholder.apply(this,arguments)},setPlaceholder:function(){var M=this.getPlaceholder();if(this.isPlaceholderOptionSelected()&&M!==k){if(this.select&&this.getPlaceholderOption()===k){return}this.selection.find(".select2-chosen").html(this.opts.escapeMarkup(M));this.selection.addClass("select2-default");this.container.removeClass("select2-allowclear")}},postprocessResults:function(R,N,Q){var P=0,M=this,S=true;this.findHighlightableChoices().each2(function(T,U){if(r(M.id(U.data("select2-data")),M.opts.element.val())){P=T;return false}});if(Q!==false){if(N===true&&P>=0){this.highlight(P)}else{this.highlight(0)}}if(N===true){var O=this.opts.minimumResultsForSearch;if(O>=0){this.showSearch(p(R.results)>=O)}}},showSearch:function(M){if(this.showSearchInput===M){return}this.showSearchInput=M;this.dropdown.find(".select2-search").toggleClass("select2-search-hidden",!M);this.dropdown.find(".select2-search").toggleClass("select2-offscreen",!M);B(this.dropdown,this.container).toggleClass("select2-with-searchbox",M)},onSelect:function(O,N){if(!this.triggerSelect(O)){return}var M=this.opts.element.val(),P=this.data();this.opts.element.val(this.id(O));this.updateSelection(O);this.opts.element.trigger({type:"select2-selected",val:this.id(O),choice:O});this.close();if(!N||!N.noFocus){this.selection.focus()}if(!r(M,this.id(O))){this.triggerChange({added:O,removed:P})}},updateSelection:function(P){var N=this.selection.find(".select2-chosen"),O,M;this.selection.data("select2-data",P);N.empty();O=this.opts.formatSelection(P,N,this.opts.escapeMarkup);if(O!==k){N.append(O)}M=this.opts.formatSelectionCssClass(P,N);if(M!==k){N.addClass(M)}this.selection.removeClass("select2-default");if(this.opts.allowClear&&this.getPlaceholder()!==k){this.container.addClass("select2-allowclear")}},val:function(){var Q,N=false,O=null,M=this,P=this.data();if(arguments.length===0){return this.opts.element.val()}Q=arguments[0];if(arguments.length>1){N=arguments[1]}if(this.select){this.select.val(Q).find(":selected").each2(function(R,S){O=M.optionToData(S);return false});this.updateSelection(O);this.setPlaceholder();if(N){this.triggerChange({added:O,removed:P})}}else{if(!Q&&Q!==0){this.clear(N);return}if(this.opts.initSelection===k){throw new Error("cannot call val() if initSelection() is not defined")}this.opts.element.val(Q);this.opts.initSelection(this.opts.element,function(R){M.opts.element.val(!R?"":M.id(R));M.updateSelection(R);M.setPlaceholder();if(N){M.triggerChange({added:R,removed:P})}})}},clearSearch:function(){this.search.val("");this.focusser.val("")},data:function(O,M){var N;if(arguments.length===0){N=this.selection.data("select2-data");if(N==k){N=null}return N}else{if(!O||O===""){this.clear(M)}else{N=this.data();this.opts.element.val(!O?"":this.id(O));this.updateSelection(O);if(M){this.triggerChange({added:O,removed:N})}}}}});c=J(L,{createContainer:function(){var M=B(document.createElement("div")).attr({"class":"select2-container select2-container-multi"}).html(["<ul class='select2-choices'>","  <li class='select2-search-field'>","    <input type='text' autocomplete='off' autocorrect='off' autocapitilize='off' spellcheck='false' class='select2-input'>","  </li>","</ul>","<div class='select2-drop select2-drop-multi select2-display-none'>","   <ul class='select2-results'>","   </ul>","</div>"].join(""));return M},prepareOpts:function(){var N=this.parent.prepareOpts.apply(this,arguments),M=this;if(N.element.get(0).tagName.toLowerCase()==="select"){N.initSelection=function(O,Q){var P=[];O.find(":selected").each2(function(R,S){P.push(M.optionToData(S))});Q(P)}}else{if("data" in N){N.initSelection=N.initSelection||function(O,R){var P=g(O.val(),N.separator);var Q=[];N.query({matcher:function(S,V,T){var U=B.grep(P,function(W){return r(W,N.id(T))}).length;if(U){Q.push(T)}return U},callback:!B.isFunction(R)?B.noop:function(){var S=[];for(var V=0;V<P.length;V++){var W=P[V];for(var U=0;U<Q.length;U++){var T=Q[U];if(r(W,N.id(T))){S.push(T);Q.splice(U,1);break}}}R(S)}})}}}return N},selectChoice:function(M){var N=this.container.find(".select2-search-choice-focus");if(N.length&&M&&M[0]==N[0]){}else{if(N.length){this.opts.element.trigger("choice-deselected",N)}N.removeClass("select2-search-choice-focus");if(M&&M.length){this.close();M.addClass("select2-search-choice-focus");this.opts.element.trigger("choice-selected",M)}}},initContainer:function(){var M=".select2-choices",N;this.searchContainer=this.container.find(".select2-search-field");this.selection=N=this.container.find(M);var O=this;this.selection.on("mousedown",".select2-search-choice",function(P){O.search[0].focus();O.selectChoice(B(this))});this.search.attr("id","s2id_autogen"+a());B("label[for='"+this.opts.element.attr("id")+"']").attr("for",this.search.attr("id"));this.search.on("input paste",this.bind(function(){if(!this.isInterfaceEnabled()){return}if(!this.opened()){this.open()}}));this.search.attr("tabindex",this.elementTabIndex);this.keydowns=0;this.search.on("keydown",this.bind(function(T){if(!this.isInterfaceEnabled()){return}++this.keydowns;var R=N.find(".select2-search-choice-focus");var S=R.prev(".select2-search-choice:not(.select2-locked)");var Q=R.next(".select2-search-choice:not(.select2-locked)");var U=d(this.search);if(R.length&&(T.which==I.LEFT||T.which==I.RIGHT||T.which==I.BACKSPACE||T.which==I.DELETE||T.which==I.ENTER)){var P=R;if(T.which==I.LEFT&&S.length){P=S}else{if(T.which==I.RIGHT){P=Q.length?Q:null}else{if(T.which===I.BACKSPACE){this.unselect(R.first());this.search.width(10);P=S.length?S:Q}else{if(T.which==I.DELETE){this.unselect(R.first());this.search.width(10);P=Q.length?Q:null}else{if(T.which==I.ENTER){P=null}}}}}this.selectChoice(P);y(T);if(!P||!P.length){this.open()}return}else{if(((T.which===I.BACKSPACE&&this.keydowns==1)||T.which==I.LEFT)&&(U.offset==0&&!U.length)){this.selectChoice(N.find(".select2-search-choice:not(.select2-locked)").last());y(T);return}else{this.selectChoice(null)}}if(this.opened()){switch(T.which){case I.UP:case I.DOWN:this.moveHighlight((T.which===I.UP)?-1:1);y(T);return;case I.ENTER:this.selectHighlighted();y(T);return;case I.TAB:this.selectHighlighted({noFocus:true});this.close();return;case I.ESC:this.cancel(T);y(T);return}}if(T.which===I.TAB||I.isControl(T)||I.isFunctionKey(T)||T.which===I.BACKSPACE||T.which===I.ESC){return}if(T.which===I.ENTER){if(this.opts.openOnEnter===false){return}else{if(T.altKey||T.ctrlKey||T.shiftKey||T.metaKey){return}}}this.open();if(T.which===I.PAGE_UP||T.which===I.PAGE_DOWN){y(T)}if(T.which===I.ENTER){y(T)}}));this.search.on("keyup",this.bind(function(P){this.keydowns=0;this.resizeSearch()}));this.search.on("blur",this.bind(function(P){this.container.removeClass("select2-container-active");this.search.removeClass("select2-focused");this.selectChoice(null);if(!this.opened()){this.clearSearch()}P.stopImmediatePropagation();this.opts.element.trigger(B.Event("select2-blur"))}));this.container.on("click",M,this.bind(function(P){if(!this.isInterfaceEnabled()){return}if(B(P.target).closest(".select2-search-choice").length>0){return}this.selectChoice(null);this.clearPlaceholder();if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(B.Event("select2-focus"))}this.open();this.focusSearch();P.preventDefault()}));this.container.on("focus",M,this.bind(function(){if(!this.isInterfaceEnabled()){return}if(!this.container.hasClass("select2-container-active")){this.opts.element.trigger(B.Event("select2-focus"))}this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active");this.clearPlaceholder()}));this.initContainerWidth();this.opts.element.addClass("select2-offscreen");this.clearSearch()},enableInterface:function(){if(this.parent.enableInterface.apply(this,arguments)){this.search.prop("disabled",!this.isInterfaceEnabled())}},initSelection:function(){var N;if(this.opts.element.val()===""&&this.opts.element.text()===""){this.updateSelection([]);this.close();this.clearSearch()}if(this.select||this.opts.element.val()!==""){var M=this;this.opts.initSelection.call(null,this.opts.element,function(O){if(O!==k&&O!==null){M.updateSelection(O);M.close();M.clearSearch()}})}},clearSearch:function(){var N=this.getPlaceholder(),M=this.getMaxSearchWidth();if(N!==k&&this.getVal().length===0&&this.search.hasClass("select2-focused")===false){this.search.val(N).addClass("select2-default");this.search.width(M>0?M:this.container.css("width"))}else{this.search.val("").width(10)}},clearPlaceholder:function(){if(this.search.hasClass("select2-default")){this.search.val("").removeClass("select2-default")}},opening:function(){this.clearPlaceholder();this.resizeSearch();this.parent.opening.apply(this,arguments);this.focusSearch();this.updateResults(true);this.search.focus();this.opts.element.trigger(B.Event("select2-open"))},close:function(){if(!this.opened()){return}this.parent.close.apply(this,arguments)},focus:function(){this.close();this.search.focus()},isFocused:function(){return this.search.hasClass("select2-focused")},updateSelection:function(P){var O=[],N=[],M=this;B(P).each(function(){if(o(M.id(this),O)<0){O.push(M.id(this));N.push(this)}});P=N;this.selection.find(".select2-search-choice").remove();B(P).each(function(){M.addSelectedChoice(this)});M.postprocessResults()},tokenize:function(){var M=this.search.val();M=this.opts.tokenizer.call(this,M,this.data(),this.bind(this.onSelect),this.opts);if(M!=null&&M!=k){this.search.val(M);if(M.length>0){this.open()}}},onSelect:function(N,M){if(!this.triggerSelect(N)){return}this.addSelectedChoice(N);this.opts.element.trigger({type:"selected",val:this.id(N),choice:N});if(this.select||!this.opts.closeOnSelect){this.postprocessResults()}if(this.opts.closeOnSelect){this.close();this.search.width(10)}else{if(this.countSelectableResults()>0){this.search.width(10);this.resizeSearch();if(this.getMaximumSelectionSize()>0&&this.val().length>=this.getMaximumSelectionSize()){this.updateResults(true)}this.positionDropdown()}else{this.close();this.search.width(10)}}this.triggerChange({added:N});if(!M||!M.noFocus){this.focusSearch()}},cancel:function(){this.close();this.focusSearch()},addSelectedChoice:function(Q){var S=!Q.locked,O=B("<li class='select2-search-choice'>    <div></div>    <a href='#' onclick='return false;' class='select2-search-choice-close' tabindex='-1'></a></li>"),T=B("<li class='select2-search-choice select2-locked'><div></div></li>");var P=S?O:T,M=this.id(Q),N=this.getVal(),R,U;R=this.opts.formatSelection(Q,P.find("div"),this.opts.escapeMarkup);if(R!=k){P.find("div").replaceWith("<div>"+R+"</div>")}U=this.opts.formatSelectionCssClass(Q,P.find("div"));if(U!=k){P.addClass(U)}if(S){P.find(".select2-search-choice-close").on("mousedown",y).on("click dblclick",this.bind(function(V){if(!this.isInterfaceEnabled()){return}B(V.target).closest(".select2-search-choice").fadeOut("fast",this.bind(function(){this.unselect(B(V.target));this.selection.find(".select2-search-choice-focus").removeClass("select2-search-choice-focus");this.close();this.focusSearch()})).dequeue();y(V)})).on("focus",this.bind(function(){if(!this.isInterfaceEnabled()){return}this.container.addClass("select2-container-active");this.dropdown.addClass("select2-drop-active")}))}P.data("select2-data",Q);P.insertBefore(this.searchContainer);N.push(M);this.setVal(N)},unselect:function(N){var P=this.getVal(),O,M;N=N.closest(".select2-search-choice");if(N.length===0){throw"Invalid argument: "+N+". Must be .select2-search-choice"}O=N.data("select2-data");if(!O){return}M=o(this.id(O),P);if(M>=0){P.splice(M,1);this.setVal(P);if(this.select){this.postprocessResults()}}N.remove();this.opts.element.trigger({type:"removed",val:this.id(O),choice:O});this.triggerChange({removed:O})},postprocessResults:function(Q,N,P){var R=this.getVal(),S=this.results.find(".select2-result"),O=this.results.find(".select2-result-with-children"),M=this;S.each2(function(U,T){var V=M.id(T.data("select2-data"));if(o(V,R)>=0){T.addClass("select2-selected");T.find(".select2-result-selectable").addClass("select2-selected")}});O.each2(function(U,T){if(!T.is(".select2-result-selectable")&&T.find(".select2-result-selectable:not(.select2-selected)").length===0){T.addClass("select2-selected")}});if(this.highlight()==-1&&P!==false){M.highlight(0)}if(!this.opts.createSearchChoice&&!S.filter(".select2-result:not(.select2-selected)").length>0){if(!Q||Q&&!Q.more&&this.results.find(".select2-no-results").length===0){if(w(M.opts.formatNoMatches,"formatNoMatches")){this.results.append("<li class='select2-no-results'>"+M.opts.formatNoMatches(M.search.val())+"</li>")}}}},getMaxSearchWidth:function(){return this.selection.width()-f(this.search)},resizeSearch:function(){var R,P,O,M,N,Q=f(this.search);R=l(this.search)+10;P=this.search.offset().left;O=this.selection.width();M=this.selection.offset().left;N=O-(P-M)-Q;if(N<R){N=O-Q}if(N<40){N=O-Q}if(N<=0){N=R}this.search.width(Math.floor(N))},getVal:function(){var M;if(this.select){M=this.select.val();return M===null?[]:M}else{M=this.opts.element.val();return g(M,this.opts.separator)}},setVal:function(N){var M;if(this.select){this.select.val(N)}else{M=[];B(N).each(function(){if(o(this,M)<0){M.push(this)}});this.opts.element.val(M.length===0?"":M.join(this.opts.separator))}},buildChangeDetails:function(M,P){var P=P.slice(0),M=M.slice(0);for(var O=0;O<P.length;O++){for(var N=0;N<M.length;N++){if(r(this.opts.id(P[O]),this.opts.id(M[N]))){P.splice(O,1);O--;M.splice(N,1);N--}}}return{added:P,removed:M}},val:function(Q,N){var P,M=this,O;if(arguments.length===0){return this.getVal()}P=this.data();if(!P.length){P=[]}if(!Q&&Q!==0){this.opts.element.val("");this.updateSelection([]);this.clearSearch();if(N){this.triggerChange({added:this.data(),removed:P})}return}this.setVal(Q);if(this.select){this.opts.initSelection(this.select,this.bind(this.updateSelection));if(N){this.triggerChange(this.buildChangeDetails(P,this.data()))}}else{if(this.opts.initSelection===k){throw new Error("val() cannot be called if initSelection() is not defined")}this.opts.initSelection(this.opts.element,function(S){var R=B.map(S,M.id);M.setVal(R);M.updateSelection(S);M.clearSearch();if(N){M.triggerChange(this.buildChangeDetails(P,this.data()))}})}this.clearSearch()},onSortStart:function(){if(this.select){throw new Error("Sorting of elements is not supported when attached to <select>. Attach to <input type='hidden'/> instead.")}this.search.width(0);this.searchContainer.hide()},onSortEnd:function(){var N=[],M=this;this.searchContainer.show();this.searchContainer.appendTo(this.searchContainer.parent());this.resizeSearch();this.selection.find(".select2-search-choice").each(function(){N.push(M.opts.id(B(this).data("select2-data")))});this.setVal(N);this.triggerChange()},data:function(O,P){var N=this,Q,M;if(arguments.length===0){return this.selection.find(".select2-search-choice").map(function(){return B(this).data("select2-data")}).get()}else{M=this.data();if(!O){O=[]}Q=B.map(O,function(R){return N.opts.id(R)});this.setVal(Q);this.updateSelection(O);this.clearSearch();if(P){this.triggerChange(this.buildChangeDetails(M,this.data()))}}}});B.fn.select2=function(){var Q=Array.prototype.slice.call(arguments,0),N,P,M,S,U,T=["val","destroy","opened","open","close","focus","isFocused","container","dropdown","onSortStart","onSortEnd","enable","readonly","positionDropdown","data","search"],R=["val","opened","isFocused","container","data"],O={search:"externalSearch"};this.each(function(){if(Q.length===0||typeof(Q[0])==="object"){N=Q.length===0?{}:B.extend({},Q[0]);N.element=B(this);if(N.element.get(0).tagName.toLowerCase()==="select"){U=N.element.prop("multiple")}else{U=N.multiple||false;if("tags" in N){N.multiple=U=true}}P=U?new c():new v();P.init(N)}else{if(typeof(Q[0])==="string"){if(o(Q[0],T)<0){throw"Unknown method: "+Q[0]}S=k;P=B(this).data("select2");if(P===k){return}M=Q[0];if(M==="container"){S=P.container}else{if(M==="dropdown"){S=P.dropdown}else{if(O[M]){M=O[M]}S=P[M].apply(P,Q.slice(1))}}if(o(Q[0],R)>=0){return false}}else{throw"Invalid arguments to select2 plugin: "+Q}}});return(S===k)?this:S};B.fn.select2.defaults={width:"copy",loadMorePadding:0,closeOnSelect:true,openOnEnter:true,containerCss:{},dropdownCss:{},containerCssClass:"",dropdownCssClass:"",formatResult:function(N,O,Q,M){var P=[];s(N.text,Q.term,P,M);return P.join("")},formatSelection:function(O,N,M){return O?M(O.text):k},sortResults:function(N,M,O){return N},formatResultCssClass:function(M){return k},formatSelectionCssClass:function(N,M){return k},formatNoMatches:function(){return"No matches found"},formatInputTooShort:function(M,N){var O=N-M.length;return"Please enter "+O+" more character"+(O==1?"":"s")},formatInputTooLong:function(N,M){var O=N.length-M;return"Please delete "+O+" character"+(O==1?"":"s")},formatSelectionTooBig:function(M){return"You can only select "+M+" item"+(M==1?"":"s")},formatLoadMore:function(M){return"Loading more results..."},formatSearching:function(){return"Searching..."},minimumResultsForSearch:0,minimumInputLength:0,maximumInputLength:null,maximumSelectionSize:0,id:function(M){return M.id},matcher:function(M,N){return(""+N).toUpperCase().indexOf((""+M).toUpperCase())>=0},separator:",",tokenSeparators:[],tokenizer:e,escapeMarkup:E,blurOnChange:false,selectOnBlur:false,adaptContainerCssClass:function(M){return M},adaptDropdownCssClass:function(M){return null}};B.fn.select2.ajaxDefaults={transport:B.ajax,params:{type:"GET",cache:false,dataType:"json"}};window.Select2={query:{ajax:C,local:F,tags:x},util:{debounce:i,markMatch:s,escapeMarkup:E},"class":{"abstract":L,single:v,multi:c}}}(jQuery));
  (function(c){var e=c.fn.select2;var d="aui-select2-container";var b="aui-select2-drop aui-dropdown2 aui-style-default";var a="aui-has-avatar";c.fn.auiSelect2=function(i){var h;if(c.isPlainObject(i)){var f=c.extend({},i);var g=f.hasAvatar?" "+a:"";f.containerCssClass=(f.containerCssClass||"")+" "+d+g;f.dropdownCssClass=(f.dropdownCssClass||"")+" "+b+g;h=Array.prototype.slice.call(arguments,1);h.unshift(f)}else{if(!arguments.length){h=[{containerCssClass:d,dropdownCssClass:b}]}else{h=arguments}}return e.apply(this,h)}})(AJS.$);
  