{"size": 16641, "ext": "js", "max_stars_repo_path": "src/ui-bootstrap-custom-build/ui-bootstrap-custom-tpls-0.12.0.min.js", "max_stars_repo_name": "flyvictor/fortune-admin", "max_stars_repo_stars_event_min_datetime": "2015-08-13T07:37:35.000Z", "max_stars_repo_stars_event_max_datetime": "2018-03-16T05:32:55.000Z", "max_issues_repo_path": "src/ui-bootstrap-custom-build/ui-bootstrap-custom-tpls-0.12.0.min.js", "max_issues_repo_name": "flyvictor/fortune-admin", "max_issues_repo_issues_event_min_datetime": "2015-01-19T10:47:24.000Z", "max_issues_repo_issues_event_max_datetime": "2015-12-03T20:00:23.000Z", "max_forks_repo_path": "src/ui-bootstrap-custom-build/ui-bootstrap-custom-tpls-0.12.0.min.js", "max_forks_repo_name": "flyvictor/fortune-admin", "max_forks_repo_forks_event_min_datetime": "2015-01-05T18:01:01.000Z", "max_forks_repo_forks_event_max_datetime": "2017-12-07T17:40:05.000Z"}
{"max_stars_count": 2, "max_issues_count": 7, "max_forks_count": 14, "avg_line_length": 2080.125, "max_line_length": 16519, "alphanum_fraction": 0.6916050718}
/*
 * angular-ui-bootstrap
 * http://angular-ui.github.io/bootstrap/

 * Version: 0.12.0 - 2014-11-16
 * License: MIT
 */
angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.transition","ui.bootstrap.dropdown","ui.bootstrap.typeahead","ui.bootstrap.position","ui.bootstrap.bindHtml","ui.bootstrap.modal"]),angular.module("ui.bootstrap.tpls",["template/typeahead/typeahead-match.html","template/typeahead/typeahead-popup.html","template/modal/backdrop.html","template/modal/window.html"]),angular.module("ui.bootstrap.collapse",["ui.bootstrap.transition"]).directive("collapse",["$transition",function(e){return{link:function(t,n,o){function a(t){function o(){s===a&&(s=void 0)}var a=e(n,t);return s&&s.cancel(),s=a,a.then(o,o),a}function i(){d?(d=!1,r()):(n.removeClass("collapse").addClass("collapsing"),a({height:n[0].scrollHeight+"px"}).then(r))}function r(){n.removeClass("collapsing"),n.addClass("collapse in"),n.css({height:"auto"})}function l(){if(d)d=!1,c(),n.css({height:0});else{n.css({height:n[0].scrollHeight+"px"});{n[0].offsetWidth}n.removeClass("collapse in").addClass("collapsing"),a({height:0}).then(c)}}function c(){n.removeClass("collapsing"),n.addClass("collapse")}var s,d=!0;t.$watch(o.collapse,function(e){e?l():i()})}}}]),angular.module("ui.bootstrap.transition",[]).factory("$transition",["$q","$timeout","$rootScope",function(e,t,n){function o(e){for(var t in e)if(void 0!==i.style[t])return e[t]}var a=function(o,i,r){r=r||{};var l=e.defer(),c=a[r.animation?"animationEndEventName":"transitionEndEventName"],s=function(){n.$apply(function(){o.unbind(c,s),l.resolve(o)})};return c&&o.bind(c,s),t(function(){angular.isString(i)?o.addClass(i):angular.isFunction(i)?i(o):angular.isObject(i)&&o.css(i),c||l.resolve(o)}),l.promise.cancel=function(){c&&o.unbind(c,s),l.reject("Transition cancelled")},l.promise},i=document.createElement("trans"),r={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd",transition:"transitionend"},l={WebkitTransition:"webkitAnimationEnd",MozTransition:"animationend",OTransition:"oAnimationEnd",transition:"animationend"};return a.transitionEndEventName=o(r),a.animationEndEventName=o(l),a}]),angular.module("ui.bootstrap.dropdown",[]).constant("dropdownConfig",{openClass:"open"}).service("dropdownService",["$document",function(e){var t=null;this.open=function(a){t||(e.bind("click",n),e.bind("keydown",o)),t&&t!==a&&(t.isOpen=!1),t=a},this.close=function(a){t===a&&(t=null,e.unbind("click",n),e.unbind("keydown",o))};var n=function(e){if(t){var n=t.getToggleElement();e&&n&&n[0].contains(e.target)||t.$apply(function(){t.isOpen=!1})}},o=function(e){27===e.which&&(t.focusToggleElement(),n())}}]).controller("DropdownController",["$scope","$attrs","$parse","dropdownConfig","dropdownService","$animate",function(e,t,n,o,a,i){var r,l=this,c=e.$new(),s=o.openClass,d=angular.noop,p=t.onToggle?n(t.onToggle):angular.noop;this.init=function(o){l.$element=o,t.isOpen&&(r=n(t.isOpen),d=r.assign,e.$watch(r,function(e){c.isOpen=!!e}))},this.toggle=function(e){return c.isOpen=arguments.length?!!e:!c.isOpen},this.isOpen=function(){return c.isOpen},c.getToggleElement=function(){return l.toggleElement},c.focusToggleElement=function(){l.toggleElement&&l.toggleElement[0].focus()},c.$watch("isOpen",function(t,n){i[t?"addClass":"removeClass"](l.$element,s),t?(c.focusToggleElement(),a.open(c)):a.close(c),d(e,t),angular.isDefined(t)&&t!==n&&p(e,{open:!!t})}),e.$on("$locationChangeSuccess",function(){c.isOpen=!1}),e.$on("$destroy",function(){c.$destroy()})}]).directive("dropdown",function(){return{controller:"DropdownController",link:function(e,t,n,o){o.init(t)}}}).directive("dropdownToggle",function(){return{require:"?^dropdown",link:function(e,t,n,o){if(o){o.toggleElement=t;var a=function(a){a.preventDefault(),t.hasClass("disabled")||n.disabled||e.$apply(function(){o.toggle()})};t.bind("click",a),t.attr({"aria-haspopup":!0,"aria-expanded":!1}),e.$watch(o.isOpen,function(e){t.attr("aria-expanded",!!e)}),e.$on("$destroy",function(){t.unbind("click",a)})}}}}),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.position","ui.bootstrap.bindHtml"]).factory("typeaheadParser",["$parse",function(e){var t=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(n){var o=n.match(t);if(!o)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+n+'".');return{itemName:o[3],source:e(o[4]),viewMapper:e(o[2]||o[1]),modelMapper:e(o[1])}}}}]).directive("typeahead",["$compile","$parse","$q","$timeout","$document","$position","typeaheadParser",function(e,t,n,o,a,i,r){var l=[9,13,27,38,40];return{require:"ngModel",link:function(c,s,d,p){var u,f=c.$eval(d.typeaheadMinLength)||1,m=c.$eval(d.typeaheadWaitMs)||0,h=c.$eval(d.typeaheadEditable)!==!1,v=t(d.typeaheadLoading).assign||angular.noop,g=t(d.typeaheadOnSelect),$=d.typeaheadInputFormatter?t(d.typeaheadInputFormatter):void 0,y=d.typeaheadAppendToBody?c.$eval(d.typeaheadAppendToBody):!1,b=c.$eval(d.typeaheadFocusFirst)!==!1,w=t(d.ngModel).assign,k=r.parse(d.typeahead),C=c.$new();c.$on("$destroy",function(){C.$destroy()});var E="typeahead-"+C.$id+"-"+Math.floor(1e4*Math.random());s.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":E});var x=angular.element("<div typeahead-popup></div>");x.attr({id:E,matches:"matches",active:"activeIdx",select:"select(activeIdx)",query:"query",position:"position"}),angular.isDefined(d.typeaheadTemplateUrl)&&x.attr("template-url",d.typeaheadTemplateUrl);var T=function(){C.matches=[],C.activeIdx=-1,s.attr("aria-expanded",!1)},S=function(e){return E+"-option-"+e};C.$watch("activeIdx",function(e){0>e?s.removeAttr("aria-activedescendant"):s.attr("aria-activedescendant",S(e))});var O=function(e){var t={$viewValue:e};v(c,!0),n.when(k.source(c,t)).then(function(n){var o=e===p.$viewValue;if(o&&u)if(n.length>0){C.activeIdx=b?0:-1,C.matches.length=0;for(var a=0;a<n.length;a++)t[k.itemName]=n[a],C.matches.push({id:S(a),label:k.viewMapper(C,t),model:n[a]});C.query=e,C.position=y?i.offset(s):i.position(s),C.position.top=C.position.top+s.prop("offsetHeight"),s.attr("aria-expanded",!0)}else T();o&&v(c,!1)},function(){T(),v(c,!1)})};T(),C.query=void 0;var U,M=function(e){U=o(function(){O(e)},m)},A=function(){U&&o.cancel(U)};p.$parsers.unshift(function(e){return u=!0,e&&e.length>=f?m>0?(A(),M(e)):O(e):(v(c,!1),A(),T()),h?e:e?void p.$setValidity("editable",!1):(p.$setValidity("editable",!0),e)}),p.$formatters.push(function(e){var t,n,o={};return $?(o.$model=e,$(c,o)):(o[k.itemName]=e,t=k.viewMapper(c,o),o[k.itemName]=void 0,n=k.viewMapper(c,o),t!==n?t:e)}),C.select=function(e){var t,n,a={};a[k.itemName]=n=C.matches[e].model,t=k.modelMapper(c,a),w(c,t),p.$setValidity("editable",!0),g(c,{$item:n,$model:t,$label:k.viewMapper(c,a)}),T(),o(function(){s[0].focus()},0,!1)},s.bind("keydown",function(e){0!==C.matches.length&&-1!==l.indexOf(e.which)&&(-1!=C.activeIdx||13!==e.which&&9!==e.which)&&(e.preventDefault(),40===e.which?(C.activeIdx=(C.activeIdx+1)%C.matches.length,C.$digest()):38===e.which?(C.activeIdx=(C.activeIdx>0?C.activeIdx:C.matches.length)-1,C.$digest()):13===e.which||9===e.which?C.$apply(function(){C.select(C.activeIdx)}):27===e.which&&(e.stopPropagation(),T(),C.$digest()))}),s.bind("blur",function(){u=!1});var q=function(e){s[0]!==e.target&&(T(),C.$digest())};a.bind("click",q),c.$on("$destroy",function(){a.unbind("click",q),y&&I.remove()});var I=e(x)(C);y?a.find("body").append(I):s.after(I)}}}]).directive("typeaheadPopup",function(){return{restrict:"EA",scope:{matches:"=",query:"=",active:"=",position:"=",select:"&"},replace:!0,templateUrl:"template/typeahead/typeahead-popup.html",link:function(e,t,n){e.templateUrl=n.templateUrl,e.isOpen=function(){return e.matches.length>0},e.isActive=function(t){return e.active==t},e.selectActive=function(t){e.active=t},e.selectMatch=function(t){e.select({activeIdx:t})}}}}).directive("typeaheadMatch",["$http","$templateCache","$compile","$parse",function(e,t,n,o){return{restrict:"EA",scope:{index:"=",match:"=",query:"="},link:function(a,i,r){var l=o(r.templateUrl)(a.$parent)||"template/typeahead/typeahead-match.html";e.get(l,{cache:t}).success(function(e){i.replaceWith(n(e.trim())(a))})}}}]).filter("typeaheadHighlight",function(){function e(e){return e.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1")}return function(t,n){return n?(""+t).replace(new RegExp(e(n),"gi"),"<strong>$&</strong>"):t}}),angular.module("ui.bootstrap.position",[]).factory("$position",["$document","$window",function(e,t){function n(e,n){return e.currentStyle?e.currentStyle[n]:t.getComputedStyle?t.getComputedStyle(e)[n]:e.style[n]}function o(e){return"static"===(n(e,"position")||"static")}var a=function(t){for(var n=e[0],a=t.offsetParent||n;a&&a!==n&&o(a);)a=a.offsetParent;return a||n};return{position:function(t){var n=this.offset(t),o={top:0,left:0},i=a(t[0]);i!=e[0]&&(o=this.offset(angular.element(i)),o.top+=i.clientTop-i.scrollTop,o.left+=i.clientLeft-i.scrollLeft);var r=t[0].getBoundingClientRect();return{width:r.width||t.prop("offsetWidth"),height:r.height||t.prop("offsetHeight"),top:n.top-o.top,left:n.left-o.left}},offset:function(n){var o=n[0].getBoundingClientRect();return{width:o.width||n.prop("offsetWidth"),height:o.height||n.prop("offsetHeight"),top:o.top+(t.pageYOffset||e[0].documentElement.scrollTop),left:o.left+(t.pageXOffset||e[0].documentElement.scrollLeft)}},positionElements:function(e,t,n,o){var a,i,r,l,c=n.split("-"),s=c[0],d=c[1]||"center";a=o?this.offset(e):this.position(e),i=t.prop("offsetWidth"),r=t.prop("offsetHeight");var p={center:function(){return a.left+a.width/2-i/2},left:function(){return a.left},right:function(){return a.left+a.width}},u={center:function(){return a.top+a.height/2-r/2},top:function(){return a.top},bottom:function(){return a.top+a.height}};switch(s){case"right":l={top:u[d](),left:p[s]()};break;case"left":l={top:u[d](),left:a.left-i};break;case"bottom":l={top:u[s](),left:p[d]()};break;default:l={top:a.top-r,left:p[d]()}}return l}}}]),angular.module("ui.bootstrap.bindHtml",[]).directive("bindHtmlUnsafe",function(){return function(e,t,n){t.addClass("ng-binding").data("$binding",n.bindHtmlUnsafe),e.$watch(n.bindHtmlUnsafe,function(e){t.html(e||"")})}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.transition"]).factory("$$stackedMap",function(){return{createNew:function(){var e=[];return{add:function(t,n){e.push({key:t,value:n})},get:function(t){for(var n=0;n<e.length;n++)if(t==e[n].key)return e[n]},keys:function(){for(var t=[],n=0;n<e.length;n++)t.push(e[n].key);return t},top:function(){return e[e.length-1]},remove:function(t){for(var n=-1,o=0;o<e.length;o++)if(t==e[o].key){n=o;break}return e.splice(n,1)[0]},removeTop:function(){return e.splice(e.length-1,1)[0]},length:function(){return e.length}}}}}).directive("modalBackdrop",["$timeout",function(e){return{restrict:"EA",replace:!0,templateUrl:"template/modal/backdrop.html",link:function(t,n,o){t.backdropClass=o.backdropClass||"",t.animate=!1,e(function(){t.animate=!0})}}}]).directive("modalWindow",["$modalStack","$timeout",function(e,t){return{restrict:"EA",scope:{index:"@",animate:"="},replace:!0,transclude:!0,templateUrl:function(e,t){return t.templateUrl||"template/modal/window.html"},link:function(n,o,a){o.addClass(a.windowClass||""),n.size=a.size,t(function(){n.animate=!0,o[0].querySelectorAll("[autofocus]").length||o[0].focus()}),n.close=function(t){var n=e.getTop();n&&n.value.backdrop&&"static"!=n.value.backdrop&&t.target===t.currentTarget&&(t.preventDefault(),t.stopPropagation(),e.dismiss(n.key,"backdrop click"))}}}}]).directive("modalTransclude",function(){return{link:function(e,t,n,o,a){a(e.$parent,function(e){t.empty(),t.append(e)})}}}).factory("$modalStack",["$transition","$timeout","$document","$compile","$rootScope","$$stackedMap",function(e,t,n,o,a,i){function r(){for(var e=-1,t=f.keys(),n=0;n<t.length;n++)f.get(t[n]).value.backdrop&&(e=n);return e}function l(e){var t=n.find("body").eq(0),o=f.get(e).value;f.remove(e),s(o.modalDomEl,o.modalScope,300,function(){o.modalScope.$destroy(),t.toggleClass(u,f.length()>0),c()})}function c(){if(d&&-1==r()){var e=p;s(d,p,150,function(){e.$destroy(),e=null}),d=void 0,p=void 0}}function s(n,o,a,i){function r(){r.done||(r.done=!0,n.remove(),i&&i())}o.animate=!1;var l=e.transitionEndEventName;if(l){var c=t(r,a);n.bind(l,function(){t.cancel(c),r(),o.$apply()})}else t(r)}var d,p,u="modal-open",f=i.createNew(),m={};return a.$watch(r,function(e){p&&(p.index=e)}),n.bind("keydown",function(e){var t;27===e.which&&(t=f.top(),t&&t.value.keyboard&&(e.preventDefault(),a.$apply(function(){m.dismiss(t.key,"escape key press")})))}),m.open=function(e,t){f.add(e,{deferred:t.deferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard});var i=n.find("body").eq(0),l=r();if(l>=0&&!d){p=a.$new(!0),p.index=l;var c=angular.element("<div modal-backdrop></div>");c.attr("backdrop-class",t.backdropClass),d=o(c)(p),i.append(d)}var s=angular.element("<div modal-window></div>");s.attr({"template-url":t.windowTemplateUrl,"window-class":t.windowClass,size:t.size,index:f.length()-1,animate:"animate"}).html(t.content);var m=o(s)(t.scope);f.top().value.modalDomEl=m,i.append(m),i.addClass(u)},m.close=function(e,t){var n=f.get(e);n&&(n.value.deferred.resolve(t),l(e))},m.dismiss=function(e,t){var n=f.get(e);n&&(n.value.deferred.reject(t),l(e))},m.dismissAll=function(e){for(var t=this.getTop();t;)this.dismiss(t.key,e),t=this.getTop()},m.getTop=function(){return f.top()},m}]).provider("$modal",function(){var e={options:{backdrop:!0,keyboard:!0},$get:["$injector","$rootScope","$q","$http","$templateCache","$controller","$modalStack",function(t,n,o,a,i,r,l){function c(e){return e.template?o.when(e.template):a.get(angular.isFunction(e.templateUrl)?e.templateUrl():e.templateUrl,{cache:i}).then(function(e){return e.data})}function s(e){var n=[];return angular.forEach(e,function(e){(angular.isFunction(e)||angular.isArray(e))&&n.push(o.when(t.invoke(e)))}),n}var d={};return d.open=function(t){var a=o.defer(),i=o.defer(),d={result:a.promise,opened:i.promise,close:function(e){l.close(d,e)},dismiss:function(e){l.dismiss(d,e)}};if(t=angular.extend({},e.options,t),t.resolve=t.resolve||{},!t.template&&!t.templateUrl)throw new Error("One of template or templateUrl options is required.");var p=o.all([c(t)].concat(s(t.resolve)));return p.then(function(e){var o=(t.scope||n).$new();o.$close=d.close,o.$dismiss=d.dismiss;var i,c={},s=1;t.controller&&(c.$scope=o,c.$modalInstance=d,angular.forEach(t.resolve,function(t,n){c[n]=e[s++]}),i=r(t.controller,c),t.controllerAs&&(o[t.controllerAs]=i)),l.open(d,{scope:o,deferred:a,content:e[0],backdrop:t.backdrop,keyboard:t.keyboard,backdropClass:t.backdropClass,windowClass:t.windowClass,windowTemplateUrl:t.windowTemplateUrl,size:t.size})},function(e){a.reject(e)}),p.then(function(){i.resolve(!0)},function(){i.reject(!1)}),d},d}]};return e}),angular.module("template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-match.html",'<a tabindex="-1" bind-html-unsafe="match.label | typeaheadHighlight:query"></a>')}]),angular.module("template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen()" ng-style="{top: position.top+\'px\', left: position.left+\'px\'}" style="display: block;" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index)" role="option" id="{{match.id}}">\n        <div typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]),angular.module("template/modal/backdrop.html",[]).run(["$templateCache",function(e){e.put("template/modal/backdrop.html",'<div class="modal-backdrop fade {{ backdropClass }}"\n     ng-class="{in: animate}"\n     ng-style="{\'z-index\': 1040 + (index && 1 || 0) + index*10}"\n></div>\n')}]),angular.module("template/modal/window.html",[]).run(["$templateCache",function(e){e.put("template/modal/window.html",'<div tabindex="-1" role="dialog" class="modal fade" ng-class="{in: animate}" ng-style="{\'z-index\': 1050 + index*10, display: \'block\'}" ng-click="close($event)">\n    <div class="modal-dialog" ng-class="{\'modal-sm\': size == \'sm\', \'modal-lg\': size == \'lg\'}"><div class="modal-content" modal-transclude></div></div>\n</div>')}]);