").append(b);var c=b.querySelectorAll(".ui-select-match");if(c.removeAttr("ui-select-match"),c.removeAttr("data-ui-select-match"),1!==c.length)throw a("transcluded","Expected 1 .ui-select-match but got '{0}'.",c.length);h.querySelectorAll(".ui-select-match").replaceWith(c);c=b.querySelectorAll(".ui-select-choices");
+if(c.removeAttr("ui-select-choices"),c.removeAttr("data-ui-select-choices"),1!==c.length)throw a("transcluded","Expected 1 .ui-select-choices but got '{0}'.",c.length);h.querySelectorAll(".ui-select-choices").replaceWith(c);b=b.querySelectorAll(".ui-select-no-choice");b.removeAttr("ui-select-no-choice");b.removeAttr("data-ui-select-no-choice");1==b.length&&h.querySelectorAll(".ui-select-no-choice").replaceWith(b)});t=g.$eval(l.appendToBody);(void 0!==t?t:c.appendToBody)&&(g.$watch("$select.open",
+function(a){a?(a=e(h),y=angular.element('
'),y[0].style.width=a.width+"px",y[0].style.height=a.height+"px",h.after(y),z=h[0].style.width,b.find("body").append(h),h[0].style.position="absolute",h[0].style.left=a.left+"px",h[0].style.top=a.top+"px",h[0].style.width=a.width+"px"):u()}),g.$on("$destroy",function(){u()}));var y=null,z="",w=null;g.$watch("$select.open",function(){"auto"!==p.dropdownPosition&&"up"!==p.dropdownPosition||g.calculateDropdownPos()});var A=
+function(a,b){a||e(h);b=b||e(w);w[0].style.position="absolute";w[0].style.top=-1*b.height+"px";h.addClass("direction-up")},B=function(){k(function(){if("up"===p.dropdownPosition)A();else{h.removeClass("direction-up");var a=e(h),c=e(w);a.top+a.height+c.height>(b[0].documentElement.scrollTop||b[0].body.scrollTop)+b[0].documentElement.clientHeight?A(a,c):(h.removeClass("direction-up"),a||e(h),c||e(w),w[0].style.position="",w[0].style.top="")}w[0].style.opacity=1})};g.calculateDropdownPos=function(){if(p.open){if(w=
+angular.element(h).querySelectorAll(".ui-select-dropdown"),0!==w.length)if(w[0].style.opacity=0,!e(w).height&&p.$animate&&p.$animate.on&&p.$animate.enabled(w)){var a=!0;p.$animate.on("enter",w,function(b,c){"close"===c&&a&&(B(),a=!1)})}else B()}else null!==w&&0!==w.length&&(w[0].style.opacity=0,w[0].style.position="",w[0].style.top="",h.removeClass("direction-up"))}}}}}]);h.directive("uiSelectMatch",["uiSelectConfig",function(b){function c(a,b){return a[0].hasAttribute(b)?a.attr(b):a[0].hasAttribute("data-"+
+b)?a.attr("data-"+b):a[0].hasAttribute("x-"+b)?a.attr("x-"+b):void 0}return{restrict:"EA",require:"^uiSelect",replace:!0,transclude:!0,templateUrl:function(a){a.addClass("ui-select-match");var e=a.parent();a=c(e,"theme")||b.theme;e=angular.isDefined(c(e,"multiple"));return a+(e?"/match-multiple.tpl.html":"/match.tpl.html")},link:function(a,c,g,f){function e(a){f.allowClear=!!angular.isDefined(a)&&(""===a||"true"===a.toLowerCase())}f.lockChoiceExpression=g.uiLockChoice;g.$observe("placeholder",function(a){f.placeholder=
+void 0!==a?a:b.placeholder});g.$observe("allowClear",e);e(g.allowClear);f.multiple&&f.sizeSearchInput()}}}]);h.directive("uiSelectMultiple",["uiSelectMinErr","$timeout",function(f,c){return{restrict:"EA",require:["^uiSelect","^ngModel"],controller:["$scope","$timeout",function(a,b){var c,e=this,k=a.$select;angular.isUndefined(k.selected)&&(k.selected=[]);a.$evalAsync(function(){c=a.ngModel});e.activeMatchIndex=-1;e.updateModel=function(){c.$setViewValue(Date.now());e.refreshComponent()};e.refreshComponent=
+function(){k.refreshItems();k.sizeSearchInput()};e.removeChoice=function(c){var g=k.selected[c];if(!g._uiSelectChoiceLocked){var f={};f[k.parserResult.itemName]=g;k.selected.splice(c,1);e.activeMatchIndex=-1;k.sizeSearchInput();b(function(){k.onRemoveCallback(a,{$item:g,$model:k.parserResult.modelMapper(a,f)})});e.updateModel()}};e.getPlaceholder=function(){return k.selected&&k.selected.length?void 0:k.placeholder}}],controllerAs:"$selectMultiple",link:function(a,e,g,h){function k(a){return angular.isNumber(a.selectionStart)?
+a.selectionStart:a.value.length}function l(a){function c(){switch(a){case b.LEFT:return~A.activeMatchIndex?l:g;case b.RIGHT:return~A.activeMatchIndex&&f!==g?h:(u.activate(),!1);case b.BACKSPACE:return~A.activeMatchIndex?(A.removeChoice(f),l):g;case b.DELETE:return!!~A.activeMatchIndex&&(A.removeChoice(A.activeMatchIndex),f)}}var e=k(u.searchInput[0]),g=u.selected.length-1,f=A.activeMatchIndex,h=A.activeMatchIndex+1,l=A.activeMatchIndex-1,n=f;return!(0
=u.limit||(u.selected.push(b),A.updateModel())});a.$on("uis:activate",function(){A.activeMatchIndex=
+-1});a.$watch("$select.disabled",function(a,b){b&&!a&&u.sizeSearchInput()});u.searchInput.on("keydown",function(c){var e=c.which;a.$apply(function(){var a=!1;b.isHorizontalMovement(e)&&(a=l(e));a&&e!=b.TAB&&(c.preventDefault(),c.stopPropagation())})});u.searchInput.on("keyup",function(c){if((b.isVerticalMovement(c.which)||a.$evalAsync(function(){u.activeIndex=!1===u.taggingLabel?-1:0}),u.tagging.isActivated&&0");
+c(t)(a);k.focusser=t;k.focusInput=t;e.parent().append(t);t.bind("focus",function(){a.$evalAsync(function(){k.focus=!0})});t.bind("blur",function(){a.$evalAsync(function(){k.focus=!1})});t.bind("keydown",function(c){return c.which===b.BACKSPACE?(c.preventDefault(),c.stopPropagation(),k.select(void 0),void a.$apply()):void(c.which===b.TAB||b.isControl(c)||b.isFunctionKey(c)||c.which===b.ESC||(c.which!=b.DOWN&&c.which!=b.UP&&c.which!=b.ENTER&&c.which!=b.SPACE||(c.preventDefault(),c.stopPropagation(),
+k.activate()),a.$digest()))});t.bind("keyup input",function(c){c.which===b.TAB||b.isControl(c)||b.isFunctionKey(c)||c.which===b.ESC||c.which==b.ENTER||c.which===b.BACKSPACE||(k.activate(t.val()),t.val(""),a.$digest())})}}}]);h.directive("uiSelectSort",["$timeout","uiSelectConfig","uiSelectMinErr",function(b,c,a){return{require:["^^uiSelect","^ngModel"],link:function(c,g,f,k){if(null===c[f.uiSelectSort])throw a("sort","Expected a list to sort");var e=k[0],h=k[1],l=angular.extend({axis:"horizontal"},
+c.$eval(f.uiSelectSortOptions)).axis;c.$watch(function(){return e.sortable},function(a){a?g.attr("draggable",!0):g.removeAttr("draggable")});g.on("dragstart",function(a){g.addClass("dragging");(a.dataTransfer||a.originalEvent.dataTransfer).setData("text",c.$index.toString())});g.on("dragend",function(){A("dragging")});var t,w=function(a,b){this.splice(b,0,this.splice(a,1)[0])},A=function(a){angular.forEach(e.$element.querySelectorAll("."+a),function(b){angular.element(b).removeClass(a)})},z=function(a){a.preventDefault();
+("vertical"===l?a.offsetY||a.layerY||(a.originalEvent?a.originalEvent.offsetY:0):a.offsetX||a.layerX||(a.originalEvent?a.originalEvent.offsetX:0)) ');
+b.put("bootstrap/no-choice.tpl.html",'');b.put("bootstrap/select-multiple.tpl.html",'