/** * angular-strap * @version v2.3.5 - 2015-10-29 * @link http://mgcrea.github.io/angular-strap * @author Olivier Louvignes (https://github.com/mgcrea) * @license MIT License, http://www.opensource.org/licenses/MIT */ 'use strict';angular.module('mgcrea.ngStrap.popover',['mgcrea.ngStrap.tooltip']).provider('$popover',function(){var t=this.defaults={animation:'am-fade',customClass:'',container:!1,target:!1,placement:'right',templateUrl:'popover/popover.tpl.html',contentTemplate:!1,trigger:'click',keyboard:!0,html:!1,title:'',content:'',delay:0,autoClose:!1};this.$get=['$tooltip',function(e){function n(n,a){var o=angular.extend({},t,a),r=e(n,o);return o.content&&(r.$scope.content=o.content),r}return n}]}).directive('bsPopover',['$window','$sce','$popover',function(t,e,n){var a=t.requestAnimationFrame||t.setTimeout;return{restrict:'EAC',scope:!0,link:function(t,o,r){var i={scope:t};angular.forEach(['template','templateUrl','controller','controllerAs','contentTemplate','placement','container','delay','trigger','html','animation','customClass','autoClose','id','prefixClass','prefixEvent'],function(t){angular.isDefined(r[t])&&(i[t]=r[t])});var l=/^(false|0|)$/i;angular.forEach(['html','container','autoClose'],function(t){angular.isDefined(r[t])&&l.test(r[t])&&(i[t]=!1)});var c=o.attr('data-target');angular.isDefined(c)&&(l.test(c)?i.target=!1:i.target=c),angular.forEach(['title','content'],function(n){r[n]&&r.$observe(n,function(o,r){t[n]=e.trustAsHtml(o),angular.isDefined(r)&&a(function(){s&&s.$applyPlacement()})})}),r.bsPopover&&t.$watch(r.bsPopover,function(e,n){angular.isObject(e)?angular.extend(t,e):t.content=e,angular.isDefined(n)&&a(function(){s&&s.$applyPlacement()})},!0),r.bsShow&&t.$watch(r.bsShow,function(t,e){s&&angular.isDefined(t)&&(angular.isString(t)&&(t=!!t.match(/true|,?(popover),?/i)),t===!0?s.show():s.hide())}),r.viewport&&t.$watch(r.viewport,function(t){s&&angular.isDefined(t)&&s.setViewport(t)});var s=n(o,i);t.$on('$destroy',function(){s&&s.destroy(),i=null,s=null})}}}]); //# sourceMappingURL=popover.min.js.map