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AAC;IACrD,CAAC;IAED;;;;;;;;;;;OAWG;IACH,+BAAQ,GAAR,UAAS,WAAwB,EAAE,UAAuB;QACxD,IAAM,KAAK,GAAqB,IAAI,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;QACtD,IAAI,CAAC,KAAK,IAAI,CAAC,KAAK,CAAC,QAAQ;YAAE,MAAM,IAAI,KAAK,CAAC,oBAAoB,GAAG,WAAW,CAAC,CAAC;QAEnF,IAAM,WAAW,GAAG,IAAI,CAAC,cAAc,EAAE,CAAC;QAC1C,IAAM,MAAM,GAAG,qBAAS,CAAC,eAAe,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,WAAW,CAAC,CAAC;QACjF,UAAU,GAAG,UAAU,IAAI,IAAI,CAAC,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAErF,OAAO,wBAAa,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC;IACH,mBAAC;AAAD,CAAC,AA9jBD,IA8jBC;AA9jBY,oCAAY",
10 "sourcesContent": [
11 "import {\n createProxyFunctions,\n defaults,\n extend,\n inArray,\n noop,\n removeFrom,\n silenceUncaughtInPromise,\n silentRejection,\n} from '../common/common';\nimport { isDefined, isObject, isString } from '../common/predicates';\nimport { Queue } from '../common/queue';\nimport { services } from '../common/coreservices';\n\nimport { PathUtils } from '../path/pathUtils';\nimport { PathNode } from '../path/pathNode';\n\nimport { HookResult, TransitionOptions } from '../transition/interface';\nimport { defaultTransOpts } from '../transition/transitionService';\nimport { Rejection, RejectType } from '../transition/rejectFactory';\nimport { Transition } from '../transition/transition';\n\nimport { HrefOptions, LazyLoadResult, StateDeclaration, StateOrName, TransitionPromise } from './interface';\nimport { StateObject } from './stateObject';\nimport { TargetState } from './targetState';\n\nimport { RawParams } from '../params/interface';\nimport { Param } from '../params/param';\nimport { Glob } from '../common/glob';\nimport { UIRouter } from '../router';\nimport { UIInjector } from '../interface';\nimport { ResolveContext } from '../resolve/resolveContext';\nimport { lazyLoadState } from '../hooks/lazyLoad';\nimport { not, val } from '../common/hof';\nimport { StateParams } from '../params/stateParams';\n\nexport type OnInvalidCallback = (toState?: TargetState, fromState?: TargetState, injector?: UIInjector) => HookResult;\n\n/**\n * Provides services related to ui-router states.\n *\n * This API is located at `router.stateService` ([[UIRouter.stateService]])\n */\nexport class StateService {\n /** @internal */\n invalidCallbacks: OnInvalidCallback[] = [];\n\n /**\n * The [[Transition]] currently in progress (or null)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.transition]]\n */\n get transition() {\n return this.router.globals.transition;\n }\n /**\n * The latest successful state parameters\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.params]]\n */\n get params(): StateParams {\n return this.router.globals.params;\n }\n /**\n * The current [[StateDeclaration]]\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.current]]\n */\n get current() {\n return this.router.globals.current;\n }\n /**\n * The current [[StateObject]] (an internal API)\n *\n * @deprecated This is a passthrough through to [[UIRouterGlobals.$current]]\n */\n get $current() {\n return this.router.globals.$current;\n }\n\n /** @internal */\n constructor(/** @internal */ private router: UIRouter) {\n const getters = ['current', '$current', 'params', 'transition'];\n const boundFns = Object.keys(StateService.prototype).filter(not(inArray(getters)));\n createProxyFunctions(val(StateService.prototype), this, val(this), boundFns);\n }\n\n /** @internal */\n dispose() {\n this.defaultErrorHandler(noop);\n this.invalidCallbacks = [];\n }\n\n /**\n * Handler for when [[transitionTo]] is called with an invalid state.\n *\n * Invokes the [[onInvalid]] callbacks, in natural order.\n * Each callback's return value is checked in sequence until one of them returns an instance of TargetState.\n * The results of the callbacks are wrapped in $q.when(), so the callbacks may return promises.\n *\n * If a callback returns an TargetState, then it is used as arguments to $state.transitionTo() and the result returned.\n *\n * @internal\n */\n private _handleInvalidTargetState(fromPath: PathNode[], toState: TargetState) {\n const fromState = PathUtils.makeTargetState(this.router.stateRegistry, fromPath);\n const globals = this.router.globals;\n const latestThing = () => globals.transitionHistory.peekTail();\n const latest = latestThing();\n const callbackQueue = new Queue<OnInvalidCallback>(this.invalidCallbacks.slice());\n const injector = new ResolveContext(fromPath).injector();\n\n const checkForRedirect = (result: HookResult) => {\n if (!(result instanceof TargetState)) {\n return;\n }\n\n let target = <TargetState>result;\n // Recreate the TargetState, in case the state is now defined.\n target = this.target(target.identifier(), target.params(), target.options());\n\n if (!target.valid()) {\n return Rejection.invalid(target.error()).toPromise();\n }\n\n if (latestThing() !== latest) {\n return Rejection.superseded().toPromise();\n }\n\n return this.transitionTo(target.identifier(), target.params(), target.options());\n };\n\n function invokeNextCallback() {\n const nextCallback = callbackQueue.dequeue();\n if (nextCallback === undefined) return Rejection.invalid(toState.error()).toPromise();\n\n const callbackResult = services.$q.when(nextCallback(toState, fromState, injector));\n return callbackResult.then(checkForRedirect).then((result) => result || invokeNextCallback());\n }\n\n return invokeNextCallback();\n }\n\n /**\n * Registers an Invalid State handler\n *\n * Registers a [[OnInvalidCallback]] function to be invoked when [[StateService.transitionTo]]\n * has been called with an invalid state reference parameter\n *\n * Example:\n * ```js\n * stateService.onInvalid(function(to, from, injector) {\n * if (to.name() === 'foo') {\n * let lazyLoader = injector.get('LazyLoadService');\n * return lazyLoader.load('foo')\n * .then(() => stateService.target('foo'));\n * }\n * });\n * ```\n *\n * @param {function} callback invoked when the toState is invalid\n * This function receives the (invalid) toState, the fromState, and an injector.\n * The function may optionally return a [[TargetState]] or a Promise for a TargetState.\n * If one is returned, it is treated as a redirect.\n *\n * @returns a function which deregisters the callback\n */\n onInvalid(callback: OnInvalidCallback): Function {\n this.invalidCallbacks.push(callback);\n return function deregisterListener() {\n removeFrom(this.invalidCallbacks)(callback);\n }.bind(this);\n }\n\n /**\n * Reloads the current state\n *\n * A method that force reloads the current state, or a partial state hierarchy.\n * All resolves are re-resolved, and components reinstantiated.\n *\n * #### Example:\n * ```js\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * $state.reload();\n * }\n * });\n * ```\n *\n * Note: `reload()` is just an alias for:\n *\n * ```js\n * $state.transitionTo($state.current, $state.params, {\n * reload: true, inherit: false\n * });\n * ```\n *\n * @param reloadState A state name or a state object.\n * If present, this state and all its children will be reloaded, but ancestors will not reload.\n *\n * #### Example:\n * ```js\n * //assuming app application consists of 3 states: 'contacts', 'contacts.detail', 'contacts.detail.item'\n * //and current state is 'contacts.detail.item'\n * let app angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.reload = function(){\n * //will reload 'contact.detail' and nested 'contact.detail.item' states\n * $state.reload('contact.detail');\n * }\n * });\n * ```\n *\n * @returns A promise representing the state of the new transition. See [[StateService.go]]\n */\n reload(reloadState?: StateOrName): Promise<StateObject> {\n return this.transitionTo(this.current, this.params, {\n reload: isDefined(reloadState) ? reloadState : true,\n inherit: false,\n notify: false,\n });\n }\n\n /**\n * Transition to a different state and/or parameters\n *\n * Convenience method for transitioning to a new state.\n *\n * `$state.go` calls `$state.transitionTo` internally but automatically sets options to\n * `{ location: true, inherit: true, relative: router.globals.$current, notify: true }`.\n * This allows you to use either an absolute or relative `to` argument (because of `relative: router.globals.$current`).\n * It also allows you to specify * only the parameters you'd like to update, while letting unspecified parameters\n * inherit from the current parameter values (because of `inherit: true`).\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.go('contact.detail');\n * };\n * });\n * ```\n *\n * @param to Absolute state name, state object, or relative state path (relative to current state).\n *\n * Some examples:\n *\n * - `$state.go('contact.detail')` - will go to the `contact.detail` state\n * - `$state.go('^')` - will go to the parent state\n * - `$state.go('^.sibling')` - if current state is `home.child`, will go to the `home.sibling` state\n * - `$state.go('.child.grandchild')` - if current state is home, will go to the `home.child.grandchild` state\n *\n * @param params A map of the parameters that will be sent to the state, will populate $stateParams.\n *\n * Any parameters that are not specified will be inherited from current parameter values (because of `inherit: true`).\n * This allows, for example, going to a sibling state that shares parameters defined by a parent state.\n *\n * @param options Transition options\n *\n * @returns {promise} A promise representing the state of the new transition.\n */\n go(to: StateOrName, params?: RawParams, options?: TransitionOptions): TransitionPromise {\n const defautGoOpts = { relative: this.$current, inherit: true };\n const transOpts = defaults(options, defautGoOpts, defaultTransOpts);\n return this.transitionTo(to, params, transOpts);\n }\n\n /**\n * Creates a [[TargetState]]\n *\n * This is a factory method for creating a TargetState\n *\n * This may be returned from a Transition Hook to redirect a transition, for example.\n */\n target(identifier: StateOrName, params?: RawParams, options: TransitionOptions = {}): TargetState {\n // If we're reloading, find the state object to reload from\n if (isObject(options.reload) && !(<any>options.reload).name) throw new Error('Invalid reload state object');\n const reg = this.router.stateRegistry;\n options.reloadState =\n options.reload === true ? reg.root() : reg.matcher.find(<any>options.reload, options.relative);\n\n if (options.reload && !options.reloadState)\n throw new Error(\n `No such reload state '${isString(options.reload) ? options.reload : (<any>options.reload).name}'`\n );\n\n return new TargetState(this.router.stateRegistry, identifier, params, options);\n }\n\n /** @internal */\n private getCurrentPath(): PathNode[] {\n const globals = this.router.globals;\n const latestSuccess: Transition = globals.successfulTransitions.peekTail();\n const rootPath = () => [new PathNode(this.router.stateRegistry.root())];\n return latestSuccess ? latestSuccess.treeChanges().to : rootPath();\n }\n\n /**\n * Low-level method for transitioning to a new state.\n *\n * The [[go]] method (which uses `transitionTo` internally) is recommended in most situations.\n *\n * #### Example:\n * ```js\n * let app = angular.module('app', ['ui.router']);\n *\n * app.controller('ctrl', function ($scope, $state) {\n * $scope.changeState = function () {\n * $state.transitionTo('contact.detail');\n * };\n * });\n * ```\n *\n * @param to State name or state object.\n * @param toParams A map of the parameters that will be sent to the state,\n * will populate $stateParams.\n * @param options Transition options\n *\n * @returns A promise representing the state of the new transition. See [[go]]\n */\n transitionTo(to: StateOrName, toParams: RawParams = {}, options: TransitionOptions = {}): TransitionPromise {\n const router = this.router;\n const globals = router.globals;\n options = defaults(options, defaultTransOpts);\n const getCurrent = () => globals.transition;\n options = extend(options, { current: getCurrent });\n\n const ref: TargetState = this.target(to, toParams, options);\n const currentPath = this.getCurrentPath();\n\n if (!ref.exists()) return this._handleInvalidTargetState(currentPath, ref);\n\n if (!ref.valid()) return <TransitionPromise>silentRejection(ref.error());\n\n if (options.supercede === false && getCurrent()) {\n return <TransitionPromise>(\n Rejection.ignored(\n 'Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.'\n ).toPromise()\n );\n }\n\n /**\n * Special handling for Ignored, Aborted, and Redirected transitions\n *\n * The semantics for the transition.run() promise and the StateService.transitionTo()\n * promise differ. For instance, the run() promise may be rejected because it was\n * IGNORED, but the transitionTo() promise is resolved because from the user perspective\n * no error occurred. Likewise, the transition.run() promise may be rejected because of\n * a Redirect, but the transitionTo() promise is chained to the new Transition's promise.\n */\n const rejectedTransitionHandler = (trans: Transition) => (error: any): Promise<any> => {\n if (error instanceof Rejection) {\n const isLatest = router.globals.lastStartedTransitionId <= trans.$id;\n\n if (error.type === RejectType.IGNORED) {\n isLatest && router.urlRouter.update();\n // Consider ignored `Transition.run()` as a successful `transitionTo`\n return services.$q.when(globals.current);\n }\n\n const detail: any = error.detail;\n if (error.type === RejectType.SUPERSEDED && error.redirected && detail instanceof TargetState) {\n // If `Transition.run()` was redirected, allow the `transitionTo()` promise to resolve successfully\n // by returning the promise for the new (redirect) `Transition.run()`.\n const redirect: Transition = trans.redirect(detail);\n return redirect.run().catch(rejectedTransitionHandler(redirect));\n }\n\n if (error.type === RejectType.ABORTED) {\n isLatest && router.urlRouter.update();\n return services.$q.reject(error);\n }\n }\n\n const errorHandler = this.defaultErrorHandler();\n errorHandler(error);\n\n return services.$q.reject(error);\n };\n\n const transition = this.router.transitionService.create(currentPath, ref);\n const transitionToPromise = transition.run().catch(rejectedTransitionHandler(transition));\n silenceUncaughtInPromise(transitionToPromise); // issue #2676\n\n // Return a promise for the transition, which also has the transition object on it.\n return extend(transitionToPromise, { transition });\n }\n\n /**\n * Checks if the current state *is* the provided state\n *\n * Similar to [[includes]] but only checks for the full state name.\n * If params is supplied then it will be tested for strict equality against the current\n * active params object, so all params must match with none missing and no extras.\n *\n * #### Example:\n * ```js\n * $state.$current.name = 'contacts.details.item';\n *\n * // absolute name\n * $state.is('contact.details.item'); // returns true\n * $state.is(contactDetailItemStateObject); // returns true\n * ```\n *\n * // relative name (. and ^), typically from a template\n * // E.g. from the 'contacts.details' template\n * ```html\n * <div ng-class=\"{highlighted: $state.is('.item')}\">Item</div>\n * ```\n *\n * @param stateOrName The state name (absolute or relative) or state object you'd like to check.\n * @param params A param object, e.g. `{sectionId: section.id}`, that you'd like\n * to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns Returns true if it is the state.\n */\n is(stateOrName: StateOrName, params?: RawParams, options?: { relative?: StateOrName }): boolean {\n options = defaults(options, { relative: this.$current });\n const state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n if (!isDefined(state)) return undefined;\n if (this.$current !== state) return false;\n if (!params) return true;\n\n const schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n }\n\n /**\n * Checks if the current state *includes* the provided state\n *\n * A method to determine if the current active state is equal to or is the child of the\n * state stateName. If any params are passed then they will be tested for a match as well.\n * Not all the parameters need to be passed, just the ones you'd like to test for equality.\n *\n * #### Example when `$state.$current.name === 'contacts.details.item'`\n * ```js\n * // Using partial names\n * $state.includes(\"contacts\"); // returns true\n * $state.includes(\"contacts.details\"); // returns true\n * $state.includes(\"contacts.details.item\"); // returns true\n * $state.includes(\"contacts.list\"); // returns false\n * $state.includes(\"about\"); // returns false\n * ```\n *\n * #### Glob Examples when `* $state.$current.name === 'contacts.details.item.url'`:\n * ```js\n * $state.includes(\"*.details.*.*\"); // returns true\n * $state.includes(\"*.details.**\"); // returns true\n * $state.includes(\"**.item.**\"); // returns true\n * $state.includes(\"*.details.item.url\"); // returns true\n * $state.includes(\"*.details.*.url\"); // returns true\n * $state.includes(\"*.details.*\"); // returns false\n * $state.includes(\"item.**\"); // returns false\n * ```\n *\n * @param stateOrName A partial name, relative name, glob pattern,\n * or state object to be searched for within the current state name.\n * @param params A param object, e.g. `{sectionId: section.id}`,\n * that you'd like to test against the current active state.\n * @param options An options object. The options are:\n * - `relative`: If `stateOrName` is a relative state name and `options.relative` is set, .is will\n * test relative to `options.relative` state (or name).\n *\n * @returns {boolean} Returns true if it does include the state\n */\n includes(stateOrName: StateOrName, params?: RawParams, options?: TransitionOptions): boolean {\n options = defaults(options, { relative: this.$current });\n const glob = isString(stateOrName) && Glob.fromString(<string>stateOrName);\n\n if (glob) {\n if (!glob.matches(this.$current.name)) return false;\n stateOrName = this.$current.name;\n }\n const state = this.router.stateRegistry.matcher.find(stateOrName, options.relative),\n include = this.$current.includes;\n\n if (!isDefined(state)) return undefined;\n if (!isDefined(include[state.name])) return false;\n if (!params) return true;\n\n const schema: Param[] = state.parameters({ inherit: true, matchingKeys: params });\n return Param.equals(schema, Param.values(schema, params), this.params);\n }\n\n /**\n * Generates a URL for a state and parameters\n *\n * Returns the url for the given state populated with the given params.\n *\n * #### Example:\n * ```js\n * expect($state.href(\"about.person\", { person: \"bob\" })).toEqual(\"/about/bob\");\n * ```\n *\n * @param stateOrName The state name or state object you'd like to generate a url from.\n * @param params An object of parameter values to fill the state's required parameters.\n * @param options Options object. The options are:\n *\n * @returns {string} compiled state url\n */\n href(stateOrName: StateOrName, params?: RawParams, options?: HrefOptions): string {\n const defaultHrefOpts = {\n lossy: true,\n inherit: true,\n absolute: false,\n relative: this.$current,\n };\n options = defaults(options, defaultHrefOpts);\n params = params || {};\n\n const state = this.router.stateRegistry.matcher.find(stateOrName, options.relative);\n\n if (!isDefined(state)) return null;\n if (options.inherit) params = <any>this.params.$inherit(params, this.$current, state);\n\n const nav = state && options.lossy ? state.navigable : state;\n\n if (!nav || nav.url === undefined || nav.url === null) {\n return null;\n }\n\n return this.router.urlRouter.href(nav.url, params, { absolute: options.absolute });\n }\n\n /** @internal */\n private _defaultErrorHandler: (_error: any) => void = function $defaultErrorHandler($error$) {\n if ($error$ instanceof Error && $error$.stack) {\n console.error($error$);\n console.error($error$.stack);\n } else if ($error$ instanceof Rejection) {\n console.error($error$.toString());\n if ($error$.detail && $error$.detail.stack) console.error($error$.detail.stack);\n } else {\n console.error($error$);\n }\n };\n\n /**\n * Sets or gets the default [[transitionTo]] error handler.\n *\n * The error handler is called when a [[Transition]] is rejected or when any error occurred during the Transition.\n * This includes errors caused by resolves and transition hooks.\n *\n * Note:\n * This handler does not receive certain Transition rejections.\n * Redirected and Ignored Transitions are not considered to be errors by [[StateService.transitionTo]].\n *\n * The built-in default error handler logs the error to the console.\n *\n * You can provide your own custom handler.\n *\n * #### Example:\n * ```js\n * stateService.defaultErrorHandler(function() {\n * // Do not log transitionTo errors\n * });\n * ```\n *\n * @param handler a global error handler function\n * @returns the current global error handler\n */\n defaultErrorHandler(handler?: (error: any) => void): (error: any) => void {\n return (this._defaultErrorHandler = handler || this._defaultErrorHandler);\n }\n\n /**\n * Gets a registered [[StateDeclaration]] object\n *\n * Returns the state declaration object for any specific state, or for all registered states.\n *\n * @param stateOrName (absolute or relative) If provided, will only get the declaration object for the requested state.\n * If not provided, returns an array of ALL states.\n * @param base When `stateOrName` is a relative state reference (such as `.bar.baz`), the state will be retrieved relative to this state.\n *\n * @returns a [[StateDeclaration]] object (or array of all registered [[StateDeclaration]] objects.)\n * @deprecated use [[StateRegistry.get]]\n */\n get(stateOrName: StateOrName, base: StateOrName): StateDeclaration;\n get(stateOrName: StateOrName): StateDeclaration;\n get(): StateDeclaration[];\n get(stateOrName?: StateOrName, base?: StateOrName): any {\n const reg = this.router.stateRegistry;\n if (arguments.length === 0) return reg.get();\n return reg.get(stateOrName, base || this.$current);\n }\n\n /**\n * Lazy loads a state\n *\n * Explicitly runs a state's [[StateDeclaration.lazyLoad]] function.\n *\n * @param stateOrName the state that should be lazy loaded\n * @param transition the optional Transition context to use (if the lazyLoad function requires an injector, etc)\n * Note: If no transition is provided, a noop transition is created using the from the current state to the current state.\n * This noop transition is not actually run.\n *\n * @returns a promise to lazy load\n */\n lazyLoad(stateOrName: StateOrName, transition?: Transition): Promise<LazyLoadResult> {\n const state: StateDeclaration = this.get(stateOrName);\n if (!state || !state.lazyLoad) throw new Error('Can not lazy load ' + stateOrName);\n\n const currentPath = this.getCurrentPath();\n const target = PathUtils.makeTargetState(this.router.stateRegistry, currentPath);\n transition = transition || this.router.transitionService.create(currentPath, target);\n\n return lazyLoadState(transition, state);\n }\n}\n"
12 ]
13}
\No newline at end of file