@gohelpfund/insight-ui
Version:
An open-source frontend for the Insight API. The Insight API provides you with a convenient, powerful and simple way to query and broadcast data on the Help network and build your own services with it.
10 lines (9 loc) • 20.7 kB
JavaScript
/**
* State-based routing for AngularJS 1.x
* This bundle requires the ui-router-core.js bundle from the @uirouter/core package.
* @version v1.0.22
* @link https://ui-router.github.io
* @license MIT License, http://www.opensource.org/licenses/MIT
*/
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular"),require("@uirouter/core")):"function"==typeof define&&define.amd?define(["exports","angular","@uirouter/core"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular,e["@uirouter/core"])}(this,function(t,e,x){"use strict";var r=angular,C=e&&e.module?e:r;function n(){var r=null;return function(e,t){return r=r||x.services.$injector.get("$templateFactory"),[new R(e,t,r)]}}var u=function(e,r){return e.reduce(function(e,t){return e||x.isDefined(r[t])},!1)};function i(n){if(!n.parent)return{};var i=["component","bindings","componentProvider"],o=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(o);if(x.isDefined(n.views)&&u(e,n))throw new Error("State '"+n.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level. Move the following properties into a view (in the 'views' object): "+e.filter(function(e){return x.isDefined(n[e])}).join(", "));var a={},t=n.views||{$default:x.pick(n,e)};return x.forEach(t,function(e,t){if(t=t||"$default",x.isString(e)&&(e={component:e}),e=x.extend({},e),u(i,e)&&u(o,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+o.join("|")+" in stateview: '"+t+"@"+n.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=n,e.$name=t;var r=x.ViewService.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=r.uiViewName,e.$uiViewContextAnchor=r.uiViewContextAnchor,a[t]=e}),a}var o=0,R=function(){function e(e,t,r){var n=this;this.path=e,this.viewDecl=t,this.factory=r,this.$id=o++,this.loaded=!1,this.getTemplate=function(e,t){return n.component?n.factory.makeComponentTemplate(e,t,n.component,n.viewDecl.bindings):n.template}}return e.prototype.load=function(){var t=this,e=x.services.$q,r=new x.ResolveContext(this.path),n=this.path.reduce(function(e,t){return x.extend(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return x.trace.traceViewServiceEvent("Loaded",t),t.controller=e.controller,x.extend(t,e.template),t})},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!x.isInjectable(t))return this.viewDecl.controller;var r=x.services.$injector.annotate(t),n=x.isArray(t)?x.tail(t):t;return new x.Resolvable("",n,r).get(e)},e}(),a=function(){function e(){var n=this;this._useHttp=C.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,r){return n.$templateRequest=r.has&&r.has("$templateRequest")&&r.get("$templateRequest"),n.$http=e,n.$templateCache=t,n}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,r){var n=function(e){return x.services.$q.when(e).then(function(e){return{template:e}})},i=function(e){return x.services.$q.when(e).then(function(e){return{component:e}})};return x.isDefined(e.template)?n(this.fromString(e.template,t)):x.isDefined(e.templateUrl)?n(this.fromUrl(e.templateUrl,t)):x.isDefined(e.templateProvider)?n(this.fromProvider(e.templateProvider,t,r)):x.isDefined(e.component)?i(e.component):x.isDefined(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,r)):n("<ui-view></ui-view>")},e.prototype.fromString=function(e,t){return x.isFunction(e)?e(t):e},e.prototype.fromUrl=function(e,t){return x.isFunction(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},e.prototype.fromComponentProvider=function(e,t,r){var n=x.services.$injector.annotate(e),i=x.isArray(e)?x.tail(e):e;return new x.Resolvable("",i,n).get(r)},e.prototype.makeComponentTemplate=function(c,s,e,l){l=l||{};var f=3<=C.version.minor?"::":"",v=function(e){var t=x.kebobString(e);return/^(x|data)-/.exec(t)?"x-"+t:t},t=function(e){var t=x.services.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(p).reduce(x.unnestR,[])}(e).map(function(e){var t=e.name,r=e.type,n=v(t);if(c.attr(n)&&!l[t])return n+"='"+c.attr(n)+"'";var i=l[t]||t;if("@"===r)return n+"='{{"+f+"$resolve."+i+"}}'";if("&"!==r)return n+"='"+f+"$resolve."+i+"'";var o=s.getResolvable(i),a=o&&o.data,u=a&&x.services.$injector.annotate(a)||[];return n+"='$resolve."+i+(x.isArray(a)?"["+(a.length-1)+"]":"")+"("+u.join(",")+")'"}).join(" "),r=v(e);return"<"+r+" "+t+"></"+r+">"},e}();var p=function(e){return x.isObject(e.bindToController)?c(e.bindToController):c(e.scope)},c=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return x.isDefined(e)&&x.isArray(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},s=function(){function r(e,t){this.stateRegistry=e,this.stateService=t,x.createProxyFunctions(x.val(r.prototype),this,x.val(this))}return r.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},r.prototype.state=function(e,t){return x.isObject(e)?t=e:t.name=e,this.stateRegistry.register(t),this},r.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},r}(),l=function(r){return function(e,t){var i=e[r],o="onExit"===r?"from":"to";return i?function(e,t){var r=new x.ResolveContext(e.treeChanges(o)).subContext(t.$$state()),n=x.extend(D(r),{$state$:t,$transition$:e});return x.services.$injector.invoke(i,this,n)}:void 0}},f=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=x.val(e);x.createProxyFunctions(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return x.removeFrom(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=x.isObject(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,r){return void 0===t&&(t=!1),x.isDefined(e)&&this.$location.url(e),t&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},e.prototype._runtimeServices=function(e,t,r,n,i){var o=this;this.$location=t,this.$sniffer=r,this.$browser=n,this.$window=i,e.$on("$locationChangeSuccess",function(t){return o._urlListeners.forEach(function(e){return e(t)})});var a=x.val(t);x.createProxyFunctions(a,this,a,["replace","path","search","hash"]),x.createProxyFunctions(a,this,a,["port","protocol","host"])},e}(),v=function(){function r(e){this.router=e}return r.injectableHandler=function(t,r){return function(e){return x.services.$injector.invoke(r,null,{$match:e,$stateParams:t.globals.params})}},r.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},r.prototype.rule=function(e){var t=this;if(!x.isFunction(e))throw new Error("'rule' must be a function");var r=new x.BaseUrlRule(function(){return e(x.services.$injector,t.router.locationService)},x.identity);return this.router.urlService.rules.rule(r),this},r.prototype.otherwise=function(e){var t=this,r=this.router.urlService.rules;if(x.isString(e))r.otherwise(e);else{if(!x.isFunction(e))throw new Error("'rule' must be a string or function");r.otherwise(function(){return e(x.services.$injector,t.router.locationService)})}return this},r.prototype.when=function(e,t){return(x.isArray(t)||x.isFunction(t))&&(t=r.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},r.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},r}();C.module("ui.router.angular1",[]);var $=C.module("ui.router.init",["ng"]),d=C.module("ui.router.util",["ui.router.init"]),h=C.module("ui.router.router",["ui.router.util"]),m=C.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),g=C.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),w=(C.module("ui.router.compat",["ui.router"]),null);function y(e){(w=this.router=new x.UIRouter).stateProvider=new s(w.stateRegistry,w.stateService),w.stateRegistry.decorator("views",i),w.stateRegistry.decorator("onExit",l("onExit")),w.stateRegistry.decorator("onRetain",l("onRetain")),w.stateRegistry.decorator("onEnter",l("onEnter")),w.viewService._pluginapi._viewConfigFactory("ng1",n());var u=w.locationService=w.locationConfig=new f(e);function t(e,t,r,n,i,o,a){return u._runtimeServices(i,e,n,t,r),delete w.router,delete w.$get,w}return f.monkeyPatchPathParameterType(w),((w.router=w).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],w}y.$inject=["$locationProvider"];var S=function(r){return["$uiRouterProvider",function(e){var t=e.router[r];return t.$get=function(){return t},t}]};function b(t,e,r){if(x.services.$injector=t,x.services.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(function(e){})}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}r.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(x.unnestR,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}b.$inject=["$injector","$q","$uiRouter"];function P(e){e.$watch(function(){x.trace.approximateDigests++})}P.$inject=["$rootScope"],$.provider("$uiRouter",y),h.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new v(e)}]),d.provider("$urlService",S("urlService")),d.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return w.urlMatcherFactory}]),d.provider("$templateFactory",function(){return new a}),m.provider("$stateRegistry",S("stateRegistry")),m.provider("$uiRouterGlobals",S("globals")),m.provider("$transitions",S("transitionService")),m.provider("$state",["$uiRouterProvider",function(){return x.extend(w.stateProvider,{$get:function(){return w.stateService}})}]),m.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),g.factory("$view",function(){return w.viewService}),g.service("$trace",function(){return x.trace}),g.run(P),d.run(["$urlMatcherFactory",function(e){}]),m.run(["$state",function(e){}]),h.run(["$urlRouter",function(e){}]),$.run(b);var A,E,j,V,D=function(r){return r.getTokens().filter(x.isString).map(function(e){var t=r.getResolvable(e);return[e,"NOWAIT"===r.getPolicy(t).async?t.promise:t.data]}).reduce(x.applyPairs,{})};function F(e){var t,r=e.match(/^\s*({[^}]*})\s*$/);if(r&&(e="("+r[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function O(e){var t=e.parent().inheritedData("$uiView"),r=x.parse("$cfg.path")(t);return r?x.tail(r).state.name:void 0}function q(e,t,r){var n,i=r.uiState||e.current.name,o=x.extend((n=e,{relative:O(t)||n.$current,inherit:!0,source:"sref"}),r.uiStateOpts||{}),a=e.href(i,r.uiStateParams,o);return{uiState:i,uiStateParams:r.uiStateParams,uiStateOpts:o,href:a}}function I(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),r="FORM"===e[0].nodeName;return{attr:r?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!r}}function U(o,a,u,c,s){return function(e){var t=e.which||e.button,r=s();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||o.attr("target"))){var n=u(function(){o.attr("disabled")||a.go(r.uiState,r.uiStateParams,r.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!r.href?1:0;e.preventDefault=function(){i--<=0&&u.cancel(n)}}}}function k(i,e,o,t){var a;t&&(a=t.events),x.isArray(a)||(a=["click"]);for(var r=i.on?"on":"bind",n=0,u=a;n<u.length;n++){var c=u[n];i[r](c,o)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,r=a;t<r.length;t++){var n=r[t];i[e](n,o)}})}function _(n){var e=function(e,t,r){return n.is(e,t,r)};return e.$stateful=!0,e}function L(n){var e=function(e,t,r){return n.includes(e,t,r)};return e.$stateful=!0,e}function T(d,h,m,e,g,t){var w=x.parse("viewDecl.controllerAs"),y=x.parse("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var $=e.html();return e.empty(),function(t,r){var e=r.data("$uiView");if(!e)return r.html($),void d(r.contents())(t);var n=e.$cfg||{viewDecl:{},getTemplate:x.noop},i=n.path&&new x.ResolveContext(n.path);r.html(n.getTemplate(r,i)||$),x.trace.traceUIViewFill(e.$uiView,r.html());var o=d(r.contents()),a=n.controller,u=w(n),c=y(n),s=i&&D(i);if(t[c]=s,a){var l=h(a,x.extend({},s,{$scope:t,$element:r}));u&&(t[u]=l,t[u][c]=s),r.data("$ngControllerController",l),r.children().data("$ngControllerController",l),N(g,m,l,t,n)}if(x.isString(n.component))var f=x.kebobString(n.component),v=new RegExp("^(x-|data-)?"+f+"$","i"),p=t.$watch(function(){var e=[].slice.call(r[0].children).filter(function(e){return e&&e.tagName&&v.exec(e.tagName)});return e&&C.element(e).data("$"+n.component+"Controller")},function(e){e&&(N(g,m,e,t,n),p())});o(t)}}}}A=["$uiRouter","$timeout",function(v,p){var $=v.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,r,n){var i,o=I(t),a=n[1]||n[0],u=null,c={},s=function(){return q($,t,c)},l=F(r.uiSref);function f(){var e=s();u&&u(),a&&(u=a.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(o.attr,e.href)}c.uiState=l.state,c.uiStateOpts=r.uiSrefOpts?e.$eval(r.uiSrefOpts):{},l.paramExpr&&(e.$watch(l.paramExpr,function(e){c.uiStateParams=x.extend({},e),f()},!0),c.uiStateParams=x.extend({},e.$eval(l.paramExpr))),f(),e.$on("$destroy",v.stateRegistry.onStatesChanged(f)),e.$on("$destroy",v.transitionService.onSuccess({},f)),o.clickable&&(i=U(t,$,p,o,s),k(t,e,i,c.uiStateOpts))}}}],E=["$uiRouter","$timeout",function(p,$){var d=p.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(r,e,n,t){var i,o=I(e),a=t[1]||t[0],u=null,c={},s=function(){return q(d,e,c)},l=["uiState","uiStateParams","uiStateOpts"],f=l.reduce(function(e,t){return e[t]=x.noop,e},{});function v(){var e=s();u&&u(),a&&(u=a.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(o.attr,e.href)}l.forEach(function(t){c[t]=n[t]?r.$eval(n[t]):null,n.$observe(t,function(e){f[t](),f[t]=r.$watch(e,function(e){c[t]=e,v()},!0)})}),v(),r.$on("$destroy",p.stateRegistry.onStatesChanged(v)),r.$on("$destroy",p.transitionService.onSuccess({},v)),o.clickable&&(i=U(e,d,$,o,s),k(e,r,i,c.uiStateOpts))}}}],j=["$state","$stateParams","$interpolate","$uiRouter",function($,e,d,h){return{restrict:"A",controller:["$scope","$element","$attrs",function(u,c,e){var s,n,t,r,i,l=[];s=d(e.uiSrefActiveEq||"",!1)(u);try{n=u.$eval(e.uiSrefActive)}catch(e){}function o(e){e.promise.then(p,x.noop)}function a(){f(n)}function f(e){x.isObject(e)&&(l=[],x.forEach(e,function(e,t){var r=function(e,t){var r=F(e);v(r.state,u.$eval(r.paramExpr),t)};x.isString(e)?r(e,t):x.isArray(e)&&x.forEach(e,function(e){r(e,t)})}))}function v(e,t,r){var n={state:$.get(e,O(c))||{name:e},params:t,activeClass:r};return l.push(n),function(){x.removeFrom(l)(n)}}function p(){var t=function(e){return e.split(/\s/).filter(x.identity)},e=function(e){return e.map(function(e){return e.activeClass}).map(t).reduce(x.unnestR,[])},r=e(l).concat(t(s)).reduce(x.uniqR,[]),n=e(l.filter(function(e){return $.includes(e.state.name,e.params)})),i=!!l.filter(function(e){return $.is(e.state.name,e.params)}).length?t(s):[],o=n.concat(i).reduce(x.uniqR,[]),a=r.filter(function(e){return!x.inArray(o,e)});u.$evalAsync(function(){o.forEach(function(e){return c.addClass(e)}),a.forEach(function(e){return c.removeClass(e)})})}f(n=n||d(e.uiSrefActive||"",!1)(u)),this.$$addStateInfo=function(e,t){if(!(x.isObject(n)&&0<l.length)){var r=v(e,t,n);return p(),r}},u.$on("$destroy",(t=h.stateRegistry.onStatesChanged(a),r=h.transitionService.onStart({},o),i=u.$on("$stateChangeSuccess",p),function(){t(),r(),i()})),h.globals.transition&&o(h.globals.transition),p()}]}}],C.module("ui.router.state").directive("uiSref",A).directive("uiSrefActive",j).directive("uiSrefActiveEq",j).directive("uiState",E),_.$inject=["$state"],L.$inject=["$state"],C.module("ui.router.state").filter("isState",_).filter("includedByState",L),V=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,o,g,w,y){var S={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},b={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,m){return function(a,u,e){var c,s,l,f,t,v=e.onload||"",p=e.autoscroll,$={enter:function(e,t,r){2<C.version.minor?o.enter(e,null,t).then(r):o.enter(e,null,t,r)},leave:function(e,t){2<C.version.minor?o.leave(e).then(t):o.leave(e,t)}},r=u.inheritedData("$uiView")||S,d=w(e.uiView||e.name||"")(a)||"$default",h={$type:"ng1",id:b.count++,name:d,fqn:r.$uiView.fqn?r.$uiView.fqn+"."+d:d,config:null,configUpdated:function(e){if(e&&!(e instanceof R))return;if(t=f,r=e,t===r)return;var t,r;x.trace.traceUIViewConfigUpdated(h,e&&e.viewDecl&&e.viewDecl.$context),n(f=e)},get creationContext(){var e=x.parse("$cfg.viewDecl.$context")(r),t=x.parse("$uiView.creationContext")(r);return e||t}};function n(e){var t=a.$new(),r=y.defer(),n=y.defer(),i={$cfg:e,$uiView:h},o={$animEnter:r.promise,$animLeave:n.promise,$$animLeave:n};t.$emit("$viewContentLoading",d),s=m(t,function(e){e.data("$uiViewAnim",o),e.data("$uiView",i),$.enter(e,u,function(){r.resolve(),l&&l.$emit("$viewContentAnimationEnded"),(x.isDefined(p)&&!p||a.$eval(p))&&g(e)}),function(){if(c&&(x.trace.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),l&&(x.trace.traceUIViewEvent("Destroying scope",h),l.$destroy(),l=null),s){var e=s.data("$uiViewAnim");x.trace.traceUIViewEvent("Animate out",e),$.leave(s,function(){e.$$animLeave.resolve(),c=null}),c=s,s=null}}()}),(l=t).$emit("$viewContentLoaded",e||f),l.$eval(v)}x.trace.traceUIViewEvent("Linking",h),u.data("$uiView",{$uiView:h}),n(),t=i.registerUIView(h),a.$on("$destroy",function(){x.trace.traceUIViewEvent("Destroying/Unregistering",h),t()})}}};return b}],T.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var H="function"==typeof C.module("ui.router").component,M=0;function N(n,e,s,t,r){!x.isFunction(s.$onInit)||r.viewDecl.component&&H||s.$onInit();var l=x.tail(r.path).state.self,i={bind:s};if(x.isFunction(s.uiOnParamsChanged)){var f=new x.ResolveContext(r.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(l)){var r=e.params("to"),n=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(x.unnestR,[]),o=e.treeChanges("from").map(t).reduce(x.unnestR,[]),a=i.filter(function(e){var t=o.indexOf(e);return-1===t||!o[t].type.equals(r[e.id],n[e.id])});if(a.length){var u=a.map(function(e){return e.id}),c=x.filter(r,function(e,t){return-1!==u.indexOf(t)});s.uiOnParamsChanged(c,e)}}},i))}if(x.isFunction(s.uiCanExit)){var o=M++,a="_uiCanExitIds",u=function(e){return!!e&&(e[a]&&!0===e[a][o]||u(e.redirectedFrom()))},c={exiting:l.name};t.$on("$destroy",e.onBefore(c,function(e){var t,r=e[a]=e[a]||{};return u(e)||(t=n.when(s.uiCanExit(e))).then(function(e){return r[o]=!1!==e}),t},i))}}C.module("ui.router.state").directive("uiView",V),C.module("ui.router.state").directive("uiView",T),C.module("ui.router.state").provider("$uiViewScroll",function(){var r=!1;this.useAnchorScroll=function(){r=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return r?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});Object.keys(x).forEach(function(e){t[e]=x[e]}),t.core=x,t.default="ui.router",t.watchDigests=P,t.getLocals=D,t.getNg1ViewConfigFactory=n,t.ng1ViewsBuilder=i,t.Ng1ViewConfig=R,t.StateProvider=s,t.UrlRouterProvider=v,Object.defineProperty(t,"__esModule",{value:!0})});
//# sourceMappingURL=ui-router-angularjs.min.js.map