From c3ef225a02a15f15d1676c9a657619cde235aaea Mon Sep 17 00:00:00 2001 From: InverseBot Date: Mon, 8 May 2017 01:23:36 -0400 Subject: [PATCH] (js/css) Update generated files --- .../js/vendor/angular-ui-router.js | 47 +++++++++++-------- .../js/vendor/angular-ui-router.min.js | 10 ++-- 2 files changed, 35 insertions(+), 22 deletions(-) diff --git a/UI/WebServerResources/js/vendor/angular-ui-router.js b/UI/WebServerResources/js/vendor/angular-ui-router.js index 02e397585..c66a6d99d 100644 --- a/UI/WebServerResources/js/vendor/angular-ui-router.js +++ b/UI/WebServerResources/js/vendor/angular-ui-router.js @@ -1,6 +1,10 @@ /** * State-based routing for AngularJS 1.x - * @version v1.0.1 + * NOTICE: This monolithic bundle also bundles the @uirouter/core code. + * This causes it to be incompatible with plugins that depend on @uirouter/core. + * We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead. + * For more information, see http://ui-router.github.io/blog/angular-ui-router-umd-bundles + * @version v1.0.3 * @link https://ui-router.github.io * @license MIT License, http://www.opensource.org/licenses/MIT */ @@ -642,10 +646,9 @@ function ancestors(first, second) { } /** * Return a copy of the object only containing the whitelisted properties. - - * @example - * ``` * + * #### Example: + * ``` * var foo = { a: 1, b: 2, c: 3 }; * var ab = pick(foo, ['a', 'b']); // { a: 1, b: 2 } * ``` @@ -653,11 +656,13 @@ function ancestors(first, second) { * @param propNames an Array of strings, which are the whitelisted property names */ function pick(obj, propNames) { - var copy = {}; - // propNames.forEach(prop => { if (obj.hasOwnProperty(prop)) copy[prop] = obj[prop] }); - propNames.forEach(function (prop$$1) { if (isDefined(obj[prop$$1])) - copy[prop$$1] = obj[prop$$1]; }); - return copy; + var objCopy = {}; + for (var prop_1 in obj) { + if (propNames.indexOf(prop_1) !== -1) { + objCopy[prop_1] = obj[prop_1]; + } + } + return objCopy; } /** * Return a copy of the object omitting the blacklisted properties. @@ -8041,7 +8046,9 @@ var TemplateFactory = (function () { return null; if (this._useHttp) { return this.$http.get(url, { cache: this.$templateCache, headers: { Accept: 'text/html' } }) - .then(function (response) { return response.data; }); + .then(function (response) { + return response.data; + }); } return this.$templateRequest(url); }; @@ -8093,19 +8100,24 @@ var TemplateFactory = (function () { bindings = bindings || {}; // Bind once prefix var prefix = ng.version.minor >= 3 ? "::" : ""; + // Convert to kebob name. Add x- prefix if the string starts with `x-` or `data-` + var kebob = function (camelCase) { + var kebobed = kebobString(camelCase); + return /^(x|data)-/.exec(kebobed) ? "x-" + kebobed : kebobed; + }; var attributeTpl = function (input) { var name = input.name, type = input.type; - var attrName = kebobString(name); + var attrName = kebob(name); // If the ui-view has an attribute which matches a binding on the routed component // then pass that attribute through to the routed component template. // Prefer ui-view wired mappings to resolve data, unless the resolve was explicitly bound using `bindings:` if (uiView.attr(attrName) && !bindings[name]) - return "x-" + attrName + "='" + uiView.attr(attrName) + "'"; + return attrName + "='" + uiView.attr(attrName) + "'"; var resolveName = bindings[name] || name; // Pre-evaluate the expression for "@" bindings by enclosing in {{ }} // some-attr="{{ ::$resolve.someResolveName }}" if (type === '@') - return "x-" + attrName + "='{{" + prefix + "$resolve." + resolveName + "}}'"; + return attrName + "='{{" + prefix + "$resolve." + resolveName + "}}'"; // Wire "&" callbacks to resolves that return a callback function // Get the result of the resolve (should be a function) and annotate it to get its arguments. // some-attr="$resolve.someResolveResultName(foo, bar)" @@ -8115,16 +8127,13 @@ var TemplateFactory = (function () { var args = fn && services.$injector.annotate(fn) || []; // account for array style injection, i.e., ['foo', function(foo) {}] var arrayIdxStr = isArray(fn) ? "[" + (fn.length - 1) + "]" : ''; - return "x-" + attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; + return attrName + "='$resolve." + resolveName + arrayIdxStr + "(" + args.join(",") + ")'"; } // some-attr="::$resolve.someResolveName" - return "x-" + attrName + "='" + prefix + "$resolve." + resolveName + "'"; + return attrName + "='" + prefix + "$resolve." + resolveName + "'"; }; var attrs = getComponentBindings(component).map(attributeTpl).join(" "); - var kebobName = kebobString(component); - if (/^(x|data)-/.exec(kebobName)) { - kebobName = "x-" + kebobName; - } + var kebobName = kebob(component); return "<" + kebobName + " " + attrs + ">"; }; diff --git a/UI/WebServerResources/js/vendor/angular-ui-router.min.js b/UI/WebServerResources/js/vendor/angular-ui-router.min.js index ba1f30253..3d16c919e 100644 --- a/UI/WebServerResources/js/vendor/angular-ui-router.min.js +++ b/UI/WebServerResources/js/vendor/angular-ui-router.min.js @@ -1,11 +1,15 @@ /** * State-based routing for AngularJS 1.x - * @version v1.0.1 + * NOTICE: This monolithic bundle also bundles the @uirouter/core code. + * This causes it to be incompatible with plugins that depend on @uirouter/core. + * We recommend switching to the ui-router-core.js and ui-router-angularjs.js bundles instead. + * For more information, see http://ui-router.github.io/blog/angular-ui-router-umd-bundles + * @version v1.0.3 * @link https://ui-router.github.io * @license MIT License, http://www.opensource.org/licenses/MIT */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],e):e(t["@uirouter/angularjs"]=t["@uirouter/angularjs"]||{},t.angular)}(this,function(t,e){"use strict";function r(t){function e(r){return r.length>=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e=0&&t.splice(r,1),t}function v(t,e){return t.push(e),e}function m(t){for(var e=[],r=1;r1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var s=r(function(){e.go(u.uiState,u.uiStateParams,u.uiStateOpts)});o.preventDefault();var c=n.isAnchor&&!u.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(s)}}}}function Tt(t,e){return{relative:St(t)||e.$current,inherit:!0,source:"sref"}}function Ct(t,e,r,n){var i;n&&(i=n.events),te(i)||(i=["click"]);for(var o=t.on?"on":"bind",a=0,u=i;athis._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(t.RejectType||(t.RejectType={}));var De=0,Ne=function(){function e(t,e,r){this.$id=De++,this.type=t,this.message=e,this.detail=r}return e.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():Q(t)}(this.detail),e=this;return"Transition Rejection($id: "+e.$id+" type: "+e.type+", message: "+e.message+", detail: "+t+")"},e.prototype.toPromise=function(){return pe(He(this),{_transitionRejection:this})},e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&Nt(e)(t._transitionRejection)},e.superseded=function(r,n){var i=new e(t.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",r);return n&&n.redirected&&(i.redirected=!0),i},e.redirected=function(t){return e.superseded(t,{redirected:!0})},e.invalid=function(r){return new e(t.RejectType.INVALID,"This transition is invalid",r)},e.ignored=function(r){return new e(t.RejectType.IGNORED,"The transition was ignored",r)},e.aborted=function(r){return new e(t.RejectType.ABORTED,"The transition has been aborted",r)},e.errored=function(r){return new e(t.RejectType.ERROR,"The transition errored",r)},e.normalize=function(t){return Nt(e)(t)?t:e.errored(t)},e}(),Fe=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(t.Category||(t.Category={}));var Ue=At("$id"),Le=At("router.$id"),Me=function(t){return"Transition #"+Ue(t)+"-"+Le(t)},Be=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(e,r){var n=this;r.length||(r=Object.keys(t.Category).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(e){return t.Category[e]})),r.map(A).forEach(function(t){return n._enabled[t]=e})},e.prototype.enable=function(){for(var t=[],e=0;e "+Q(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Me(e)+": Ignored <> "+Q(e))},e.prototype.traceHookInvocation=function(e,r,n){if(this.enabled(t.Category.HOOK)){var i=At("traceData.hookType")(n)||"internal",o=At("traceData.context.state.name")(n)||At("traceData.context")(n)||"unknown",a=z(e.registeredHook.callback);console.log(Me(r)+": Hook -> "+i+" context: "+o+", "+B(200,a))}},e.prototype.traceHookResult=function(e,r,n){this.enabled(t.Category.HOOK)&&console.log(Me(r)+": <- Hook returned: "+B(200,Q(e)))},e.prototype.traceResolvePath=function(e,r,n){this.enabled(t.Category.RESOLVE)&&console.log(Me(n)+": Resolving "+e+" ("+r+")")},e.prototype.traceResolvableResolved=function(e,r){this.enabled(t.Category.RESOLVE)&&console.log(Me(r)+": <- Resolved "+e+" to: "+B(200,Q(e.data)))},e.prototype.traceError=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Me(r)+": <- Rejected "+Q(r)+", reason: "+e)},e.prototype.traceSuccess=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Me(r)+": <- Success "+Q(r)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,r,n){void 0===n&&(n=""),this.enabled(t.Category.UIVIEW)&&console.log("ui-view: "+G(30,e)+" "+V(r)+n)},e.prototype.traceUIViewConfigUpdated=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+r+"'")},e.prototype.traceUIViewFill=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+B(200,r))},e.prototype.traceViewServiceEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+Fe(r))},e.prototype.traceViewServiceUIViewEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+V(r))},e}(),Ge=new Be;!function(t){t[t.CREATE=0]="CREATE",t[t.BEFORE=1]="BEFORE",t[t.RUN=2]="RUN",t[t.SUCCESS=3]="SUCCESS",t[t.ERROR=4]="ERROR"}(t.TransitionHookPhase||(t.TransitionHookPhase={})),function(t){t[t.TRANSITION=0]="TRANSITION",t[t.STATE=1]="STATE"}(t.TransitionHookScope||(t.TransitionHookScope={}));var We=function(){function t(t,e,r,n){void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+fe(this.params())},t}();We.isDef=function(t){return t&&t.state&&(Zt(t.state)||Zt(t.state.name))};var ze={current:l,transition:null,traceData:{},bind:null},Je=function(){function e(e,r,n,i){var o=this;this.transition=e,this.stateContext=r,this.registeredHook=n,this.options=i,this.isSuperseded=function(){return o.type.hookPhase===t.TransitionHookPhase.RUN&&!o.options.transition.isActive()},this.options=m(i,ze),this.type=n.eventType}return e.prototype.logError=function(t){this.transition.router.stateService.defaultErrorHandler()(t)},e.prototype.invokeHook=function(){var t=this,e=this.registeredHook;if(!e._deregistered){var r=this.getNotCurrentRejection();if(r)return r;var n=this.options;Ge.traceHookInvocation(this,this.transition,n);var i=function(t){return Ne.normalize(t).toPromise()},o=function(r){return e.eventType.getErrorHandler(t)(r)},a=function(r){return e.eventType.getResultHandler(t)(r)};try{var u=function(){return e.callback.call(n.bind,t.transition,t.stateContext)}();return!this.type.synchronous&&ie(u)?u.catch(i).then(a,o):a(u)}catch(t){return o(Ne.normalize(t))}}},e.prototype.handleHookResult=function(t){var e=this,r=this.getNotCurrentRejection();return r||(ie(t)?t.then(function(t){return e.handleHookResult(t)}):(Ge.traceHookResult(t,this.transition,this.options),!1===t?Ne.aborted("Hook aborted transition").toPromise():Nt(We)(t)?Ne.redirected(t).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?Ne.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Ne.aborted().toPromise():this.isSuperseded()?Ne.superseded(this.options.current()).toPromise():void 0},e.prototype.toString=function(){var t=this,e=t.options,r=t.registeredHook;return(At("traceData.hookType")(e)||"internal")+" context: "+(At("traceData.context.state.name")(e)||At("traceData.context")(e)||"unknown")+", "+B(200,J(r.callback))},e.chain=function(t,e){var r=function(t,e){return t.then(function(){return e.invokeHook()})};return t.reduce(r,e||ae.$q.when())},e.invokeHooks=function(t,r){for(var n=0;n=n?t.apply(null,r):function(){return e(r.concat([].slice.apply(arguments)))}}var r=[].slice.apply(arguments,[1]),n=t.length;return e(r)}function n(){var t=arguments,e=t.length-1;return function(){for(var r=e,n=t[e].apply(this,arguments);r--;)n=t[r].call(this,n);return n}}function i(){for(var t=[],e=0;e=0&&t.splice(r,1),t}function v(t,e){return t.push(e),e}function m(t){for(var e=[],r=1;r1||o.ctrlKey||o.metaKey||o.shiftKey||t.attr("target"))){var s=r(function(){e.go(u.uiState,u.uiStateParams,u.uiStateOpts)});o.preventDefault();var c=n.isAnchor&&!u.href?1:0;o.preventDefault=function(){c--<=0&&r.cancel(s)}}}}function Tt(t,e){return{relative:St(t)||e.$current,inherit:!0,source:"sref"}}function Ct(t,e,r,n){var i;n&&(i=n.events),te(i)||(i=["click"]);for(var o=t.on?"on":"bind",a=0,u=i;athis._limit&&e.shift(),t},t.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},t.prototype.clear=function(){var t=this._items;return this._items=[],t},t.prototype.size=function(){return this._items.length},t.prototype.remove=function(t){var e=this._items.indexOf(t);return e>-1&&this._items.splice(e,1)[0]},t.prototype.peekTail=function(){return this._items[this._items.length-1]},t.prototype.peekHead=function(){if(this.size())return this._items[0]},t}();!function(t){t[t.SUPERSEDED=2]="SUPERSEDED",t[t.ABORTED=3]="ABORTED",t[t.INVALID=4]="INVALID",t[t.IGNORED=5]="IGNORED",t[t.ERROR=6]="ERROR"}(t.RejectType||(t.RejectType={}));var De=0,Ne=function(){function e(t,e,r){this.$id=De++,this.type=t,this.message=e,this.detail=r}return e.prototype.toString=function(){var t=function(t){return t&&t.toString!==Object.prototype.toString?t.toString():Q(t)}(this.detail),e=this;return"Transition Rejection($id: "+e.$id+" type: "+e.type+", message: "+e.message+", detail: "+t+")"},e.prototype.toPromise=function(){return pe(He(this),{_transitionRejection:this})},e.isRejectionPromise=function(t){return t&&"function"==typeof t.then&&Nt(e)(t._transitionRejection)},e.superseded=function(r,n){var i=new e(t.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",r);return n&&n.redirected&&(i.redirected=!0),i},e.redirected=function(t){return e.superseded(t,{redirected:!0})},e.invalid=function(r){return new e(t.RejectType.INVALID,"This transition is invalid",r)},e.ignored=function(r){return new e(t.RejectType.IGNORED,"The transition was ignored",r)},e.aborted=function(r){return new e(t.RejectType.ABORTED,"The transition has been aborted",r)},e.errored=function(r){return new e(t.RejectType.ERROR,"The transition errored",r)},e.normalize=function(t){return Nt(e)(t)?t:e.errored(t)},e}(),Fe=function(t){return"[ViewConfig#"+t.$id+" from '"+(t.viewDecl.$context.name||"(root)")+"' state]: target ui-view: '"+t.viewDecl.$uiViewName+"@"+t.viewDecl.$uiViewContextAnchor+"'"};!function(t){t[t.RESOLVE=0]="RESOLVE",t[t.TRANSITION=1]="TRANSITION",t[t.HOOK=2]="HOOK",t[t.UIVIEW=3]="UIVIEW",t[t.VIEWCONFIG=4]="VIEWCONFIG"}(t.Category||(t.Category={}));var Ue=At("$id"),Le=At("router.$id"),Me=function(t){return"Transition #"+Ue(t)+"-"+Le(t)},Be=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(e,r){var n=this;r.length||(r=Object.keys(t.Category).map(function(t){return parseInt(t,10)}).filter(function(t){return!isNaN(t)}).map(function(e){return t.Category[e]})),r.map(A).forEach(function(t){return n._enabled[t]=e})},e.prototype.enable=function(){for(var t=[],e=0;e "+Q(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(t.Category.TRANSITION)&&console.log(Me(e)+": Ignored <> "+Q(e))},e.prototype.traceHookInvocation=function(e,r,n){if(this.enabled(t.Category.HOOK)){var i=At("traceData.hookType")(n)||"internal",o=At("traceData.context.state.name")(n)||At("traceData.context")(n)||"unknown",a=z(e.registeredHook.callback);console.log(Me(r)+": Hook -> "+i+" context: "+o+", "+B(200,a))}},e.prototype.traceHookResult=function(e,r,n){this.enabled(t.Category.HOOK)&&console.log(Me(r)+": <- Hook returned: "+B(200,Q(e)))},e.prototype.traceResolvePath=function(e,r,n){this.enabled(t.Category.RESOLVE)&&console.log(Me(n)+": Resolving "+e+" ("+r+")")},e.prototype.traceResolvableResolved=function(e,r){this.enabled(t.Category.RESOLVE)&&console.log(Me(r)+": <- Resolved "+e+" to: "+B(200,Q(e.data)))},e.prototype.traceError=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Me(r)+": <- Rejected "+Q(r)+", reason: "+e)},e.prototype.traceSuccess=function(e,r){this.enabled(t.Category.TRANSITION)&&console.log(Me(r)+": <- Success "+Q(r)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,r,n){void 0===n&&(n=""),this.enabled(t.Category.UIVIEW)&&console.log("ui-view: "+G(30,e)+" "+V(r)+n)},e.prototype.traceUIViewConfigUpdated=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+r+"'")},e.prototype.traceUIViewFill=function(e,r){this.enabled(t.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+B(200,r))},e.prototype.traceViewServiceEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+Fe(r))},e.prototype.traceViewServiceUIViewEvent=function(e,r){this.enabled(t.Category.VIEWCONFIG)&&console.log("VIEWCONFIG: "+e+" "+V(r))},e}(),Ge=new Be;!function(t){t[t.CREATE=0]="CREATE",t[t.BEFORE=1]="BEFORE",t[t.RUN=2]="RUN",t[t.SUCCESS=3]="SUCCESS",t[t.ERROR=4]="ERROR"}(t.TransitionHookPhase||(t.TransitionHookPhase={})),function(t){t[t.TRANSITION=0]="TRANSITION",t[t.STATE=1]="STATE"}(t.TransitionHookScope||(t.TransitionHookScope={}));var We=function(){function t(t,e,r,n){void 0===n&&(n={}),this._identifier=t,this._definition=e,this._options=n,this._params=r||{}}return t.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},t.prototype.identifier=function(){return this._identifier},t.prototype.params=function(){return this._params},t.prototype.$state=function(){return this._definition},t.prototype.state=function(){return this._definition&&this._definition.self},t.prototype.options=function(){return this._options},t.prototype.exists=function(){return!(!this._definition||!this._definition.self)},t.prototype.valid=function(){return!this.error()},t.prototype.error=function(){var t=this.options().relative;if(!this._definition&&t){var e=t.name?t.name:t;return"Could not resolve '"+this.name()+"' from state '"+e+"'"}return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'"},t.prototype.toString=function(){return"'"+this.name()+"'"+fe(this.params())},t}();We.isDef=function(t){return t&&t.state&&(Zt(t.state)||Zt(t.state.name))};var ze={current:l,transition:null,traceData:{},bind:null},Je=function(){function e(e,r,n,i){var o=this;this.transition=e,this.stateContext=r,this.registeredHook=n,this.options=i,this.isSuperseded=function(){return o.type.hookPhase===t.TransitionHookPhase.RUN&&!o.options.transition.isActive()},this.options=m(i,ze),this.type=n.eventType}return e.prototype.logError=function(t){this.transition.router.stateService.defaultErrorHandler()(t)},e.prototype.invokeHook=function(){var t=this,e=this.registeredHook;if(!e._deregistered){var r=this.getNotCurrentRejection();if(r)return r;var n=this.options;Ge.traceHookInvocation(this,this.transition,n);var i=function(t){return Ne.normalize(t).toPromise()},o=function(r){return e.eventType.getErrorHandler(t)(r)},a=function(r){return e.eventType.getResultHandler(t)(r)};try{var u=function(){return e.callback.call(n.bind,t.transition,t.stateContext)}();return!this.type.synchronous&&ie(u)?u.catch(i).then(a,o):a(u)}catch(t){return o(Ne.normalize(t))}}},e.prototype.handleHookResult=function(t){var e=this,r=this.getNotCurrentRejection();return r||(ie(t)?t.then(function(t){return e.handleHookResult(t)}):(Ge.traceHookResult(t,this.transition,this.options),!1===t?Ne.aborted("Hook aborted transition").toPromise():Nt(We)(t)?Ne.redirected(t).toPromise():void 0))},e.prototype.getNotCurrentRejection=function(){var t=this.transition.router;return t._disposed?Ne.aborted("UIRouter instance #"+t.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Ne.aborted().toPromise():this.isSuperseded()?Ne.superseded(this.options.current()).toPromise():void 0},e.prototype.toString=function(){var t=this,e=t.options,r=t.registeredHook;return(At("traceData.hookType")(e)||"internal")+" context: "+(At("traceData.context.state.name")(e)||At("traceData.context")(e)||"unknown")+", "+B(200,J(r.callback))},e.chain=function(t,e){var r=function(t,e){return t.then(function(){return e.invokeHook()})};return t.reduce(r,e||ae.$q.when())},e.invokeHooks=function(t,r){for(var n=0;n20)throw new Error("Too many consecutive Transition redirects (20+)");var n={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==t.options().location&&(n.location="replace");var i=pe({},this.options(),t.options(),n);t=new We(t.identifier(),t.$state(),t.params(),i);var o=this.router.transitionService.create(this._treeChanges.from,t),a=this._treeChanges.entering,u=o._treeChanges.entering;return rr.matching(u,a,rr.nonDynamicParams).filter(Ht(function(t){return function(e){return t&&e.state.includes[t.name]}}(t.options().reloadState))).forEach(function(t,e){t.resolvables=a[e].resolvables}),o},e.prototype._changedParams=function(){var t=this._treeChanges;if(!this._options.reload&&!t.exiting.length&&!t.entering.length&&t.to.length===t.from.length){if(!T(t.to,t.from).map(function(t){return t[0].state!==t[1].state}).reduce(Re,!1)){var e=t.to.map(function(t){return t.paramSchema}),r=[t.to,t.from].map(function(t){return t.map(function(t){return t.paramValues})});return T(e,r[0],r[1]).map(function(t){var e=t[0],r=t[1],n=t[2];return tr.changed(e,r,n)}).reduce(Ee,[])}}},e.prototype.dynamic=function(){var t=this._changedParams();return!!t&&t.map(function(t){return t.dynamic}).reduce(Re,!1)},e.prototype.ignored=function(){return!!this._ignoredReason()},e.prototype._ignoredReason=function(){var t=this.router.globals.transition,e=this._options.reloadState,r=function(t,r){if(t.length!==r.length)return!1;var n=rr.matching(t,r);return t.length===n.filter(function(t){return!e||!t.state.includes[e.name]}).length},n=this.treeChanges(),i=t&&t.treeChanges();return i&&r(i.to,n.to)&&r(i.exiting,n.exiting)?"SameAsPending":0===n.exiting.length&&0===n.entering.length&&r(n.from,n.to)?"SameAsCurrent":void 0},e.prototype.run=function(){var e=this,r=Je.runAllHooks,n=function(t){return e._hookBuilder.buildHooksForPhase(t)},i=function(){Ge.traceSuccess(e.$to(),e),e.success=!0,e._deferred.resolve(e.to()),r(n(t.TransitionHookPhase.SUCCESS))},o=function(i){Ge.traceError(i,e),e.success=!1,e._deferred.reject(i),e._error=i,r(n(t.TransitionHookPhase.ERROR))},a=function(){var e=n(t.TransitionHookPhase.RUN),r=function(){return ae.$q.when(void 0)};return Je.invokeHooks(e,r)},u=function(){var t=e.router.globals;return t.lastStartedTransitionId=e.$id,t.transition=e,t.transitionHistory.enqueue(e),Ge.traceTransitionStart(e),ae.$q.when(void 0)},s=n(t.TransitionHookPhase.BEFORE);return Je.invokeHooks(s,u).then(a).then(i,o),this.promise},e.prototype.valid=function(){return!this.error()||void 0!==this.success},e.prototype.abort=function(){Wt(this.success)&&(this._aborted=!0)},e.prototype.error=function(){var t=this.$to();return t.self.abstract?"Cannot transition to abstract state '"+t.name+"'":tr.validates(t.parameters(),this.params())?!1===this.success?this._error:void 0:"Param values not valid for state '"+t.name+"'"},e.prototype.toString=function(){var t=this.from(),e=this.to(),r=function(t){return null!==t["#"]&&void 0!==t["#"]?t:w(t,["#"])};return"Transition#"+this.$id+"( '"+(Xt(t)?t.name:t)+"'"+fe(r(this._treeChanges.from.map(It("paramValues")).reduce(_e,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(Xt(e)?e.name:e)+"'"+fe(r(this.params()))+" )"},e}();pr.diToken=pr;var dr=null,vr=function(t){var e=Ne.isRejectionPromise;return(dr=dr||s([[Ht(zt),Ut("undefined")],[Jt,Ut("null")],[ie,Ut("[Promise]")],[e,function(t){return t._transitionRejection.toString()}],[Nt(Ne),u("toString")],[Nt(pr),u("toString")],[Nt(ir),u("toString")],[c,z],[Ut(!0),f]]))(t)},mr=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return-1===r?[e,""]:[e.substr(0,r),e.substr(r+1)]}},yr=function(){function t(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=g(t.prototype,["hash","string","query","path","int","bool","date","json","any"]);var e=function(t,e){return new Ye(pe({name:e},t))};this.types=ve(b(this.defaultTypes,e),{})}return t.prototype.dispose=function(){this.types={}},t.prototype.type=function(t,e,r){if(!zt(e))return this.types[t];if(this.types.hasOwnProperty(t))throw new Error("A type named '"+t+"' has already been defined.");return this.types[t]=new Ye(pe({name:t},e)),r&&(this.typeQueue.push({name:t,def:r}),this.enqueue||this._flushTypeQueue()),this},t.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var t=this.typeQueue.shift();if(t.pattern)throw new Error("You cannot override a type's .pattern at runtime.");pe(this.types[t.name],ae.$injector.invoke(t.def))}},t}();!function(){var t=function(t){var e=function(t){return null!=t?t.toString():t},r={encode:e,decode:e,is:Nt(String),pattern:/.*/,equals:function(t,e){return t==e}};return pe({},r,t)};pe(yr.prototype,{string:t({}),path:t({pattern:/[^\/]*/}),query:t({}),hash:t({inherit:!1}),int:t({decode:function(t){return parseInt(t,10)},is:function(t){return!Qt(t)&&this.decode(t.toString())===t},pattern:/-?\d+/}),bool:t({encode:function(t){return t&&1||0},decode:function(t){return 0!==parseInt(t,10)},is:Nt(Boolean),pattern:/0|1/}),date:t({encode:function(t){return this.is(t)?[t.getFullYear(),("0"+(t.getMonth()+1)).slice(-2),("0"+t.getDate()).slice(-2)].join("-"):void 0},decode:function(t){if(this.is(t))return t;var e=this.capture.exec(t);return e?new Date(e[1],e[2]-1,e[3]):void 0},is:function(t){return t instanceof Date&&!isNaN(t.valueOf())},equals:function(t,e){return["getFullYear","getMonth","getDate"].reduce(function(r,n){return r&&t[n]()===e[n]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:t({encode:fe,decode:ce,is:Nt(Object),equals:de,pattern:/[^\/]*/}),any:t({encode:f,decode:f,is:function(){return!0},equals:de})})}();var gr=function(){function t(t){void 0===t&&(t={}),pe(this,t)}return t.prototype.$inherit=function(t,e,r){var n,i=y(e,r),o={},a=[];for(var u in i)if(i[u]&&i[u].params&&(n=Object.keys(i[u].params),n.length))for(var s in n)a.indexOf(n[s])>=0||(a.push(n[s]),o[n[s]]=this[n[s]]);return pe({},o,t)},t}(),wr=function(t){if(!Zt(t))return!1;var e="^"===t.charAt(0);return{val:e?t.substring(1):t,root:e}},_r=function(t,e){return function(r){var n=r;n&&n.url&&n.name&&n.name.match(/\.\*\*$/)&&(n.url+="{remainder:any}");var i=wr(n.url),o=r.parent,a=i?t.compile(i.val,{params:r.params||{},paramMap:function(t,e){return!1===n.reloadOnSearch&&e&&(t=pe(t||{},{dynamic:!0})),t}}):n.url;if(!a)return null;if(!t.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+r+"'");return i&&i.root?a:(o&&o.navigable||e()).url.append(a)}},$r=function(t){return function(e){return!t(e)&&e.url?e:e.parent?e.parent.navigable:null}},Sr=function(t){return function(e){var r=function(e,r){return t.fromConfig(r,null,e)},n=e.url&&e.url.parameters({inherit:!1})||[],i=Se($e(w(e.params||{},n.map(It("id"))),r));return n.concat(i).map(function(t){return[t.id,t]}).reduce(C,{})}},br=function(){function t(t,e){function r(e){return o(e)?null:t.find(n.parentName(e))||i()}this.matcher=t;var n=this,i=function(){return t.find("")},o=function(t){return""===t.name};this.builders={name:[Z],self:[X],parent:[r],data:[tt],url:[_r(e,i)],navigable:[$r(o)],params:[Sr(e.paramFactory)],views:[],path:[et],includes:[rt],resolvables:[nt]}}return t.prototype.builder=function(t,e){var r=this.builders,n=r[t]||[];return Zt(t)&&!zt(e)?n.length>1?n:n[0]:Zt(t)&&Kt(e)?(r[t]=n,r[t].push(e),function(){return r[t].splice(r[t].indexOf(e,1))&&null}):void 0},t.prototype.build=function(t){var e=this,r=e.matcher,n=e.builders,i=this.parentName(t);if(i&&!r.find(i,void 0,!1))return null;for(var o in n)if(n.hasOwnProperty(o)){var a=n[o].reduce(function(t,e){return function(r){return e(r,t)}},l);t[o]=a(t)}return t},t.prototype.parentName=function(t){var e=t.name||"",r=e.split(".");if(r.length>1){if(t.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+e+")");return"**"===r.pop()&&r.pop(),r.join(".")}return t.parent?Zt(t.parent)?t.parent:t.parent.name:""},t.prototype.name=function(t){var e=t.name;if(-1!==e.indexOf(".")||!t.parent)return e;var r=Zt(t.parent)?t.parent:t.parent.name;return r?r+"."+e:e},t}(),Rr=function(){function t(t){this._states=t}return t.prototype.isRelative=function(t){return t=t||"",0===t.indexOf(".")||0===t.indexOf("^")},t.prototype.find=function(t,e,r){if(void 0===r&&(r=!0),t||""===t){var n=Zt(t),i=n?t:t.name;this.isRelative(i)&&(i=this.resolvePath(i,e));var o=this._states[i];if(o&&(n||!(n||o!==t&&o.self!==t)))return o;if(n&&r){var a=Se(this._states),u=a.filter(function(t){return t.__stateObjectCache.nameGlob&&t.__stateObjectCache.nameGlob.matches(i)});return u.length>1&&console.log("stateMatcher.find: Found multiple matches for "+i+" using glob: ",u.map(function(t){return t.name})),u[0]}}},t.prototype.resolvePath=function(t,e){if(!e)throw new Error("No reference point given for path '"+t+"'");for(var r=this.find(e),n=t.split("."),i=0,o=n.length,a=r;i0;){var c=r.shift(),f=c.name,l=i.build(c),h=a.indexOf(c);if(l){var p=s(f);if(p&&p.name===f)throw new Error("State '"+f+"' is already defined");var d=s(f+".**");d&&this.$registry.deregister(d),n[f]=c,this.attachRoute(c),h>=0&&a.splice(h,1),o.push(c)}else{var v=u[f];if(u[f]=r.length,h>=0&&v===r.length)return r.push(c),n;h<0&&a.push(c),r.push(c)}}return o.length&&this.listeners.forEach(function(t){return t("registered",o.map(function(t){return t.self}))}),n},t.prototype.attachRoute=function(t){!t.abstract&&t.url&&this.$urlRouter.rule(this.$urlRouter.urlRuleFactory.create(t))},t}(),Tr=function(){function t(t){this._router=t,this.states={},this.listeners=[],this.matcher=new Rr(this.states),this.builder=new br(this.matcher,t.urlMatcherFactory),this.stateQueue=new Er(this,t.urlRouter,this.states,this.builder,this.listeners),this._registerRoot()}return t.prototype._registerRoot=function(){var t={name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0};(this._root=this.stateQueue.register(t)).navigable=null},t.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},t.prototype.onStatesChanged=function(t){return this.listeners.push(t),function(){ye(this.listeners)(t)}.bind(this)},t.prototype.root=function(){return this._root},t.prototype.register=function(t){return this.stateQueue.register(t)},t.prototype._deregisterTree=function(t){var e=this,r=this.get().map(function(t){return t.$$state()}),n=function(t){var e=r.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(n(e))},i=n([t]),o=[t].concat(i).reverse();return o.forEach(function(t){var r=e._router.urlRouter;r.rules().filter(Vt("state",t)).forEach(r.removeRule.bind(r)),delete e.states[t.name]}),o},t.prototype.deregister=function(t){var e=this.get(t);if(!e)throw new Error("Can't deregister state; not found: "+t);var r=this._deregisterTree(e.$$state());return this.listeners.forEach(function(t){return t("deregistered",r.map(function(t){return t.self}))}),r},t.prototype.get=function(t,e){var r=this;if(0===arguments.length)return Object.keys(this.states).map(function(t){return r.states[t].self});var n=this.matcher.find(t,e);return n&&n.self||null},t.prototype.decorator=function(t,e){return this.builder.builder(t,e)},t}(),Cr=function(t,e,r){return t[e]=t[e]||r()},Pr=K("/"),kr=function(){function e(t,r,n,i){var o=this;this.config=i,this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.pattern=t,this.config=m(this.config,{params:{},strict:!0,caseInsensitive:!1,paramMap:f});for(var a,u,s,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,h=0,p=[],d=function(r){if(!e.nameValidator.test(r))throw new Error("Invalid parameter name '"+r+"' in pattern '"+t+"'");if(S(o._params,Vt("id",r)))throw new Error("Duplicate parameter name '"+r+"' in pattern '"+t+"'")},v=function(e,n){var i=e[2]||e[3],a=n?e[4]:e[4]||("*"===e[1]?".*":null);return{id:i,regexp:a,cfg:o.config.params[i],segment:t.substring(h,e.index),type:a?r.type(a)||function(t){return ve(r.type(n?"query":"path"),{pattern:new RegExp(t,o.config.caseInsensitive?"i":void 0)})}(a):null}};(a=c.exec(t))&&(u=v(a,!1),!(u.segment.indexOf("?")>=0));)d(u.id),this._params.push(n.fromPath(u.id,u.type,this.config.paramMap(u.cfg,!1))),this._segments.push(u.segment),p.push([u.segment,P(this._params)]),h=c.lastIndex;s=t.substring(h);var y=s.indexOf("?");if(y>=0){var g=s.substring(y);if(s=s.substring(0,y),g.length>0)for(h=0;a=l.exec(g);)u=v(a,!0),d(u.id),this._params.push(n.fromSearch(u.id,u.type,this.config.paramMap(u.cfg,!0))),h=c.lastIndex}this._segments.push(s),this._compiled=p.map(function(t){return it.apply(null,t)}).concat(it(s))}return e.prototype.append=function(t){return this._children.push(t),t._cache={path:this._cache.path.concat(t),parent:this,pattern:null},t},e.prototype.isRoot=function(){return this._cache.path[0]===this},e.prototype.toString=function(){return this.pattern},e.prototype.exec=function(t,e,r,n){var i=this;void 0===e&&(e={}),void 0===n&&(n={});var o=Cr(this._cache,"pattern",function(){return new RegExp(["^",Pe(i._cache.path.map(It("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)}).exec(t);if(!o)return null;var a=this.parameters(),u=a.filter(function(t){return!t.isSearch()}),s=a.filter(function(t){return t.isSearch()}),c=this._cache.path.map(function(t){return t._segments.length-1}).reduce(function(t,e){return t+e}),f={};if(c!==o.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var l=0;ln.weight?o:n}return n},t.prototype.sync=function(t){if(!t||!t.defaultPrevented){var e=this._router,r=e.urlService,n=e.stateService,i={path:r.path(),search:r.search(),hash:r.hash()},o=this.match(i);s([[Zt,function(t){return r.url(t,!0)}],[We.isDef,function(t){return n.go(t.state,t.params,t.options)}],[Nt(We),function(t){return n.go(t.state(),t.params(),t.options())}]])(o&&o.rule.handler(o.match,i,e))}},t.prototype.listen=function(t){var e=this;if(!1!==t)return this._stopFn=this._stopFn||this._router.urlService.onChange(function(t){return e.sync(t)});this._stopFn&&this._stopFn(),delete this._stopFn},t.prototype.update=function(t){var e=this._router.locationService;if(t)return void(this.location=e.path());e.path()!==this.location&&e.url(this.location,!0)},t.prototype.push=function(t,e,r){var n=r&&!!r.replace;this._router.urlService.url(t.format(e||{}),n)},t.prototype.href=function(t,e,r){var n=t.format(e);if(null==n)return null;r=r||{absolute:!1};var i=this._router.urlService.config,o=i.html5Mode();if(o||null===n||(n="#"+i.hashPrefix()+n),n=ot(n,o,r.absolute,i.baseHref()),!r.absolute||!n)return n;var a=!o&&n?"/":"",u=i.port();return u=80===u||443===u?"":":"+u,[i.protocol(),"://",i.host(),u,a,n].join("")},t.prototype.rule=function(t){var e=this;if(!xr.isUrlRule(t))throw new Error("invalid rule");return t.$id=this._id++,t.priority=t.priority||0,this._rules.push(t),this._sorted=!1,function(){return e.removeRule(t)}},t.prototype.removeRule=function(t){ye(this._rules,t)},t.prototype.rules=function(){return this.ensureSorted(),this._rules.slice()},t.prototype.otherwise=function(t){var e=at(t);this._otherwiseFn=this.urlRuleFactory.create(Ut(!0),e),this._sorted=!1},t.prototype.initial=function(t){var e=at(t),r=function(t,e){return 0===e.globals.transitionHistory.size()&&!!/^\/?$/.exec(t.path)};this.rule(this.urlRuleFactory.create(r,e))},t.prototype.when=function(t,e,r){var n=this.urlRuleFactory.create(t,e);return zt(r&&r.priority)&&(n.priority=r.priority),this.rule(n),n},t.prototype.deferIntercept=function(t){void 0===t&&(t=!0),this.interceptDeferred=t},t}(),Hr=function(){function t(){var t=this;this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIViews:function(){return t._uiViews},_activeViewConfigs:function(){return t._viewConfigs}}}return t.prototype._rootViewContext=function(t){return this._rootContext=t||this._rootContext},t.prototype._viewConfigFactory=function(t,e){this._viewConfigFactories[t]=e},t.prototype.createViewConfig=function(t,e){var r=this._viewConfigFactories[e.$type];if(!r)throw new Error("ViewService: No view config factory registered for type "+e.$type);var n=r(t,e);return te(n)?n:[n]},t.prototype.deactivateViewConfig=function(t){Ge.traceViewServiceEvent("<- Removing",t),ye(this._viewConfigs,t)},t.prototype.activateViewConfig=function(t){Ge.traceViewServiceEvent("-> Registering",t),this._viewConfigs.push(t)},t.prototype.sync=function(){function e(t){var e=function(t){return t&&t.parent?e(t.parent)+1:1};return 1e4*t.fqn.split(".").length+e(t.creationContext)}function n(t){for(var e=t.viewDecl.$context,r=0;++r&&e.parent;)e=e.parent;return r}var i=this,o=this._uiViews.map(function(t){return[t.fqn,t]}).reduce(C,{}),a=r(function(t,e,r,n){return e*(t(r)-t(n))}),u=function(e){var r=i._viewConfigs.filter(t.matches(o,e));return r.length>1&&r.sort(a(n,-1)),[e,r[0]]},s=function(t){var e=t[0],r=t[1];-1!==i._uiViews.indexOf(e)&&e.configUpdated(r)};this._uiViews.sort(a(e,1)).map(u).forEach(s)},t.prototype.registerUIView=function(t){Ge.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews,r=function(e){return e.fqn===t.fqn};return e.filter(r).length&&Ge.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){if(-1===e.indexOf(t))return void Ge.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t);Ge.traceViewServiceUIViewEvent("<- Deregistering",t),ye(e)(t)}},t.prototype.available=function(){return this._uiViews.map(It("fqn"))},t.prototype.active=function(){return this._uiViews.filter(It("$config")).map(It("name"))},t.normalizeUIViewTarget=function(t,e){void 0===e&&(e="");var r=e.split("@"),n=r[0]||"$default",i=Zt(r[1])?r[1]:"^",o=/^(\^(?:\.\^)*)\.(.*$)/.exec(n);(o&&(i=o[1],n=o[2]),"!"===n.charAt(0)&&(n=n.substr(1),i=""),/^(\^(?:\.\^)*)$/.exec(i))?i=i.split(".").reduce(function(t,e){return t.parent},t).name:"."===i&&(i=t.name);return{uiViewName:n,uiViewContextAnchor:i}},t}();Hr.matches=function(t,e){return function(r){if(e.$type!==r.viewDecl.$type)return!1;var n=r.viewDecl,i=n.$uiViewName.split("."),o=e.fqn.split(".");if(!de(i,o.slice(0-i.length)))return!1;var a=1-i.length||void 0,u=o.slice(0,a).join("."),s=t[u].creationContext;return n.$uiViewContextAnchor===(s&&s.name)}};var qr=function(){function t(){this.params=new gr,this.lastStartedTransitionId=-1,this.transitionHistory=new qe([],1),this.successfulTransitions=new qe([],1)}return t.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},t}(),Dr=function(t){return t.reduce(function(t,e){return t[e]=oe(e),t},{dispose:l})},Nr=["url","path","search","hash","onChange"],Fr=["port","protocol","host","baseHref","html5Mode","hashPrefix"],Ur=["type","caseInsensitive","strictMode","defaultSquashPolicy"],Lr=["sort","when","initial","otherwise","rules","rule","removeRule"],Mr=["deferIntercept","listen","sync","match"],Br=function(){function t(t,e){void 0===e&&(e=!0),this.router=t,this.rules={},this.config={};var r=function(){return t.locationService};h(r,this,r,Nr,e);var n=function(){return t.locationConfig};h(n,this.config,n,Fr,e);var i=function(){return t.urlMatcherFactory};h(i,this.config,i,Ur);var o=function(){return t.urlRouter};h(o,this.rules,o,Lr),h(o,this,o,Mr)}return t.prototype.url=function(t,e,r){},t.prototype.path=function(){},t.prototype.search=function(){},t.prototype.hash=function(){},t.prototype.onChange=function(t){},t.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},t.prototype.dispose=function(){},t.prototype.sync=function(t){},t.prototype.listen=function(t){},t.prototype.deferIntercept=function(t){},t.prototype.match=function(t){},t}();Br.locationServiceStub=Dr(Nr),Br.locationConfigStub=Dr(Fr);var Gr=0,Wr=function(){function t(t,e){void 0===t&&(t=Br.locationServiceStub),void 0===e&&(e=Br.locationConfigStub),this.locationService=t,this.locationConfig=e,this.$id=Gr++,this._disposed=!1,this._disposables=[],this.trace=Ge,this.viewService=new Hr,this.transitionService=new $n(this),this.globals=new qr,this.urlMatcherFactory=new Or,this.urlRouter=new Ar(this),this.stateRegistry=new Tr(this),this.stateService=new Sn(this),this.urlService=new Br(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlRouter),this.disposable(t),this.disposable(e)}return t.prototype.disposable=function(t){this._disposables.push(t)},t.prototype.dispose=function(t){var e=this;if(t&&Kt(t.dispose))return void t.dispose(this);this._disposed=!0,this._disposables.slice().forEach(function(t){try{"function"==typeof t.dispose&&t.dispose(e),ye(e._disposables,t)}catch(t){}})},t.prototype.plugin=function(t,e){void 0===e&&(e={});var r=new t(this,e);if(!r.name)throw new Error("Required property `name` missing on plugin: "+r);return this._disposables.push(r),this._plugins[r.name]=r},t.prototype.getPlugin=function(t){return t?this._plugins[t]:Se(this._plugins)},t}(),zr=function(t){return t.onCreate({},ut)},Jr=function(t){function e(e){if(e)return e instanceof We?e:Zt(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}var r=t.to().redirectTo;if(r){var n=t.router.stateService;return Kt(r)?ae.$q.when(r(t)).then(e):e(r)}},Qr=function(t){return t.onStart({to:function(t){return!!t.redirectTo}},Jr)},Kr=st("onExit"),Yr=function(t){return t.onExit({exiting:function(t){return!!t.onExit}},Kr)},Zr=st("onRetain"),Xr=function(t){return t.onRetain({retained:function(t){return!!t.onRetain}},Zr)},tn=st("onEnter"),en=function(t){return t.onEnter({entering:function(t){return!!t.onEnter}},tn)},rn=function(t){return new fr(t.treeChanges().to).resolvePath("EAGER",t).then(l)},nn=function(t){return t.onStart({},rn,{priority:1e3})},on=function(t,e){return new fr(t.treeChanges().to).subContext(e.$$state()).resolvePath("LAZY",t).then(l)},an=function(t){return t.onEnter({entering:Ut(!0)},on,{priority:1e3})},un=function(t){var e=ae.$q,r=t.views("entering");if(r.length)return e.all(r.map(function(t){return e.when(t.load())})).then(l)},sn=function(t){return t.onFinish({},un)},cn=function(t){var e=t.views("entering"),r=t.views("exiting");if(e.length||r.length){var n=t.router.viewService;r.forEach(function(t){return n.deactivateViewConfig(t)}),e.forEach(function(t){return n.activateViewConfig(t)}),n.sync()}},fn=function(t){return t.onSuccess({},cn)},ln=function(t){var e=t.router.globals,r=function(){e.successfulTransitions.enqueue(t),e.$current=t.$to(),e.current=e.$current.self,le(t.params(),e.params)},n=function(){e.transition===t&&(e.transition=null)};t.onSuccess({},r,{priority:1e4}),t.promise.then(n,n)},hn=function(t){return t.onCreate({},ln)},pn=function(t){var e=t.options(),r=t.router.stateService,n=t.router.urlRouter;if("url"!==e.source&&e.location&&r.$current.navigable){var i={replace:"replace"===e.location};n.push(r.$current.navigable.url,r.params,i)}n.update(!0)},dn=function(t){return t.onSuccess({},pn,{priority:9999})},vn=function(t){function e(){if("url"!==t.originalTransition().options().source){var e=t.targetState();return r.stateService.target(e.identifier(),e.params(),e.options())}var n=r.urlService,i=n.match(n.parts()),o=i&&i.rule;if(o&&"STATE"===o.type){var a=o.state,u=i.match;return r.stateService.target(a,u,t.options())}r.urlService.sync()}var r=t.router,n=t.entering().filter(function(t){return!!t.$$state().lazyLoad}).map(function(e){return ct(t,e)});return ae.$q.all(n).then(e)},mn=function(t){return t.onBefore({entering:function(t){return!!t.lazyLoad}},vn)},yn=function(){function t(t,e,r,n,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=Je.HANDLE_RESULT),void 0===a&&(a=Je.REJECT_ERROR),void 0===u&&(u=!1),this.name=t,this.hookPhase=e,this.hookOrder=r,this.criteriaMatchPath=n,this.reverseSort=i,this.getResultHandler=o,this.getErrorHandler=a,this.synchronous=u}return t}(),gn=function(t){return t.onBefore({},ft,{priority:-9999})},wn=function(t){return t.onBefore({},lt,{priority:-1e4})},_n={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,custom:{},current:function(){return null},source:"unknown"},$n=function(){function e(t){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=t,this.$view=t.viewService,this._deregisterHookFns={},this._pluginapi=h(Ut(this),{},Ut(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks()}return e.prototype.onCreate=function(t,e,r){},e.prototype.onBefore=function(t,e,r){},e.prototype.onStart=function(t,e,r){},e.prototype.onExit=function(t,e,r){},e.prototype.onRetain=function(t,e,r){},e.prototype.onEnter=function(t,e,r){},e.prototype.onFinish=function(t,e,r){},e.prototype.onSuccess=function(t,e,r){},e.prototype.onError=function(t,e,r){},e.prototype.dispose=function(t){Se(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,ye(t,e)})})},e.prototype.create=function(t,e){return new pr(t,e,this._router)},e.prototype._defineCoreEvents=function(){var e=t.TransitionHookPhase,r=Je,n=this._criteriaPaths;this._defineEvent("onCreate",e.CREATE,0,n.to,!1,r.LOG_REJECTED_RESULT,r.THROW_ERROR,!0),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,!1,r.LOG_REJECTED_RESULT,r.LOG_ERROR,!0),this._defineEvent("onError",e.ERROR,0,n.to,!1,r.LOG_REJECTED_RESULT,r.LOG_ERROR,!0)},e.prototype._defineCorePaths=function(){var e=t.TransitionHookScope.STATE,r=t.TransitionHookScope.TRANSITION;this._definePathType("to",r),this._definePathType("from",r),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(t,e,r,n,i,o,a,u){void 0===i&&(i=!1),void 0===o&&(o=Je.HANDLE_RESULT),void 0===a&&(a=Je.REJECT_ERROR),void 0===u&&(u=!1);var s=new yn(t,e,r,n,i,o,a,u);this._eventTypes.push(s),q(this,this,s)},e.prototype._getEvents=function(t){return(zt(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(t,e){var r=t.hookPhase-e.hookPhase;return 0===r?t.hookOrder-e.hookOrder:r})},e.prototype._definePathType=function(t,e){this._criteriaPaths[t]={name:t,scope:e}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(t){return this._registeredHooks[t]},e.prototype._registerCoreTransitionHooks=function(){var t=this._deregisterHookFns;t.addCoreResolves=zr(this),t.ignored=gn(this),t.invalid=wn(this),t.redirectTo=Qr(this),t.onExit=Yr(this),t.onRetain=Xr(this),t.onEnter=en(this),t.eagerResolve=nn(this),t.lazyResolve=an(this),t.loadViews=sn(this),t.activateViews=fn(this),t.updateGlobals=hn(this),t.updateUrl=dn(this),t.lazyLoad=mn(this)},e}(),Sn=function(){function e(t){this.router=t,this.invalidCallbacks=[],this._defaultErrorHandler=function(t){t instanceof Error&&t.stack?(console.error(t),console.error(t.stack)):t instanceof Ne?(console.error(t.toString()),t.detail&&t.detail.stack&&console.error(t.detail.stack)):console.error(t)};var r=["current","$current","params","transition"],n=Object.keys(e.prototype).filter(Ht(me(r)));h(Ut(e.prototype),this,Ut(this),n)}return Object.defineProperty(e.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(e.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),e.prototype.dispose=function(){this.defaultErrorHandler(l),this.invalidCallbacks=[]},e.prototype._handleInvalidTargetState=function(t,e){function r(){var t=s.dequeue();return void 0===t?Ne.invalid(e.error()).toPromise():ae.$q.when(t(e,i,c)).then(f).then(function(t){return t||r()})}var n=this,i=rr.makeTargetState(t),o=this.router.globals,a=function(){return o.transitionHistory.peekTail()},u=a(),s=new qe(this.invalidCallbacks.slice()),c=new fr(t).injector(),f=function(t){if(t instanceof We){var e=t;return e=n.target(e.identifier(),e.params(),e.options()),e.valid()?a()!==u?Ne.superseded().toPromise():n.transitionTo(e.identifier(),e.params(),e.options()):Ne.invalid(e.error()).toPromise()}};return r()},e.prototype.onInvalid=function(t){return this.invalidCallbacks.push(t),function(){ye(this.invalidCallbacks)(t)}.bind(this)},e.prototype.reload=function(t){return this.transitionTo(this.current,this.params,{reload:!zt(t)||t,inherit:!1,notify:!1})},e.prototype.go=function(t,e,r){var n={relative:this.$current,inherit:!0},i=m(r,n,_n);return this.transitionTo(t,e,i)},e.prototype.target=function(t,e,r){if(void 0===r&&(r={}),Xt(r.reload)&&!r.reload.name)throw new Error("Invalid reload state object");var n=this.router.stateRegistry;if(r.reloadState=!0===r.reload?n.root():n.matcher.find(r.reload,r.relative),r.reload&&!r.reloadState)throw new Error("No such reload state '"+(Zt(r.reload)?r.reload:r.reload.name)+"'");var i=n.matcher.find(t,r.relative);return new We(t,i,e,r)},e.prototype.getCurrentPath=function(){var t=this,e=this.router.globals,r=e.successfulTransitions.peekTail();return r?r.treeChanges().to:function(){return[new er(t.router.stateRegistry.root())]}()},e.prototype.transitionTo=function(e,r,n){var i=this;void 0===r&&(r={}),void 0===n&&(n={});var o=this.router,a=o.globals;n=m(n,_n),n=pe(n,{current:function(){return a.transition}});var u=this.target(e,r,n),s=this.getCurrentPath();if(!u.exists())return this._handleInvalidTargetState(s,u);if(!u.valid())return He(u.error());var c=function(e){return function(r){if(r instanceof Ne){var n=o.globals.lastStartedTransitionId===e.$id;if(r.type===t.RejectType.IGNORED)return n&&o.urlRouter.update(),ae.$q.when(a.current);var u=r.detail;if(r.type===t.RejectType.SUPERSEDED&&r.redirected&&u instanceof We){var s=e.redirect(u);return s.run().catch(c(s))}if(r.type===t.RejectType.ABORTED)return n&&o.urlRouter.update(),ae.$q.reject(r)}return i.defaultErrorHandler()(r),ae.$q.reject(r)}},f=this.router.transitionService.create(s,u),l=f.run().catch(c(f));return Ae(l),pe(l,{transition:f})},e.prototype.is=function(t,e,r){r=m(r,{relative:this.$current});var n=this.router.stateRegistry.matcher.find(t,r.relative);if(zt(n)){if(this.$current!==n)return!1;if(!e)return!0;var i=n.parameters({inherit:!0,matchingKeys:e});return tr.equals(i,tr.values(i,e),this.params)}},e.prototype.includes=function(t,e,r){r=m(r,{relative:this.$current});var n=Zt(t)&&Lt.fromString(t);if(n){if(!n.matches(this.$current.name))return!1;t=this.$current.name}var i=this.router.stateRegistry.matcher.find(t,r.relative),o=this.$current.includes;if(zt(i)){if(!zt(o[i.name]))return!1;if(!e)return!0;var a=i.parameters({inherit:!0,matchingKeys:e});return tr.equals(a,tr.values(a,e),this.params)}},e.prototype.href=function(t,e,r){r=m(r,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),e=e||{};var n=this.router.stateRegistry.matcher.find(t,r.relative);if(!zt(n))return null;r.inherit&&(e=this.params.$inherit(e,this.$current,n));var i=n&&r.lossy?n.navigable:n;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,e,{absolute:r.absolute}):null},e.prototype.defaultErrorHandler=function(t){return this._defaultErrorHandler=t||this._defaultErrorHandler},e.prototype.get=function(t,e){var r=this.router.stateRegistry;return 0===arguments.length?r.get():r.get(t,e||this.$current)},e.prototype.lazyLoad=function(t,e){var r=this.get(t);if(!r||!r.lazyLoad)throw new Error("Can not lazy load "+t);var n=this.getCurrentPath(),i=rr.makeTargetState(n);return e=e||this.router.transitionService.create(n,i),ct(e,r)},e}(),bn={when:function(t){return new Promise(function(e,r){return e(t)})},reject:function(t){return new Promise(function(e,r){r(t)})},defer:function(){var t={};return t.promise=new Promise(function(e,r){t.resolve=e,t.reject=r}),t},all:function(t){if(te(t))return Promise.all(t);if(Xt(t)){var e=Object.keys(t).map(function(e){return t[e].then(function(t){return{key:e,val:t}})});return bn.all(e).then(function(t){return t.reduce(function(t,e){return t[e.key]=e.val,t},{})})}}},Rn={},En={get:function(t){return Rn[t]},has:function(t){return null!=En.get(t)},invoke:function(t,e,r){var n=pe({},Rn,r||{}),i=En.annotate(t),o=Oe(function(t){return n.hasOwnProperty(t)},function(t){return"DI can't find injectable: '"+t+"'"}),a=i.filter(o).map(function(t){return n[t]});return Kt(t)?t.apply(e,a):t.slice(-1)[0].apply(e,a)},annotate:function(t){if(!c(t))throw new Error("Not an injectable function: "+t);if(t&&t.$inject)return t.$inject;if(te(t))return t.slice(0,-1);var e=t.toString().replace(/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,"");return e.slice(e.indexOf("(")+1,e.indexOf(")")).match(/([^\s,]+)/g)||[]}},Tn=function(t){return function(e){if(!e)return["",""];var r=e.indexOf(t);return-1===r?[e,""]:[e.substr(0,r),e.substr(r+1)]}},Cn=Tn("#"),Pn=Tn("?"),kn=Tn("="),On=function(t){return t?t.replace(/^#/,""):""},xn=function(t,e){var r=e[0],n=e[1];return t.hasOwnProperty(r)?te(t[r])?t[r].push(n):t[r]=[t[r],n]:t[r]=n,t},jn=function(t){return t.split("&").filter(f).map(kn).reduce(xn,{})},In=function(t){var e=t.path(),r=t.search(),n=t.hash(),i=Object.keys(r).map(function(t){var e=r[t];return(te(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(Ee,[]).join("&");return e+(i?"?"+i:"")+(n?"#"+n:"")},Vn=function(){function t(t,e){var r=this;this.fireAfterUpdate=e,this._listener=function(t){return r._listeners.forEach(function(e){return e(t)})},this._listeners=[],this.hash=function(){return ht(r._get()).hash},this.path=function(){return ht(r._get()).path},this.search=function(){return jn(ht(r._get()).search)},this._location=window&&window.location,this._history=window&&window.history}return t.prototype.url=function(t,e){if(void 0===e&&(e=!0),zt(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate)){var r=pe(new Event("locationchange"),{url:t});this._listeners.forEach(function(t){return t(r)})}return In(this)},t.prototype.onChange=function(t){var e=this;return this._listeners.push(t),function(){return ye(e._listeners,t)}},t.prototype.dispose=function(t){we(this._listeners)},t}(),An=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Hn=function(t){function e(e){var r=t.call(this,e,!1)||this;return window.addEventListener("hashchange",r._listener,!1),r}return An(e,t),e.prototype._get=function(){return On(this._location.hash)},e.prototype._set=function(t,e,r,n){this._location.hash=r},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),window.removeEventListener("hashchange",this._listener)},e}(Vn),qn=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Dn=function(t){function e(e){return t.call(this,e,!0)||this}return qn(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(t,e,r,n){this._url=r},e}(Vn),Nn=function(){var t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])};return function(e,r){function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),Fn=function(t){function e(e){var r=t.call(this,e,!0)||this;return r._config=e.urlService.config,window.addEventListener("popstate",r._listener,!1),r}return Nn(e,t),e.prototype._get=function(){var t=this._location,e=t.pathname,r=t.hash,n=t.search;return n=Pn(n)[1],r=Cn(r)[1],e+(n?"?"+n:"")+(r?"$"+n:"")},e.prototype._set=function(t,e,r,n){var i=this,o=i._config,a=i._history,u=o.baseHref()+r;n?a.replaceState(t,e,u):a.pushState(t,e,u)},e.prototype.dispose=function(e){t.prototype.dispose.call(this,e),window.removeEventListener("popstate",this._listener)},e}(Vn),Un=function(){function t(){var t=this;this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return zt(e)?t._hashPrefix=e:t._hashPrefix},this.dispose=l}return t}(),Ln=function(){function t(t,e){void 0===e&&(e=!1),this._isHtml5=e,this._baseHref=void 0,this._hashPrefix=""}return t.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},t.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},t.prototype.host=function(){return location.host},t.prototype.html5Mode=function(){return this._isHtml5},t.prototype.hashPrefix=function(t){return zt(t)?this._hashPrefix=t:this._hashPrefix},t.prototype.baseHref=function(t){return zt(t)?this._baseHref=t:this._baseHref||this.applyDocumentBaseHref()},t.prototype.applyDocumentBaseHref=function(){var t=document.getElementsByTagName("base");return this._baseHref=t.length?t[0].href.substr(location.origin.length):""},t.prototype.dispose=function(){},t}(),Mn=pt("vanilla.hashBangLocation",!1,Hn,Ln),Bn=pt("vanilla.pushStateLocation",!0,Fn,Ln),Gn=pt("vanilla.memoryLocation",!1,Dn,Un),Wn=function(){function t(){}return t.prototype.dispose=function(t){},t}(),zn=Object.freeze({fromJson:ce,toJson:fe,copy:le,forEach:he,extend:pe,equals:de,identity:f,noop:l,createProxyFunctions:h,inherit:ve,inArray:me,_inArray:p,removeFrom:ye,_removeFrom:d,pushTo:ge,_pushTo:v,deregAll:we,defaults:m,mergeR:_e,ancestors:y,pick:g,omit:w,pluck:_,filter:$,find:S,mapObj:$e,map:b,values:Se,allTrueR:be,anyTrueR:Re,unnestR:Ee,flattenR:Te,pushR:R,uniqR:Ce,unnest:Pe,flatten:ke,assertPredicate:Oe,assertMap:xe,assertFn:E,pairs:je,arrayTuples:T,applyPairs:C,tail:P,_extend:x,sortBy:Ie,composeSort:Ve,silenceUncaughtInPromise:Ae,silentRejection:He,notImplemented:oe,services:ae,Glob:Lt,curry:r,compose:n,pipe:i,prop:It,propEq:Vt,parse:At,not:Ht,and:o,or:a,all:qt,any:Dt,is:Nt,eq:Ft,val:Ut,invoke:u,pattern:s,isUndefined:Wt,isDefined:zt,isNull:Jt,isNullOrUndefined:Qt,isFunction:Kt,isNumber:Yt,isString:Zt,isObject:Xt,isArray:te,isDate:ee,isRegExp:re,isState:ne,isInjectable:c,isPromise:ie,Queue:qe,maxLength:B,padString:G,kebobString:W,functionToString:z,fnToString:J,stringify:Q,beforeAfterSubstr:mr,splitOnDelim:K,joinNeighborsR:Y,get Category(){return t.Category},Trace:Be,trace:Ge,get DefType(){return t.DefType},Param:tr,ParamTypes:yr,StateParams:gr,ParamType:Ye,PathNode:er,PathUtils:rr,resolvePolicies:or,defaultResolvePolicy:nr,Resolvable:ir,NATIVE_INJECTOR_TOKEN:cr,ResolveContext:fr,resolvablesBuilder:nt,StateBuilder:br,StateObject:Mt,StateMatcher:Rr,StateQueueManager:Er,StateRegistry:Tr,StateService:Sn,TargetState:We,get TransitionHookPhase(){return t.TransitionHookPhase},get TransitionHookScope(){return t.TransitionHookScope},HookBuilder:Ke,matchState:H,RegisteredHook:Qe,makeEvent:q,get RejectType(){return t.RejectType},Rejection:Ne,Transition:pr,TransitionHook:Je,TransitionEventType:yn,defaultTransOpts:_n,TransitionService:$n,UrlMatcher:kr,UrlMatcherFactory:Or,UrlRouter:Ar,UrlRuleFactory:xr,BaseUrlRule:Ir,UrlService:Br,ViewService:Hr,UIRouterGlobals:qr,UIRouter:Wr,$q:bn,$injector:En,BaseLocationServices:Vn,HashLocationService:Hn,MemoryLocationService:Dn,PushStateLocationService:Fn,MemoryLocationConfig:Un,BrowserLocationConfig:Ln,splitHash:Cn,splitQuery:Pn,splitEqual:kn,trimHashVal:On,keyValsToObjectR:xn,getParams:jn,parseUrl:ht,buildUrl:In,locationPluginFactory:pt,servicesPlugin:dt,hashLocationPlugin:Mn,pushStateLocationPlugin:Bn,memoryLocationPlugin:Gn,UIRouterPluginBase:Wn}),Jn=angular,Qn=e&&e.module?e:Jn,Kn=function(t,e){return t.reduce(function(t,r){return t||zt(e[r])},!1)},Yn=0,Zn=function(){function t(t,e,r){var n=this;this.path=t,this.viewDecl=e,this.factory=r,this.$id=Yn++,this.loaded=!1,this.getTemplate=function(t,e){return n.component?n.factory.makeComponentTemplate(t,e,n.component,n.viewDecl.bindings):n.template}}return t.prototype.load=function(){var t=this,e=ae.$q,r=new fr(this.path),n=this.path.reduce(function(t,e){return pe(t,e.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,n,r)),controller:e.when(this.getController(r))};return e.all(i).then(function(e){return Ge.traceViewServiceEvent("Loaded",t),t.controller=e.controller,pe(t,e.template),t})},t.prototype.getController=function(t){var e=this.viewDecl.controllerProvider;if(!c(e))return this.viewDecl.controller;var r=ae.$injector.annotate(e),n=te(e)?P(e):e;return new ir("",n,r).get(t)},t}(),Xn=function(){function t(){var t=this;this._useHttp=Qn.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,r,n){return t.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),t.$http=e,t.$templateCache=r,t}]} -return t.prototype.useHttpService=function(t){this._useHttp=t},t.prototype.fromConfig=function(t,e,r){var n=function(t){return ae.$q.when(t).then(function(t){return{template:t}})},i=function(t){return ae.$q.when(t).then(function(t){return{component:t}})};return zt(t.template)?n(this.fromString(t.template,e)):zt(t.templateUrl)?n(this.fromUrl(t.templateUrl,e)):zt(t.templateProvider)?n(this.fromProvider(t.templateProvider,e,r)):zt(t.component)?i(t.component):zt(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,r)):n("")},t.prototype.fromString=function(t,e){return Kt(t)?t(e):t},t.prototype.fromUrl=function(t,e){return Kt(t)&&(t=t(e)),null==t?null:this._useHttp?this.$http.get(t,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(t){return t.data}):this.$templateRequest(t)},t.prototype.fromProvider=function(t,e,r){var n=ae.$injector.annotate(t),i=te(t)?P(t):t;return new ir("",i,n).get(r)},t.prototype.fromComponentProvider=function(t,e,r){var n=ae.$injector.annotate(t),i=te(t)?P(t):t;return new ir("",i,n).get(r)},t.prototype.makeComponentTemplate=function(t,e,r,n){n=n||{};var i=Qn.version.minor>=3?"::":"",o=function(r){var o=r.name,a=r.type,u=W(o);if(t.attr(u)&&!n[o])return"x-"+u+"='"+t.attr(u)+"'";var s=n[o]||o;if("@"===a)return"x-"+u+"='{{"+i+"$resolve."+s+"}}'";if("&"===a){var c=e.getResolvable(s),f=c&&c.data,l=f&&ae.$injector.annotate(f)||[];return"x-"+u+"='$resolve."+s+(te(f)?"["+(f.length-1)+"]":"")+"("+l.join(",")+")'"}return"x-"+u+"='"+i+"$resolve."+s+"'"},a=yt(r).map(o).join(" "),u=W(r);return/^(x|data)-/.exec(u)&&(u="x-"+u),"<"+u+" "+a+">"},t}(),ti=function(t){return ei(Xt(t.bindToController)?t.bindToController:t.scope)},ei=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(t){return zt(t)&&te(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},ri=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,h(Ut(t.prototype),this,Ut(this))}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return Xt(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}(),ni=function(t){return function(e,r){function n(t,e){var r=new fr(t.treeChanges(o)),n=pe(mi(r),{$state$:e,$transition$:t});return ae.$injector.invoke(i,this,n)}var i=e[t],o="onExit"===t?"from":"to";return i?n:void 0}},ii=function(){function t(t){this._urlListeners=[],this.$locationProvider=t;var e=Ut(t);h(e,this,e,["hashPrefix"])}return t.prototype.dispose=function(){},t.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return ye(e._urlListeners)(t)}},t.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=Xt(t)?t.enabled:t)&&this.$sniffer.history},t.prototype.url=function(t,e,r){return void 0===e&&(e=!1),t&&this.$location.url(t),e&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},t.prototype._runtimeServices=function(t,e,r,n){var i=this;this.$location=e,this.$sniffer=r,t.$on("$locationChangeSuccess",function(t){return i._urlListeners.forEach(function(e){return e(t)})});var o=Ut(e),a=Ut(n);h(o,this,o,["replace","path","search","hash"]),h(o,this,o,["port","protocol","host"]),h(a,this,a,["baseHref"])},t.monkeyPatchPathParameterType=function(t){var e=t.urlMatcherFactory.type("path");e.encode=function(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t},e.decode=function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}},t}(),oi=function(){function t(t){this._router=t,this._urlRouter=t.urlRouter}return t.prototype.$get=function(){var t=this._urlRouter;return t.update(!0),t.interceptDeferred||t.listen(),t},t.prototype.rule=function(t){var e=this;if(!Kt(t))throw new Error("'rule' must be a function");var r=function(){return t(ae.$injector,e._router.locationService)},n=new Ir(r,f);return this._urlRouter.rule(n),this},t.prototype.otherwise=function(t){var e=this,r=this._urlRouter;if(Zt(t))r.otherwise(t);else{if(!Kt(t))throw new Error("'rule' must be a string or function");r.otherwise(function(){return t(ae.$injector,e._router.locationService)})}return this},t.prototype.when=function(e,r){return(te(r)||Kt(r))&&(r=t.injectableHandler(this._router,r)),this._urlRouter.when(e,r),this},t.injectableHandler=function(t,e){return function(r){return ae.$injector.invoke(e,null,{$match:r,$stateParams:t.globals.params})}},t.prototype.deferIntercept=function(t){this._urlRouter.deferIntercept(t)},t}();Qn.module("ui.router.angular1",[]);var ai=Qn.module("ui.router.init",[]),ui=Qn.module("ui.router.util",["ng","ui.router.init"]),si=Qn.module("ui.router.router",["ui.router.util"]),ci=Qn.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),fi=Qn.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),li=(Qn.module("ui.router.compat",["ui.router"]),null);gt.$inject=["$locationProvider"];var hi=function(t){return["$uiRouterProvider",function(e){var r=e.router[t];return r.$get=function(){return r},r}]};wt.$inject=["$injector","$q","$uiRouter"];var pi=function(t){return t.urlRouterProvider=new oi(t)},di=function(){return pe(li.stateProvider,{$get:function(){return li.stateService}})};_t.$inject=["$rootScope"],ai.provider("$uiRouter",gt),si.provider("$urlRouter",["$uiRouterProvider",pi]),ui.provider("$urlService",hi("urlService")),ui.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return li.urlMatcherFactory}]),ui.provider("$templateFactory",function(){return new Xn}),ci.provider("$stateRegistry",hi("stateRegistry")),ci.provider("$uiRouterGlobals",hi("globals")),ci.provider("$transitions",hi("transitionService")),ci.provider("$state",["$uiRouterProvider",di]),ci.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),fi.factory("$view",function(){return li.viewService}),fi.service("$trace",function(){return Ge}),fi.run(_t),ui.run(["$urlMatcherFactory",function(t){}]),ci.run(["$state",function(t){}]),si.run(["$urlRouter",function(t){}]),ai.run(wt);var vi,mi=function(t){return t.getTokens().filter(Zt).map(function(e){var r=t.getResolvable(e);return[e,"NOWAIT"===t.getPolicy(r).async?r.promise:r.data]}).reduce(C,{})};vi=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){function u(){var t=p();l&&l(),f&&(l=f.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(c.attr,t.href)}var s,c=Rt(i),f=a[1]||a[0],l=null,h={},p=function(){return bt(r,i,h)},d=$t(o.uiSref);h.uiState=d.state,h.uiStateOpts=o.uiSrefOpts?n.$eval(o.uiSrefOpts):{},d.paramExpr&&(n.$watch(d.paramExpr,function(t){h.uiStateParams=pe({},t),u()},!0),h.uiStateParams=pe({},n.$eval(d.paramExpr))),u(),n.$on("$destroy",t.stateRegistry.onStatesChanged(u)),n.$on("$destroy",t.transitionService.onSuccess({},u)),c.clickable&&(s=Et(i,r,e,c,p),Ct(i,n,s,h.uiStateOpts))}}}];var yi;yi=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){function u(){var t=d();h&&h(),f&&(h=f.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(c.attr,t.href)}var s,c=Rt(i),f=a[1]||a[0],h=null,p={},d=function(){return bt(r,i,p)},v=["uiState","uiStateParams","uiStateOpts"],m=v.reduce(function(t,e){return t[e]=l,t},{});v.forEach(function(t){p[t]=o[t]?n.$eval(o[t]):null,o.$observe(t,function(e){m[t](),m[t]=n.$watch(e,function(e){p[t]=e,u()},!0)})}),u(),n.$on("$destroy",t.stateRegistry.onStatesChanged(u)),n.$on("$destroy",t.transitionService.onSuccess({},u)),c.clickable&&(s=Et(i,r,e,c,d),Ct(i,n,s,p.uiStateOpts))}}}];var gi;gi=["$state","$stateParams","$interpolate","$uiRouter",function(t,e,r,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(e,i,o){function a(t){t.promise.then(s)}function u(e,r,n){var o=t.get(e,St(i)),a={state:o||{name:e},params:r,activeClass:n};return h.push(a),function(){ye(h)(a)}}function s(){var r=function(t){return t.split(/\s/).filter(f)},n=function(t){return t.map(function(t){return t.activeClass}).map(r).reduce(Ee,[])},o=n(h).concat(r(c)).reduce(Ce,[]),a=n(h.filter(function(e){return t.includes(e.state.name,e.params)})),u=!!h.filter(function(e){return t.is(e.state.name,e.params)}).length,s=u?r(c):[],l=a.concat(s).reduce(Ce,[]),p=o.filter(function(t){return!me(l,t)});e.$evalAsync(function(){l.forEach(function(t){return i.addClass(t)}),p.forEach(function(t){return i.removeClass(t)})})}var c,l,h=[];c=r(o.uiSrefActiveEq||"",!1)(e);try{l=e.$eval(o.uiSrefActive)}catch(t){}l=l||r(o.uiSrefActive||"",!1)(e),Xt(l)&&he(l,function(t,r){if(Zt(t)){var n=$t(t);u(n.state,e.$eval(n.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(Xt(l)&&h.length>0)){var r=u(t,e,l);return s(),r}},e.$on("$stateChangeSuccess",s),e.$on("$destroy",n.transitionService.onStart({},a)),n.globals.transition&&a(n.globals.transition),s()}]}}],Qn.module("ui.router.state").directive("uiSref",vi).directive("uiSrefActive",gi).directive("uiSrefActiveEq",gi).directive("uiState",yi),Pt.$inject=["$state"],kt.$inject=["$state"],Qn.module("ui.router.state").filter("isState",Pt).filter("includedByState",kt);var wi;wi=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){Qn.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){Qn.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function a(t,e){return t===e}var u={$cfg:{viewDecl:{$context:t._pluginapi._rootViewContext()}},$uiView:{}},s={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,c,f){return function(e,c,l){function h(t){(!t||t instanceof Zn)&&(a(S,t)||(Ge.traceUIViewConfigUpdated(E,t&&t.viewDecl&&t.viewDecl.$context),S=t,d(t)))}function p(){if(v&&(Ge.traceUIViewEvent("Removing (previous) el",v.data("$uiView")),v.remove(),v=null),y&&(Ge.traceUIViewEvent("Destroying scope",E),y.$destroy(),y=null),m){var t=m.data("$uiViewAnim");Ge.traceUIViewEvent("Animate out",t),$.leave(m,function(){t.$$animLeave.resolve(),v=null}),v=m,m=null}}function d(t){var n=e.$new(),o=i.defer(),a=i.defer(),u={$cfg:t,$uiView:E},s={$animEnter:o.promise,$animLeave:a.promise,$$animLeave:a};n.$emit("$viewContentLoading",R);var l=f(n,function(t){t.data("$uiViewAnim",s),t.data("$uiView",u),$.enter(t,c,function(){o.resolve(),y&&y.$emit("$viewContentAnimationEnded"),(zt(_)&&!_||e.$eval(_))&&r(t)}),p()});m=l,y=n,y.$emit("$viewContentLoaded",t||S),y.$eval(w)}var v,m,y,g,w=l.onload||"",_=l.autoscroll,$=o(l,e),S=void 0,b=c.inheritedData("$uiView")||u,R=n(l.uiView||l.name||"")(e)||"$default",E={$type:"ng1",id:s.count++,name:R,fqn:b.$uiView.fqn?b.$uiView.fqn+"."+R:R,config:null,configUpdated:h,get creationContext(){var t=At("$cfg.viewDecl.$context")(b),e=At("$uiView.creationContext")(b);return t||e}};Ge.traceUIViewEvent("Linking",E),c.data("$uiView",{$uiView:E}),d(),g=t.registerUIView(E),e.$on("$destroy",function(){Ge.traceUIViewEvent("Destroying/Unregistering",E),g()})}}};return s}],Ot.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var _i="function"==typeof Qn.module("ui.router").component,$i=0;Qn.module("ui.router.state").directive("uiView",wi),Qn.module("ui.router.state").directive("uiView",Ot),Qn.module("ui.router.state").provider("$uiViewScroll",jt);t.core=zn,t.default="ui.router",t.fromJson=ce,t.toJson=fe,t.copy=le,t.forEach=he,t.extend=pe,t.equals=de,t.identity=f,t.noop=l,t.createProxyFunctions=h,t.inherit=ve,t.inArray=me,t._inArray=p,t.removeFrom=ye,t._removeFrom=d,t.pushTo=ge,t._pushTo=v,t.deregAll=we,t.defaults=m,t.mergeR=_e,t.ancestors=y,t.pick=g,t.omit=w,t.pluck=_,t.filter=$,t.find=S,t.mapObj=$e,t.map=b,t.values=Se,t.allTrueR=be,t.anyTrueR=Re,t.unnestR=Ee,t.flattenR=Te,t.pushR=R,t.uniqR=Ce,t.unnest=Pe,t.flatten=ke,t.assertPredicate=Oe,t.assertMap=xe,t.assertFn=E,t.pairs=je,t.arrayTuples=T,t.applyPairs=C,t.tail=P,t._extend=x,t.sortBy=Ie,t.composeSort=Ve,t.silenceUncaughtInPromise=Ae,t.silentRejection=He,t.notImplemented=oe,t.services=ae,t.Glob=Lt,t.curry=r,t.compose=n,t.pipe=i,t.prop=It,t.propEq=Vt,t.parse=At,t.not=Ht,t.and=o,t.or=a,t.all=qt,t.any=Dt,t.is=Nt,t.eq=Ft,t.val=Ut,t.invoke=u,t.pattern=s,t.isUndefined=Wt,t.isDefined=zt,t.isNull=Jt,t.isNullOrUndefined=Qt,t.isFunction=Kt,t.isNumber=Yt,t.isString=Zt,t.isObject=Xt,t.isArray=te,t.isDate=ee,t.isRegExp=re,t.isState=ne,t.isInjectable=c,t.isPromise=ie,t.Queue=qe,t.maxLength=B,t.padString=G,t.kebobString=W,t.functionToString=z,t.fnToString=J,t.stringify=Q,t.beforeAfterSubstr=mr,t.splitOnDelim=K,t.joinNeighborsR=Y,t.Trace=Be,t.trace=Ge,t.Param=tr,t.ParamTypes=yr,t.StateParams=gr,t.ParamType=Ye,t.PathNode=er,t.PathUtils=rr,t.resolvePolicies=or,t.defaultResolvePolicy=nr,t.Resolvable=ir,t.NATIVE_INJECTOR_TOKEN=cr,t.ResolveContext=fr,t.resolvablesBuilder=nt,t.StateBuilder=br,t.StateObject=Mt,t.StateMatcher=Rr,t.StateQueueManager=Er,t.StateRegistry=Tr,t.StateService=Sn,t.TargetState=We,t.HookBuilder=Ke,t.matchState=H,t.RegisteredHook=Qe,t.makeEvent=q,t.Rejection=Ne,t.Transition=pr,t.TransitionHook=Je,t.TransitionEventType=yn,t.defaultTransOpts=_n,t.TransitionService=$n,t.UrlMatcher=kr,t.UrlMatcherFactory=Or,t.UrlRouter=Ar,t.UrlRuleFactory=xr,t.BaseUrlRule=Ir,t.UrlService=Br,t.ViewService=Hr,t.UIRouterGlobals=qr,t.UIRouter=Wr,t.$q=bn,t.$injector=En,t.BaseLocationServices=Vn,t.HashLocationService=Hn,t.MemoryLocationService=Dn,t.PushStateLocationService=Fn,t.MemoryLocationConfig=Un,t.BrowserLocationConfig=Ln,t.splitHash=Cn,t.splitQuery=Pn,t.splitEqual=kn,t.trimHashVal=On,t.keyValsToObjectR=xn,t.getParams=jn,t.parseUrl=ht,t.buildUrl=In,t.locationPluginFactory=pt,t.servicesPlugin=dt,t.hashLocationPlugin=Mn,t.pushStateLocationPlugin=Bn,t.memoryLocationPlugin=Gn,t.UIRouterPluginBase=Wn,t.watchDigests=_t,t.getLocals=mi,t.getNg1ViewConfigFactory=vt,t.ng1ViewsBuilder=mt,t.Ng1ViewConfig=Zn,t.StateProvider=ri,t.UrlRouterProvider=oi,Object.defineProperty(t,"__esModule",{value:!0})}); +return t.prototype.useHttpService=function(t){this._useHttp=t},t.prototype.fromConfig=function(t,e,r){var n=function(t){return ae.$q.when(t).then(function(t){return{template:t}})},i=function(t){return ae.$q.when(t).then(function(t){return{component:t}})};return zt(t.template)?n(this.fromString(t.template,e)):zt(t.templateUrl)?n(this.fromUrl(t.templateUrl,e)):zt(t.templateProvider)?n(this.fromProvider(t.templateProvider,e,r)):zt(t.component)?i(t.component):zt(t.componentProvider)?i(this.fromComponentProvider(t.componentProvider,e,r)):n("")},t.prototype.fromString=function(t,e){return Kt(t)?t(e):t},t.prototype.fromUrl=function(t,e){return Kt(t)&&(t=t(e)),null==t?null:this._useHttp?this.$http.get(t,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(t){return t.data}):this.$templateRequest(t)},t.prototype.fromProvider=function(t,e,r){var n=ae.$injector.annotate(t),i=te(t)?P(t):t;return new ir("",i,n).get(r)},t.prototype.fromComponentProvider=function(t,e,r){var n=ae.$injector.annotate(t),i=te(t)?P(t):t;return new ir("",i,n).get(r)},t.prototype.makeComponentTemplate=function(t,e,r,n){n=n||{};var i=Qn.version.minor>=3?"::":"",o=function(t){var e=W(t);return/^(x|data)-/.exec(e)?"x-"+e:e},a=function(r){var a=r.name,u=r.type,s=o(a);if(t.attr(s)&&!n[a])return s+"='"+t.attr(s)+"'";var c=n[a]||a;if("@"===u)return s+"='{{"+i+"$resolve."+c+"}}'";if("&"===u){var f=e.getResolvable(c),l=f&&f.data,h=l&&ae.$injector.annotate(l)||[];return s+"='$resolve."+c+(te(l)?"["+(l.length-1)+"]":"")+"("+h.join(",")+")'"}return s+"='"+i+"$resolve."+c+"'"},u=yt(r).map(a).join(" "),s=o(r);return"<"+s+" "+u+">"},t}(),ti=function(t){return ei(Xt(t.bindToController)?t.bindToController:t.scope)},ei=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(t){return zt(t)&&te(t[1])}).map(function(t){return{name:t[1][2]||t[0],type:t[1][1]}})},ri=function(){function t(e,r){this.stateRegistry=e,this.stateService=r,h(Ut(t.prototype),this,Ut(this))}return t.prototype.decorator=function(t,e){return this.stateRegistry.decorator(t,e)||this},t.prototype.state=function(t,e){return Xt(t)?e=t:e.name=t,this.stateRegistry.register(e),this},t.prototype.onInvalid=function(t){return this.stateService.onInvalid(t)},t}(),ni=function(t){return function(e,r){function n(t,e){var r=new fr(t.treeChanges(o)),n=pe(mi(r),{$state$:e,$transition$:t});return ae.$injector.invoke(i,this,n)}var i=e[t],o="onExit"===t?"from":"to";return i?n:void 0}},ii=function(){function t(t){this._urlListeners=[],this.$locationProvider=t;var e=Ut(t);h(e,this,e,["hashPrefix"])}return t.prototype.dispose=function(){},t.prototype.onChange=function(t){var e=this;return this._urlListeners.push(t),function(){return ye(e._urlListeners)(t)}},t.prototype.html5Mode=function(){var t=this.$locationProvider.html5Mode();return(t=Xt(t)?t.enabled:t)&&this.$sniffer.history},t.prototype.url=function(t,e,r){return void 0===e&&(e=!1),t&&this.$location.url(t),e&&this.$location.replace(),r&&this.$location.state(r),this.$location.url()},t.prototype._runtimeServices=function(t,e,r,n){var i=this;this.$location=e,this.$sniffer=r,t.$on("$locationChangeSuccess",function(t){return i._urlListeners.forEach(function(e){return e(t)})});var o=Ut(e),a=Ut(n);h(o,this,o,["replace","path","search","hash"]),h(o,this,o,["port","protocol","host"]),h(a,this,a,["baseHref"])},t.monkeyPatchPathParameterType=function(t){var e=t.urlMatcherFactory.type("path");e.encode=function(t){return null!=t?t.toString().replace(/(~|\/)/g,function(t){return{"~":"~~","/":"~2F"}[t]}):t},e.decode=function(t){return null!=t?t.toString().replace(/(~~|~2F)/g,function(t){return{"~~":"~","~2F":"/"}[t]}):t}},t}(),oi=function(){function t(t){this._router=t,this._urlRouter=t.urlRouter}return t.prototype.$get=function(){var t=this._urlRouter;return t.update(!0),t.interceptDeferred||t.listen(),t},t.prototype.rule=function(t){var e=this;if(!Kt(t))throw new Error("'rule' must be a function");var r=function(){return t(ae.$injector,e._router.locationService)},n=new Ir(r,f);return this._urlRouter.rule(n),this},t.prototype.otherwise=function(t){var e=this,r=this._urlRouter;if(Zt(t))r.otherwise(t);else{if(!Kt(t))throw new Error("'rule' must be a string or function");r.otherwise(function(){return t(ae.$injector,e._router.locationService)})}return this},t.prototype.when=function(e,r){return(te(r)||Kt(r))&&(r=t.injectableHandler(this._router,r)),this._urlRouter.when(e,r),this},t.injectableHandler=function(t,e){return function(r){return ae.$injector.invoke(e,null,{$match:r,$stateParams:t.globals.params})}},t.prototype.deferIntercept=function(t){this._urlRouter.deferIntercept(t)},t}();Qn.module("ui.router.angular1",[]);var ai=Qn.module("ui.router.init",[]),ui=Qn.module("ui.router.util",["ng","ui.router.init"]),si=Qn.module("ui.router.router",["ui.router.util"]),ci=Qn.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),fi=Qn.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),li=(Qn.module("ui.router.compat",["ui.router"]),null);gt.$inject=["$locationProvider"];var hi=function(t){return["$uiRouterProvider",function(e){var r=e.router[t];return r.$get=function(){return r},r}]};wt.$inject=["$injector","$q","$uiRouter"];var pi=function(t){return t.urlRouterProvider=new oi(t)},di=function(){return pe(li.stateProvider,{$get:function(){return li.stateService}})};_t.$inject=["$rootScope"],ai.provider("$uiRouter",gt),si.provider("$urlRouter",["$uiRouterProvider",pi]),ui.provider("$urlService",hi("urlService")),ui.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return li.urlMatcherFactory}]),ui.provider("$templateFactory",function(){return new Xn}),ci.provider("$stateRegistry",hi("stateRegistry")),ci.provider("$uiRouterGlobals",hi("globals")),ci.provider("$transitions",hi("transitionService")),ci.provider("$state",["$uiRouterProvider",di]),ci.factory("$stateParams",["$uiRouter",function(t){return t.globals.params}]),fi.factory("$view",function(){return li.viewService}),fi.service("$trace",function(){return Ge}),fi.run(_t),ui.run(["$urlMatcherFactory",function(t){}]),ci.run(["$state",function(t){}]),si.run(["$urlRouter",function(t){}]),ai.run(wt);var vi,mi=function(t){return t.getTokens().filter(Zt).map(function(e){var r=t.getResolvable(e);return[e,"NOWAIT"===t.getPolicy(r).async?r.promise:r.data]}).reduce(C,{})};vi=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){function u(){var t=p();l&&l(),f&&(l=f.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(c.attr,t.href)}var s,c=Rt(i),f=a[1]||a[0],l=null,h={},p=function(){return bt(r,i,h)},d=$t(o.uiSref);h.uiState=d.state,h.uiStateOpts=o.uiSrefOpts?n.$eval(o.uiSrefOpts):{},d.paramExpr&&(n.$watch(d.paramExpr,function(t){h.uiStateParams=pe({},t),u()},!0),h.uiStateParams=pe({},n.$eval(d.paramExpr))),u(),n.$on("$destroy",t.stateRegistry.onStatesChanged(u)),n.$on("$destroy",t.transitionService.onSuccess({},u)),c.clickable&&(s=Et(i,r,e,c,p),Ct(i,n,s,h.uiStateOpts))}}}];var yi;yi=["$uiRouter","$timeout",function(t,e){var r=t.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,i,o,a){function u(){var t=d();h&&h(),f&&(h=f.$$addStateInfo(t.uiState,t.uiStateParams)),null!=t.href&&o.$set(c.attr,t.href)}var s,c=Rt(i),f=a[1]||a[0],h=null,p={},d=function(){return bt(r,i,p)},v=["uiState","uiStateParams","uiStateOpts"],m=v.reduce(function(t,e){return t[e]=l,t},{});v.forEach(function(t){p[t]=o[t]?n.$eval(o[t]):null,o.$observe(t,function(e){m[t](),m[t]=n.$watch(e,function(e){p[t]=e,u()},!0)})}),u(),n.$on("$destroy",t.stateRegistry.onStatesChanged(u)),n.$on("$destroy",t.transitionService.onSuccess({},u)),c.clickable&&(s=Et(i,r,e,c,d),Ct(i,n,s,p.uiStateOpts))}}}];var gi;gi=["$state","$stateParams","$interpolate","$uiRouter",function(t,e,r,n){return{restrict:"A",controller:["$scope","$element","$attrs",function(e,i,o){function a(t){t.promise.then(s)}function u(e,r,n){var o=t.get(e,St(i)),a={state:o||{name:e},params:r,activeClass:n};return h.push(a),function(){ye(h)(a)}}function s(){var r=function(t){return t.split(/\s/).filter(f)},n=function(t){return t.map(function(t){return t.activeClass}).map(r).reduce(Ee,[])},o=n(h).concat(r(c)).reduce(Ce,[]),a=n(h.filter(function(e){return t.includes(e.state.name,e.params)})),u=!!h.filter(function(e){return t.is(e.state.name,e.params)}).length,s=u?r(c):[],l=a.concat(s).reduce(Ce,[]),p=o.filter(function(t){return!me(l,t)});e.$evalAsync(function(){l.forEach(function(t){return i.addClass(t)}),p.forEach(function(t){return i.removeClass(t)})})}var c,l,h=[];c=r(o.uiSrefActiveEq||"",!1)(e);try{l=e.$eval(o.uiSrefActive)}catch(t){}l=l||r(o.uiSrefActive||"",!1)(e),Xt(l)&&he(l,function(t,r){if(Zt(t)){var n=$t(t);u(n.state,e.$eval(n.paramExpr),r)}}),this.$$addStateInfo=function(t,e){if(!(Xt(l)&&h.length>0)){var r=u(t,e,l);return s(),r}},e.$on("$stateChangeSuccess",s),e.$on("$destroy",n.transitionService.onStart({},a)),n.globals.transition&&a(n.globals.transition),s()}]}}],Qn.module("ui.router.state").directive("uiSref",vi).directive("uiSrefActive",gi).directive("uiSrefActiveEq",gi).directive("uiState",yi),Pt.$inject=["$state"],kt.$inject=["$state"],Qn.module("ui.router.state").filter("isState",Pt).filter("includedByState",kt);var wi;wi=["$view","$animate","$uiViewScroll","$interpolate","$q",function(t,e,r,n,i){function o(t,r){return{enter:function(t,r,n){Qn.version.minor>2?e.enter(t,null,r).then(n):e.enter(t,null,r,n)},leave:function(t,r){Qn.version.minor>2?e.leave(t).then(r):e.leave(t,r)}}}function a(t,e){return t===e}var u={$cfg:{viewDecl:{$context:t._pluginapi._rootViewContext()}},$uiView:{}},s={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,c,f){return function(e,c,l){function h(t){(!t||t instanceof Zn)&&(a(S,t)||(Ge.traceUIViewConfigUpdated(E,t&&t.viewDecl&&t.viewDecl.$context),S=t,d(t)))}function p(){if(v&&(Ge.traceUIViewEvent("Removing (previous) el",v.data("$uiView")),v.remove(),v=null),y&&(Ge.traceUIViewEvent("Destroying scope",E),y.$destroy(),y=null),m){var t=m.data("$uiViewAnim");Ge.traceUIViewEvent("Animate out",t),$.leave(m,function(){t.$$animLeave.resolve(),v=null}),v=m,m=null}}function d(t){var n=e.$new(),o=i.defer(),a=i.defer(),u={$cfg:t,$uiView:E},s={$animEnter:o.promise,$animLeave:a.promise,$$animLeave:a};n.$emit("$viewContentLoading",R);var l=f(n,function(t){t.data("$uiViewAnim",s),t.data("$uiView",u),$.enter(t,c,function(){o.resolve(),y&&y.$emit("$viewContentAnimationEnded"),(zt(_)&&!_||e.$eval(_))&&r(t)}),p()});m=l,y=n,y.$emit("$viewContentLoaded",t||S),y.$eval(w)}var v,m,y,g,w=l.onload||"",_=l.autoscroll,$=o(l,e),S=void 0,b=c.inheritedData("$uiView")||u,R=n(l.uiView||l.name||"")(e)||"$default",E={$type:"ng1",id:s.count++,name:R,fqn:b.$uiView.fqn?b.$uiView.fqn+"."+R:R,config:null,configUpdated:h,get creationContext(){var t=At("$cfg.viewDecl.$context")(b),e=At("$uiView.creationContext")(b);return t||e}};Ge.traceUIViewEvent("Linking",E),c.data("$uiView",{$uiView:E}),d(),g=t.registerUIView(E),e.$on("$destroy",function(){Ge.traceUIViewEvent("Destroying/Unregistering",E),g()})}}};return s}],Ot.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var _i="function"==typeof Qn.module("ui.router").component,$i=0;Qn.module("ui.router.state").directive("uiView",wi),Qn.module("ui.router.state").directive("uiView",Ot),Qn.module("ui.router.state").provider("$uiViewScroll",jt);t.core=zn,t.default="ui.router",t.fromJson=ce,t.toJson=fe,t.copy=le,t.forEach=he,t.extend=pe,t.equals=de,t.identity=f,t.noop=l,t.createProxyFunctions=h,t.inherit=ve,t.inArray=me,t._inArray=p,t.removeFrom=ye,t._removeFrom=d,t.pushTo=ge,t._pushTo=v,t.deregAll=we,t.defaults=m,t.mergeR=_e,t.ancestors=y,t.pick=g,t.omit=w,t.pluck=_,t.filter=$,t.find=S,t.mapObj=$e,t.map=b,t.values=Se,t.allTrueR=be,t.anyTrueR=Re,t.unnestR=Ee,t.flattenR=Te,t.pushR=R,t.uniqR=Ce,t.unnest=Pe,t.flatten=ke,t.assertPredicate=Oe,t.assertMap=xe,t.assertFn=E,t.pairs=je,t.arrayTuples=T,t.applyPairs=C,t.tail=P,t._extend=x,t.sortBy=Ie,t.composeSort=Ve,t.silenceUncaughtInPromise=Ae,t.silentRejection=He,t.notImplemented=oe,t.services=ae,t.Glob=Lt,t.curry=r,t.compose=n,t.pipe=i,t.prop=It,t.propEq=Vt,t.parse=At,t.not=Ht,t.and=o,t.or=a,t.all=qt,t.any=Dt,t.is=Nt,t.eq=Ft,t.val=Ut,t.invoke=u,t.pattern=s,t.isUndefined=Wt,t.isDefined=zt,t.isNull=Jt,t.isNullOrUndefined=Qt,t.isFunction=Kt,t.isNumber=Yt,t.isString=Zt,t.isObject=Xt,t.isArray=te,t.isDate=ee,t.isRegExp=re,t.isState=ne,t.isInjectable=c,t.isPromise=ie,t.Queue=qe,t.maxLength=B,t.padString=G,t.kebobString=W,t.functionToString=z,t.fnToString=J,t.stringify=Q,t.beforeAfterSubstr=mr,t.splitOnDelim=K,t.joinNeighborsR=Y,t.Trace=Be,t.trace=Ge,t.Param=tr,t.ParamTypes=yr,t.StateParams=gr,t.ParamType=Ye,t.PathNode=er,t.PathUtils=rr,t.resolvePolicies=or,t.defaultResolvePolicy=nr,t.Resolvable=ir,t.NATIVE_INJECTOR_TOKEN=cr,t.ResolveContext=fr,t.resolvablesBuilder=nt,t.StateBuilder=br,t.StateObject=Mt,t.StateMatcher=Rr,t.StateQueueManager=Er,t.StateRegistry=Tr,t.StateService=Sn,t.TargetState=We,t.HookBuilder=Ke,t.matchState=H,t.RegisteredHook=Qe,t.makeEvent=q,t.Rejection=Ne,t.Transition=pr,t.TransitionHook=Je,t.TransitionEventType=yn,t.defaultTransOpts=_n,t.TransitionService=$n,t.UrlMatcher=kr,t.UrlMatcherFactory=Or,t.UrlRouter=Ar,t.UrlRuleFactory=xr,t.BaseUrlRule=Ir,t.UrlService=Br,t.ViewService=Hr,t.UIRouterGlobals=qr,t.UIRouter=Wr,t.$q=bn,t.$injector=En,t.BaseLocationServices=Vn,t.HashLocationService=Hn,t.MemoryLocationService=Dn,t.PushStateLocationService=Fn,t.MemoryLocationConfig=Un,t.BrowserLocationConfig=Ln,t.splitHash=Cn,t.splitQuery=Pn,t.splitEqual=kn,t.trimHashVal=On,t.keyValsToObjectR=xn,t.getParams=jn,t.parseUrl=ht,t.buildUrl=In,t.locationPluginFactory=pt,t.servicesPlugin=dt,t.hashLocationPlugin=Mn,t.pushStateLocationPlugin=Bn,t.memoryLocationPlugin=Gn,t.UIRouterPluginBase=Wn,t.watchDigests=_t,t.getLocals=mi,t.getNg1ViewConfigFactory=vt,t.ng1ViewsBuilder=mt,t.Ng1ViewConfig=Zn,t.StateProvider=ri,t.UrlRouterProvider=oi,Object.defineProperty(t,"__esModule",{value:!0})}); //# sourceMappingURL=angular-ui-router.min.js.map