Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ui-router-extras

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ui-router-extras - npm Package Compare versions

Comparing version 0.0.14 to 0.1.0

CHANGELOG.md

7

package.json
{
"author": "Christopher Thielen",
"name": "ui-router-extras",
"version": "0.0.14",
"version": "0.1.0",
"description": "UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise",

@@ -33,6 +33,3 @@ "homepage": "http://christopherthielen.github.io/ui-router-extras/",

],
"repository": "",
"engines": {
"node": "0.10.10"
}
"repository": ""
}

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Monolithic build (all modules) http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["angular"],function(t){e(t)}):e("object"==typeof exports?require("angular"):t.angular)}(this,function(t,e){function r(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function n(e){if(Object.keys)return Object.keys(e);var r=[];return t.forEach(e,function(t,e){r.push(e)}),r}function a(t,e){var r=[];for(var n in t)e&&-1!==e.indexOf(n)||r.push(n);return r}function o(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=r);r>n;n++)if(n in t&&t[n]===e)return n;return-1}function i(t,e,a,i){var u,s=r(a,i),c={},f=[];for(var l in s)if(s[l].params&&(u=$(s[l].params)?s[l].params:n(s[l].params),u.length))for(var v in u)o(f,u[v])>=0||(f.push(u[v]),c[u[v]]=t[u[v]]);return h({},c,e)}function u(t,e){return h(new(h(function(){},{prototype:t})),e)}function s(t){d.push(t)}function c(){b=e}function f(e,r){var n=r,a=n.inheritParams,o=(n.objectKeys,n.protoKeys),i=n.forEach,u=n.map,s={},c={},f=!1;this.registerStickyState=function(t){c[t.name]=t},this.enableDebug=this.debugMode=function(e){return t.isDefined(e)&&(f=e),f},this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(e,r,n,c,l){function v(){var e={};return t.forEach(s,function(t,r){for(var n=d(t),a=0;a<n.length;a++){var o=n[a].parent;e[o.name]=e[o.name]||[],e[o.name].push(t)}e[""]&&(e.__inactives=e[""])}),e}function p(){var t={};return i(s,function(e){i(e.path,function(r){r!==e&&(t[r.name]=t[r.name]||[],t[r.name].push(e))})}),t}function d(t){var e=[];if(!t)return e;do t.sticky&&e.push(t),t=t.parent;while(t);return e.reverse(),e}function m(t,e,r){if(t[r]===e[r])return{from:!1,to:!1};var n=r<t.length&&t[r].self.sticky,a=r<e.length&&e[r].self.sticky;return{from:n,to:a}}function h(t,e,r,n){if(n)return"updateStateParams";var a=s[t.self.name];if(!a)return"enter";if(t.self===r)return"updateStateParams";var o=g(e,a.locals.globals.$stateParams,t.ownParams);return o?"reactivate":"updateStateParams"}function $(t,e){var r=s[t.name];if(!r)return null;if(!e)return r;var n=g(e,r.locals.globals.$stateParams,t.ownParams);return n?r:null}function g(e,r,n){if(!t.isArray(n)&&t.isObject(n)&&(n=o(n,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!n){n=[];for(var a in e)n.push(a)}for(var i=0;i<n.length;i++){var u=n[i];if(e[u]!=r[u])return!1}return!0}var x={getInactiveStates:function(){var e=[];return t.forEach(s,function(t){e.push(t)}),e},getInactiveStatesByParent:function(){return v()},processTransition:function(e){var o={inactives:[],enter:[],exit:[],keep:0},c=e.fromState.path,f=e.fromParams,l=e.toState.path,v=e.toParams,d=e.reloadStateTree,$=e.options,x=0,y=l[x];for($.inherit&&(v=a(n,v||{},r.$current,e.toState));y&&y===c[x]&&g(v,f,y.ownParams);)y=l[++x];o.keep=x;var S,b,E,P={},k=m(c,l,x),w=!!$.reload,R=[],j=[],F=[],A=[];for(S=x;S<c.length;S++)k.from?(o.inactives.push(c[S]),R.push(c[S]),o.exit[S]="inactivate"):(A.push(c[S]),o.exit[S]="exit");for(S=x;S<l.length;S++){var O=k.to?h(l[S],v,d,w):"enter";w=w||"updateStateParams"==O,o.enter[S]=O,"reactivate"==O?(j.push(l[S]),E=P[l[S].name]=l[S]):"updateStateParams"==O&&(b=P[l[S].name]=l[S]),F.push(l[S])}var T=p(),C=[];E===e.toState&&(C=T[E.name]||[]),A=A.concat(C);var _=u(A,function(t){return T[t.name]||[]});return i(_,function(t){A=A.concat(t)}),R=R.concat(u(s,t.identity)),R=R.filter(function(t){return-1===A.indexOf(t)&&-1===F.indexOf(t)}),o.inactives=R,o.reactivatingStates=j,o.deepestReactivateChildren=C,o},stateInactivated:function(t){s[t.self.name]=t,t.self.status="inactive",t.self.onInactivate&&c.invoke(t.self.onInactivate,t.self,t.locals.globals)},stateReactivated:function(t){s[t.self.name]&&delete s[t.self.name],t.self.status="entered",t.self.onReactivate&&c.invoke(t.self.onReactivate,t.self,t.locals.globals)},stateExiting:function(e,r,n){var a={};t.forEach(r,function(t){a[t.self.name]=!0}),t.forEach(s,function(r,n){!a[n]&&r.includes[e.name]&&(f&&l.debug("Exiting "+n+" because it's a substate of "+e.name+" and wasn't found in ",a),r.self.onExit&&c.invoke(r.self.onExit,r.self,r.locals.globals),t.forEach(r.locals,function(t,e){delete R.locals[e]}),r.locals=null,r.self.status="exited",delete s[n])}),n&&c.invoke(n,e.self,e.locals.globals),e.locals=null,e.self.status="exited",delete s[e.self.name]},stateEntering:function(t,e,r,n){var a=$(t);if(a&&(n||!$(t,e))){var o=t.locals;this.stateExiting(a),t.locals=o}t.self.status="entered",r&&c.invoke(r,t.self,t.locals.globals)},reset:function(n,a){function o(t){x.reset(t)}if("*"===n)return t.forEach(x.getInactiveStates(),o),!0;var i=r.get(n);if(!i)return!1;var u=$(i,a);return u?(x.stateExiting(u),e.$broadcast("$viewContentLoading"),!0):!1}};return x}]}function l(t){return{resolve:{},locals:{globals:k&&k.locals&&k.locals.globals},views:{},self:{},params:{},ownParams:A.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:t}}var v=t.module("ct.ui.router.extras.core",["ui.router"]),p={},d=[];v.config(["$stateProvider","$injector",function(e,r){e.decorator("parent",function(e,r){return p[e.self.name]=e,e.self.$$state=function(){return p[e.self.name]},t.forEach(d,function(t){t(e)}),r(e)})}]);var m=t.forEach,h=t.extend,$=t.isArray,g=function(t,e){"use strict";var r=[];return m(t,function(t,n){r.push(e(t,n))}),r},x=function(t){"use strict";return g(t,function(t,e){return e})},y=function(t,e){"use strict";var r=[];return m(t,function(t,n){e(t,n)&&r.push(t)}),r},S=function(t,e){"use strict";var r={};return m(t,function(t,n){e(t,n)&&(r[n]=t)}),r};v.provider("uirextras_core",function(){var e={internalStates:p,onStateRegistered:s,forEach:m,extend:h,isArray:$,map:g,keys:x,filter:y,filterObj:S,ancestors:r,objectKeys:n,protoKeys:a,arraySearch:o,inheritParams:i,inherit:u};t.extend(this,e),this.$get=function(){return e}});var b;t.module("ct.ui.router.extras.dsr",["ct.ui.router.extras.core"]).config(["$provide",function(t){var e;t.decorator("$state",["$delegate","$q",function(t,r){return e=t.transitionTo,t.transitionTo=function(n,a,o){return o.ignoreDsr&&(b=o.ignoreDsr),e.apply(t,arguments).then(function(t){return c(),t},function(t){return c(),r.reject(t)})},t}])}]),t.module("ct.ui.router.extras.dsr").service("$deepStateRedirect",["$rootScope","$state","$injector",function(r,n,a){function o(t){var e=t.name;return l.hasOwnProperty(e)?l[e]:void u(e)}function i(e){var r=e.deepStateRedirect||e.dsr;if(!r)return{dsr:!1};var n={dsr:!0};return t.isFunction(r)?n.fn=r:t.isObject(r)&&(n=t.extend(n,r)),t.isString(n["default"])&&(n["default"]={state:n["default"]}),n.fn||(n.fn=["$dsr$",function(t){return t.redirect.state!=t.to.state}]),n}function u(t){var r=n.get(t);if(!r)return!1;var a=i(r);a.dsr&&(l[r.name]=v,f[t]===e&&(f[t]={}));var o=r.$$state&&r.$$state().parent;if(o){var s=u(o.self.name);s&&l[r.name]===e&&(l[r.name]=p)}return l[r.name]||!1}function s(r,n){n===!0&&(n=Object.keys(r)),(null===n||n===e)&&(n=[]);var a={};return t.forEach(n.sort(),function(t){a[t]=r[t]}),a}function c(e,r){function n(t){return t?t.toString():t}var a=s(e,r),o={};return t.forEach(a,function(t,e){o[e]=n(t)}),t.toJson(o)}var f={},l={},v="Redirect",p="AncestorRedirect";return r.$on("$stateChangeStart",function(e,r,u,l,p){var d=i(r);if(!b&&(o(r)===v||d["default"])){var m=c(u,d.params),h=f[r.name][m]||d["default"];if(h){var $={redirect:{state:h.state,params:h.params},to:{state:r.name,params:u}},g=a.invoke(d.fn,r,{$dsr$:$});if(g){g.state&&(h=g),e.preventDefault();var x=s(u,d.params);n.go(h.state,t.extend(x,h.params))}}}}),r.$on("$stateChangeSuccess",function(e,r,a,u,s){var l=o(r);if(l){var v=r.name;t.forEach(f,function(e,o){var u=i(n.get(o)),s=c(a,u.params);r.$$state().includes[o]&&(f[o][s]={state:v,params:t.copy(a)})})}}),{getRedirect:function(t,e){var r=n.get(t);o(r);var a=i(r),u=c(e,a.params),s=f[r.name][u]||a["default"];return s},reset:function(e,r){if(e){var a=n.get(e);if(!a)throw new Error("Unknown state: "+e);if(f[a.name])if(r){var o=c(r,i(a).params);delete f[a.name][o]}else f[a.name]={}}else t.forEach(f,function(t,e){f[e]={}})}}}]),t.module("ct.ui.router.extras.dsr").run(["$deepStateRedirect",function(t){}]),t.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);var E=t.module("ct.ui.router.extras.sticky");f.$inject=["$stateProvider","uirextras_coreProvider"],E.provider("$stickyState",f);var P,k,w,R,p={},j=[],F={},A={hasParamSet:!1};t.module("ct.ui.router.extras.sticky").run(["$stickyState",function(t){P=t}]),t.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(r,n,a,o,i){function u(e,r,n){function a(t,e,r){return t[e]?t[e].toUpperCase()+": "+r.self.name:"("+r.self.name+")"}var o=d(n.inactives,function(t){return t.self.name}),i=d(r.toState.path,function(t,e){return a(n.enter,e,t)}),u=d(r.fromState.path,function(t,e){return a(n.exit,e,t)}),s=r.fromState.self.name+": "+t.toJson(r.fromParams)+": -> "+r.toState.self.name+": "+t.toJson(r.toParams);e.debug(" Current transition: ",s),e.debug("Before transition, inactives are: : ",d(P.getInactiveStates(),function(t){return t.self.name})),e.debug("After transition, inactives will be: ",o),e.debug("Transition will exit: ",u),e.debug("Transition will enter: ",i)}function s(t,e,r){t.debug("Current state: "+e.self.name+", inactive states: ",d(P.getInactiveStates(),function(t){return t.self.name}));for(var n=function(t,e){return"'"+e+"' ("+t.$$state.name+")"},a=function(t,e){return"globals"!=e&&"resolve"!=e},o=function(t){var e=d(m(t.locals,a),n).join(", ");return"("+(t.self.name?t.self.name:"root")+".locals"+(e.length?": "+e:"")+")"},i=o(e),u=e.parent;u&&u!==e;)""===u.self.name&&(i=o(r.$current.path[0])+" / "+i),i=o(u)+" / "+i,e=u,u=e.parent;t.debug("Views: "+i)}var c=i,f=c.internalStates,v=c.inherit,p=(c.inheritParams,c.forEach),d=c.map,m=c.filterObj;A.hasParamSet=!!o.ParamSet,R=t.extend(new l("__inactives"),{self:{name:"__inactives"}}),k=w=e,j=[],i.onStateRegistered(function(t){t.self.sticky===!0&&a.registerStickyState(t.self)});var h;r.decorator("$state",["$delegate","$log","$q",function(r,n,i){return k=r.$current,f[""]=k,k.parent=R,R.parent=e,R.locals=v(F,R.locals),k.locals=v(R.locals,k.locals),delete R.locals.globals,h=r.transitionTo,r.transitionTo=function(e,c,v){function m(e){var r=t.extend(new l("reactivate_phase1"),{locals:e.locals});return r.self=t.extend({},e.self),r}function $(e){var r=t.extend(new l("reactivate_phase2"),e),n=r.self.onEnter;return r.resolve={},r.views={},r.self.onEnter=function(){r.locals=e.locals,P.stateReactivated(e)},J.addRestoreFunction(function(){e.self.onEnter=n}),r}function g(t){var e=new l("inactivate");e.self=t.self;var r=t.self.onExit;return e.self.onExit=function(){P.stateInactivated(t)},J.addRestoreFunction(function(){t.self.onExit=r}),e}function x(t,e){var r=t.self.onEnter;return t.self.onEnter=function(){P.stateEntering(t,e,r)},J.addRestoreFunction(function(){t.self.onEnter=r}),t}function y(t,e){var r=t.self.onEnter;return t.self.onEnter=function(){P.stateEntering(t,e,r,!0)},J.addRestoreFunction(function(){t.self.onEnter=r}),t}function S(t){var e=t.self.onExit;return t.self.onExit=function(){P.stateExiting(t,K,e)},J.addRestoreFunction(function(){t.self.onExit=e}),t}var b=a.debugMode();R.locals||(R.locals=k.locals);var E=j.length;w&&(w(),b&&n.debug("Restored paths from pending transition"));var O,T,C,_,I=r.$current,M=r.params,D=v&&v.relative||r.$current,N=r.get(e,D),q=[],K=[];c=c||{},arguments[1]=c;var z=function(){},J=function(){O&&(L.path=O,O=null),T&&(I.path=T,T=null),t.forEach(J.restoreFunctions,function(t){t()}),J=z,w=null,j.splice(E,1)};if(J.restoreFunctions=[],J.addRestoreFunction=function(t){this.restoreFunctions.push(t)},N){var L=f[N.name];if(L){O=L.path,T=I.path;var B=v&&v.reload||!1,H=B&&(B===!0?O[0].self:r.get(B,D));v&&B&&B!==!0&&delete v.reload;var U={toState:L,toParams:c||{},fromState:I,fromParams:M||{},options:v,reloadStateTree:H};if(j.push(U),w=J,H){U.toParams.$$uirouterextrasreload=Math.random();var V=H.$$state().params,W=H.$$state().ownParams;if(A.hasParamSet){var Y=new o.Param("$$uirouterextrasreload");V.$$uirouterextrasreload=W.$$uirouterextrasreload=Y,J.restoreFunctions.push(function(){delete V.$$uirouterextrasreload,delete W.$$uirouterextrasreload})}else V.push("$$uirouterextrasreload"),W.push("$$uirouterextrasreload"),J.restoreFunctions.push(function(){V.length=V.length-1,W.length=W.length-1})}C=P.processTransition(U),b&&u(n,U,C);var G=L.path.slice(0,C.keep),Q=I.path.slice(0,C.keep);t.forEach(R.locals,function(t,e){-1!=e.indexOf("@")&&delete R.locals[e]});var X=function(t){return function(e,r){-1!==r.indexOf("@")&&(t[r]=e)}};p(C.inactives,function(t){p(t.locals,X(R.locals))}),p(C.reactivatingStates,function(t){p(t.locals,X(F))}),J.addRestoreFunction(function(){p(F,function(t,e){delete F[e]})}),t.forEach(C.enter,function(t,e){var r,n=L.path[e];"reactivate"===t?(r=m(n),G.push(r),Q.push(r),q.push($(n)),_=n):"updateStateParams"===t?(G.push(y(n)),_=n):"enter"===t&&G.push(x(n))}),t.forEach(C.exit,function(t,e){var r=I.path[e];"inactivate"===t?(Q.push(g(r)),K.push(r)):"exit"===t&&(Q.push(S(r)),K.push(r))}),q.length&&t.forEach(q,function(t){G.push(t)});var Z=C.deepestReactivateChildren;Q=Q.concat(d(C.deepestReactivateChildren,function(t){return S(t)})),K=K.concat(Z),I.path=Q,L.path=G;var tt=function(t){return(t.surrogateType?t.surrogateType+":":"")+t.self.name};b&&n.debug("SurrogateFromPath: ",d(Q,tt)),b&&n.debug("SurrogateToPath: ",d(G,tt))}}var et=h.apply(r,arguments);return et.then(function(t){return J(),b&&s(n,f[t.name],r),t.status="active",t},function(t){return J(),b&&"transition prevented"!==t.message&&"transition aborted"!==t.message&&"transition superseded"!==t.message&&(n.debug("transition failed",t),n.debug(t.stack)),i.reject(t)})},r}])}]),function(t,e){function r(e,r,n,a){function o(e,r){var n=t.isObject(e)?e.name:e;return r?p[n]:l[n]}function i(t,e){if(e.name){var r=e.name.split(/\./);for("."===e.name.charAt(0)&&(r[0]=t.current.name);r.length;){var n=r.join(".");if(t.get(n,{relative:t.current}))return null;if(p[n])return p[n];r.pop()}}if(e.url){var a=[];for(var o in p){var i=p[o].urlMatcher;i&&i.exec(e.url)&&a.push(p[o])}for(var u=a.slice(0),s=a.length-1;s>=0;s--)for(var c=0;c<u.length;c++)a[s]===u[c].parentFutureState&&a.splice(s,1);return a[0]}}function u(t,e){function r(){delete p[e.name]}function n(t){return"remove"===l&&r(),a.reject(t)}d=!0;var a=t.get("$q");if(!e){var o=a.defer();return o.reject("No lazyState passed in "+e),o.promise}var i=a.when([]),s=e.parentFutureState;s&&p[s.name]&&(i=u(t,p[s.name]));var c=e.type,f=v[c];if(!f)throw Error("No state factory for futureState.type: "+(e&&e.type));var l=f.$options&&f.$options.failedLazyLoadPolicy||"remove";return i.then(function(n){var a=t.invoke(f,f,{futureState:e});return a.then(function(t){return r(),t&&n.push(t),n})})["catch"](n)}function s(t,r){var n=!1,a=["$rootScope","$urlRouter","$state",function(a,o,s){function f(){n=!0,o.sync(),n=!1}if(!h)return c().then(f),void(h=!0);var l=i(s,{url:r.path()});return l?void u(t,l).then(function(t){t.forEach(function(t){t&&(!s.get(t)||t.name&&!s.get(t.name))&&e.state(t)}),d=!1,f()},function(){d=!1,f()}):t.invoke(g)}];if(!d){var o=n?g:a;return t.invoke(o)}}var c,f=a,l=f.internalStates,v={},p={},d=!1,m=[],h=!1,$=this;this.addResolve=function(t){m.push(t)},this.stateFactory=function(t,e){v[t]=e},this.futureState=function(e){e.stateName&&(e.name=e.stateName),e.urlPrefix&&(e.url="^"+e.urlPrefix),p[e.name]=e;var r,a=e.name.split(/\./).slice(0,-1).join("."),i=o(e.parent||a);if(i)r=i.url||i.navigable&&i.navigable.url;else if(""===a)r=n.compile("");else{var u=o(e.parent||a,!0);if(!u)throw new Error("Couldn't determine parent state of future state. FutureState:"+t.toJson(e));var s=u.urlMatcher.source.replace(/\*rest$/,"");r=n.compile(s),e.parentFutureState=u}e.url&&(e.urlMatcher="^"===e.url.charAt(0)?n.compile(e.url.substring(1)+"*rest"):r.concat(e.url+"*rest"))},this.get=function(){return t.extend({},p)};var g=["$log","$location",function(t,e){}];r.otherwise(s),r.otherwise=function(e){if(t.isString(e)){var n=e;e=function(){return n}}else if(!t.isFunction(e))throw new Error("'rule' must be a function");return g=["$injector","$location",e],r};var x={getResolvePromise:function(){return c()}};this.$get=["$injector","$state","$q","$rootScope","$urlRouter","$timeout","$log",function(r,n,a,o,s,f,l){function v(){if(o.$on("$stateNotFound",function(t,a,o,s){if(!d){var c=i(n,{name:a.to});if(c){t.preventDefault();var f=u(r,c);f.then(function(t){t.forEach(function(t){t&&(!n.get(t)||t.name&&!n.get(t.name))&&e.state(t)}),n.go(a.to,a.toParams),d=!1},function(t){console.log("failed to lazy load state ",t),o.name&&n.go(o,s),d=!1})}}}),!c){var l=[];t.forEach(m,function(t){l.push(r.invoke(t))}),c=function(){return a.all(l)}}c().then(function v(){f(function(){n.transition?n.transition.then(v,v):s.sync()})})}return v(),x.state=e.state,x.futureState=$.futureState,x.get=$.get,x}]}var n=t.module("ct.ui.router.extras.future",["ct.ui.router.extras.core"]);r.$inject=["$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","uirextras_coreProvider"],n.provider("$futureState",r);var a={state:function(t){a.$rootScope&&a.$rootScope.$broadcast("$stateAdded",t)},itsNowRuntimeOhWhatAHappyDay:function(t){a.$rootScope=t},$rootScope:e};n.config(["$stateProvider",function(e){var r=e.state;e.state=function(){var n=r.apply(e,arguments),o=t.isObject(arguments[0])?arguments[0]:arguments[1];return a.state(o),n}}]),n.run(["$futureState",function(t,e){a.itsNowRuntimeOhWhatAHappyDay(e)}])}(t),t.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state",function(t,r){var n=null,a=null,o={};t.$on("$transitionStart",function(t,e){function r(){a=null}function o(){n=a}var i=e.from,u=i.state&&i.state.$$state&&i.state.$$state();u&&(a=n,n=e.from,e.promise.then(r)["catch"](o))});var i={get:function(t){return t?o[t]:n},go:function(t,e){var n=i.get(t);return r.go(n.state,n.params,e)},memo:function(t,e,a){o[t]=n||{state:r.get(e),params:a}},forget:function(t){t?delete o[t]:n=e}};return i}]),t.module("ct.ui.router.extras.previous").run(["$previousState",function(t){}]),t.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(e){e.decorator("$state",["$delegate","$rootScope","$q","$injector",function(e,r,n,a){function o(e){var r=a.invoke,n=a.instantiate;return a.invoke=function(n,a,o){return r(n,a,t.extend({$transition$:e},o))},a.instantiate=function(r,a){return n(r,t.extend({$transition$:e},a))},function(){a.invoke=r,a.instantiate=n}}function i(){v.pop()(),l.pop(),f--}function u(t,e){return function(n){return i(),r.$broadcast("$transitionSuccess",e),t.resolve(n),n}}function s(t,e){return function(a){return i(),r.$broadcast("$transitionError",e,a),t.reject(a),n.reject(a)}}var c=e.transitionTo,f=-1,l=[],v=[];return e.transitionTo=function(t,r,a){var o=n.defer(),i=l[++f]={promise:o.promise};v[f]=function(){};var p=c.apply(e,arguments);return p.then(u(o,i),s(o,i))},r.$on("$stateChangeStart",function(e,n,a,i,u){var s=f,c=t.extend(l[s],{to:{state:n,params:a},from:{state:i,params:u}}),p=o(c);v[s]=p,r.$broadcast("$transitionStart",c)}),e}])}]),function(){"use strict";function e(e,r,n){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg></svg>",link:function(r,a,o){function i(e){e=e.map(function(e){return""===e.name?v:t.copy(e)}),t.extend(s,e.reduce(function(t,e){return t[e.name]=e,t},{})),e.forEach(function(t){var e=t.name.split(/\./).slice(0,-1).join("."),r=t.name!=e&&s[e];r&&((r.children||(r.children=[])).push(t),t.px=r.px,t.py=r.py,p.push(t))})}function u(){function t(t){var e=t.name.split(".").pop();return t.sticky&&(e+=" (STICKY)"),t.deepStateRedirect&&(e+=" (DSR)"),e}$=$.data(l.nodes(v),function(t){return t.name}),g=g.data(l.links(p),function(t){return t.target.name}),x=x.data(d),p.forEach(function(t){t.y=70*t.depth});var e=$.enter();x.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(t){return t.parent.px||100}).attr("cy",function(t){return t.parent.py||100}),e.append("circle").attr("class","node").attr("r",9).attr("cx",function(t){return t.parent.px}).attr("cy",function(t){return t.parent.py}),e.append("text").attr("class","label").attr("x",function(t){return t.parent.px}).attr("y",function(t){return t.parent.py}).attr("text-anchor",function(t){return"middle"}).text(t).style("fill-opacity",1),g.enter().insert("path",".node").attr("class","link").attr("d",function(t){var e={x:t.source.px,y:t.source.py};return m({source:e,target:e})});var r=h.transition().duration(S);r.selectAll(".link").attr("d",m);var n={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};r.selectAll(".node").attr("cx",function(t){return t.px=t.x}).attr("cy",function(t){return t.py=t.y}).attr("r",function(t){return"active"===t.status?15:10}).style("fill",function(t){return n[t.status]||"#FFF"}),r.selectAll(".label").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15}).attr("transform",function(t){return"rotate(-25 "+t.x+" "+t.y+")"}),r.selectAll(".active").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15})}var s={},c=r.width||400,f=r.height||400,l=d3.layout.tree().size([c-20,f-20]).separation(function(t,e){return t.parent==e.parent?10:25}),v=e.get().filter(function(t){return""===t.name})[0],p=l(v);v.parent=v,v.px=v.x=c/2,v.py=v.y=f/2;var d={};d.px=d.x=v.px,d.py=d.y=v.py;{var m=d3.svg.diagonal(),h=d3.select(a.find("svg")[0]).attr("width",c).attr("height",f).append("g").attr("transform","translate(10, 10)"),$=h.selectAll(".node"),g=h.selectAll(".link"),x=h.selectAll(".active"),y=200,S=200;setInterval(u,y)}n(function(){r.states=e.get(),t.forEach(p,function(t){var r=e.get(t.name);r&&(t.status=r.status||"exited")})},250),r.$watchCollection("states",function(t,e){var r=(e||[]).map(function(t){return t.name});i((t||[]).filter(function(t){return-1==r.indexOf(t.name)}))}),u(y)}}}var r=t.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);r.directive("stateVis",["$state","$timeout","$interval",e])}(),t.module("ct.ui.router.extras",["ct.ui.router.extras.core","ct.ui.router.extras.dsr","ct.ui.router.extras.future","ct.ui.router.extras.previous","ct.ui.router.extras.statevis","ct.ui.router.extras.sticky","ct.ui.router.extras.transition"])});
/** UI-Router Extras v.0.1.0 Monolithic build (all modules) http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";"function"==typeof define&&define.amd?define(["angular"],function(t){e(t)}):e("object"==typeof exports?require("angular"):t.angular)}(this,function(t,e){function r(t,e){var r=[];for(var n in t.path){if(t.path[n]!==e.path[n])break;r.push(t.path[n])}return r}function n(e){if(Object.keys)return Object.keys(e);var r=[];return t.forEach(e,function(t,e){r.push(e)}),r}function a(t,e){var r=[];for(var n in t)e&&-1!==e.indexOf(n)||r.push(n);return r}function o(t,e){if(Array.prototype.indexOf)return t.indexOf(e,Number(arguments[2])||0);var r=t.length>>>0,n=Number(arguments[2])||0;for(n=0>n?Math.ceil(n):Math.floor(n),0>n&&(n+=r);r>n;n++)if(n in t&&t[n]===e)return n;return-1}function i(t,e,a,i){var u,s=r(a,i),c={},f=[];for(var l in s)if(s[l].params&&(u=g(s[l].params)?s[l].params:n(s[l].params),u.length))for(var p in u)o(f,u[p])>=0||(f.push(u[p]),c[u[p]]=t[u[p]]);return h({},c,e)}function u(t,e){return h(new(h(function(){},{prototype:t})),e)}function s(t){d.push(t)}function c(){b=e}function f(e,r){var n=r,a=n.inheritParams,o=(n.objectKeys,n.protoKeys),i=n.forEach,u=n.map,s={},c={},f=!1;this.registerStickyState=function(t){c[t.name]=t},this.enableDebug=this.debugMode=function(e){return t.isDefined(e)&&(f=e),f},this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(e,r,n,c,l){function p(){var e={};return t.forEach(s,function(t,r){for(var n=d(t),a=0;a<n.length;a++){var o=n[a].parent;e[o.name]=e[o.name]||[],e[o.name].push(t)}e[""]&&(e.__inactives=e[""])}),e}function v(){var t={};return i(s,function(e){i(e.path,function(r){r!==e&&(t[r.name]=t[r.name]||[],t[r.name].push(e))})}),t}function d(t){var e=[];if(!t)return e;do t.sticky&&e.push(t),t=t.parent;while(t);return e.reverse(),e}function m(t,e,r,n){if(n)return"reload";var a=s[t.self.name];if(!a)return"enter";if(t.self===r)return"reload";var o=g(t.ownParams,e,a.locals.globals.$stateParams);return o?"reactivate":"reload"}function h(t,e){var r=s[t.name];if(!r)return null;if(!e)return r;var n=g(t.ownParams,e,r.locals.globals.$stateParams);return n?r:null}function g(t,e,r){return"function"==typeof t.$$equals?t.$$equals(e,r):$(e,r,t)}function $(e,r,n){if(!t.isArray(n)&&t.isObject(n)&&(n=o(n,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!n){n=[];for(var a in e)n.push(a)}for(var i=0;i<n.length;i++){var u=n[i];if(e[u]!=r[u])return!1}return!0}function x(t){var e=t.fromState.path,o=t.toState.path,i=t.toParams,u=0,s=o[u];for(t.options.inherit&&(i=a(n,i||{},r.$current,t.toState));s&&s===e[u]&&g(s.ownParams,i,t.fromParams);)s=o[++u];return{keep:u,retained:e.slice(0,u),exiting:e.slice(u),entering:o.slice(u)}}var y={getInactiveStates:function(){return u(s,t.identity)},getInactiveStatesByParent:function(){return p()},processTransition:function(e){function r(t){return function(e){return-1===t.indexOf(e)}}function n(t,e){return t.concat(e)}function a(t){return function(e){return e[t]}}function o(t){return function(e){return e.type===t}}function i(t){return function(e){return e.parent===t}}function c(t){return!t.sticky}var f,l,p,d=x(e),h=u(s,t.identity),g=d.keep,$=r(d.entering),y=d.exiting[0]&&d.exiting[0].sticky&&d.entering.length>0;l=d.exiting.map(function(t){var e=y?"inactivate":"exit";return{type:e,state:t}});var S=!!e.options.reload;p=d.entering.map(function(t){var r=m(t,e.toParams,e.reloadStateTree,S);return S=S||"reload"===r,{type:r,state:t}});var b=d.entering.map(function(t){return h.filter(i(t.parent))}).reduce(n,[]).filter($).filter(c).concat(h.filter(i(e.toState))),E=v(),k=b.map(function(t){return E[t.name]}).filter(t.isDefined).reduce(n,[]).concat(b).sort(function(t,e){return t.name.split(".").length-e.name.split(".").length}),P=l.filter(o("exit")).map(a("state")).concat(k);return f=h.filter(r(P)).filter(r(d.entering)).concat(l.filter(o("inactivate")).map(a("state"))),{keep:g,enter:new Array(g).concat(p.map(a("type"))),exit:new Array(g).concat(l.map(a("type"))),inactives:f,reactivatingStates:p.filter(o("reactivate")).map(a("state")),orphans:k}},stateInactivated:function(t){s[t.self.name]=t,t.self.status="inactive",t.self.onInactivate&&c.invoke(t.self.onInactivate,t.self,t.locals.globals)},stateReactivated:function(t){s[t.self.name]&&delete s[t.self.name],t.self.status="entered",t.self.onReactivate&&c.invoke(t.self.onReactivate,t.self,t.locals.globals)},stateExiting:function(e,r,n){var a={};t.forEach(r,function(t){a[t.self.name]=!0}),t.forEach(s,function(r,n){!a[n]&&r.includes[e.name]&&(f&&l.debug("Exiting "+n+" because it's a substate of "+e.name+" and wasn't found in ",a),r.self.onExit&&c.invoke(r.self.onExit,r.self,r.locals.globals),t.forEach(r.locals,function(t,e){delete j.locals[e]}),r.locals=null,r.self.status="exited",delete s[n])}),n&&c.invoke(n,e.self,e.locals.globals),e.locals=null,e.self.status="exited",delete s[e.self.name]},stateEntering:function(t,e,r,n){var a=h(t);if(a&&(n||!h(t,e))){var o=t.locals;this.stateExiting(a),t.locals=o}t.self.status="entered",r&&c.invoke(r,t.self,t.locals.globals)},reset:function(n,a){function o(t){y.reset(t)}if("*"===n)return t.forEach(y.getInactiveStates(),o),!0;var i=r.get(n);if(!i)return!1;var u=h(i,a);return u?(y.stateExiting(u),e.$broadcast("$viewContentLoading"),!0):!1}};return y}]}function l(t){return{resolve:{},locals:{globals:P&&P.locals&&P.locals.globals},views:{},self:{},params:{},ownParams:A.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:t}}var p=t.module("ct.ui.router.extras.core",["ui.router"]),v={},d=[];p.config(["$stateProvider","$injector",function(e,r){e.decorator("parent",function(e,r){return v[e.self.name]=e,e.self.$$state=function(){return v[e.self.name]},t.forEach(d,function(t){t(e)}),r(e)})}]);var m=t.forEach,h=t.extend,g=t.isArray,$=function(t,e){"use strict";var r=[];return m(t,function(t,n){r.push(e(t,n))}),r},x=function(t){"use strict";return $(t,function(t,e){return e})},y=function(t,e){"use strict";var r=[];return m(t,function(t,n){e(t,n)&&r.push(t)}),r},S=function(t,e){"use strict";var r={};return m(t,function(t,n){e(t,n)&&(r[n]=t)}),r};p.provider("uirextras_core",function(){var e={internalStates:v,onStateRegistered:s,forEach:m,extend:h,isArray:g,map:$,keys:x,filter:y,filterObj:S,ancestors:r,objectKeys:n,protoKeys:a,arraySearch:o,inheritParams:i,inherit:u};t.extend(this,e),this.$get=function(){return e}});var b;t.module("ct.ui.router.extras.dsr",["ct.ui.router.extras.core"]).config(["$provide",function(t){var e;t.decorator("$state",["$delegate","$q",function(t,r){return e=t.transitionTo,t.transitionTo=function(n,a,o){return o.ignoreDsr&&(b=o.ignoreDsr),e.apply(t,arguments).then(function(t){return c(),t},function(t){return c(),r.reject(t)})},t}])}]),t.module("ct.ui.router.extras.dsr").service("$deepStateRedirect",["$rootScope","$state","$injector",function(r,n,a){function o(t){var e=t.name;return l.hasOwnProperty(e)?l[e]:void u(e)}function i(e){var r=e.deepStateRedirect||e.dsr;if(!r)return{dsr:!1};var n={dsr:!0};return t.isFunction(r)?n.fn=r:t.isObject(r)&&(n=t.extend(n,r)),t.isString(n["default"])&&(n["default"]={state:n["default"]}),n.fn||(n.fn=["$dsr$",function(t){return t.redirect.state!=t.to.state}]),n}function u(t){var r=n.get(t);if(!r)return!1;var a=i(r);a.dsr&&(l[r.name]=p,f[t]===e&&(f[t]={}));var o=r.$$state&&r.$$state().parent;if(o){var s=u(o.self.name);s&&l[r.name]===e&&(l[r.name]=v)}return l[r.name]||!1}function s(r,n){n===!0&&(n=Object.keys(r)),(null===n||n===e)&&(n=[]);var a={};return t.forEach(n.sort(),function(t){a[t]=r[t]}),a}function c(e,r){function n(t){return t?t.toString():t}var a=s(e,r),o={};return t.forEach(a,function(t,e){o[e]=n(t)}),t.toJson(o)}var f={},l={},p="Redirect",v="AncestorRedirect";return r.$on("$stateChangeStart",function(e,r,u,l,v){var d=i(r);if(!b&&(o(r)===p||d["default"])){var m=c(u,d.params),h=f[r.name][m]||d["default"];if(h){var g={redirect:{state:h.state,params:h.params},to:{state:r.name,params:u}},$=a.invoke(d.fn,r,{$dsr$:g});if($){$.state&&(h=$),e.preventDefault();var x=s(u,d.params);n.go(h.state,t.extend(x,h.params))}}}}),r.$on("$stateChangeSuccess",function(e,r,a,u,s){var l=o(r);if(l){var p=r.name;t.forEach(f,function(e,o){var u=i(n.get(o)),s=c(a,u.params);r.$$state().includes[o]&&(f[o][s]={state:p,params:t.copy(a)})})}}),{getRedirect:function(t,e){var r=n.get(t);o(r);var a=i(r),u=c(e,a.params),s=f[r.name][u]||a["default"];return s},reset:function(e,r){if(e){var a=n.get(e);if(!a)throw new Error("Unknown state: "+e);if(f[a.name])if(r){var o=c(r,i(a).params);delete f[a.name][o]}else f[a.name]={}}else t.forEach(f,function(t,e){f[e]={}})}}}]),t.module("ct.ui.router.extras.dsr").run(["$deepStateRedirect",function(t){}]),t.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);var E=t.module("ct.ui.router.extras.sticky");f.$inject=["$stateProvider","uirextras_coreProvider"],E.provider("$stickyState",f);var k,P,w,j,v={},R=[],F={},A={hasParamSet:!1};t.module("ct.ui.router.extras.sticky").run(["$stickyState",function(t){k=t}]),t.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(r,n,a,o,i){function u(e,r,n){function a(t,e,r){return t[e]?t[e].toUpperCase()+": "+r.self.name:"("+r.self.name+")"}var o=d(n.inactives,function(t){return t.self.name}),i=d(r.toState.path,function(t,e){return a(n.enter,e,t)}),u=d(r.fromState.path,function(t,e){return a(n.exit,e,t)}),s=r.fromState.self.name+": "+t.toJson(r.fromParams)+": -> "+r.toState.self.name+": "+t.toJson(r.toParams);e.debug("------------------------------------------------------"),e.debug(" Current transition: ",s),e.debug("Before transition, inactives are: : ",d(k.getInactiveStates(),function(t){return t.self.name})),e.debug("After transition, inactives will be: ",o),e.debug("Transition will exit: ",u),e.debug("Transition will enter: ",i)}function s(t,e,r){t.debug("Current state: "+e.self.name+", inactive states: ",d(k.getInactiveStates(),function(t){return t.self.name}));for(var n=function(t,e){return"'"+e+"' ("+t.$$state.name+")"},a=function(t,e){return"globals"!=e&&"resolve"!=e},o=function(t){var e=d(m(t.locals,a),n).join(", ");return"("+(t.self.name?t.self.name:"root")+".locals"+(e.length?": "+e:"")+")"},i=o(e),u=e.parent;u&&u!==e;)""===u.self.name&&(i=o(r.$current.path[0])+" / "+i),i=o(u)+" / "+i,e=u,u=e.parent;t.debug("Views: "+i)}var c=i,f=c.internalStates,p=c.inherit,v=(c.inheritParams,c.forEach),d=c.map,m=c.filterObj;A.hasParamSet=!!o.ParamSet,j=t.extend(new l("__inactives"),{self:{name:"__inactives"}}),P=w=e,R=[],i.onStateRegistered(function(t){t.self.sticky===!0&&a.registerStickyState(t.self)});var h;r.decorator("$state",["$delegate","$log","$q",function(r,n,i){return P=r.$current,f[""]=P,P.parent=j,j.parent=e,j.locals=p(F,j.locals),P.locals=p(j.locals,P.locals),delete j.locals.globals,h=r.transitionTo,r.transitionTo=function(e,c,p){function m(e){var r=t.extend(new l("reactivate_phase1"),{locals:e.locals});return r.self=t.extend({},e.self),r}function g(e){var r=t.extend(new l("reactivate_phase2"),e),n=r.self.onEnter;return r.resolve={},r.views={},r.self.onEnter=function(){r.locals=e.locals,k.stateReactivated(e)},J.addRestoreFunction(function(){e.self.onEnter=n}),r}function $(t){var e=new l("inactivate");e.self=t.self;var r=t.self.onExit;return e.self.onExit=function(){k.stateInactivated(t)},J.addRestoreFunction(function(){t.self.onExit=r}),e}function x(t,e){var r=t.self.onEnter;return t.self.onEnter=function(){k.stateEntering(t,e,r)},J.addRestoreFunction(function(){t.self.onEnter=r}),t}function y(t,e){var r=t.self.onEnter;return t.self.onEnter=function(){k.stateEntering(t,e,r,!0)},J.addRestoreFunction(function(){t.self.onEnter=r}),t}function S(t){var e=t.self.onExit;return t.self.onExit=function(){k.stateExiting(t,K,e)},J.addRestoreFunction(function(){t.self.onExit=e}),t}var b=a.debugMode();j.locals||(j.locals=P.locals);var E=R.length;w&&(w(),b&&n.debug("Restored paths from pending transition"));var O,T,_,q,I=r.$current,C=r.params,D=p&&p.relative||r.$current,M=r.get(e,D),N=[],K=[];c=c||{},arguments[1]=c;var z=function(){},J=function(){O&&(L.path=O,O=null),T&&(I.path=T,T=null),t.forEach(J.restoreFunctions,function(t){t()}),J=z,w=null,R.splice(E,1)};if(J.restoreFunctions=[],J.addRestoreFunction=function(t){this.restoreFunctions.push(t)},M){var L=f[M.name];if(L){O=L.path,T=I.path;var B=p&&p.reload||!1,H=B&&(B===!0?O[0].self:r.get(B,D));p&&B&&B!==!0&&delete p.reload;var U={toState:L,toParams:c||{},fromState:I,fromParams:C||{},options:p,reloadStateTree:H};if(R.push(U),w=J,H){U.toParams.$$uirouterextrasreload=Math.random();var V=H.$$state().params,W=H.$$state().ownParams;if(A.hasParamSet){var Y=new o.Param("$$uirouterextrasreload");V.$$uirouterextrasreload=W.$$uirouterextrasreload=Y,J.restoreFunctions.push(function(){delete V.$$uirouterextrasreload,delete W.$$uirouterextrasreload})}else V.push("$$uirouterextrasreload"),W.push("$$uirouterextrasreload"),J.restoreFunctions.push(function(){V.length=V.length-1,W.length=W.length-1})}_=k.processTransition(U),b&&u(n,U,_);var G=L.path.slice(0,_.keep),Q=I.path.slice(0,_.keep);t.forEach(j.locals,function(t,e){-1!=e.indexOf("@")&&delete j.locals[e]});var X=function(t){return function(e,r){-1!==r.indexOf("@")&&(t[r]=e)}};v(_.inactives,function(t){v(t.locals,X(j.locals))}),v(_.reactivatingStates,function(t){v(t.locals,X(F))}),J.addRestoreFunction(function(){v(F,function(t,e){delete F[e]})}),t.forEach(_.enter,function(t,e){var r,n=L.path[e];"reactivate"===t?(r=m(n),G.push(r),Q.push(r),N.push(g(n)),q=n):"reload"===t?(G.push(y(n)),q=n):"enter"===t&&G.push(x(n))}),t.forEach(_.exit,function(t,e){var r=I.path[e];"inactivate"===t?(Q.push($(r)),K.push(r)):"exit"===t&&(Q.push(S(r)),K.push(r))}),N.length&&t.forEach(N,function(t){G.push(t)});var Z=_.orphans;Q=Q.concat(d(Z,function(t){return S(t)})),K=K.concat(Z),I.path=Q,L.path=G;var tt=function(t){return(t.surrogateType?t.surrogateType+":":"")+t.self.name};b&&n.debug("SurrogateFromPath: ",d(Q,tt)),b&&n.debug("SurrogateToPath: ",d(G,tt))}}var et=h.apply(r,arguments);return et.then(function(t){return J(),b&&s(n,f[t.name],r),t.status="active",t},function(t){return J(),b&&"transition prevented"!==t.message&&"transition aborted"!==t.message&&"transition superseded"!==t.message&&(n.debug("transition failed",t),n.debug(t.stack)),i.reject(t)})},r}])}]),function(t,e){function r(e,r,n,a){function o(e,r){var n=t.isObject(e)?e.name:e;return r?v[n]:l[n]}function i(t,e){if(e.name){var r=e.name.split(/\./);for("."===e.name.charAt(0)&&(r[0]=t.current.name);r.length;){var n=r.join(".");if(t.get(n,{relative:t.current}))return null;if(v[n])return v[n];r.pop()}}if(e.url){var a=[];for(var o in v){var i=v[o].urlMatcher;i&&i.exec(e.url)&&a.push(v[o])}for(var u=a.slice(0),s=a.length-1;s>=0;s--)for(var c=0;c<u.length;c++)a[s]===u[c].parentFutureState&&a.splice(s,1);return a[0]}}function u(t,e){function r(){delete v[e.name]}function n(t){return"remove"===l&&r(),a.reject(t)}d=!0;var a=t.get("$q");if(!e){var o=a.defer();return o.reject("No lazyState passed in "+e),o.promise}var i=a.when([]),s=e.parentFutureState;s&&v[s.name]&&(i=u(t,v[s.name]));var c=e.type,f=p[c];if(!f)throw Error("No state factory for futureState.type: "+(e&&e.type));var l=f.$options&&f.$options.failedLazyLoadPolicy||"remove";return i.then(function(n){var a=t.invoke(f,f,{futureState:e});return a.then(function(t){return r(),t&&n.push(t),n})})["catch"](n)}function s(t,r){var n=!1,a=["$rootScope","$urlRouter","$state",function(a,o,s){function f(){n=!0,o.sync(),n=!1}if(!h)return c().then(f),void(h=!0);var l=i(s,{url:r.path()});return l?void u(t,l).then(function(t){t.forEach(function(t){t&&(!s.get(t)||t.name&&!s.get(t.name))&&e.state(t)}),d=!1,f()},function(){d=!1,f()}):t.invoke($)}];if(!d){var o=n?$:a;return t.invoke(o)}}var c,f=a,l=f.internalStates,p={},v={},d=!1,m=[],h=!1,g=this;this.addResolve=function(t){m.push(t)},this.stateFactory=function(t,e){p[t]=e},this.futureState=function(e){e.stateName&&(e.name=e.stateName),e.urlPrefix&&(e.url="^"+e.urlPrefix),v[e.name]=e;var r,a=e.name.split(/\./).slice(0,-1).join("."),i=o(e.parent||a);if(i)r=i.url||i.navigable&&i.navigable.url;else if(""===a)r=n.compile("");else{var u=o(e.parent||a,!0);if(!u)throw new Error("Couldn't determine parent state of future state. FutureState:"+t.toJson(e));var s=u.urlMatcher.source.replace(/\*rest$/,"");r=n.compile(s),e.parentFutureState=u}e.url&&(e.urlMatcher="^"===e.url.charAt(0)?n.compile(e.url.substring(1)+"*rest"):r.concat(e.url+"*rest"))},this.get=function(){return t.extend({},v)};var $=["$log","$location",function(t,e){}];r.otherwise(s),r.otherwise=function(e){if(t.isString(e)){var n=e;e=function(){return n}}else if(!t.isFunction(e))throw new Error("'rule' must be a function");return $=["$injector","$location",e],r};var x={getResolvePromise:function(){return c()}};this.$get=["$injector","$state","$q","$rootScope","$urlRouter","$timeout","$log",function(r,n,a,o,s,f,l){function p(){if(o.$on("$stateNotFound",function(t,a,o,s){if(!d){var c=i(n,{name:a.to});if(c){t.preventDefault();var f=u(r,c);f.then(function(t){t.forEach(function(t){t&&(!n.get(t)||t.name&&!n.get(t.name))&&e.state(t)}),n.go(a.to,a.toParams),d=!1},function(t){console.log("failed to lazy load state ",t),o.name&&n.go(o,s),d=!1})}}}),!c){var l=[];t.forEach(m,function(t){l.push(r.invoke(t))}),c=function(){return a.all(l)}}c().then(function p(){f(function(){n.transition?n.transition.then(p,p):s.sync()})})}return p(),x.state=e.state,x.futureState=g.futureState,x.get=g.get,x}]}var n=t.module("ct.ui.router.extras.future",["ct.ui.router.extras.core"]);r.$inject=["$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","uirextras_coreProvider"],n.provider("$futureState",r);var a={state:function(t){a.$rootScope&&a.$rootScope.$broadcast("$stateAdded",t)},itsNowRuntimeOhWhatAHappyDay:function(t){a.$rootScope=t},$rootScope:e};n.config(["$stateProvider",function(e){var r=e.state;e.state=function(){var n=r.apply(e,arguments),o=t.isObject(arguments[0])?arguments[0]:arguments[1];return a.state(o),n}}]),n.run(["$futureState",function(t,e){a.itsNowRuntimeOhWhatAHappyDay(e)}])}(t),t.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state","$q",function(t,r,n){var a=null,o=null,i={};t.$on("$transitionStart",function(t,e){function r(){o=null}function n(){a=o}var i=e.from,u=i.state&&i.state.$$state&&i.state.$$state();u&&(o=a,a=e.from,e.promise.then(r)["catch"](n))});var u={get:function(t){return t?i[t]:a},go:function(t,e){var a=u.get(t);return t&&!a?n.reject(new Error("undefined memo")):r.go(a.state,a.params,e)},memo:function(t,e,n){i[t]=a||{state:r.get(e),params:n}},forget:function(t){t?delete i[t]:a=e}};return u}]),t.module("ct.ui.router.extras.previous").run(["$previousState",function(t){}]),t.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(e){e.decorator("$state",["$delegate","$rootScope","$q","$injector",function(e,r,n,a){function o(e){var r=a.invoke,n=a.instantiate;return a.invoke=function(n,a,o){return r(n,a,t.extend({$transition$:e},o))},a.instantiate=function(r,a){return n(r,t.extend({$transition$:e},a))},function(){a.invoke=r,a.instantiate=n}}function i(){p.pop()(),l.pop(),f--}function u(t,e){return function(n){return i(),r.$broadcast("$transitionSuccess",e),t.resolve(n),n}}function s(t,e){return function(a){return i(),r.$broadcast("$transitionError",e,a),t.reject(a),n.reject(a)}}var c=e.transitionTo,f=-1,l=[],p=[];return e.transitionTo=function(t,r,a){var o=n.defer(),i=l[++f]={promise:o.promise};p[f]=function(){};var v=c.apply(e,arguments);return v.then(u(o,i),s(o,i))},r.$on("$stateChangeStart",function(e,n,a,i,u){if(!(f>=l.length)){var s=f,c=t.extend(l[s],{to:{state:n,params:a},from:{state:i,params:u}}),v=o(c);p[s]=v,r.$broadcast("$transitionStart",c)}}),e}])}]),function(){"use strict";function e(e,r,n){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg></svg>",link:function(r,a,o){function i(e){e=e.map(function(e){return""===e.name?p:t.copy(e)}),t.extend(s,e.reduce(function(t,e){return t[e.name]=e,t},{})),e.forEach(function(t){var e=t.name.split(/\./).slice(0,-1).join("."),r=t.name!=e&&s[e];r&&((r.children||(r.children=[])).push(t),t.px=r.px,t.py=r.py,v.push(t))})}function u(){function t(t){var e=t.name.split(".").pop();return t.sticky&&(e+=" (STICKY)"),t.deepStateRedirect&&(e+=" (DSR)"),e}g=g.data(l.nodes(p),function(t){return t.name}),$=$.data(l.links(v),function(t){return t.target.name}),x=x.data(d),v.forEach(function(t){t.y=70*t.depth});var e=g.enter();x.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(t){return t.parent.px||100}).attr("cy",function(t){return t.parent.py||100}),e.append("circle").attr("class","node").attr("r",9).attr("cx",function(t){return t.parent.px}).attr("cy",function(t){return t.parent.py}),e.append("text").attr("class","label").attr("x",function(t){return t.parent.px}).attr("y",function(t){return t.parent.py}).attr("text-anchor",function(t){return"middle"}).text(t).style("fill-opacity",1),$.enter().insert("path",".node").attr("class","link").attr("d",function(t){var e={x:t.source.px,y:t.source.py};return m({source:e,target:e})});var r=h.transition().duration(S);r.selectAll(".link").attr("d",m);var n={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};r.selectAll(".node").attr("cx",function(t){return t.px=t.x}).attr("cy",function(t){return t.py=t.y}).attr("r",function(t){return"active"===t.status?15:10}).style("fill",function(t){return n[t.status]||"#FFF"}),r.selectAll(".label").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15}).attr("transform",function(t){return"rotate(-25 "+t.x+" "+t.y+")"}),r.selectAll(".active").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15})}var s={},c=r.width||400,f=r.height||400,l=d3.layout.tree().size([c-20,f-20]).separation(function(t,e){return t.parent==e.parent?10:25}),p=e.get().filter(function(t){return""===t.name})[0],v=l(p);p.parent=p,p.px=p.x=c/2,p.py=p.y=f/2;var d={};d.px=d.x=p.px,d.py=d.y=p.py;var m=d3.svg.diagonal(),h=d3.select(a.find("svg")[0]).attr("width",c).attr("height",f).append("g").attr("transform","translate(10, 10)"),g=h.selectAll(".node"),$=h.selectAll(".link"),x=h.selectAll(".active"),y=200,S=200;setInterval(u,y);n(function(){r.states=e.get(),t.forEach(v,function(t){var r=e.get(t.name);r&&(t.status=r.status||"exited")})},250),r.$watchCollection("states",function(t,e){var r=(e||[]).map(function(t){return t.name});i((t||[]).filter(function(t){return-1==r.indexOf(t.name)}))}),u(y)}}}var r=t.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);r.directive("stateVis",["$state","$timeout","$interval",e])}(),t.module("ct.ui.router.extras",["ct.ui.router.extras.core","ct.ui.router.extras.dsr","ct.ui.router.extras.future","ct.ui.router.extras.previous","ct.ui.router.extras.statevis","ct.ui.router.extras.sticky","ct.ui.router.extras.transition"])});
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: core
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -6,0 +6,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: core http://christopherthielen.github.io/ui-router-extras/ - MIT License */
/** UI-Router Extras v.0.1.0 Module: core http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(r,n){"use strict";function t(r,n){var t=[];for(var e in r.path){if(r.path[e]!==n.path[e])break;t.push(r.path[e])}return t}function e(n){if(Object.keys)return Object.keys(n);var t=[];return r.forEach(n,function(r,n){t.push(n)}),t}function u(r,n){var t=[];for(var e in r)n&&-1!==n.indexOf(e)||t.push(e);return t}function a(r,n){if(Array.prototype.indexOf)return r.indexOf(n,Number(arguments[2])||0);var t=r.length>>>0,e=Number(arguments[2])||0;for(e=0>e?Math.ceil(e):Math.floor(e),0>e&&(e+=t);t>e;e++)if(e in r&&r[e]===n)return e;return-1}function i(r,n,u,i){var o,f=t(u,i),c={},s=[];for(var h in f)if(f[h].params&&(o=m(f[h].params)?f[h].params:e(f[h].params),o.length))for(var p in o)a(s,o[p])>=0||(s.push(o[p]),c[o[p]]=r[o[p]]);return v({},c,n)}function o(r,n){return v(new(v(function(){},{prototype:r})),n)}function f(r){h.push(r)}var c=r.module("ct.ui.router.extras.core",["ui.router"]),s={},h=[];c.config(["$stateProvider","$injector",function(n,t){n.decorator("parent",function(n,t){return s[n.self.name]=n,n.self.$$state=function(){return s[n.self.name]},r.forEach(h,function(r){r(n)}),t(n)})}]);var p=r.forEach,v=r.extend,m=r.isArray,l=function(r,n){var t=[];return p(r,function(r,e){t.push(n(r,e))}),t},d=function(r){return l(r,function(r,n){return n})},y=function(r,n){var t=[];return p(r,function(r,e){n(r,e)&&t.push(r)}),t},g=function(r,n){var t={};return p(r,function(r,e){n(r,e)&&(t[e]=r)}),t};c.provider("uirextras_core",function(){var n={internalStates:s,onStateRegistered:f,forEach:p,extend:v,isArray:m,map:l,keys:d,filter:y,filterObj:g,ancestors:t,objectKeys:e,protoKeys:u,arraySearch:a,inheritParams:i,inherit:o};r.extend(this,n),this.$get=function(){return n}})}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: dsr
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -6,0 +6,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: dsr http://christopherthielen.github.io/ui-router-extras/ - MIT License */
/** UI-Router Extras v.0.1.0 Module: dsr http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";function r(){n=e}var n;t.module("ct.ui.router.extras.dsr",["ct.ui.router.extras.core"]).config(["$provide",function(t){var e;t.decorator("$state",["$delegate","$q",function(t,a){return e=t.transitionTo,t.transitionTo=function(o,i,u){return u.ignoreDsr&&(n=u.ignoreDsr),e.apply(t,arguments).then(function(t){return r(),t},function(t){return r(),a.reject(t)})},t}])}]),t.module("ct.ui.router.extras.dsr").service("$deepStateRedirect",["$rootScope","$state","$injector",function(r,a,o){function i(t){var e=t.name;return v.hasOwnProperty(e)?v[e]:void s(e)}function u(e){var r=e.deepStateRedirect||e.dsr;if(!r)return{dsr:!1};var n={dsr:!0};return t.isFunction(r)?n.fn=r:t.isObject(r)&&(n=t.extend(n,r)),t.isString(n["default"])&&(n["default"]={state:n["default"]}),n.fn||(n.fn=["$dsr$",function(t){return t.redirect.state!=t.to.state}]),n}function s(t){var r=a.get(t);if(!r)return!1;var n=u(r);n.dsr&&(v[r.name]=m,d[t]===e&&(d[t]={}));var o=r.$$state&&r.$$state().parent;if(o){var i=s(o.self.name);i&&v[r.name]===e&&(v[r.name]=$)}return v[r.name]||!1}function c(r,n){n===!0&&(n=Object.keys(r)),(null===n||n===e)&&(n=[]);var a={};return t.forEach(n.sort(),function(t){a[t]=r[t]}),a}function f(e,r){function n(t){return t?t.toString():t}var a=c(e,r),o={};return t.forEach(a,function(t,e){o[e]=n(t)}),t.toJson(o)}var d={},v={},m="Redirect",$="AncestorRedirect";return r.$on("$stateChangeStart",function(e,r,s,v,$){var p=u(r);if(!n&&(i(r)===m||p["default"])){var l=f(s,p.params),g=d[r.name][l]||p["default"];if(g){var h={redirect:{state:g.state,params:g.params},to:{state:r.name,params:s}},S=o.invoke(p.fn,r,{$dsr$:h});if(S){S.state&&(g=S),e.preventDefault();var x=c(s,p.params);a.go(g.state,t.extend(x,g.params))}}}}),r.$on("$stateChangeSuccess",function(e,r,n,o,s){var c=i(r);if(c){var v=r.name;t.forEach(d,function(e,o){var i=u(a.get(o)),s=f(n,i.params);r.$$state().includes[o]&&(d[o][s]={state:v,params:t.copy(n)})})}}),{getRedirect:function(t,e){var r=a.get(t);i(r);var n=u(r),o=f(e,n.params),s=d[r.name][o]||n["default"];return s},reset:function(e,r){if(e){var n=a.get(e);if(!n)throw new Error("Unknown state: "+e);if(d[n.name])if(r){var o=f(r,u(n).params);delete d[n.name][o]}else d[n.name]={}}else t.forEach(d,function(t,e){d[e]={}})}}}]),t.module("ct.ui.router.extras.dsr").run(["$deepStateRedirect",function(t){}])}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: future
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -6,0 +6,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: future http://christopherthielen.github.io/ui-router-extras/ - MIT License */
/** UI-Router Extras v.0.1.0 Module: future http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";!function(t,e){function r(e,r,n,o){function a(e,r){var n=t.isObject(e)?e.name:e;return r?h[n]:l[n]}function u(t,e){if(e.name){var r=e.name.split(/\./);for("."===e.name.charAt(0)&&(r[0]=t.current.name);r.length;){var n=r.join(".");if(t.get(n,{relative:t.current}))return null;if(h[n])return h[n];r.pop()}}if(e.url){var o=[];for(var a in h){var u=h[a].urlMatcher;u&&u.exec(e.url)&&o.push(h[a])}for(var i=o.slice(0),c=o.length-1;c>=0;c--)for(var f=0;f<i.length;f++)o[c]===i[f].parentFutureState&&o.splice(c,1);return o[0]}}function i(t,e){function r(){delete h[e.name]}function n(t){return"remove"===l&&r(),o.reject(t)}p=!0;var o=t.get("$q");if(!e){var a=o.defer();return a.reject("No lazyState passed in "+e),a.promise}var u=o.when([]),c=e.parentFutureState;c&&h[c.name]&&(u=i(t,h[c.name]));var f=e.type,s=v[f];if(!s)throw Error("No state factory for futureState.type: "+(e&&e.type));var l=s.$options&&s.$options.failedLazyLoadPolicy||"remove";return u.then(function(n){var o=t.invoke(s,s,{futureState:e});return o.then(function(t){return r(),t&&n.push(t),n})})["catch"](n)}function c(t,r){var n=!1,o=["$rootScope","$urlRouter","$state",function(o,a,c){function s(){n=!0,a.sync(),n=!1}if(!$)return f().then(s),void($=!0);var l=u(c,{url:r.path()});return l?void i(t,l).then(function(t){t.forEach(function(t){t&&(!c.get(t)||t.name&&!c.get(t.name))&&e.state(t)}),p=!1,s()},function(){p=!1,s()}):t.invoke(d)}];if(!p){var a=n?d:o;return t.invoke(a)}}var f,s=o,l=s.internalStates,v={},h={},p=!1,m=[],$=!1,g=this;this.addResolve=function(t){m.push(t)},this.stateFactory=function(t,e){v[t]=e},this.futureState=function(e){e.stateName&&(e.name=e.stateName),e.urlPrefix&&(e.url="^"+e.urlPrefix),h[e.name]=e;var r,o=e.name.split(/\./).slice(0,-1).join("."),u=a(e.parent||o);if(u)r=u.url||u.navigable&&u.navigable.url;else if(""===o)r=n.compile("");else{var i=a(e.parent||o,!0);if(!i)throw new Error("Couldn't determine parent state of future state. FutureState:"+t.toJson(e));var c=i.urlMatcher.source.replace(/\*rest$/,"");r=n.compile(c),e.parentFutureState=i}e.url&&(e.urlMatcher="^"===e.url.charAt(0)?n.compile(e.url.substring(1)+"*rest"):r.concat(e.url+"*rest"))},this.get=function(){return t.extend({},h)};var d=["$log","$location",function(t,e){}];r.otherwise(c),r.otherwise=function(e){if(t.isString(e)){var n=e;e=function(){return n}}else if(!t.isFunction(e))throw new Error("'rule' must be a function");return d=["$injector","$location",e],r};var S={getResolvePromise:function(){return f()}};this.$get=["$injector","$state","$q","$rootScope","$urlRouter","$timeout","$log",function(r,n,o,a,c,s,l){function v(){if(a.$on("$stateNotFound",function(t,o,a,c){if(!p){var f=u(n,{name:o.to});if(f){t.preventDefault();var s=i(r,f);s.then(function(t){t.forEach(function(t){t&&(!n.get(t)||t.name&&!n.get(t.name))&&e.state(t)}),n.go(o.to,o.toParams),p=!1},function(t){console.log("failed to lazy load state ",t),a.name&&n.go(a,c),p=!1})}}}),!f){var l=[];t.forEach(m,function(t){l.push(r.invoke(t))}),f=function(){return o.all(l)}}f().then(function v(){s(function(){n.transition?n.transition.then(v,v):c.sync()})})}return v(),S.state=e.state,S.futureState=g.futureState,S.get=g.get,S}]}var n=t.module("ct.ui.router.extras.future",["ct.ui.router.extras.core"]);r.$inject=["$stateProvider","$urlRouterProvider","$urlMatcherFactoryProvider","uirextras_coreProvider"],n.provider("$futureState",r);var o={state:function(t){o.$rootScope&&o.$rootScope.$broadcast("$stateAdded",t)},itsNowRuntimeOhWhatAHappyDay:function(t){o.$rootScope=t},$rootScope:e};n.config(["$stateProvider",function(e){var r=e.state;e.state=function(){var n=r.apply(e,arguments),a=t.isObject(arguments[0])?arguments[0]:arguments[1];return o.state(a),n}}]),n.run(["$futureState",function(t,e){o.itsNowRuntimeOhWhatAHappyDay(e)}])}(t)}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: previous
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -11,4 +11,4 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

angular.module('ct.ui.router.extras.previous', [ 'ct.ui.router.extras.core', 'ct.ui.router.extras.transition' ]).service("$previousState",
[ '$rootScope', '$state',
function ($rootScope, $state) {
[ '$rootScope', '$state', '$q',
function ($rootScope, $state, $q) {
var previous = null, lastPrevious = null, memos = {};

@@ -37,2 +37,5 @@

var to = $previousState.get(memoName);
if (memoName && !to) {
return $q.reject(new Error('undefined memo'));
}
return $state.go(to.state, to.params, options);

@@ -39,0 +42,0 @@ },

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: previous http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";t.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state",function(t,r){var n=null,o=null,u={};t.$on("$transitionStart",function(t,e){function r(){o=null}function u(){n=o}var a=e.from,i=a.state&&a.state.$$state&&a.state.$$state();i&&(o=n,n=e.from,e.promise.then(r)["catch"](u))});var a={get:function(t){return t?u[t]:n},go:function(t,e){var n=a.get(t);return r.go(n.state,n.params,e)},memo:function(t,e,o){u[t]=n||{state:r.get(e),params:o}},forget:function(t){t?delete u[t]:n=e}};return a}]),t.module("ct.ui.router.extras.previous").run(["$previousState",function(t){}])}(angular);
/** UI-Router Extras v.0.1.0 Module: previous http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";t.module("ct.ui.router.extras.previous",["ct.ui.router.extras.core","ct.ui.router.extras.transition"]).service("$previousState",["$rootScope","$state","$q",function(t,r,n){var o=null,u=null,a={};t.$on("$transitionStart",function(t,e){function r(){u=null}function n(){o=u}var a=e.from,i=a.state&&a.state.$$state&&a.state.$$state();i&&(u=o,o=e.from,e.promise.then(r)["catch"](n))});var i={get:function(t){return t?a[t]:o},go:function(t,e){var o=i.get(t);return t&&!o?n.reject(new Error("undefined memo")):r.go(o.state,o.params,e)},memo:function(t,e,n){a[t]=o||{state:r.get(e),params:n}},forget:function(t){t?delete a[t]:o=e}};return i}]),t.module("ct.ui.router.extras.previous").run(["$previousState",function(t){}])}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: statevis
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -6,0 +6,0 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: statevis http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";!function(){function e(e,n,r){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg></svg>",link:function(n,a,i){function c(e){e=e.map(function(e){return""===e.name?f:t.copy(e)}),t.extend(o,e.reduce(function(t,e){return t[e.name]=e,t},{})),e.forEach(function(t){var e=t.name.split(/\./).slice(0,-1).join("."),n=t.name!=e&&o[e];n&&((n.children||(n.children=[])).push(t),t.px=n.px,t.py=n.py,d.push(t))})}function u(){function t(t){var e=t.name.split(".").pop();return t.sticky&&(e+=" (STICKY)"),t.deepStateRedirect&&(e+=" (DSR)"),e}h=h.data(p.nodes(f),function(t){return t.name}),m=m.data(p.links(d),function(t){return t.target.name}),g=g.data(x),d.forEach(function(t){t.y=70*t.depth});var e=h.enter();g.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(t){return t.parent.px||100}).attr("cy",function(t){return t.parent.py||100}),e.append("circle").attr("class","node").attr("r",9).attr("cx",function(t){return t.parent.px}).attr("cy",function(t){return t.parent.py}),e.append("text").attr("class","label").attr("x",function(t){return t.parent.px}).attr("y",function(t){return t.parent.py}).attr("text-anchor",function(t){return"middle"}).text(t).style("fill-opacity",1),m.enter().insert("path",".node").attr("class","link").attr("d",function(t){var e={x:t.source.px,y:t.source.py};return y({source:e,target:e})});var n=v.transition().duration(k);n.selectAll(".link").attr("d",y);var r={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};n.selectAll(".node").attr("cx",function(t){return t.px=t.x}).attr("cy",function(t){return t.py=t.y}).attr("r",function(t){return"active"===t.status?15:10}).style("fill",function(t){return r[t.status]||"#FFF"}),n.selectAll(".label").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15}).attr("transform",function(t){return"rotate(-25 "+t.x+" "+t.y+")"}),n.selectAll(".active").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15})}var o={},s=n.width||400,l=n.height||400,p=d3.layout.tree().size([s-20,l-20]).separation(function(t,e){return t.parent==e.parent?10:25}),f=e.get().filter(function(t){return""===t.name})[0],d=p(f);f.parent=f,f.px=f.x=s/2,f.py=f.y=l/2;var x={};x.px=x.x=f.px,x.py=x.y=f.py;{var y=d3.svg.diagonal(),v=d3.select(a.find("svg")[0]).attr("width",s).attr("height",l).append("g").attr("transform","translate(10, 10)"),h=v.selectAll(".node"),m=v.selectAll(".link"),g=v.selectAll(".active"),A=200,k=200;setInterval(u,A)}r(function(){n.states=e.get(),t.forEach(d,function(t){var n=e.get(t.name);n&&(t.status=n.status||"exited")})},250),n.$watchCollection("states",function(t,e){var n=(e||[]).map(function(t){return t.name});c((t||[]).filter(function(t){return-1==n.indexOf(t.name)}))}),u(A)}}}var n=t.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);n.directive("stateVis",["$state","$timeout","$interval",e])}()}(angular);
/** UI-Router Extras v.0.1.0 Module: statevis http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,e){"use strict";!function(){function e(e,n,r){return{scope:{width:"@",height:"@"},restrict:"AE",template:"<svg></svg>",link:function(n,a,i){function c(e){e=e.map(function(e){return""===e.name?f:t.copy(e)}),t.extend(o,e.reduce(function(t,e){return t[e.name]=e,t},{})),e.forEach(function(t){var e=t.name.split(/\./).slice(0,-1).join("."),n=t.name!=e&&o[e];n&&((n.children||(n.children=[])).push(t),t.px=n.px,t.py=n.py,d.push(t))})}function u(){function t(t){var e=t.name.split(".").pop();return t.sticky&&(e+=" (STICKY)"),t.deepStateRedirect&&(e+=" (DSR)"),e}h=h.data(p.nodes(f),function(t){return t.name}),m=m.data(p.links(d),function(t){return t.target.name}),g=g.data(x),d.forEach(function(t){t.y=70*t.depth});var e=h.enter();g.enter().append("circle").attr("class","active").attr("r",13).attr("cx",function(t){return t.parent.px||100}).attr("cy",function(t){return t.parent.py||100}),e.append("circle").attr("class","node").attr("r",9).attr("cx",function(t){return t.parent.px}).attr("cy",function(t){return t.parent.py}),e.append("text").attr("class","label").attr("x",function(t){return t.parent.px}).attr("y",function(t){return t.parent.py}).attr("text-anchor",function(t){return"middle"}).text(t).style("fill-opacity",1),m.enter().insert("path",".node").attr("class","link").attr("d",function(t){var e={x:t.source.px,y:t.source.py};return y({source:e,target:e})});var n=v.transition().duration(k);n.selectAll(".link").attr("d",y);var r={entered:"#AF0",exited:"#777",active:"#0f0",inactive:"#55F",future:"#009"};n.selectAll(".node").attr("cx",function(t){return t.px=t.x}).attr("cy",function(t){return t.py=t.y}).attr("r",function(t){return"active"===t.status?15:10}).style("fill",function(t){return r[t.status]||"#FFF"}),n.selectAll(".label").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15}).attr("transform",function(t){return"rotate(-25 "+t.x+" "+t.y+")"}),n.selectAll(".active").attr("x",function(t){return t.px=t.x}).attr("y",function(t){return t.py=t.y-15})}var o={},s=n.width||400,l=n.height||400,p=d3.layout.tree().size([s-20,l-20]).separation(function(t,e){return t.parent==e.parent?10:25}),f=e.get().filter(function(t){return""===t.name})[0],d=p(f);f.parent=f,f.px=f.x=s/2,f.py=f.y=l/2;var x={};x.px=x.x=f.px,x.py=x.y=f.py;var y=d3.svg.diagonal(),v=d3.select(a.find("svg")[0]).attr("width",s).attr("height",l).append("g").attr("transform","translate(10, 10)"),h=v.selectAll(".node"),m=v.selectAll(".link"),g=v.selectAll(".active"),A=200,k=200;setInterval(u,A);r(function(){n.states=e.get(),t.forEach(d,function(t){var n=e.get(t.name);n&&(t.status=n.status||"exited")})},250),n.$watchCollection("states",function(t,e){var n=(e||[]).map(function(t){return t.name});c((t||[]).filter(function(t){return-1==n.indexOf(t.name)}))}),u(A)}}}var n=t.module("ct.ui.router.extras.statevis",["ct.ui.router.extras.core","ct.ui.router.extras.sticky"]);n.directive("stateVis",["$state","$timeout","$interval",e])}()}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: sticky
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -90,27 +90,16 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

// Used by processTransition to determine if what kind of sticky state transition this is.
// returns { from: (bool), to: (bool) }
function getStickyTransitionType(fromPath, toPath, keep) {
if (fromPath[keep] === toPath[keep]) return { from: false, to: false };
var stickyFromState = keep < fromPath.length && fromPath[keep].self.sticky;
var stickyToState = keep < toPath.length && toPath[keep].self.sticky;
return { from: stickyFromState, to: stickyToState };
}
// Returns a sticky transition type necessary to enter the state.
// Transition can be: reactivate, updateStateParams, or enter
// Transition can be: reactivate, reload, or enter
// Note: if a state is being reactivated but params dont match, we treat
// it as a Exit/Enter, thus the special "updateStateParams" transition.
// If a parent inactivated state has "updateStateParams" transition type, then
// it as a Exit/Enter, thus the special "reload" transition.
// If a parent inactivated state has "reload" transition type, then
// all descendant states must also be exit/entered, thus the first line of this function.
function getEnterTransition(state, stateParams, reloadStateTree, ancestorParamsChanged) {
if (ancestorParamsChanged) return "updateStateParams";
function getEnterTransition(state, stateParams, reloadStateTree, ancestorReloaded) {
if (ancestorReloaded) return "reload";
var inactiveState = inactiveStates[state.self.name];
if (!inactiveState) return "enter";
if (state.self === reloadStateTree) return "updateStateParams";
// if (inactiveState.locals == null || inactiveState.locals.globals == null) debugger;
var paramsMatch = equalForKeys(stateParams, inactiveState.locals.globals.$stateParams, state.ownParams);
// if (DEBUG) $log.debug("getEnterTransition: " + state.name + (paramsMatch ? ": reactivate" : ": updateStateParams"));
return paramsMatch ? "reactivate" : "updateStateParams";
if (state.self === reloadStateTree) return "reload";
var paramsMatch = paramsEqualForState(state.ownParams, stateParams, inactiveState.locals.globals.$stateParams);
return paramsMatch ? "reactivate" : "reload";
}

@@ -123,6 +112,12 @@

if (!stateParams) return inactiveState;
var paramsMatch = equalForKeys(stateParams, inactiveState.locals.globals.$stateParams, state.ownParams);
var paramsMatch = paramsEqualForState(state.ownParams, stateParams, inactiveState.locals.globals.$stateParams);
return paramsMatch ? inactiveState : null;
}
function paramsEqualForState(ownParams, stateParams, stateParams2) {
if (typeof ownParams.$$equals === 'function')
return ownParams.$$equals(stateParams, stateParams2);
return equalForKeys(stateParams, stateParams2, ownParams);
}
// Duplicates logic in $state.transitionTo, primarily to find the pivot state (i.e., the "keep" value)

@@ -145,9 +140,29 @@ function equalForKeys(a, b, keys) {

function calcTreeChanges(transition) {
var fromPath = transition.fromState.path;
var toPath = transition.toState.path;
var toParams = transition.toParams;
var keep = 0, state = toPath[keep];
if (transition.options.inherit) {
toParams = inheritParams($stateParams, toParams || {}, $state.$current, transition.toState);
}
while (state && state === fromPath[keep] && paramsEqualForState(state.ownParams, toParams, transition.fromParams)) {
// We're "keeping" this state. bump keep var and get the next state in toPath for the next iteration.
state = toPath[++keep];
}
return {
keep: keep,
retained: fromPath.slice(0, keep),
exiting: fromPath.slice(keep),
entering: toPath.slice(keep)
};
}
var stickySupport = {
getInactiveStates: function () {
var states = [];
angular.forEach(inactiveStates, function (state) {
states.push(state);
});
return states;
return map(inactiveStates, angular.identity);
},

@@ -163,90 +178,103 @@ getInactiveStatesByParent: function () {

// reactivatingStates: Array of all states which will be reactivated if the transition is completed.
// deepestReactivateChildren: Array of inactive children states of the toState, if the toState is being reactivated.
// orphans: Array of previously inactive states, which are being orphaned by the transition
// Note: Transitioning directly to an inactive state with inactive children will reactivate the state, but exit all the inactive children.
// enter: Enter transition type for all added states. This is a sticky array to "toStates" array in $state.transitionTo.
// exit: Exit transition type for all removed states. This is a sticky array to "fromStates" array in $state.transitionTo.
// enter: Enter transition type for all added states. This is a parallel array to "toStates" array in $state.transitionTo.
// exit: Exit transition type for all removed states. This is a parallel array to "fromStates" array in $state.transitionTo.
// }
processTransition: function (transition) {
// This object is returned
var result = { inactives: [], enter: [], exit: [], keep: 0 };
var fromPath = transition.fromState.path,
fromParams = transition.fromParams,
toPath = transition.toState.path,
toParams = transition.toParams,
reloadStateTree = transition.reloadStateTree,
options = transition.options;
var keep = 0, state = toPath[keep];
var treeChanges = calcTreeChanges(transition);
var currentInactives = map(inactiveStates, angular.identity);
var futureInactives, exitingTypes, enteringTypes;
var keep = treeChanges.keep;
if (options.inherit) {
toParams = inheritParams($stateParams, toParams || {}, $state.$current, transition.toState);
}
while (state && state === fromPath[keep] && equalForKeys(toParams, fromParams, state.ownParams)) {
// We're "keeping" this state. bump keep var and get the next state in toPath for the next iteration.
state = toPath[++keep];
}
/////////////////////////////////////////
// helper functions
function notIn(array) { return function (elem) { return array.indexOf(elem) === -1; }; }
function flattenReduce(memo, list) { return memo.concat(list); }
function uniqReduce(memo, orphan) { if (notIn(memo)(orphan)) memo.push(orphan); return memo; }
function prop(attr) { return function(obj) { return obj[attr]; } }
function typeIs(type) { return function(obj) { return obj.type === type; } }
function isChildOf(state) { return function(other) { return other.parent === state; }; }
var notEntering = notIn(treeChanges.entering);
function notSticky(state) { return !state.sticky; }
////////////////////////////////////
result.keep = keep;
var idx, deepestUpdatedParams, deepestReactivate, noLongerInactiveStates = {}, pType = getStickyTransitionType(fromPath, toPath, keep);
var ancestorUpdated = !!options.reload; // When ancestor params change, treat reactivation as exit/enter
// Calculate the "exit" transition types for states being exited in fromPath
// Exit types will be either "inactivate" or "exit"
// Two things must be satisfied in order to inactivate the "exiting" states (instead of exit them):
// - The first element of the exiting path must be sticky
// - We must be entering any sibling state of the sticky (we can check this using entering.length)
var shouldInactivate = treeChanges.exiting[0] && treeChanges.exiting[0].sticky && treeChanges.entering.length > 0;
exitingTypes = treeChanges.exiting.map(function (state) {
var type = shouldInactivate ? "inactivate" : "exit";
return { type: type, state: state };
});
var inactives = [], reactivatingStates = [], enteringStates = [], exitingStates = [];
// Calculate the "exit" transition for states not "kept", in fromPath.
// Exit transition can be one of:
// exit: standard state exit logic
// inactivate: register state as an inactive state
for (idx = keep; idx < fromPath.length; idx++) {
if (pType.from) {
// State is being inactivated, note this in result.inactives array
result.inactives.push(fromPath[idx]);
inactives.push(fromPath[idx]);
result.exit[idx] = "inactivate";
} else {
exitingStates.push(fromPath[idx]);
result.exit[idx] = "exit";
}
}
// Calculate the "enter" transitions for new states in toPath
// Enter transitions will be either "enter", "reactivate", or "updateStateParams" where
// Calculate the "enter" transition types for states being entered in toPath
// Enter types will be either "enter", "reactivate", or "reload" where:
// enter: full resolve, no special logic
// reactivate: use previous locals
// updateStateParams: like 'enter', except exit the inactive state before entering it.
for (idx = keep; idx < toPath.length; idx++) {
var enterTrans = !pType.to ? "enter" : getEnterTransition(toPath[idx], toParams, reloadStateTree, ancestorUpdated);
ancestorUpdated = (ancestorUpdated || enterTrans == 'updateStateParams');
result.enter[idx] = enterTrans;
// If we're reactivating a state, make a note of it, so we can remove that state from the "inactive" list
if (enterTrans == 'reactivate') {
reactivatingStates.push(toPath[idx]);
deepestReactivate = noLongerInactiveStates[toPath[idx].name] = toPath[idx];
} else if (enterTrans == 'updateStateParams') {
deepestUpdatedParams = noLongerInactiveStates[toPath[idx].name] = toPath[idx];
}
enteringStates.push(toPath[idx]);
}
// reload: like 'enter', except exit the inactive state before entering it.
var reloaded = !!transition.options.reload;
enteringTypes = treeChanges.entering.map(function(state) {
var type = getEnterTransition(state, transition.toParams, transition.reloadStateTree, reloaded);
reloaded = reloaded || type === 'reload';
return { type: type, state: state };
});
// Get the currently inactive states (before the transition is processed), mapped by parent state
var inactivesByAllParents = mapInactivesByImmediateParent();
// If we are transitioning directly to an inactive state, and that state also has inactive children,
// then find those children so that they can be exited.
var deepestReactivateChildren = [];
if (deepestReactivate === transition.toState) {
deepestReactivateChildren = inactivesByAllParents[deepestReactivate.name] || [];
}
// Add them to the list of states being exited.
exitingStates = exitingStates.concat(deepestReactivateChildren);
// Find all the "orphaned" states. those states that are :
// - are siblings of the entering states
// - previously inactive
// - are not being reactivated (entered)
// - are not sticky
// unioned with:
// - children of the toState
// - previously inactive
//
// Given:
// - states A (sticky: true), B, A.foo, A.bar
// - A.foo is currently inactive
// - B is currently active
// Orphan case 1)
// - Transition to A.bar orphans the inactive state A.foo; it should be exited
// Orphan case 2)
// - Transition directly to A orphans the inactive state A.foo; it should be exited
//
// Given:
// - states A (sticky: true), B, A.foo (sticky), A.bar
// - A.foo is currently inactive
// - B is currently active
// Orphan case 3)
// - Transition directly to A orphans the inactive sticky state A.foo; it should be exited
// Note: transition from B to A.bar does not orphan A.foo
// Note 2: each orphaned state might be the parent of a larger inactive subtree.
var orphanedRoots = treeChanges.entering
// For each entering state in the path, find all sibling states which are currently inactive
.map(function (entering) { return currentInactives.filter(isChildOf(entering.parent)); })
// Flatten nested arrays. Now we have an array of inactive states that are children of the ones being entered.
.reduce(flattenReduce, [])
// Consider "orphaned": only those children that are themselves not currently being entered
.filter(notEntering)
// Consider "orphaned": only those children that are not themselves sticky states.
.filter(notSticky)
// Finally, union that set with any inactive children of the "to state"
.concat(currentInactives.filter(isChildOf(transition.toState)));
// Find any other inactive children of any of the states being "exited"
var exitingChildren = map(exitingStates, function (state) {
return inactivesByAllParents[state.name] || [];
});
var currentInactivesByParent = mapInactivesByImmediateParent();
var allOrphans = orphanedRoots
.map(function(root) { return currentInactivesByParent[root.name] })
.filter(angular.isDefined)
.reduce(flattenReduce, [])
.concat(orphanedRoots)
// Sort by depth to exit orphans in proper order
.sort(function (a,b) { return a.name.split(".").length - b.name.split(".").length; });
// append each array of children-of-exiting states to "exitingStates" because they will be exited too.
forEach(exitingChildren, function(children) {
exitingStates = exitingStates.concat(children);
});
// Add them to the list of states being exited.
var exitOrOrphaned = exitingTypes
.filter(typeIs("exit"))
.map(prop("state"))
.concat(allOrphans);

@@ -256,13 +284,15 @@ // Now calculate the states that will be inactive if this transition succeeds.

// Second, add all the existing inactive states
inactives = inactives.concat(map(inactiveStates, angular.identity));
// Finally, remove any states that are scheduled for "exit" or "enter", "reactivate", or "updateStateParams"
inactives = inactives.filter(function(state) {
return exitingStates.indexOf(state) === -1 && enteringStates.indexOf(state) === -1;
});
futureInactives = currentInactives
.filter(notIn(exitOrOrphaned))
.filter(notIn(treeChanges.entering))
.concat(exitingTypes.filter(typeIs("inactivate")).map(prop("state")));
result.inactives = inactives;
result.reactivatingStates = reactivatingStates;
result.deepestReactivateChildren = deepestReactivateChildren;
return result;
return {
keep: keep,
enter: new Array(keep).concat(enteringTypes.map(prop("type"))),
exit: new Array(keep).concat(exitingTypes.map(prop("type"))),
inactives: futureInactives,
reactivatingStates: enteringTypes.filter(typeIs("reactivate")).map(prop("state")),
orphans: allOrphans
};
},

@@ -761,3 +791,3 @@

terminalReactivatedState = enteringState;
} else if (value === "updateStateParams") {
} else if (value === "reload") {
// If the state params have been changed, we need to exit any inactive states and re-enter them.

@@ -795,8 +825,8 @@ surrogateToPath.push(stateUpdateParamsSurrogate(enteringState));

// exit all of that state's inactivated children.
var inactiveOrphans = stickyTransitions.deepestReactivateChildren;
var orphans = stickyTransitions.orphans;
// Add surrogate exited states for all orphaned descendants of the Deepest Reactivated State
surrogateFromPath = surrogateFromPath.concat(map(stickyTransitions.deepestReactivateChildren, function (exiting) {
surrogateFromPath = surrogateFromPath.concat(map(orphans, function (exiting) {
return stateExitedSurrogate(exiting);
}));
exited = exited.concat(inactiveOrphans);
exited = exited.concat(orphans);

@@ -865,2 +895,3 @@ // Replace the .path variables. toState.path and fromState.path are now ready for a sticky transition.

$log.debug("------------------------------------------------------");
$log.debug(" Current transition: ", transitionMessage);

@@ -867,0 +898,0 @@ $log.debug("Before transition, inactives are: : ", map(_StickyState.getInactiveStates(), function (s) {

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: sticky http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(e,t){"use strict";function n(t,n){var a=n,r=a.inheritParams,s=(a.objectKeys,a.protoKeys),o=a.forEach,i=a.map,l={},c={},f=!1;this.registerStickyState=function(e){c[e.name]=e},this.enableDebug=this.debugMode=function(t){return e.isDefined(t)&&(f=t),f},this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(t,n,a,c,v){function d(){var t={};return e.forEach(l,function(e,n){for(var a=m(e),r=0;r<a.length;r++){var s=a[r].parent;t[s.name]=t[s.name]||[],t[s.name].push(e)}t[""]&&(t.__inactives=t[""])}),t}function h(){var e={};return o(l,function(t){o(t.path,function(n){n!==t&&(e[n.name]=e[n.name]||[],e[n.name].push(t))})}),e}function m(e){var t=[];if(!e)return t;do e.sticky&&t.push(e),e=e.parent;while(e);return t.reverse(),t}function p(e,t,n){if(e[n]===t[n])return{from:!1,to:!1};var a=n<e.length&&e[n].self.sticky,r=n<t.length&&t[n].self.sticky;return{from:a,to:r}}function g(e,t,n,a){if(a)return"updateStateParams";var r=l[e.self.name];if(!r)return"enter";if(e.self===n)return"updateStateParams";var s=x(t,r.locals.globals.$stateParams,e.ownParams);return s?"reactivate":"updateStateParams"}function $(e,t){var n=l[e.name];if(!n)return null;if(!t)return n;var a=x(t,n.locals.globals.$stateParams,e.ownParams);return a?n:null}function x(t,n,a){if(!e.isArray(a)&&e.isObject(a)&&(a=s(a,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!a){a=[];for(var r in t)a.push(r)}for(var o=0;o<a.length;o++){var i=a[o];if(t[i]!=n[i])return!1}return!0}var S={getInactiveStates:function(){var t=[];return e.forEach(l,function(e){t.push(e)}),t},getInactiveStatesByParent:function(){return d()},processTransition:function(t){var s={inactives:[],enter:[],exit:[],keep:0},u=t.fromState.path,c=t.fromParams,f=t.toState.path,v=t.toParams,d=t.reloadStateTree,m=t.options,$=0,S=f[$];for(m.inherit&&(v=r(a,v||{},n.$current,t.toState));S&&S===u[$]&&x(v,c,S.ownParams);)S=f[++$];s.keep=$;var E,P,b,k={},y=p(u,f,$),w=!!m.reload,R=[],F=[],T=[],_=[];for(E=$;E<u.length;E++)y.from?(s.inactives.push(u[E]),R.push(u[E]),s.exit[E]="inactivate"):(_.push(u[E]),s.exit[E]="exit");for(E=$;E<f.length;E++){var I=y.to?g(f[E],v,d,w):"enter";w=w||"updateStateParams"==I,s.enter[E]=I,"reactivate"==I?(F.push(f[E]),b=k[f[E].name]=f[E]):"updateStateParams"==I&&(P=k[f[E].name]=f[E]),T.push(f[E])}var j=h(),C=[];b===t.toState&&(C=j[b.name]||[]),_=_.concat(C);var O=i(_,function(e){return j[e.name]||[]});return o(O,function(e){_=_.concat(e)}),R=R.concat(i(l,e.identity)),R=R.filter(function(e){return-1===_.indexOf(e)&&-1===T.indexOf(e)}),s.inactives=R,s.reactivatingStates=F,s.deepestReactivateChildren=C,s},stateInactivated:function(e){l[e.self.name]=e,e.self.status="inactive",e.self.onInactivate&&c.invoke(e.self.onInactivate,e.self,e.locals.globals)},stateReactivated:function(e){l[e.self.name]&&delete l[e.self.name],e.self.status="entered",e.self.onReactivate&&c.invoke(e.self.onReactivate,e.self,e.locals.globals)},stateExiting:function(t,n,a){var r={};e.forEach(n,function(e){r[e.self.name]=!0}),e.forEach(l,function(n,a){!r[a]&&n.includes[t.name]&&(f&&v.debug("Exiting "+a+" because it's a substate of "+t.name+" and wasn't found in ",r),n.self.onExit&&c.invoke(n.self.onExit,n.self,n.locals.globals),e.forEach(n.locals,function(e,t){delete u.locals[t]}),n.locals=null,n.self.status="exited",delete l[a])}),a&&c.invoke(a,t.self,t.locals.globals),t.locals=null,t.self.status="exited",delete l[t.self.name]},stateEntering:function(e,t,n,a){var r=$(e);if(r&&(a||!$(e,t))){var s=e.locals;this.stateExiting(r),e.locals=s}e.self.status="entered",n&&c.invoke(n,e.self,e.locals.globals)},reset:function(a,r){function s(e){S.reset(e)}if("*"===a)return e.forEach(S.getInactiveStates(),s),!0;var o=n.get(a);if(!o)return!1;var i=$(o,r);return i?(S.stateExiting(i),t.$broadcast("$viewContentLoading"),!0):!1}};return S}]}function a(e){return{resolve:{},locals:{globals:o&&o.locals&&o.locals.globals},views:{},self:{},params:{},ownParams:f.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:e}}e.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);var r=e.module("ct.ui.router.extras.sticky");n.$inject=["$stateProvider","uirextras_coreProvider"],r.provider("$stickyState",n);var s,o,i,u,l=[],c={},f={hasParamSet:!1};e.module("ct.ui.router.extras.sticky").run(["$stickyState",function(e){s=e}]),e.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(n,r,v,d,h){function m(t,n,a){function r(e,t,n){return e[t]?e[t].toUpperCase()+": "+n.self.name:"("+n.self.name+")"}var o=E(a.inactives,function(e){return e.self.name}),i=E(n.toState.path,function(e,t){return r(a.enter,t,e)}),u=E(n.fromState.path,function(e,t){return r(a.exit,t,e)}),l=n.fromState.self.name+": "+e.toJson(n.fromParams)+": -> "+n.toState.self.name+": "+e.toJson(n.toParams);t.debug(" Current transition: ",l),t.debug("Before transition, inactives are: : ",E(s.getInactiveStates(),function(e){return e.self.name})),t.debug("After transition, inactives will be: ",o),t.debug("Transition will exit: ",u),t.debug("Transition will enter: ",i)}function p(e,t,n){e.debug("Current state: "+t.self.name+", inactive states: ",E(s.getInactiveStates(),function(e){return e.self.name}));for(var a=function(e,t){return"'"+t+"' ("+e.$$state.name+")"},r=function(e,t){return"globals"!=t&&"resolve"!=t},o=function(e){var t=E(P(e.locals,r),a).join(", ");return"("+(e.self.name?e.self.name:"root")+".locals"+(t.length?": "+t:"")+")"},i=o(t),u=t.parent;u&&u!==t;)""===u.self.name&&(i=o(n.$current.path[0])+" / "+i),i=o(u)+" / "+i,t=u,u=t.parent;e.debug("Views: "+i)}var g=h,$=g.internalStates,x=g.inherit,S=(g.inheritParams,g.forEach),E=g.map,P=g.filterObj;f.hasParamSet=!!d.ParamSet,u=e.extend(new a("__inactives"),{self:{name:"__inactives"}}),o=i=t,l=[],h.onStateRegistered(function(e){e.self.sticky===!0&&v.registerStickyState(e.self)});var b;n.decorator("$state",["$delegate","$log","$q",function(n,r,h){return o=n.$current,$[""]=o,o.parent=u,u.parent=t,u.locals=x(c,u.locals),o.locals=x(u.locals,o.locals),delete u.locals.globals,b=n.transitionTo,n.transitionTo=function(t,g,x){function P(t){var n=e.extend(new a("reactivate_phase1"),{locals:t.locals});return n.self=e.extend({},t.self),n}function k(t){var n=e.extend(new a("reactivate_phase2"),t),r=n.self.onEnter;return n.resolve={},n.views={},n.self.onEnter=function(){n.locals=t.locals,s.stateReactivated(t)},L.addRestoreFunction(function(){t.self.onEnter=r}),n}function y(e){var t=new a("inactivate");t.self=e.self;var n=e.self.onExit;return t.self.onExit=function(){s.stateInactivated(e)},L.addRestoreFunction(function(){e.self.onExit=n}),t}function w(e,t){var n=e.self.onEnter;return e.self.onEnter=function(){s.stateEntering(e,t,n)},L.addRestoreFunction(function(){e.self.onEnter=n}),e}function R(e,t){var n=e.self.onEnter;return e.self.onEnter=function(){s.stateEntering(e,t,n,!0)},L.addRestoreFunction(function(){e.self.onEnter=n}),e}function F(e){var t=e.self.onExit;return e.self.onExit=function(){s.stateExiting(e,J,t)},L.addRestoreFunction(function(){e.self.onExit=t}),e}var T=v.debugMode();u.locals||(u.locals=o.locals);var _=l.length;i&&(i(),T&&r.debug("Restored paths from pending transition"));var I,j,C,O,M=n.$current,q=n.params,A=x&&x.relative||n.$current,B=n.get(t,A),D=[],J=[];g=g||{},arguments[1]=g;var K=function(){},L=function(){I&&(U.path=I,I=null),j&&(M.path=j,j=null),e.forEach(L.restoreFunctions,function(e){e()}),L=K,i=null,l.splice(_,1)};if(L.restoreFunctions=[],L.addRestoreFunction=function(e){this.restoreFunctions.push(e)},B){var U=$[B.name];if(U){I=U.path,j=M.path;var V=x&&x.reload||!1,z=V&&(V===!0?I[0].self:n.get(V,A));x&&V&&V!==!0&&delete x.reload;var G={toState:U,toParams:g||{},fromState:M,fromParams:q||{},options:x,reloadStateTree:z};if(l.push(G),i=L,z){G.toParams.$$uirouterextrasreload=Math.random();var H=z.$$state().params,N=z.$$state().ownParams;if(f.hasParamSet){var Q=new d.Param("$$uirouterextrasreload");H.$$uirouterextrasreload=N.$$uirouterextrasreload=Q,L.restoreFunctions.push(function(){delete H.$$uirouterextrasreload,delete N.$$uirouterextrasreload})}else H.push("$$uirouterextrasreload"),N.push("$$uirouterextrasreload"),L.restoreFunctions.push(function(){H.length=H.length-1,N.length=N.length-1})}C=s.processTransition(G),T&&m(r,G,C);var W=U.path.slice(0,C.keep),X=M.path.slice(0,C.keep);e.forEach(u.locals,function(e,t){-1!=t.indexOf("@")&&delete u.locals[t]});var Y=function(e){return function(t,n){-1!==n.indexOf("@")&&(e[n]=t)}};S(C.inactives,function(e){S(e.locals,Y(u.locals))}),S(C.reactivatingStates,function(e){S(e.locals,Y(c))}),L.addRestoreFunction(function(){S(c,function(e,t){delete c[t]})}),e.forEach(C.enter,function(e,t){var n,a=U.path[t];"reactivate"===e?(n=P(a),W.push(n),X.push(n),D.push(k(a)),O=a):"updateStateParams"===e?(W.push(R(a)),O=a):"enter"===e&&W.push(w(a))}),e.forEach(C.exit,function(e,t){var n=M.path[t];"inactivate"===e?(X.push(y(n)),J.push(n)):"exit"===e&&(X.push(F(n)),J.push(n))}),D.length&&e.forEach(D,function(e){W.push(e)});var Z=C.deepestReactivateChildren;X=X.concat(E(C.deepestReactivateChildren,function(e){return F(e)})),J=J.concat(Z),M.path=X,U.path=W;var ee=function(e){return(e.surrogateType?e.surrogateType+":":"")+e.self.name};T&&r.debug("SurrogateFromPath: ",E(X,ee)),T&&r.debug("SurrogateToPath: ",E(W,ee))}}var te=b.apply(n,arguments);return te.then(function(e){return L(),T&&p(r,$[e.name],n),e.status="active",e},function(e){return L(),T&&"transition prevented"!==e.message&&"transition aborted"!==e.message&&"transition superseded"!==e.message&&(r.debug("transition failed",e),r.debug(e.stack)),h.reject(e)})},n}])}])}(angular);
/** UI-Router Extras v.0.1.0 Module: sticky http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(e,t){"use strict";function n(t,n){var r=n,a=r.inheritParams,i=(r.objectKeys,r.protoKeys),o=r.forEach,s=r.map,c={},l={},f=!1;this.registerStickyState=function(e){l[e.name]=e},this.enableDebug=this.debugMode=function(t){return e.isDefined(t)&&(f=t),f},this.$get=["$rootScope","$state","$stateParams","$injector","$log",function(t,n,r,l,v){function d(){var t={};return e.forEach(c,function(e,n){for(var r=m(e),a=0;a<r.length;a++){var i=r[a].parent;t[i.name]=t[i.name]||[],t[i.name].push(e)}t[""]&&(t.__inactives=t[""])}),t}function p(){var e={};return o(c,function(t){o(t.path,function(n){n!==t&&(e[n.name]=e[n.name]||[],e[n.name].push(t))})}),e}function m(e){var t=[];if(!e)return t;do e.sticky&&t.push(e),e=e.parent;while(e);return t.reverse(),t}function g(e,t,n,r){if(r)return"reload";var a=c[e.self.name];if(!a)return"enter";if(e.self===n)return"reload";var i=$(e.ownParams,t,a.locals.globals.$stateParams);return i?"reactivate":"reload"}function h(e,t){var n=c[e.name];if(!n)return null;if(!t)return n;var r=$(e.ownParams,t,n.locals.globals.$stateParams);return r?n:null}function $(e,t,n){return"function"==typeof e.$$equals?e.$$equals(t,n):x(t,n,e)}function x(t,n,r){if(!e.isArray(r)&&e.isObject(r)&&(r=i(r,["$$keys","$$values","$$equals","$$validates","$$new","$$parent"])),!r){r=[];for(var a in t)r.push(a)}for(var o=0;o<r.length;o++){var s=r[o];if(t[s]!=n[s])return!1}return!0}function b(e){var t=e.fromState.path,i=e.toState.path,o=e.toParams,s=0,u=i[s];for(e.options.inherit&&(o=a(r,o||{},n.$current,e.toState));u&&u===t[s]&&$(u.ownParams,o,e.fromParams);)u=i[++s];return{keep:s,retained:t.slice(0,s),exiting:t.slice(s),entering:i.slice(s)}}var E={getInactiveStates:function(){return s(c,e.identity)},getInactiveStatesByParent:function(){return d()},processTransition:function(t){function n(e){return function(t){return-1===e.indexOf(t)}}function r(e,t){return e.concat(t)}function a(e){return function(t){return t[e]}}function i(e){return function(t){return t.type===e}}function o(e){return function(t){return t.parent===e}}function u(e){return!e.sticky}var l,f,v,d=b(t),m=s(c,e.identity),h=d.keep,$=n(d.entering),x=d.exiting[0]&&d.exiting[0].sticky&&d.entering.length>0;f=d.exiting.map(function(e){var t=x?"inactivate":"exit";return{type:t,state:e}});var E=!!t.options.reload;v=d.entering.map(function(e){var n=g(e,t.toParams,t.reloadStateTree,E);return E=E||"reload"===n,{type:n,state:e}});var S=d.entering.map(function(e){return m.filter(o(e.parent))}).reduce(r,[]).filter($).filter(u).concat(m.filter(o(t.toState))),y=p(),P=S.map(function(e){return y[e.name]}).filter(e.isDefined).reduce(r,[]).concat(S).sort(function(e,t){return e.name.split(".").length-t.name.split(".").length}),k=f.filter(i("exit")).map(a("state")).concat(P);return l=m.filter(n(k)).filter(n(d.entering)).concat(f.filter(i("inactivate")).map(a("state"))),{keep:h,enter:new Array(h).concat(v.map(a("type"))),exit:new Array(h).concat(f.map(a("type"))),inactives:l,reactivatingStates:v.filter(i("reactivate")).map(a("state")),orphans:P}},stateInactivated:function(e){c[e.self.name]=e,e.self.status="inactive",e.self.onInactivate&&l.invoke(e.self.onInactivate,e.self,e.locals.globals)},stateReactivated:function(e){c[e.self.name]&&delete c[e.self.name],e.self.status="entered",e.self.onReactivate&&l.invoke(e.self.onReactivate,e.self,e.locals.globals)},stateExiting:function(t,n,r){var a={};e.forEach(n,function(e){a[e.self.name]=!0}),e.forEach(c,function(n,r){!a[r]&&n.includes[t.name]&&(f&&v.debug("Exiting "+r+" because it's a substate of "+t.name+" and wasn't found in ",a),n.self.onExit&&l.invoke(n.self.onExit,n.self,n.locals.globals),e.forEach(n.locals,function(e,t){delete u.locals[t]}),n.locals=null,n.self.status="exited",delete c[r])}),r&&l.invoke(r,t.self,t.locals.globals),t.locals=null,t.self.status="exited",delete c[t.self.name]},stateEntering:function(e,t,n,r){var a=h(e);if(a&&(r||!h(e,t))){var i=e.locals;this.stateExiting(a),e.locals=i}e.self.status="entered",n&&l.invoke(n,e.self,e.locals.globals)},reset:function(r,a){function i(e){E.reset(e)}if("*"===r)return e.forEach(E.getInactiveStates(),i),!0;var o=n.get(r);if(!o)return!1;var s=h(o,a);return s?(E.stateExiting(s),t.$broadcast("$viewContentLoading"),!0):!1}};return E}]}function r(e){return{resolve:{},locals:{globals:o&&o.locals&&o.locals.globals},views:{},self:{},params:{},ownParams:f.hasParamSet?{$$equals:function(){return!0}}:[],surrogateType:e}}e.module("ct.ui.router.extras.sticky",["ct.ui.router.extras.core"]);var a=e.module("ct.ui.router.extras.sticky");n.$inject=["$stateProvider","uirextras_coreProvider"],a.provider("$stickyState",n);var i,o,s,u,c=[],l={},f={hasParamSet:!1};e.module("ct.ui.router.extras.sticky").run(["$stickyState",function(e){i=e}]),e.module("ct.ui.router.extras.sticky").config(["$provide","$stateProvider","$stickyStateProvider","$urlMatcherFactoryProvider","uirextras_coreProvider",function(n,a,v,d,p){function m(t,n,r){function a(e,t,n){return e[t]?e[t].toUpperCase()+": "+n.self.name:"("+n.self.name+")"}var o=E(r.inactives,function(e){return e.self.name}),s=E(n.toState.path,function(e,t){return a(r.enter,t,e)}),u=E(n.fromState.path,function(e,t){return a(r.exit,t,e)}),c=n.fromState.self.name+": "+e.toJson(n.fromParams)+": -> "+n.toState.self.name+": "+e.toJson(n.toParams);t.debug("------------------------------------------------------"),t.debug(" Current transition: ",c),t.debug("Before transition, inactives are: : ",E(i.getInactiveStates(),function(e){return e.self.name})),t.debug("After transition, inactives will be: ",o),t.debug("Transition will exit: ",u),t.debug("Transition will enter: ",s)}function g(e,t,n){e.debug("Current state: "+t.self.name+", inactive states: ",E(i.getInactiveStates(),function(e){return e.self.name}));for(var r=function(e,t){return"'"+t+"' ("+e.$$state.name+")"},a=function(e,t){return"globals"!=t&&"resolve"!=t},o=function(e){var t=E(S(e.locals,a),r).join(", ");return"("+(e.self.name?e.self.name:"root")+".locals"+(t.length?": "+t:"")+")"},s=o(t),u=t.parent;u&&u!==t;)""===u.self.name&&(s=o(n.$current.path[0])+" / "+s),s=o(u)+" / "+s,t=u,u=t.parent;e.debug("Views: "+s)}var h=p,$=h.internalStates,x=h.inherit,b=(h.inheritParams,h.forEach),E=h.map,S=h.filterObj;f.hasParamSet=!!d.ParamSet,u=e.extend(new r("__inactives"),{self:{name:"__inactives"}}),o=s=t,c=[],p.onStateRegistered(function(e){e.self.sticky===!0&&v.registerStickyState(e.self)});var y;n.decorator("$state",["$delegate","$log","$q",function(n,a,p){return o=n.$current,$[""]=o,o.parent=u,u.parent=t,u.locals=x(l,u.locals),o.locals=x(u.locals,o.locals),delete u.locals.globals,y=n.transitionTo,n.transitionTo=function(t,h,x){function S(t){var n=e.extend(new r("reactivate_phase1"),{locals:t.locals});return n.self=e.extend({},t.self),n}function P(t){var n=e.extend(new r("reactivate_phase2"),t),a=n.self.onEnter;return n.resolve={},n.views={},n.self.onEnter=function(){n.locals=t.locals,i.stateReactivated(t)},L.addRestoreFunction(function(){t.self.onEnter=a}),n}function k(e){var t=new r("inactivate");t.self=e.self;var n=e.self.onExit;return t.self.onExit=function(){i.stateInactivated(e)},L.addRestoreFunction(function(){e.self.onExit=n}),t}function w(e,t){var n=e.self.onEnter;return e.self.onEnter=function(){i.stateEntering(e,t,n)},L.addRestoreFunction(function(){e.self.onEnter=n}),e}function F(e,t){var n=e.self.onEnter;return e.self.onEnter=function(){i.stateEntering(e,t,n,!0)},L.addRestoreFunction(function(){e.self.onEnter=n}),e}function R(e){var t=e.self.onExit;return e.self.onExit=function(){i.stateExiting(e,J,t)},L.addRestoreFunction(function(){e.self.onExit=t}),e}var T=v.debugMode();u.locals||(u.locals=o.locals);var _=c.length;s&&(s(),T&&a.debug("Restored paths from pending transition"));var I,j,q,O,A=n.$current,C=n.params,M=x&&x.relative||n.$current,D=n.get(t,M),B=[],J=[];h=h||{},arguments[1]=h;var K=function(){},L=function(){I&&(U.path=I,I=null),j&&(A.path=j,j=null),e.forEach(L.restoreFunctions,function(e){e()}),L=K,s=null,c.splice(_,1)};if(L.restoreFunctions=[],L.addRestoreFunction=function(e){this.restoreFunctions.push(e)},D){var U=$[D.name];if(U){I=U.path,j=A.path;var V=x&&x.reload||!1,z=V&&(V===!0?I[0].self:n.get(V,M));x&&V&&V!==!0&&delete x.reload;var G={toState:U,toParams:h||{},fromState:A,fromParams:C||{},options:x,reloadStateTree:z};if(c.push(G),s=L,z){G.toParams.$$uirouterextrasreload=Math.random();var H=z.$$state().params,N=z.$$state().ownParams;if(f.hasParamSet){var Q=new d.Param("$$uirouterextrasreload");H.$$uirouterextrasreload=N.$$uirouterextrasreload=Q,L.restoreFunctions.push(function(){delete H.$$uirouterextrasreload,delete N.$$uirouterextrasreload})}else H.push("$$uirouterextrasreload"),N.push("$$uirouterextrasreload"),L.restoreFunctions.push(function(){H.length=H.length-1,N.length=N.length-1})}q=i.processTransition(G),T&&m(a,G,q);var W=U.path.slice(0,q.keep),X=A.path.slice(0,q.keep);e.forEach(u.locals,function(e,t){-1!=t.indexOf("@")&&delete u.locals[t]});var Y=function(e){return function(t,n){-1!==n.indexOf("@")&&(e[n]=t)}};b(q.inactives,function(e){b(e.locals,Y(u.locals))}),b(q.reactivatingStates,function(e){b(e.locals,Y(l))}),L.addRestoreFunction(function(){b(l,function(e,t){delete l[t]})}),e.forEach(q.enter,function(e,t){var n,r=U.path[t];"reactivate"===e?(n=S(r),W.push(n),X.push(n),B.push(P(r)),O=r):"reload"===e?(W.push(F(r)),O=r):"enter"===e&&W.push(w(r))}),e.forEach(q.exit,function(e,t){var n=A.path[t];"inactivate"===e?(X.push(k(n)),J.push(n)):"exit"===e&&(X.push(R(n)),J.push(n))}),B.length&&e.forEach(B,function(e){W.push(e)});var Z=q.orphans;X=X.concat(E(Z,function(e){return R(e)})),J=J.concat(Z),A.path=X,U.path=W;var ee=function(e){return(e.surrogateType?e.surrogateType+":":"")+e.self.name};T&&a.debug("SurrogateFromPath: ",E(X,ee)),T&&a.debug("SurrogateToPath: ",E(W,ee))}}var te=y.apply(n,arguments);return te.then(function(e){return L(),T&&g(a,$[e.name],n),e.status="active",e},function(e){return L(),T&&"transition prevented"!==e.message&&"transition aborted"!==e.message&&"transition superseded"!==e.message&&(a.debug("transition failed",e),a.debug(e.stack)),p.reject(e)})},n}])}])}(angular);
/**
* UI-Router Extras: Sticky states, Future States, Deep State Redirect, Transition promise
* Module: transition
* @version 0.0.14
* @version 0.1.0
* @link http://christopherthielen.github.io/ui-router-extras/

@@ -87,2 +87,3 @@ * @license MIT License, http://www.opensource.org/licenses/MIT

$rootScope.$on("$stateChangeStart", function (evt, toState, toParams, fromState, fromParams) {
if (transitionDepth >= tDataStack.length) return;
var depth = transitionDepth;

@@ -89,0 +90,0 @@ // To/From is now normalized by ui-router. Add this information to the transition data object.

@@ -1,2 +0,2 @@

/** UI-Router Extras v.0.0.14 Module: transition http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,n){"use strict";t.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(n){n.decorator("$state",["$delegate","$rootScope","$q","$injector",function(n,r,e,o){function i(n){var r=o.invoke,e=o.instantiate;return o.invoke=function(e,o,i){return r(e,o,t.extend({$transition$:n},i))},o.instantiate=function(r,o){return e(r,t.extend({$transition$:n},o))},function(){o.invoke=r,o.instantiate=e}}function a(){p.pop()(),$.pop(),f--}function u(t,n){return function(e){return a(),r.$broadcast("$transitionSuccess",n),t.resolve(e),e}}function c(t,n){return function(o){return a(),r.$broadcast("$transitionError",n,o),t.reject(o),e.reject(o)}}var s=n.transitionTo,f=-1,$=[],p=[];return n.transitionTo=function(t,r,o){var i=e.defer(),a=$[++f]={promise:i.promise};p[f]=function(){};var d=s.apply(n,arguments);return d.then(u(i,a),c(i,a))},r.$on("$stateChangeStart",function(n,e,o,a,u){var c=f,s=t.extend($[c],{to:{state:e,params:o},from:{state:a,params:u}}),d=i(s);p[c]=d,r.$broadcast("$transitionStart",s)}),n}])}])}(angular);
/** UI-Router Extras v.0.1.0 Module: transition http://christopherthielen.github.io/ui-router-extras/ - MIT License */
!function(t,n){"use strict";t.module("ct.ui.router.extras.transition",["ct.ui.router.extras.core"]).config(["$provide",function(n){n.decorator("$state",["$delegate","$rootScope","$q","$injector",function(n,r,e,o){function i(n){var r=o.invoke,e=o.instantiate;return o.invoke=function(e,o,i){return r(e,o,t.extend({$transition$:n},i))},o.instantiate=function(r,o){return e(r,t.extend({$transition$:n},o))},function(){o.invoke=r,o.instantiate=e}}function a(){p.pop()(),$.pop(),f--}function u(t,n){return function(e){return a(),r.$broadcast("$transitionSuccess",n),t.resolve(e),e}}function c(t,n){return function(o){return a(),r.$broadcast("$transitionError",n,o),t.reject(o),e.reject(o)}}var s=n.transitionTo,f=-1,$=[],p=[];return n.transitionTo=function(t,r,o){var i=e.defer(),a=$[++f]={promise:i.promise};p[f]=function(){};var d=s.apply(n,arguments);return d.then(u(i,a),c(i,a))},r.$on("$stateChangeStart",function(n,e,o,a,u){if(!(f>=$.length)){var c=f,s=t.extend($[c],{to:{state:e,params:o},from:{state:a,params:u}}),d=i(s);p[c]=d,r.$broadcast("$transitionStart",s)}}),n}])}])}(angular);

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc